GPS NMEA through NavSatFix

Dependencies:   TinyGPSPlus

Committer:
Luka_Danilovic
Date:
Fri Mar 01 11:48:05 2019 +0000
Revision:
3:30c3f20c2387
Parent:
2:a2e5b48beaa1
Child:
4:df54ebe69b38
ROS - NO SATELITES

Who changed what in which revision?

UserRevisionLine numberNew 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 3:30c3f20c2387 7 //#include "USBSerial.h" // Serial over second USB
Luka_Danilovic 0:448e0e74e00f 8 #include "TinyGPSPlus.h" // GPS Module Library
Luka_Danilovic 0:448e0e74e00f 9 #include "ros.h" // ROS Library
Luka_Danilovic 0:448e0e74e00f 10 #include "nav_msgs/Odometry.h" // ROS Navigation Messages component
Luka_Danilovic 0:448e0e74e00f 11 #include "std_msgs/String.h" // ROS Standard Messages component
Luka_Danilovic 2:a2e5b48beaa1 12 #include "std_msgs/Char.h" // ROS Standard Messages component
Luka_Danilovic 0:448e0e74e00f 13
Luka_Danilovic 0:448e0e74e00f 14 /* Definitions */
Luka_Danilovic 3:30c3f20c2387 15 #define GPS_TX PC_10 // GPS Transmit Pin
Luka_Danilovic 3:30c3f20c2387 16 #define GPS_RX PC_11 // GPS Recieve Pin
Luka_Danilovic 3:30c3f20c2387 17 #define USB_TX PC_12 // USB Transmit Pin
Luka_Danilovic 3:30c3f20c2387 18 #define USB_RX PD_2 // USB Recieve Pin
Luka_Danilovic 0:448e0e74e00f 19 #define GPS_Baud 9600 // GPS Baud Rate
Luka_Danilovic 3:30c3f20c2387 20 #define USB_Baud 9600 // ROS Baud Rate
Luka_Danilovic 3:30c3f20c2387 21 #define ROS_Baud 57600 // ROS Baud Rate
Luka_Danilovic 0:448e0e74e00f 22 #define frameID "/gps_odom" // ROS frame ID
Luka_Danilovic 0:448e0e74e00f 23 #define childID "/base_link" // ROS child frame ID
Luka_Danilovic 0:448e0e74e00f 24 #define CVX 0x01 // Covariance value for X from the datasheet
Luka_Danilovic 0:448e0e74e00f 25 #define CVY 0x01 // Covariance value for X from the datasheet
Luka_Danilovic 0:448e0e74e00f 26 #define CVZ 0x01 // Covariance value for X from the datasheet
Luka_Danilovic 3:30c3f20c2387 27 #define ONE 0x01 // Hard coded covariance of 1
Luka_Danilovic 3:30c3f20c2387 28 #define PRINT_DATA 0x01
Luka_Danilovic 0:448e0e74e00f 29
Luka_Danilovic 0:448e0e74e00f 30 /* Declarations */
Luka_Danilovic 1:b610535e5879 31 extern char gps_c; // GPS stream character - Defined in PROJ515.cpp
Luka_Danilovic 0:448e0e74e00f 32
Luka_Danilovic 0:448e0e74e00f 33 /* Function prototypes */
Luka_Danilovic 3:30c3f20c2387 34 void streamF(); // Function prototype for streaming data
Luka_Danilovic 3:30c3f20c2387 35 void setupRosMsg(); // Function prototype for seting up ROS messages
Luka_Danilovic 0:448e0e74e00f 36
Luka_Danilovic 0:448e0e74e00f 37 /*============================================================================*/
Luka_Danilovic 0:448e0e74e00f 38 #endif // End of inclusion