diff options
Diffstat (limited to 'gps/utils/loc_nmea.h')
-rw-r--r-- | gps/utils/loc_nmea.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gps/utils/loc_nmea.h b/gps/utils/loc_nmea.h index 585a9c1..a9cafb7 100644 --- a/gps/utils/loc_nmea.h +++ b/gps/utils/loc_nmea.h @@ -35,12 +35,51 @@ #include <string> #define NMEA_SENTENCE_MAX_LENGTH 200 +/** gnss datum type */ +#define LOC_GNSS_DATUM_WGS84 0 +#define LOC_GNSS_DATUM_PZ90 1 + +/* len of semi major axis of ref ellips*/ +#define MAJA (6378137.0) +/* flattening coef of ref ellipsoid*/ +#define FLAT (1.0/298.2572235630) +/* 1st eccentricity squared*/ +#define ESQR (FLAT*(2.0 - FLAT)) +/*1 minus eccentricity squared*/ +#define OMES (1.0 - ESQR) +#define MILARCSEC2RAD (4.848136811095361e-09) +/*semi major axis */ +#define C_PZ90A (6378136.0) +/*semi minor axis */ +#define C_PZ90B (6356751.3618) +/* Transformation from WGS84 to PZ90 + * Cx,Cy,Cz,Rs,Rx,Ry,Rz,C_SYS_A,C_SYS_B*/ +const double DatumConstFromWGS84[9] = + {+0.003, +0.001, 0.000, (1.0+(0.000*1E-6)), (-0.019*MILARCSEC2RAD), + (+0.042*MILARCSEC2RAD), (-0.002*MILARCSEC2RAD), C_PZ90A, C_PZ90B}; + +/** Represents a LTP*/ +typedef struct { + double lat; + double lon; + double alt; +} LocLla; + +/** Represents a ECEF*/ +typedef struct { + double X; + double Y; + double Z; +} LocEcef; + void loc_nmea_generate_sv(const GnssSvNotification &svNotify, std::vector<std::string> &nmeaArraystr); void loc_nmea_generate_pos(const UlpLocation &location, const GpsLocationExtended &locationExtended, + const LocationSystemInfo &systemInfo, unsigned char generate_nmea, + bool custom_gga_fix_quality, std::vector<std::string> &nmeaArraystr); #define DEBUG_NMEA_MINSIZE 6 |