Zack Braun
/
GPS_20u7
Library to operate GPS 20u7 with Mbed
Embed:
(wiki syntax)
Show/hide line numbers
gps.h
00001 #include "mbed.h" 00002 #include "TinyGPS.h" 00003 00004 #ifndef MBED_GPS_H 00005 #define MBED_GPS_H 00006 00007 00008 /** A GPS interface for reading from a Globalsat EM-406 GPS Module */ 00009 class GPS { 00010 public: 00011 00012 /** Create the GPS interface, connected to the specified serial port 00013 */ 00014 GPS(PinName tx, PinName rx); 00015 00016 //Checks if GPS (Serial Object) is connected 00017 bool isConnected(); 00018 00019 //Does GPS Module have lock on satellite 00020 bool isLocked(); 00021 00022 //parses incoming NMEA standard strings from GPS Module 00023 void parseNMEA(); 00024 00025 double f_lat, f_lon, f_altitude, f_course, knots,mph, mps,kmph, f_hdop; 00026 00027 long lat, lon, altitude, hdop; 00028 00029 unsigned long course, age; //how long a fix has lasted to satellite in ms 00030 00031 int year; 00032 byte month, day, hour, minute, second; 00033 00034 unsigned long sat_count,speed; 00035 00036 00037 private: 00038 00039 Serial _gps; 00040 00041 TinyGPS gpsr; 00042 00043 00044 }; 00045 00046 #endif
Generated on Sat Jul 16 2022 01:40:30 by 1.7.2