GPS working with LoRa code - can't transmit faster that once every 6 seconds
Dependencies: mbed LoRaWAN-lib_gps_lora SingleFrequencyLora
Diff: l86.hpp
- Revision:
- 6:670ff1507ff4
- Parent:
- 5:850a9db98a41
- Child:
- 7:1c90f51096fe
--- a/l86.hpp Sun Nov 12 23:34:19 2017 +0000 +++ b/l86.hpp Mon Nov 13 15:44:11 2017 +0000 @@ -10,9 +10,30 @@ #define DEBUGGER // uncomment to output serial data to PC -#define MAX_NMEA_LENGTH 82 // maximum length of an NMEA sentence +/* PIN DEFINITIONS */ +#define RESET_PIN PB_14 +#define FORCE_ON_PIN PB_15 +#define ONEPPS_PIN PA_8 +#define GPS_RX PA_10 +#define GPS_TX PA_9 +#define PC_RX PC_5 +#define PC_TX PC_4 +#define GPS_STATUS_LED LED1 + +/* PMTK MMESSAGE DEFINITIONS */ +#define MAX_NMEA_LENGTH 82 // maximum length of an NMEA sentence #define PMTK_SET_NMEA_OUTPUT_RMC "$PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n" #define PMTK_SET_UPDATE_F_2HZ "$PMTK300,500,0,0,0,0*28\r\n" +#define PMTK_COLD_RESTART "$PMTK104*37\r\n" +#define PMTK_WARM_START "$PMTK102*31\r\n" +#define PMTK_HOT_START "$PMTK101*32\r\n" +#define PMTK_ALWAYS_LOCATE_STANDDBY "$PMTK225,8*23\r\n" +#define PMTK_ALWAYS_LOCATE_BACKUP "$PMTK225,922\r\n*" +#define PMTK_STANDBY_MODE "$PMTK161,0*28\r\n" +#define PMTK_BACKUP_MODE "$PMTK225,4*2F\r\n" // Force_on must be low before entering backup mode! + // Pull Force_on high to exit backup mode + + static const char GPRMC_Tag[] = "$GPRMC"; static const char GNRMC_Tag[] = "$GNRMC"; @@ -30,15 +51,12 @@ char Speed_Over_Ground[5]; /* In Knots */ char Course_Over_Ground[7]; /* Degrees */ char Date[7]; /* ddmmyy */ - char Mode[5]; /* N = No Fix A = autonomous mode, D = Differential mode */ + char Magnetic_Variation[1]; /* Not being output */ + char Magnetic_E_W_Indicator[1]; /* Not being outupt */ + char Mode[5]; /* N = No Fix, A = autonomous mode, D = Differential mode + checksum */ }RMC_Data; -void Parse_RMC_data(RMC_data RMC_data_parse); - - -// uint8_t l86_send(char *string); // generic function for sending a command to the module -// void l86_set_uf(uint8_t update_f); // set the update frequency of the l86 module in Hz (1 - 10) -// uint8_t l86_wait_for_ack(void); // wait for acknowledge frame from l86 +void Parse_RMC_data(RMC_data *RMC_data_parse); // struct RMC_msg l86_retreive_RMC(void) <= e.g.