protocol_nmea.h
Go to the documentation of this file.
1 #ifndef PROTOCOL_NMEA_H_
2 #define PROTOCOL_NMEA_H_
3 
4 #include "data_sets.h"
5 
6 
8 {
9  ASCII_MSG_ID_ASCB = 0x41534342, // ASCII messages broadcast periods
10  ASCII_MSG_ID_STPB = 0x53545042, // Stop broadcasts on all ports
11  ASCII_MSG_ID_STPC = 0x53545043, // Stop broadcasts on current port
12  ASCII_MSG_ID_BLEN = 0x424c454e, // Enable bootloader on uINS
13  ASCII_MSG_ID_EBLE = 0x45424c45, // Enable bootloader on EVB
14  ASCII_MSG_ID_NELB = 0x4e454c42, // Enable SAM-BA mode
15  ASCII_MSG_ID_SRST = 0x53525354, // Software reset
16  ASCII_MSG_ID_INFO = 0x494e464f, // Device info
17  ASCII_MSG_ID_PERS = 0x50455253, // Save perstent messages
18 };
19 
20 
22 // Utility functions
24 uint32_t ASCII_compute_checksum(uint8_t* str, int size);
25 char *ASCII_find_next_field(char *str);
26 double ddmm2deg(double ddmm);
27 void set_gpsPos_status_mask(uint32_t *status, uint32_t state, uint32_t mask);
28 
30 // DID to NMEA
32 int dev_info_to_nmea_info(char a[], const int aSize, dev_info_t &info);
33 int tow_to_nmea_ptow(char a[], const int aSize, double imuTow, double insTow, unsigned int gpsWeek);
34 int dimu_to_nmea_pimu(char a[], const int aSize, dual_imu_t &dImu);
35 int pimu_to_nmea_ppimu(char a[], const int aSize, preintegrated_imu_t &pimu);
36 int ins1_to_nmea_pins1(char a[], const int aSize, ins_1_t &ins1);
37 int ins2_to_nmea_pins2(char a[], const int aSize, ins_2_t &ins2);
38 int strobe_to_nmea_pstrb(char a[], const int aSize, strobe_in_time_t &strobe);
39 int gps_to_nmea_pgpsp(char a[], const int aSize, gps_pos_t &pos, gps_vel_t &vel);
40 int gps_to_nmea_gga(char a[], const int aSize, gps_pos_t &pos);
41 int gps_to_nmea_gll(char a[], const int aSize, gps_pos_t &pos);
42 int gps_to_nmea_gsa(char a[], const int aSize, gps_pos_t &pos, gps_sat_t &sat);
43 int gps_to_nmea_rmc(char a[], const int aSize, gps_pos_t &pos, gps_vel_t &vel, float magDeclination);
44 int gps_to_nmea_zda(char a[], const int aSize, gps_pos_t &pos);
45 int gps_to_nmea_pashr(char a[], const int aSize, gps_pos_t &pos, ins_1_t &ins1, float heave, inl2_ned_sigma_t &sigma);
46 
48 // NMEA parse
50 uint32_t parse_nmea_ascb(int pHandle, const char msg[], int msgSize, ascii_msgs_t asciiPeriod[]);
51 int parse_nmea_zda(const char msgBuf[], int msgSize, double &day, double &month, double &year);
52 int parse_nmea_gns(const char msgBuf[], int msgSize, gps_pos_t *gpsPos, double datetime[6], int *satsUsed, int navMode);
53 int parse_nmea_gga(const char msg[], int msgSize, gps_pos_t *gpsPos, double datetime[6], int *satsUsed, int navMode);
54 int parse_nmea_rmc(const char msg[], int msgSize, gps_vel_t *gpsVel, double datetime[6], int *satsUsed, int navMode);
55 int parse_nmea_gsa(const char msg[], int msgSize, gps_pos_t *gpsPos, int *navMode);
56 int parse_nmea_gsv(const char msg[], int msgSize, gps_sat_t* gpsSat, int lastGSVmsg[2], int *satPointer, uint32_t *cnoSum, uint32_t *cnoCount);
57 
58 
59 
60 #endif /* PROTOCOL_NMEA_H_ */
char * ASCII_find_next_field(char *str)
int ins2_to_nmea_pins2(char a[], const int aSize, ins_2_t &ins2)
eNmeaMsgIdUint
Definition: protocol_nmea.h:7
int gps_to_nmea_gga(char a[], const int aSize, gps_pos_t &pos)
void set_gpsPos_status_mask(uint32_t *status, uint32_t state, uint32_t mask)
int parse_nmea_gsv(const char msg[], int msgSize, gps_sat_t *gpsSat, int lastGSVmsg[2], int *satPointer, uint32_t *cnoSum, uint32_t *cnoCount)
uint32_t parse_nmea_ascb(int pHandle, const char msg[], int msgSize, ascii_msgs_t asciiPeriod[])
uint32_t ASCII_compute_checksum(uint8_t *str, int size)
double ddmm2deg(double ddmm)
int strobe_to_nmea_pstrb(char a[], const int aSize, strobe_in_time_t &strobe)
int dimu_to_nmea_pimu(char a[], const int aSize, dual_imu_t &dImu)
int dev_info_to_nmea_info(char a[], const int aSize, dev_info_t &info)
int gps_to_nmea_gll(char a[], const int aSize, gps_pos_t &pos)
int gps_to_nmea_gsa(char a[], const int aSize, gps_pos_t &pos, gps_sat_t &sat)
int parse_nmea_rmc(const char msg[], int msgSize, gps_vel_t *gpsVel, double datetime[6], int *satsUsed, int navMode)
int gps_to_nmea_pashr(char a[], const int aSize, gps_pos_t &pos, ins_1_t &ins1, float heave, inl2_ned_sigma_t &sigma)
int gps_to_nmea_pgpsp(char a[], const int aSize, gps_pos_t &pos, gps_vel_t &vel)
int tow_to_nmea_ptow(char a[], const int aSize, double imuTow, double insTow, unsigned int gpsWeek)
int parse_nmea_gns(const char msgBuf[], int msgSize, gps_pos_t *gpsPos, double datetime[6], int *satsUsed, int navMode)
int parse_nmea_gga(const char msg[], int msgSize, gps_pos_t *gpsPos, double datetime[6], int *satsUsed, int navMode)
int gps_to_nmea_rmc(char a[], const int aSize, gps_pos_t &pos, gps_vel_t &vel, float magDeclination)
int ins1_to_nmea_pins1(char a[], const int aSize, ins_1_t &ins1)
int gps_to_nmea_zda(char a[], const int aSize, gps_pos_t &pos)
int parse_nmea_zda(const char msgBuf[], int msgSize, double &day, double &month, double &year)
int pimu_to_nmea_ppimu(char a[], const int aSize, preintegrated_imu_t &pimu)
int parse_nmea_gsa(const char msg[], int msgSize, gps_pos_t *gpsPos, int *navMode)


inertial_sense_ros
Author(s):
autogenerated on Sat Sep 19 2020 03:19:04