GNSS library

Committer:
brdarji
Date:
Sun Jul 03 08:36:50 2016 +0000
Revision:
1:eff122356909
Parent:
0:15611c7938a3
GNSS library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
simon 0:15611c7938a3 1 #include "mbed.h"
simon 0:15611c7938a3 2
simon 0:15611c7938a3 3 /** A GPS interface for reading from a Globalsat EM-406 GPS Module */
simon 0:15611c7938a3 4 class GPS {
simon 0:15611c7938a3 5 public:
simon 0:15611c7938a3 6
simon 0:15611c7938a3 7 /** Create the GPS interface, connected to the specified serial port
simon 0:15611c7938a3 8 */
simon 0:15611c7938a3 9 GPS(PinName tx, PinName rx);
simon 0:15611c7938a3 10
simon 0:15611c7938a3 11 /** Sample the incoming GPS data, returning whether there is a lock
simon 0:15611c7938a3 12 *
simon 0:15611c7938a3 13 * @return 1 if there was a lock when the sample was taken (and therefore .longitude and .latitude are valid), else 0
simon 0:15611c7938a3 14 */
simon 0:15611c7938a3 15 int sample();
brdarji 1:eff122356909 16 float trunc(float v);
simon 0:15611c7938a3 17 /** The longitude (call sample() to set) */
simon 0:15611c7938a3 18 float longitude;
simon 0:15611c7938a3 19
simon 0:15611c7938a3 20 /** The latitude (call sample() to set) */
simon 0:15611c7938a3 21 float latitude;
brdarji 1:eff122356909 22 int sate_in_view,lock;
brdarji 1:eff122356909 23 float time;
brdarji 1:eff122356909 24
simon 0:15611c7938a3 25
simon 0:15611c7938a3 26 private:
brdarji 1:eff122356909 27
simon 0:15611c7938a3 28 void getline();
simon 0:15611c7938a3 29
simon 0:15611c7938a3 30 Serial _gps;
simon 0:15611c7938a3 31 char msg[256];
simon 0:15611c7938a3 32
brdarji 1:eff122356909 33 };