nothing

Dependents:   mbed-os-example-mbed5-wifi

stm32l475e_iot01_gps.h

Committer:
ctlee
Date:
2021-01-15
Revision:
0:81d4b52c0083

File content as of revision 0:81d4b52c0083:


#include "mbed.h"
 
#ifndef __STM32L475E_IOT01_GPS_H
#define __STM32L475E_IOT01_GPS_H
 
/**  A GPS interface for reading from a Globalsat EM-406 GPS Module */
class GPS {
public:
 
    /** Create the GPS interface, connected to the specified serial port
     */    
    GPS(PinName tx, PinName rx);
    
    /** Sample the incoming GPS data, returning whether there is a lock
     * 
     * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0
     */
    int sample();
    
    /** The longitude (call sample() to set) */
    float longitude;
 
    /** The latitude (call sample() to set) */
    float latitude;
    
    int num_sat;
    float hori_dilute;
    float alt;
    float geoid, time;
    char ns, ew;
     char gu, hu;
     
private:
    float trunc(float v);
    void getline();
    
    Serial _gps;
    char msg[256];
 
};
 
#endif