GNSS library
Embed:
(wiki syntax)
Show/hide line numbers
GPS.h
00001 #include "mbed.h" 00002 00003 /** A GPS interface for reading from a Globalsat EM-406 GPS Module */ 00004 class GPS { 00005 public: 00006 00007 /** Create the GPS interface, connected to the specified serial port 00008 */ 00009 GPS(PinName tx, PinName rx); 00010 00011 /** Sample the incoming GPS data, returning whether there is a lock 00012 * 00013 * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0 00014 */ 00015 int sample(); 00016 float trunc(float v); 00017 /** The longitude (call sample() to set) */ 00018 float longitude; 00019 00020 /** The latitude (call sample() to set) */ 00021 float latitude; 00022 int sate_in_view,lock; 00023 float time; 00024 00025 00026 private: 00027 00028 void getline(); 00029 00030 Serial _gps; 00031 char msg[256]; 00032 00033 };
Generated on Thu Jul 14 2022 11:11:57 by
![doxygen](doxygen.png)