From eb7b9f6d6e5904dbd832ef7eada8c1da7df6d233 Mon Sep 17 00:00:00 2001 From: deweibel Date: Sat, 4 Sep 2010 14:56:48 +0000 Subject: [PATCH] corrected units on MTK test program git-svn-id: https://arducopter.googlecode.com/svn/trunk@382 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- .../GPS_MTK/examples/GPS_MTK_test/GPS_MTK_test.pde | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/GPS_MTK/examples/GPS_MTK_test/GPS_MTK_test.pde b/libraries/GPS_MTK/examples/GPS_MTK_test/GPS_MTK_test.pde index d4685d5d4e..6b52cd136d 100644 --- a/libraries/GPS_MTK/examples/GPS_MTK_test/GPS_MTK_test.pde +++ b/libraries/GPS_MTK/examples/GPS_MTK_test/GPS_MTK_test.pde @@ -8,6 +8,9 @@ #include // UBLOX GPS Library +#define T6 1000000 +#define T7 10000000 + void setup() { Serial.begin(38400); @@ -22,15 +25,15 @@ void loop() { Serial.print("GPS:"); Serial.print(" Lat:"); - Serial.print(GPS.Lattitude); + Serial.print((float)GPS.Lattitude/T7, DEC); Serial.print(" Lon:"); - Serial.print(GPS.Longitude); + Serial.print((float)GPS.Longitude/T7, DEC); Serial.print(" Alt:"); - Serial.print((float)GPS.Altitude/100.0); + Serial.print((float)GPS.Altitude/100.0, DEC); Serial.print(" GSP:"); - Serial.print((float)GPS.Ground_Speed/100.0); + Serial.print((float)GPS.Ground_Speed/100.0, DEC); Serial.print(" COG:"); - Serial.print(GPS.Ground_Course/1000000); + Serial.print(GPS.Ground_Course/100.0, DEC); Serial.print(" SAT:"); Serial.print((int)GPS.NumSats); Serial.print(" FIX:");