Mbed library to handle GPS data reception and parsing

Dependents:   GPS_U-blox_NEO-6M_Code

Features

  • All positionning parameters are contained into a global data structure.
  • Automatic nema string parsing and data structure update.
    • GSA,GGA,VTG and RMC
  • Convert latitude and longitude to decimal value.
  • Converts latittude,longitude and altitude to ECEF coordinates.

Planed developement

  • Test library for RTOS use.
  • Complete the nema parsing decoders (couple of parameters are not parsed yet and not present in the data structure).
  • Add conversion tool to get ENU coordinates.

GPS.h

Committer:
chris215
Date:
2016-02-16
Revision:
5:8a73e34b3978
Parent:
4:d911d7c4e09d

File content as of revision 5:8a73e34b3978:

#ifndef _MBED_GPS_H_
#define _MBED_GPS_H_
#include "mbedGPSDefs.h"
#include "mbed.h"
#define MESSAGE_QUEUE_SIZE 20


    
    
class GPS : RawSerial{
    public:
    GPS(PinName TxPin,PinName RxPin);
    
    void SetBaud(int rate);
    
    ECEFPoint ReadPositionECEF(void);
    
    ECEFDistance DistanceBetweenTwoWP(ECEFPoint p1,ECEFPoint p2);
    
    geodPoint   ReadDecGeodLoc(void);
    geodPoint   ReadRawGeodLoc(void);
    
    bool        FixIs3d(void);
    bool        FixIs2d(void);
    bool        GPSFixValid(void);
    
    GPSInfo info;   //current gps information
    
    void UpdateGPS(void);       

    private:
    void RxIrqHandler(void);    
    message GPSRMCMessage;
    message GPSVTGMessage;
    message GPSGSAMessage;
    message GPSGGAMessage;
    message RxMessageBuffer;
    uint32_t RxQueueSize;
    uint32_t RxQueueWriteIndex;
    uint32_t RxQueueReadIndex;
    char insertIndex;
    Timer _gpsTimer;
};

#endif