GPS working with LoRa code - can't transmit faster that once every 6 seconds

Dependencies:   mbed LoRaWAN-lib_gps_lora SingleFrequencyLora

Committer:
Rishin
Date:
Sun Nov 12 23:34:19 2017 +0000
Revision:
5:850a9db98a41
Child:
6:670ff1507ff4
Add RMC parsing code - untested but compiles

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Rishin 5:850a9db98a41 1 /*
Rishin 5:850a9db98a41 2 * l86.h
Rishin 5:850a9db98a41 3 * Author: Rishin Amin
Rishin 5:850a9db98a41 4 * library header file for communication with the Quectel L86 MT33 GPS module
Rishin 5:850a9db98a41 5 *
Rishin 5:850a9db98a41 6 */
Rishin 5:850a9db98a41 7
Rishin 5:850a9db98a41 8 #ifndef l86_hpp
Rishin 5:850a9db98a41 9 #define l86_hpp
Rishin 5:850a9db98a41 10
Rishin 5:850a9db98a41 11 #define DEBUGGER // uncomment to output serial data to PC
Rishin 5:850a9db98a41 12
Rishin 5:850a9db98a41 13 #define MAX_NMEA_LENGTH 82 // maximum length of an NMEA sentence
Rishin 5:850a9db98a41 14 #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"
Rishin 5:850a9db98a41 15 #define PMTK_SET_UPDATE_F_2HZ "$PMTK300,500,0,0,0,0*28\r\n"
Rishin 5:850a9db98a41 16
Rishin 5:850a9db98a41 17 static const char GPRMC_Tag[] = "$GPRMC";
Rishin 5:850a9db98a41 18 static const char GNRMC_Tag[] = "$GNRMC";
Rishin 5:850a9db98a41 19
Rishin 5:850a9db98a41 20 typedef struct RMC_data
Rishin 5:850a9db98a41 21 {
Rishin 5:850a9db98a41 22 char Message[MAX_NMEA_LENGTH]; /* Un-parsed NMEA sentence */
Rishin 5:850a9db98a41 23 char Message_ID[7]; /* RMC Protocol header */
Rishin 5:850a9db98a41 24 char UTC_Time[11]; /* hhmmss.sss */
Rishin 5:850a9db98a41 25 char Status[2]; /* A = data valid, V = data NOT valid */
Rishin 5:850a9db98a41 26 char Latitude[10]; /* ddmm.mmmm */
Rishin 5:850a9db98a41 27 char N_S_Indicator[3]; /* N = North, S = South */
Rishin 5:850a9db98a41 28 char Longitude[11]; /* dddmm.mmmm */
Rishin 5:850a9db98a41 29 char E_W_Indicator[3]; /* E = East, W = West */
Rishin 5:850a9db98a41 30 char Speed_Over_Ground[5]; /* In Knots */
Rishin 5:850a9db98a41 31 char Course_Over_Ground[7]; /* Degrees */
Rishin 5:850a9db98a41 32 char Date[7]; /* ddmmyy */
Rishin 5:850a9db98a41 33 char Mode[5]; /* N = No Fix A = autonomous mode, D = Differential mode */
Rishin 5:850a9db98a41 34 }RMC_Data;
Rishin 5:850a9db98a41 35
Rishin 5:850a9db98a41 36 void Parse_RMC_data(RMC_data RMC_data_parse);
Rishin 5:850a9db98a41 37
Rishin 5:850a9db98a41 38
Rishin 5:850a9db98a41 39 // uint8_t l86_send(char *string); // generic function for sending a command to the module
Rishin 5:850a9db98a41 40 // void l86_set_uf(uint8_t update_f); // set the update frequency of the l86 module in Hz (1 - 10)
Rishin 5:850a9db98a41 41 // uint8_t l86_wait_for_ack(void); // wait for acknowledge frame from l86
Rishin 5:850a9db98a41 42
Rishin 5:850a9db98a41 43 // struct RMC_msg l86_retreive_RMC(void) <= e.g.
Rishin 5:850a9db98a41 44
Rishin 5:850a9db98a41 45 #endif
Rishin 5:850a9db98a41 46