Michael Ernst Peter / Mbed OS Test_GPS

Dependencies:   Eigen

Revision:
53:50ecf1240eba
Parent:
52:4c282feb57eb
Child:
55:fbd59767e175
--- a/main.cpp	Fri Jun 03 11:54:52 2022 +0200
+++ b/main.cpp	Fri Jun 03 14:26:31 2022 +0200
@@ -19,8 +19,8 @@
 int main()
 {
     // while loop gets executed every main_task_period_ms milliseconds
-    const int main_task_period_ms = 40;  // define main task period time in ms e.g. 50 ms -> main task runns 20 times per second
-    Timer main_task_timer;                // create Timer object which we use to run the main task every main task period time in ms
+    const int main_task_period_ms = 50;  // define main task period time in ms e.g. 50 ms -> main task runns 20 times per second
+    Timer main_task_timer;               // create Timer object which we use to run the main task every main task period time in ms
 
     // led on nucleo board
     DigitalOut user_led(LED1);      // create DigitalOut object to command user led
@@ -72,7 +72,7 @@
         int main_task_elapsed_time_mus = std::chrono::duration_cast<std::chrono::microseconds>(main_task_timer.elapsed_time()).count();
 
         // do only output via serial what's really necessary (this makes your code slow)
-        // printf("%f, %f, %f\r\n", mag_val[0], mag_val[1], mag_val[2]);
+        printf("%f, %f, %f\r\n", mag_val[0], mag_val[1], mag_val[2]);
         printf("Update time: %d, GPS time: %d, num sat: %d, lat: %d, lon: %d, speed: %d, heading: %d\r\n", main_task_elapsed_time_mus, neom9n.actualPVT.itow, neom9n.actualPVT.numSV, neom9n.actualPVT.lat, neom9n.actualPVT.lon, neom9n.actualPVT.speed, neom9n.actualPVT.headMot);
 
         // read timer and make the main thread sleep for the remaining time span (non blocking)