check range of lat and lon

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

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

Loading…
Cancel
Save

Powered by TurnKey Linux.