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:
2:8917036cbf69
Parent:
0:d177c0087d1f
Child:
3:a2f9eb3b8a16
--- a/Init.h	Sun Jan 29 22:08:35 2012 +0000
+++ b/Init.h	Tue Jan 31 00:22:58 2012 +0000
@@ -1,52 +1,18 @@
-// 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);
+extern Serial pc;
+extern Watchdog wd;
 
 // 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;
+extern double latitude, longitude;
+extern 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};
+extern int SetTimeOk;
 
-nmeaINFO info;                  // Store GPS information 
-nmeaPARSER parser;
-
-typedef struct _DegMinSec
-{
-    int Deg;         
-    int Min; 
-    double Sec;        
- } DegMinSec;
+extern nmeaINFO info; 
+extern nmeaPOS Pos[];
+extern DistAzimuth Path;
+extern nmeaINFO Dest;
+extern int Menu;
 
-typedef struct _DistAzimuth
-{
-    double Dist; 
-    double Azimuth[2];
- } DistAzimuth;
-  
- DistAzimuth Path;
- nmeaPOS Pos[2];
- nmeaINFO Dest;
- 
+extern int Ang[];