uuu

Dependencies:   mbed HMC5883L GPS

Files at this revision

API Documentation at this revision

Comitter:
sliackystefan
Date:
Wed Mar 20 11:18:33 2019 +0000
Commit message:
uuu

Changed in this revision

GPS.lib Show annotated file Show diff for this revision Revisions of this file
HMC5883L.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/GPS.lib	Wed Mar 20 11:18:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/sliackystefan/code/GPS/#7908d7196d1e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HMC5883L.lib	Wed Mar 20 11:18:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/tylerjw/code/HMC5883L/#bc4e1201e092
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 20 11:18:33 2019 +0000
@@ -0,0 +1,46 @@
+#include "mbed.h"
+#include "GPS.h"
+#include "HMC5883L.h"
+
+Serial pc(SERIAL_TX, SERIAL_RX);
+GPS ark(PA_9, PA_10);
+DigitalOut myled(LED1);
+HMC5883L compass(D14, D15);
+ 
+int main()
+{
+     pc.baud(9600);
+     pc.printf("l");  
+    int16_t data[3] = {0};
+    double heading = 0.0f;  
+    
+    compass.init();
+    while(1) 
+    {
+        compass.getXYZ(data);
+        wait(0.1f);
+        heading = compass.getHeadingXYDeg();
+        pc.printf("x: %4d, y: %4d, z: %4d\r\n", data[0], data[1], data[2]);
+        pc.printf("heading: %0.2f\r\n", heading);
+        wait(1.0f);
+           
+        if( ark.sample() == 1) 
+        {
+            myled=0;
+            float latitude = ark.latitude;
+            float longitude = ark.longitude;
+            float latitudeB = ark.latitudeB;
+            float longitudeA = ark.longitudeA;
+            float utc = ark.utc + 50000;
+            pc.printf("latitude: %0.6f, longitude: %0.6f, latitudeRAW: %0.6f, longitudeRAW: %0.6f, utc: %f\r\n",latitude,longitude,latitudeB,longitudeA,utc);                     
+            wait(1);
+        } 
+        else 
+        {
+            myled=1;
+        }
+    }
+}
+
+
+ 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Mar 20 11:18:33 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/3a7713b1edbc
\ No newline at end of file