-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgps.h
55 lines (48 loc) · 921 Bytes
/
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
/*
* gps.c
*
* Created on: Feb 16, 2019
* Author: TritionCubed
*
* The GPS module for the payload.
* Gives access to the UPUTRONICS breakout for MAX-M8C GPS
*
* The breakout uses the following pins:
*
* RPI Chip
* --------------------
* Pin 1 (3v3) VCC
* Pin 6 (GND) GND
* Pin 5 (SCL) SCL
* Pin 3 (SDA) SDA
*/
//the I2C address
#define GPS_ADDRESS 0x42
typedef struct {
double latitude;
double longitude;
double altitude;
double speed;
double course;
int hour;
int minute;
int second;
} loc_t;
/*
* Stub
*/
void gps_init();
/*
* Stub
*/
void gps_close();
/*
* Saves location data to the given
* location struct.
*/
void getLocation( loc_t *coord );
/*
* Convert lat e lon to decimals (from deg)
*/
void gps_convert_deg_to_dec( double *latitude, char ns, double *longitude, char we );
double gps_deg_dec( double deg_point );