Luka Danilovic
/
PROJ515_GPS
GPS NMEA through NavSatFix
Embed:
(wiki syntax)
Show/hide line numbers
PROJ515.hpp
00001 #ifndef __PROJ515_H__ //Inclusion safeguards 00002 #define __PROJ515_H__ //Definition of the inclusion 00003 /*============================================================================*/ 00004 00005 /* Libraries */ 00006 #include "mbed.h" // Mbed RTOS 00007 #include "TinyGPSPlus.h" // GPS Module Library 00008 #include "ros.h" // ROS Library 00009 #include "sensor_msgs/NavSatFix.h" // ROS Sensor Messages component 00010 #include "std_msgs/String.h" // ROS Standard Messages component 00011 //#include "std_msgs/Char.h" // ROS Standard Messages component 00012 00013 /* Definitions */ 00014 #define LEDS_OFF 0x00 // LED bus all off 00015 #define LEDS_ON 0x07 // LED bus all on 00016 #define GPS_TX PC_10 // GPS Transmit Pin 00017 #define GPS_RX PC_11 // GPS Recieve Pin 00018 #define USB_TX PD_5 // USB Transmit Pin 00019 #define USB_RX PD_6 // USB Recieve Pin 00020 00021 #define GPS_Baud 9600 // GPS Baud Rate 00022 #define USB_Baud 9600 // USB Baud Rate 00023 #define ROS_Baud 921600 // ROS Baud Rate 00024 #define frameID "gps_odom" // ROS frame ID 00025 00026 #define UNAGUMENTED 0x00 // Unagumented 00027 #define GPS_CONSTELL 0x01 // GPS constellation 00028 #define UNNWN 0x00 // Unknown covariance 00029 00030 #define CVX 0x01 // Covariance value for X from the datasheet 00031 #define CVY 0x01 // Covariance value for X from the datasheet 00032 #define CVZ 0x01 // Covariance value for X from the datasheet 00033 #define CVO 0x00 // Covariance value for zero components 00034 00035 #define PRINT_DATA 0x01 // Thread communication event to print data 00036 00037 /* Declarations */ 00038 extern char gps_c; // GPS stream character - Defined in PROJ515.cpp 00039 extern int sats_n; // GPS satelite number - Defined in PROJ515.cpp 00040 00041 /* Function prototypes */ 00042 void streamF(); // Function prototype for streaming data 00043 void setupRosMsg(); // Function prototype for seting up ROS messages 00044 00045 /*============================================================================*/ 00046 #endif // End of inclusion
Generated on Fri Jul 15 2022 20:04:52 by 1.7.2