From 468c0dbeaee1e60a3ac7d7fc1183193936960a2e Mon Sep 17 00:00:00 2001 From: Kyle Gabriel Date: Mon, 26 Aug 2019 18:05:23 -0400 Subject: [PATCH] update serial print messages --- main/gps.ino | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/main/gps.ino b/main/gps.ino index 27a0fb2..ca40a8f 100644 --- a/main/gps.ino +++ b/main/gps.ino @@ -72,10 +72,20 @@ static void gps_loop() { { LatitudeBinary = ((_gps.location.lat() + 90) / 180.0) * 16777215; LongitudeBinary = ((_gps.location.lng() + 180) / 360.0) * 16777215; + altitudeGps = _gps.altitude.meters(); + hdopGps = _gps.hdop.value() / 10; + sats = _gps.satellites.value(); + sprintf(t, "Lat: %f", _gps.location.lat()); Serial.println(t); sprintf(t, "Lng: %f", _gps.location.lng()); Serial.println(t); + sprintf(t, "Alt: %f", altitudeGps); + Serial.println(t); + sprintf(t, "Hdop: %d", hdopGps); + Serial.println(t); + sprintf(t, "Sats: %d", sats); + Serial.println(t); txBuffer[0] = ( LatitudeBinary >> 16 ) & 0xFF; txBuffer[1] = ( LatitudeBinary >> 8 ) & 0xFF; @@ -83,12 +93,9 @@ static void gps_loop() { txBuffer[3] = ( LongitudeBinary >> 16 ) & 0xFF; txBuffer[4] = ( LongitudeBinary >> 8 ) & 0xFF; txBuffer[5] = LongitudeBinary & 0xFF; - altitudeGps = _gps.altitude.meters(); txBuffer[6] = ( altitudeGps >> 8 ) & 0xFF; txBuffer[7] = altitudeGps & 0xFF; - hdopGps = _gps.hdop.value() / 10; txBuffer[8] = hdopGps & 0xFF; - sats = _gps.satellites.value(); txBuffer[9] = sats & 0xFF; }