Luka Danilovic
/
PROJ515_GPS
GPS NMEA through NavSatFix
PROJ515.hpp@17:264eb15c8be2, 2019-04-23 (annotated)
- Committer:
- Luka_Danilovic
- Date:
- Tue Apr 23 16:02:34 2019 +0000
- Revision:
- 17:264eb15c8be2
- Parent:
- 14:90590736e700
Fixed the issue of location not updating when "statCheck" print-out is running
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Luka_Danilovic | 0:448e0e74e00f | 1 | #ifndef __PROJ515_H__ //Inclusion safeguards |
Luka_Danilovic | 0:448e0e74e00f | 2 | #define __PROJ515_H__ //Definition of the inclusion |
Luka_Danilovic | 0:448e0e74e00f | 3 | /*============================================================================*/ |
Luka_Danilovic | 0:448e0e74e00f | 4 | |
Luka_Danilovic | 0:448e0e74e00f | 5 | /* Libraries */ |
Luka_Danilovic | 14:90590736e700 | 6 | #include "mbed.h" // Mbed RTOS |
Luka_Danilovic | 14:90590736e700 | 7 | #include "TinyGPSPlus.h" // GPS Module Library |
Luka_Danilovic | 14:90590736e700 | 8 | #include "ros.h" // ROS Library |
Luka_Danilovic | 13:755a3cd9d35d | 9 | #include "sensor_msgs/NavSatFix.h" // ROS Sensor Messages component |
Luka_Danilovic | 14:90590736e700 | 10 | #include "std_msgs/String.h" // ROS Standard Messages component |
Luka_Danilovic | 14:90590736e700 | 11 | //#include "std_msgs/Char.h" // ROS Standard Messages component |
Luka_Danilovic | 0:448e0e74e00f | 12 | |
Luka_Danilovic | 0:448e0e74e00f | 13 | /* Definitions */ |
Luka_Danilovic | 14:90590736e700 | 14 | #define LEDS_OFF 0x00 // LED bus all off |
Luka_Danilovic | 14:90590736e700 | 15 | #define LEDS_ON 0x07 // LED bus all on |
Luka_Danilovic | 14:90590736e700 | 16 | #define GPS_TX PC_10 // GPS Transmit Pin |
Luka_Danilovic | 14:90590736e700 | 17 | #define GPS_RX PC_11 // GPS Recieve Pin |
Luka_Danilovic | 17:264eb15c8be2 | 18 | #define USB_TX PD_5 // USB Transmit Pin |
Luka_Danilovic | 17:264eb15c8be2 | 19 | #define USB_RX PD_6 // USB Recieve Pin |
Luka_Danilovic | 13:755a3cd9d35d | 20 | |
Luka_Danilovic | 14:90590736e700 | 21 | #define GPS_Baud 9600 // GPS Baud Rate |
Luka_Danilovic | 17:264eb15c8be2 | 22 | #define USB_Baud 9600 // USB Baud Rate |
Luka_Danilovic | 14:90590736e700 | 23 | #define ROS_Baud 921600 // ROS Baud Rate |
Luka_Danilovic | 14:90590736e700 | 24 | #define frameID "gps_odom" // ROS frame ID |
Luka_Danilovic | 14:90590736e700 | 25 | |
Luka_Danilovic | 14:90590736e700 | 26 | #define UNAGUMENTED 0x00 // Unagumented |
Luka_Danilovic | 14:90590736e700 | 27 | #define GPS_CONSTELL 0x01 // GPS constellation |
Luka_Danilovic | 14:90590736e700 | 28 | #define UNNWN 0x00 // Unknown covariance |
Luka_Danilovic | 14:90590736e700 | 29 | |
Luka_Danilovic | 14:90590736e700 | 30 | #define CVX 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 14:90590736e700 | 31 | #define CVY 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 14:90590736e700 | 32 | #define CVZ 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 14:90590736e700 | 33 | #define CVO 0x00 // Covariance value for zero components |
Luka_Danilovic | 14:90590736e700 | 34 | |
Luka_Danilovic | 14:90590736e700 | 35 | #define PRINT_DATA 0x01 // Thread communication event to print data |
Luka_Danilovic | 0:448e0e74e00f | 36 | |
Luka_Danilovic | 0:448e0e74e00f | 37 | /* Declarations */ |
Luka_Danilovic | 14:90590736e700 | 38 | extern char gps_c; // GPS stream character - Defined in PROJ515.cpp |
Luka_Danilovic | 14:90590736e700 | 39 | extern int sats_n; // GPS satelite number - Defined in PROJ515.cpp |
Luka_Danilovic | 0:448e0e74e00f | 40 | |
Luka_Danilovic | 0:448e0e74e00f | 41 | /* Function prototypes */ |
Luka_Danilovic | 14:90590736e700 | 42 | void streamF(); // Function prototype for streaming data |
Luka_Danilovic | 14:90590736e700 | 43 | void setupRosMsg(); // Function prototype for seting up ROS messages |
Luka_Danilovic | 0:448e0e74e00f | 44 | |
Luka_Danilovic | 0:448e0e74e00f | 45 | /*============================================================================*/ |
Luka_Danilovic | 0:448e0e74e00f | 46 | #endif // End of inclusion |