From 157df8b0523531db695d88c9a6cb59fa9f0f2a88 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Sun, 17 Dec 2023 23:10:49 -0300 Subject: [PATCH] adding Wide1-1 to Mic-E --- lib/APRSPacketLib/APRSPacketLib.cpp | 9 +++++++-- lib/APRSPacketLib/APRSPacketLib.h | 2 +- src/station_utils.cpp | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/APRSPacketLib/APRSPacketLib.cpp b/lib/APRSPacketLib/APRSPacketLib.cpp index 2621181..3da569a 100644 --- a/lib/APRSPacketLib/APRSPacketLib.cpp +++ b/lib/APRSPacketLib/APRSPacketLib.cpp @@ -191,7 +191,7 @@ namespace APRSPacketLib { return miceLongitudeStruct; } - String generateMiceGPSBeacon(String miceMsgType, String callsign, String symbol, String overlay, float latitude, float longitude, float course, float speed, int altitude) { + String generateMiceGPSBeacon(String miceMsgType, String callsign, String symbol, String overlay, String path, float latitude, float longitude, float course, float speed, int altitude) { gpsLatitudeStruct latitudeStruct = gpsDecimalToDegreesMiceLatitude(latitude); gpsLongitudeStruct longitudeStruct = gpsDecimalToDegreesMiceLongitude(longitude); @@ -215,7 +215,12 @@ namespace APRSPacketLib { miceInfoFieldArray[13] = 0x00; // por repetidor? String miceInformationField = (char*)miceInfoFieldArray; - return callsign + ">" + miceDestination + ":" + miceInformationField; + String miceAPRSPacket = callsign + ">" + miceDestination; + if (path != "") { + miceAPRSPacket += "," + path; + } + miceAPRSPacket += ":" + miceInformationField; + return miceAPRSPacket; } String generateBasePacket(String callsign, String tocall, String path) { diff --git a/lib/APRSPacketLib/APRSPacketLib.h b/lib/APRSPacketLib/APRSPacketLib.h index 2b0fe23..5e5adf8 100644 --- a/lib/APRSPacketLib/APRSPacketLib.h +++ b/lib/APRSPacketLib/APRSPacketLib.h @@ -47,7 +47,7 @@ namespace APRSPacketLib { gpsLatitudeStruct gpsDecimalToDegreesMiceLatitude(float latitude); gpsLongitudeStruct gpsDecimalToDegreesMiceLongitude(float longitude); - String generateMiceGPSBeacon(String miceMsgType, String callsign, String symbol, String overlay, float latitude, float longitude, float course, float speed, int altitude); + String generateMiceGPSBeacon(String miceMsgType, String callsign, String symbol, String overlay, String path, float latitude, float longitude, float course, float speed, int altitude); String generateBasePacket(String callsign, String tocall, String path); String generateStatusPacket(String callsign, String tocall, String path, String status); diff --git a/src/station_utils.cpp b/src/station_utils.cpp index c97efd3..df498b0 100644 --- a/src/station_utils.cpp +++ b/src/station_utils.cpp @@ -391,14 +391,14 @@ namespace STATION_Utils { String packet; if (Config.bme.sendTelemetry && type == "Wx") { if (miceActive) { - packet = APRSPacketLib::generateMiceGPSBeacon(currentBeacon->micE, currentBeacon->callsign,"_", currentBeacon->overlay, gps.location.lat(), gps.location.lng(), gps.course.deg(), gps.speed.knots(), gps.altitude.meters()); + packet = APRSPacketLib::generateMiceGPSBeacon(currentBeacon->micE, currentBeacon->callsign,"_", currentBeacon->overlay, Config.path, gps.location.lat(), gps.location.lng(), gps.course.deg(), gps.speed.knots(), gps.altitude.meters()); } else { packet = APRSPacketLib::generateGPSBeaconPacket(currentBeacon->callsign, "APLRT1", Config.path, "/", APRSPacketLib::encondeGPS(gps.location.lat(),gps.location.lng(), gps.course.deg(), gps.speed.knots(), currentBeacon->symbol, Config.sendAltitude, gps.altitude.feet(), sendStandingUpdate, "Wx")); } packet += BME_Utils::readDataSensor("APRS"); } else { if (miceActive) { - packet = APRSPacketLib::generateMiceGPSBeacon(currentBeacon->micE, currentBeacon->callsign, currentBeacon->symbol, currentBeacon->overlay, gps.location.lat(), gps.location.lng(), gps.course.deg(), gps.speed.knots(), gps.altitude.meters()); + packet = APRSPacketLib::generateMiceGPSBeacon(currentBeacon->micE, currentBeacon->callsign, currentBeacon->symbol, currentBeacon->overlay, Config.path, gps.location.lat(), gps.location.lng(), gps.course.deg(), gps.speed.knots(), gps.altitude.meters()); } else { packet = APRSPacketLib::generateGPSBeaconPacket(currentBeacon->callsign, "APLRT1", Config.path, currentBeacon->overlay, APRSPacketLib::encondeGPS(gps.location.lat(),gps.location.lng(), gps.course.deg(), gps.speed.knots(), currentBeacon->symbol, Config.sendAltitude, gps.altitude.feet(), sendStandingUpdate, "GPS")); }