don't update if lat lon is 0

sr-frs-aprs-payload
alanbjohnston 3 years ago committed by GitHub
parent 156df62f98
commit a8f3556cab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -731,12 +731,12 @@ int main(int argc, char * argv[]) {
}
printf("\n");
// if (sensor[XS1] != 0) {
if ((sensor[XS1] > -90.0) && (sensor[XS1] < 90.0)) {
if ((sensor[XS1] > -90.0) && (sensor[XS1] < 90.0) && (sensor[XS1] != 0.0)) {
latitude = toAprsFormat(sensor[XS1]);
printf("Latitude updated to %f \n", latitude);
}
// if (sensor[XS2] != 0) {
if ((sensor[XS2] > -180.0) && (sensor[XS2] < 180.0)) {
if ((sensor[XS2] > -180.0) && (sensor[XS2] < 180.0) && (sensor[XS2] != 0.0)) {
longitude = toAprsFormat(sensor[XS2]);
printf("Longitude updated to %f \n", longitude);
}

Loading…
Cancel
Save

Powered by TurnKey Linux.