Luka Danilovic
/
PROJ515_GPS
GPS NMEA through NavSatFix
PROJ515.hpp@5:a201e5377e90, 2019-03-04 (annotated)
- Committer:
- Luka_Danilovic
- Date:
- Mon Mar 04 13:03:02 2019 +0000
- Revision:
- 5:a201e5377e90
- Parent:
- 4:df54ebe69b38
- Child:
- 10:46216f5f48a8
- Child:
- 11:8e44351d580d
ROS Working;
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 | 0:448e0e74e00f | 6 | #include "mbed.h" // Mbed RTOS |
Luka_Danilovic | 0:448e0e74e00f | 7 | #include "TinyGPSPlus.h" // GPS Module Library |
Luka_Danilovic | 0:448e0e74e00f | 8 | #include "ros.h" // ROS Library |
Luka_Danilovic | 0:448e0e74e00f | 9 | #include "nav_msgs/Odometry.h" // ROS Navigation Messages component |
Luka_Danilovic | 0:448e0e74e00f | 10 | #include "std_msgs/String.h" // ROS Standard Messages component |
Luka_Danilovic | 5:a201e5377e90 | 11 | //#include "std_msgs/Char.h" // ROS Standard Messages component |
Luka_Danilovic | 0:448e0e74e00f | 12 | |
Luka_Danilovic | 0:448e0e74e00f | 13 | /* Definitions */ |
Luka_Danilovic | 4:df54ebe69b38 | 14 | #define LEDS_OFF 0x00 // LED bus all off |
Luka_Danilovic | 5:a201e5377e90 | 15 | #define LEDS_ON 0x07 // LED bus all on |
Luka_Danilovic | 3:30c3f20c2387 | 16 | #define GPS_TX PC_10 // GPS Transmit Pin |
Luka_Danilovic | 3:30c3f20c2387 | 17 | #define GPS_RX PC_11 // GPS Recieve Pin |
Luka_Danilovic | 3:30c3f20c2387 | 18 | #define USB_TX PC_12 // USB Transmit Pin |
Luka_Danilovic | 3:30c3f20c2387 | 19 | #define USB_RX PD_2 // USB Recieve Pin |
Luka_Danilovic | 0:448e0e74e00f | 20 | #define GPS_Baud 9600 // GPS Baud Rate |
Luka_Danilovic | 3:30c3f20c2387 | 21 | #define USB_Baud 9600 // ROS Baud Rate |
Luka_Danilovic | 3:30c3f20c2387 | 22 | #define ROS_Baud 57600 // ROS Baud Rate |
Luka_Danilovic | 0:448e0e74e00f | 23 | #define frameID "/gps_odom" // ROS frame ID |
Luka_Danilovic | 0:448e0e74e00f | 24 | #define childID "/base_link" // ROS child frame ID |
Luka_Danilovic | 0:448e0e74e00f | 25 | #define CVX 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 0:448e0e74e00f | 26 | #define CVY 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 0:448e0e74e00f | 27 | #define CVZ 0x01 // Covariance value for X from the datasheet |
Luka_Danilovic | 5:a201e5377e90 | 28 | #define CVR 0x01 // Covariance value for rotational components |
Luka_Danilovic | 4:df54ebe69b38 | 29 | #define PRINT_DATA 0x01 // Thread communication event to print data |
Luka_Danilovic | 0:448e0e74e00f | 30 | |
Luka_Danilovic | 0:448e0e74e00f | 31 | /* Declarations */ |
Luka_Danilovic | 5:a201e5377e90 | 32 | extern char gps_c; // GPS stream character - Defined in PROJ515.cpp |
Luka_Danilovic | 5:a201e5377e90 | 33 | extern int sats_n; // GPS satelite number - Defined in PROJ515.cpp |
Luka_Danilovic | 0:448e0e74e00f | 34 | |
Luka_Danilovic | 0:448e0e74e00f | 35 | /* Function prototypes */ |
Luka_Danilovic | 3:30c3f20c2387 | 36 | void streamF(); // Function prototype for streaming data |
Luka_Danilovic | 3:30c3f20c2387 | 37 | void setupRosMsg(); // Function prototype for seting up ROS messages |
Luka_Danilovic | 0:448e0e74e00f | 38 | |
Luka_Danilovic | 0:448e0e74e00f | 39 | /*============================================================================*/ |
Luka_Danilovic | 0:448e0e74e00f | 40 | #endif // End of inclusion |