-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathPSCS_GPS.h
67 lines (55 loc) · 1.55 KB
/
PSCS_GPS.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/**
* @file PSCS_GPS.h
* @author SeungMin Shin, Haneulbit Kim, Chan Lee
* @license This project is released under the MIT License (MIT)
* @copyright Copyright (c) 2018 Asgardia
* @date June 2018
* @brief ...
*/
#ifndef PSCS_GPS_h
#define PSCS_GPS_h
#include "Arduino.h"
struct LocationInfo {
float alt; //Altitude in meters
float lat; //Latitude in hddd.ddddddd
float lng; //Longitude in hddd.ddddddd
float speed; ///< ground speed in m/sec
float course; //< ground course in degrees
};
class MngGps
{
public:
void readGpsData(); //Measure GPS value
bool isGpsDataReady();
void gpsBegin();
void rx_empty();
float time;
int32_t date;
float ground_speed; ///< ground speed in m/sec
float ground_course; //< ground course in degrees
uint8_t num_satellites; //< Number of visible satellites
float alt; //Altitude in meters
float lat; //Latitude in hddd.ddddddd
float lng; //Longitude in hddd.ddddddd
private:
};
class TskGps
{
public:
TskGPS();
void begin();
void update();
int32_t getTime();
int32_t getDate();
uint8_t getNumOfSatellites();
LocationInfo getLocation();
bool isGpsDataNew();
void rx_empty();
void printGpsInfo();
void printGpsInfoSimple();
private:
int32_t _last_gps_time_ms;
MngGps _manager_gps;
bool _gps_data_flag;
};
#endif