From a99083c25c2f3b4225881e0dffb32944d9002524 Mon Sep 17 00:00:00 2001 From: Chipster Date: Mon, 13 Feb 2023 09:32:01 -0600 Subject: [PATCH] For NXDNGw, add missing symbol func. in offset/no-offset cconditions --- NXDNGateway/APRSWriter.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/NXDNGateway/APRSWriter.cpp b/NXDNGateway/APRSWriter.cpp index 695fa6b..42d8779 100644 --- a/NXDNGateway/APRSWriter.cpp +++ b/NXDNGateway/APRSWriter.cpp @@ -308,17 +308,21 @@ void CAPRSWriter::sendIdFrameMobile() ::sprintf(lon, "%08.2lf", longitude); std::string server = m_callsign; + std::string symbol = m_symbol; size_t pos = server.find_first_of('-'); if (pos == std::string::npos) server.append("-S"); else server.append("S"); + if (symbol.empty()) + symbol.append("D&"); + char output[500U]; - ::sprintf(output, "%s>APDG03,TCPIP*,qAC,%s:!%s%cD%s%c&", + ::sprintf(output, "%s>APDG03,TCPIP*,qAC,%s:!%s%c%c%s%c%c", m_callsign.c_str(), server.c_str(), - lat, (rawLatitude < 0.0F) ? 'S' : 'N', - lon, (rawLongitude < 0.0F) ? 'W' : 'E'); + lat, (rawLatitude < 0.0F) ? 'S' : 'N', symbol[0], + lon, (rawLongitude < 0.0F) ? 'W' : 'E',symbol[0]); if (bearingSet && velocitySet) ::sprintf(output + ::strlen(output), "%03.0f/%03.0f", rawBearing, rawVelocity * 0.539957F);