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.

defines/WGS84.h

Committer:
chris215
Date:
2014-08-06
Revision:
0:0c1aa5906cef

File content as of revision 0:0c1aa5906cef:

/*   
     a   the equatorial earth radius
     f   the "flattening" parameter ( = (a-b)/a ,the ratio of the
         difference between the equatorial and polar radii to a;
         this is a measure of how "elliptical" a polar cross-section
         is).

        The eccentricity e of the figure of the earth is found from
    
        e^2 = 2f - f^2 ,  or  e = sqrt(2f-f^2) .
*/
//For WGS84, 

#define A   6378137.0
#define RF  298.257224
#define F   1/RF
#define E   sqrt(2*f-f^2)

 /*
         a   = 6378137 meters
       (1/f) = 298.257224

(the reciprocal of f is usually given instead of f itself, because the
reciprocal is so close to an integer)

Given latitude (geodetic latitude, not geocentric latitude!), compute

                                  1
        C =  ---------------------------------------------------
             sqrt( cos^2(latitude) + (1-f)^2 * sin^2(latitude) )

and
        S = (1-f)^2 * C .
*/