Cmera and GPS labrary

Dependents:   HEPTA_SENSOR HEPTA_SENSOR

Files at this revision

API Documentation at this revision

Comitter:
HeptaSatTraining2019
Date:
Tue Nov 05 07:16:56 2019 +0000
Parent:
26:f2017248e4f2
Commit message:
Compatible with south latitude and west longitude

Changed in this revision

HeptaCamera_GPS.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r f2017248e4f2 -r 98bb06a7ecf4 HeptaCamera_GPS.cpp
--- a/HeptaCamera_GPS.cpp	Thu Oct 31 08:02:24 2019 +0000
+++ b/HeptaCamera_GPS.cpp	Tue Nov 05 07:16:56 2019 +0000
@@ -768,6 +768,12 @@
                 *longitude = int(*longitude/100)+(*longitude-int(*longitude/100)*100)/60;
                 *serial_check = 1;
             }
+            if(!strcmp(ns,"S")){
+                *latitude = -*latitude;
+            }
+            if(!strcmp(ns,"W")){
+                *longitude = -*longitude;
+            }
         } else {
             printf("No Data");
             *serial_check = 2;