mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-05-03 20:02:14 +02:00
add iGate with APRS and LoRa beacon mode
This commit is contained in:
@@ -107,6 +107,19 @@ namespace GPS_Utils {
|
||||
return beaconPacket;
|
||||
}
|
||||
|
||||
String generateiGateLoRaBeacon() {
|
||||
String stationLatitude, stationLongitude, beaconPacket;
|
||||
stationLatitude = processLatitudeAPRS(currentWiFi->latitude);
|
||||
stationLongitude = processLongitudeAPRS(currentWiFi->longitude);
|
||||
beaconPacket = Config.callsign + ">APLRG1,RFONLY:=" + stationLatitude + "L" + stationLongitude;
|
||||
if (Config.bme.active) {
|
||||
beaconPacket += "_";
|
||||
} else {
|
||||
beaconPacket += "a";
|
||||
}
|
||||
return beaconPacket;
|
||||
}
|
||||
|
||||
double calculateDistanceTo(double latitude, double longitude) {
|
||||
return TinyGPSPlus::distanceBetween(currentWiFi->latitude,currentWiFi->longitude, latitude, longitude) / 1000.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user