Altitude in the comment before range

According to APRS spec http://www.aprs.org/doc/APRS101.PDF altitude (/A=) should be placed in the comment section of the packet so it should be after range (RNG) descriptor.
This commit is contained in:
sp5lg 2019-09-27 09:14:43 +02:00 committed by GitHub
parent ed99456d14
commit 0bdf963d84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -406,12 +406,12 @@ void CAPRSWriter::sendIdFramesFixed()
lon.Replace(wxT(","), wxT("."));
wxString output;
output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%ca/A=%06.0lfRNG%04.0lf %s %s"),
output.Printf(wxT("%s-S>APDG01,TCPIP*,qAC,%s-GS:;%-7s%-2s*%02d%02d%02dz%s%cD%s%caRNG%04.0lf/A=%06.0lf %s %s"),
m_gateway.c_str(), m_gateway.c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(),
tm->tm_mday, tm->tm_hour, tm->tm_min,
lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'),
lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'),
entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str());
entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str());
char ascii[300U];
::memset(ascii, 0x00, 300U);
@ -421,11 +421,11 @@ void CAPRSWriter::sendIdFramesFixed()
m_thread->write(ascii);
if (entry->getBand().Len() == 1U) {
output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&/A=%06.0lfRNG%04.0lf %s %s"),
output.Printf(wxT("%s-%s>APDG02,TCPIP*,qAC,%s-%sS:!%s%cD%s%c&RNG%04.0lf/A=%06.0lf %s %s"),
entry->getCallsign().c_str(), entry->getBand().c_str(), entry->getCallsign().c_str(), entry->getBand().c_str(),
lat.c_str(), (entry->getLatitude() < 0.0F) ? wxT('S') : wxT('N'),
lon.c_str(), (entry->getLongitude() < 0.0F) ? wxT('W') : wxT('E'),
entry->getAGL() * 3.28, entry->getRange() * 0.6214, band.c_str(), desc.c_str());
entry->getRange() * 0.6214, entry->getAGL() * 3.28, band.c_str(), desc.c_str());
::memset(ascii, 0x00, 300U);
for (unsigned int i = 0U; i < output.Len(); i++)