MLIB
|
Data Structures | |
class | mlib::parse_context |
parsing context for NMEA-0183 parser More... | |
Macros | |
#define | NEXT_TOKEN(A, B) |
#define | NEXT_VALIDTOKEN(A, B) |
#define | IFPAR(par, exp) |
Functions | |
bool | mlib::nmea_checksum (const char *buf) |
Compute the checksum of a NMEA sentence. | |
int | mlib::dbs (const char *buf, double *depth) |
NMEA-0183 DBS sentence. | |
int | mlib::dbt (const char *buf, double *depth) |
NMEA-0183 DBT sentence. | |
int | mlib::dpt (const char *buf, double *depth, double *offset, double *range) |
NMEA-0183 DPT sentence. | |
int | mlib::gga (const char *buf, double *lat, double *lon, double *time, double *height, double *undul, double *dop, int *sat, int *mode, double *age, int *station) |
int | mlib::ggk (const char *buf, double *lat, double *lon, double *time, double *height, double *dop, int *sat, int *mode) |
NMEA-0183 GGK sentence. | |
int | mlib::gll (const char *buf, double *lat, double *lon, double *time, int *mode) |
NMEA-0183 GLL sentence. | |
int | mlib::gns (const char *buf, double *time, double *lat, double *lon, int *mode, int *sat, double *dop, double *height, double *age, int *station) |
int | mlib::gsa (const char *buf, int *hmode, int *fmode, int *sv, double *pdop, double *hdop, double *vdop) |
NMEA-0183 GSA sentence. | |
int | mlib::gst (const char *buf, double *time, double *rms, double *smaj, double *smin, double *orient, double *stdlat, double *stdlon, double *stdh) |
NMEA-0183 GST sentence. | |
int | mlib::gsv (const char *buf, int *tmsg, int *msg, int *count, int *sv, int *az, int *elev, int *snr) |
NMEA-0183 GSV sentence - Satellites in View. | |
int | mlib::gxp (const char *buf, double *lat, double *lon, double *time, int *wp) |
NMEA-0183 GXP sentence. | |
int | mlib::hdg (const char *buf, double *head, double *dev, double *var) |
NMEA-0183 HDG sentence. | |
int | mlib::hdm (const char *buf, double *head) |
NMEA-0183 HDM sentence. | |
int | mlib::hdt (const char *buf, double *head) |
NMEA-0183 HDT sentence $ttHDT,xxx.x,T. | |
int | mlib::llq (const char *buf, double *time, double *x, double *y, int *mode, int *sat, double *dop, double *height) |
int | mlib::pashr (const char *buf, double *time, double *hdg, double *pitch, double *roll, double *heave, double *roll_std, double *pitch_std, double *hdg_std, int *flag_h, int *flag_i) |
NMEA-0183 Ashtech proprietary PASHR sentence. | |
int | mlib::psathpr (const char *buf, double *time, double *head, double *pitch, double *roll, char *type) |
NMEA-0183 Hemisphere GNSS proprietary sentence. | |
int | mlib::ptnlggk (const char *buf, double *lat, double *lon, double *time, double *height, double *dop, int *sat, int *mode) |
NMEA-0183 Trimble proprietary PTNLGGK sentence. | |
int | mlib::ptnlqa (const char *buf, double *sigman, double *sigmae, double *smaj, double *smin, double *orient) |
NMEA-0183 Trimble proprietary PTNL,QA sentence. | |
int | mlib::rmc (const char *buf, double *lat, double *lon, double *time, double *speed, double *head, int *date, int *mode) |
NMEA-0183 RMC sentence. | |
int | mlib::ttm (const char *buf, double *utc, int *num, char *name, double *dist, double *brg, int *relbrg, double *speed, double *cog, int *relcog, double *cpa, double *tcpa, int *stat) |
NMEA-0183 TTM sentence (Tracked Target message). | |
int | mlib::vtg (const char *buf, double *speed, double *head) |
NMEA-0183 VTG sentence. | |
int | mlib::zda (const char *buf, double *time, unsigned short *day, unsigned short *month, unsigned short *year) |
NMEA-0183 ZDA sentence. | |
mlib::parse_context::parse_context (const char *buf) | |
Constructor for a parsing context. | |
char * | mlib::parse_context::token () |
Return next token of a NMEA sentence. | |
#define IFPAR | ( | par, | |
exp | |||
) |
#define NEXT_TOKEN | ( | A, | |
B | |||
) |
#define NEXT_VALIDTOKEN | ( | A, | |
B | |||
) |
int mlib::dbs | ( | const char * | buf, |
double * | depth | ||
) |
NMEA-0183 DBS sentence.
$ttDBS,depf,f,depm,M,depF,F
Returned value is always in meters.
int mlib::dbt | ( | const char * | buf, |
double * | depth | ||
) |
NMEA-0183 DBT sentence.
$ttDBT,depf,f,depm,M,depF,F
Returned value is always in meters.
This sentence is obsolete.
int mlib::dpt | ( | const char * | buf, |
double * | depth, | ||
double * | offset, | ||
double * | range | ||
) |
NMEA-0183 DPT sentence.
$ttDPT,dep,offset,range
int mlib::gga | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
double * | height, | ||
double * | undul, | ||
double * | dop, | ||
int * | sat, | ||
int * | mode, | ||
double * | age, | ||
int * | station | ||
) |
NMEA-0183 GGA sentence.
$ttGGA,hhmmss,xxxx.xx,N,xxxxx.xx,W,q,s,dop,msl,M,und,M[,age,station]
int mlib::ggk | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
double * | height, | ||
double * | dop, | ||
int * | sat, | ||
int * | mode | ||
) |
NMEA-0183 GGK sentence.
$ttGGK,hhmmss,mmddyy,xxxx.xx,N,xxxxx.xx,W,q,s,dop,geo,M
int mlib::gll | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
int * | mode | ||
) |
NMEA-0183 GLL sentence.
$ttGLL,lat,N,lon,W[,time,valid,[mode]]
int mlib::gns | ( | const char * | buf, |
double * | time, | ||
double * | lat, | ||
double * | lon, | ||
int * | mode, | ||
int * | sat, | ||
double * | dop, | ||
double * | height, | ||
double * | age, | ||
int * | station | ||
) |
NMEA-0183 GNS sentence.
$–GNS,hhmmss.ss,llll.lll,a,yyyyy.yyy,a,c–c,xx,x.x,x.x,x.x,x.x,x.x*hh
int mlib::gsa | ( | const char * | buf, |
int * | hmode, | ||
int * | fmode, | ||
int * | sv, | ||
double * | pdop, | ||
double * | hdop, | ||
double * | vdop | ||
) |
NMEA-0183 GSA sentence.
GNSS DOP and Active Satellites
GNSS receiver operating mode, satellites used in the navigation solution reported by the GGA or GNS sentence, and DOP values.
$--GSA,a,x,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,xx,x.x,x.x,x.x<CR><LF> | | | | | | | | | | | | | +-- VDOP | | | | | +------ HDOP | | | | +---------- PDOP | | |_________________________________| | | | | | +--- ID numbers of satellites used in solution | +---------------- Mode: 1 = Fix not available, 2 = 2D, 3 = 3D +------------------ Mode: M = Manual, forced to operate in 2D or 3D mode A = Automatic, allowed to automatically switch 2D/3D
int mlib::gst | ( | const char * | buf, |
double * | time, | ||
double * | rms, | ||
double * | smaj, | ||
double * | smin, | ||
double * | orient, | ||
double * | stdlat, | ||
double * | stdlon, | ||
double * | stdh | ||
) |
NMEA-0183 GST sentence.
$ttGST,time,rms,semimaj,semimin,orient,stdlat,stdlon,stdh
int mlib::gsv | ( | const char * | buf, |
int * | tmsg, | ||
int * | msg, | ||
int * | count, | ||
int * | sv, | ||
int * | az, | ||
int * | elev, | ||
int * | snr | ||
) |
NMEA-0183 GSV sentence - Satellites in View.
$xxGSV,t,n,c,id,el,az,sn,id,az,el,sn,id,az,el,sn,id,az,el,sn*hh | | | | | | | | || ||__________+- satellite 4 | | | | | | | | ||__________+------------- satellite 3 | | | | | | | |__________+------------------------- satellite 2 | | | | | | +------- SNR satellite 1 (0-99) | | | | | +---------- Azimuth satellite 1 (0-359) | | | | +------------- Elevation satellite 1 (0-90) | | | +---------------- SV number satellite 1 | | +------------------ Total number of satellites in view | +-------------------- Message number +---------------------- Total number of messages
int mlib::gxp | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
int * | wp | ||
) |
NMEA-0183 GXP sentence.
$ttGXP,time,lat,N,lon,a,wp
int mlib::hdg | ( | const char * | buf, |
double * | head, | ||
double * | dev, | ||
double * | var | ||
) |
NMEA-0183 HDG sentence.
$ttHDG,hdg,dev,E/W,var,E/W
magnetic = hdg + dev true = magnetic + var
int mlib::hdm | ( | const char * | buf, |
double * | head | ||
) |
NMEA-0183 HDM sentence.
$ttHDM,xxx.x,M
int mlib::hdt | ( | const char * | buf, |
double * | head | ||
) |
NMEA-0183 HDT sentence $ttHDT,xxx.x,T.
int mlib::llq | ( | const char * | buf, |
double * | time, | ||
double * | x, | ||
double * | y, | ||
int * | mode, | ||
int * | sat, | ||
double * | dop, | ||
double * | height | ||
) |
Leica LLQ sentence.
$GPLLQ,hhmmss.ss,mmddyy,eeeeee.eee,M,nnnnnn.nnn,M,g,ss,q.q,z.z,M*hh
bool mlib::nmea_checksum | ( | const char * | buf | ) |
Compute the checksum of a NMEA sentence.
int mlib::pashr | ( | const char * | buf, |
double * | time, | ||
double * | hdg, | ||
double * | pitch, | ||
double * | roll, | ||
double * | heave, | ||
double * | roll_std, | ||
double * | pitch_std, | ||
double * | hdg_std, | ||
int * | flag_h, | ||
int * | flag_i | ||
) |
NMEA-0183 Ashtech proprietary PASHR sentence.
$PASHR,UTC-Time,HeadingTRUE,T,ROLL,PITCH,HEAVE(m),accuracyRoll, accuracyPitch,accuracyHeading
Newer Ashtech proprietary sentence for attitude sensors. Also used by Applanix POS M/V systems.
$PASHR,145719.272,252.41,T,1.22,0.48,0.01,0.090,0.090,0.116,2,1*11 $PASHR,141424.923,45.36,T,-0.57,-0.63,0.02,0.086,0.086,0.025,1,1*28
$PASHR,hhmmss.ss,HHH.HH,T,RRR.RR,PPP.PP,heave,rr.rrr,pp.ppp,hh.hhh,QF*CC<CR><LF> where: hhmmss.ss UTC time HHH.HH Heading value in decimal degrees T True heading (T displayed if heading is relative to true north) RRR.RR Roll in decimal degrees (- sign will be displayed when applicable) PPP.PP Pitch in decimal degrees (- sign will be displayed when applicable) heave Heave, in meters rr.rrr Roll standard deviation in decimal degrees pp.ppp Pitch standard deviation in decimal degrees hh.hhh Heading standard deviation in decimal degrees QF Quality Flag 0 = No position 1 = All non-RTK fixed integer positions 2 = RTK fixed integer position
int mlib::psathpr | ( | const char * | buf, |
double * | time, | ||
double * | head, | ||
double * | pitch, | ||
double * | roll, | ||
char * | type | ||
) |
NMEA-0183 Hemisphere GNSS proprietary sentence.
$PSAT,HPR,time,heading,pitch,roll,type
type:
int mlib::ptnlggk | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
double * | height, | ||
double * | dop, | ||
int * | sat, | ||
int * | mode | ||
) |
NMEA-0183 Trimble proprietary PTNLGGK sentence.
$PTNL,GGK,hhmmss.ss,mmddyy,llll.ll,a,yyyyy.yy,a,xx,xx,x.x,EHTxx.x,M*hh - hhmmss.ss = UTC of Position Fix - mmddyy = UTC date - llll.ll = Latitude - a = Hemisphere (N/S) - yyyyy.yy = Longitude - a = E/W - xx = GPS Quality Indicator - 0: Fix not available or invalid - 1: Autonomous GPS fix - 2: RTK float solution - 3: RTK fix solution - 4: Differential, code phase only solution (DGPS) - 5: SBAS solution (WAAS/EGNOS/MSAS) - 6: RTK float or RTK location 3D Network solution - 7: RTK fixed 3D Network solution - 8: RTK float or RTK location 2D in a Network solution - 9: RTK fixed 2D Network solution - 10: OmniSTAR HP/XP solution - 11: OmniSTAR VBS solution - 12: Location RTK solution - 13: Beacon DGPS - xx = Number of Satellites in use - x.x = PDOP - xx.x = Ellipsoidal height. = Altitude above/below mean sea level for position of marker. Note, if no orthometric height is available the local ell. height will be exported. - M = Units of altitude meters (fixed text "M") - hh = Checksum $PTNL,GGK,172814.00,071296,3723.46587704,N,12202.26957864,W,3,06,1.7,EHT-6.777,M*48
int mlib::ptnlqa | ( | const char * | buf, |
double * | sigman, | ||
double * | sigmae, | ||
double * | smaj, | ||
double * | smin, | ||
double * | orient | ||
) |
NMEA-0183 Trimble proprietary PTNL,QA sentence.
int mlib::rmc | ( | const char * | buf, |
double * | lat, | ||
double * | lon, | ||
double * | time, | ||
double * | speed, | ||
double * | head, | ||
int * | date, | ||
int * | mode | ||
) |
NMEA-0183 RMC sentence.
$ttRMC,time,stat,lat,N/S,lon,E/W,speed,head,date,magvar,E/W,mode
char * mlib::parse_context::token | ( | ) |
Return next token of a NMEA sentence.
Tokens are delimited by ',', <CR>, '*' or end of string. We cannot use strtok directly because we want to leave the string unchanged and we don't want to skip over consecutive empty fields.
int mlib::ttm | ( | const char * | buf, |
double * | utc, | ||
int * | num, | ||
char * | name, | ||
double * | dist, | ||
double * | brg, | ||
int * | relbrg, | ||
double * | speed, | ||
double * | cog, | ||
int * | relcog, | ||
double * | cpa, | ||
double * | tcpa, | ||
int * | stat | ||
) |
NMEA-0183 TTM sentence (Tracked Target message).
$xxTTM,num,dist,brg,relbrg,speed,course,relcog,cpa,tcpa,units,name,status,ref,hhmmss.ss,acq*hh
int mlib::vtg | ( | const char * | buf, |
double * | speed, | ||
double * | head | ||
) |
NMEA-0183 VTG sentence.
$ttVTG,true,T,mag,M,knots,N,kph,K,mode
True heading takes precedence over magnetic heading. Speed value in knots takes precedence over value in km/h.
int mlib::zda | ( | const char * | buf, |
double * | time, | ||
unsigned short * | day, | ||
unsigned short * | month, | ||
unsigned short * | year | ||
) |
NMEA-0183 ZDA sentence.
$ttZDA,time,day,month,year,loch,locm
UTC = local +loch + locm/60