pull/4/head
Addy Gallareta 2020-02-10 12:24:30 -08:00
rodzic 6f95f08bb9
commit 85ca61b917
1 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -221,12 +221,14 @@ void do_send(osjob_t* j){
Serial.println(GPS.latitudeDegrees);
Serial.println(GPS.longitudeDegrees);
Serial.println(GPS.altitude + 0.5);
data = (int)(GPS.latitude_fixed * (GPS.lat == 'N' ? 1 : -1) + 90 * 1E7); // decimal degree format and getting 7 decimals
// decimal degree format and getting 7 decimals
data = (int)(GPS.latitude_fixed * (GPS.lat == 'N' ? 1 : -1) + 90 * 1E7);
payload[idx++] = data >> 24;
payload[idx++] = data >> 16;
payload[idx++] = data >> 8;
payload[idx++] = data;
data = (int)(GPS.longitude_fixed * (GPS.lon == 'E' ? 1 : -1) + 180 * 1E7); // decimal degree format and getting 7 decimals
// decimal degree format and getting 7 decimals
data = (int)(GPS.longitude_fixed * (GPS.lon == 'E' ? 1 : -1) + 180 * 1E7);
payload[idx++] = data >> 24;
payload[idx++] = data >> 16;
payload[idx++] = data >> 8;