A porting of a GPS decoding and presenting program within the mbos RTOS. It is not a definitive application but a study program to test NMEA full decoding library and a first approach to an RTOS. Many thanks to Andrew Levido for his support and his patience on teaching me the RTOS principles from the other side of the Earth. It uses NMEA library by Tim (xtimor@gmail.com) ported by Ken Todotani (http://mbed.org/users/todotani/) on public mbed library (http://mbed.org/users/todotani/programs/GPS_nmeaLib/5yo4h) also available, as original universal C library, on http://nmea.sourceforge.net

Dependencies:   mbos Watchdog TextLCD mbed ConfigFile

Revision:
0:d177c0087d1f
Child:
2:8917036cbf69
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Init.h	Sun Jan 29 16:06:12 2012 +0000
@@ -0,0 +1,52 @@
+// Ports initialization
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
+Serial pc(USBTX, USBRX);
+Serial gps(NC, GPSRX);
+
+PwmOut LcdBklight(p25);
+AnalogIn KeypadIn(p20);
+
+// Globals
+int size;
+int X=0, Y=0;
+char Key='-';
+
+char msgBuff[2][BUFF_SIZE];     // Receive data buffer from GPS module
+                                // Two buffer for double buffering
+volatile int writePointer = 0;  // Write pointer for active data buffer
+volatile unsigned int bufferSelect = 0; // Active buffer selector
+
+double latitude, longitude;
+double degrees, minutes;
+
+int SetTimeOk=0; // is RTC in sync?
+int PcMonitor=0;    // to control serial out on USB serial
+int Menu = 0;
+const char *Lab[]={"MAG", "DIR", "GPS"}; //Label to display in compass view
+int CmpPos[]={0,15,0}; //Compass position
+int Ang[3]; //Compass angle values
+enum DirLab{Mag, Dir, Gps};
+
+nmeaINFO info;                  // Store GPS information 
+nmeaPARSER parser;
+
+typedef struct _DegMinSec
+{
+    int Deg;         
+    int Min; 
+    double Sec;        
+ } DegMinSec;
+
+typedef struct _DistAzimuth
+{
+    double Dist; 
+    double Azimuth[2];
+ } DistAzimuth;
+  
+ DistAzimuth Path;
+ nmeaPOS Pos[2];
+ nmeaINFO Dest;
+