-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGPS.c
72 lines (66 loc) · 2.02 KB
/
GPS.c
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
68
69
70
71
72
#include "GPS.h"
#ifdef _DEBUG
#include <__cross_studio_io.h>
#endif
/*#include "adafruit_GPS.h"
#include "ports.h"
GPS_Data data;
volatile char g = 0;
volatile int compteur = 0;
volatile int ok = 0;
void boussolemode(void){
for (;;)
{
if (ok)
{
_DINT();
debug_printf("\nMATRAME %s\n", trame);
ok = 0;
if (parse(trame, &data))
{
#ifdef _DEBUG
if (data.type == GGA)
{
type = "gga";
}
else if (data.type == RMC)
type = "rmc";
else
type = "inc";
debug_printf("\nParsed: type: %s\n\
hours(%d) minutes(%d) seconds(%d) year(%d) month(%d) day(%d)\n\
milliseconds(%d)\n\
latitude(%f) longitude(%f)\n\
latitude_fixed(%d) longitude_fixed(%d)\n\
latitudeDegrees(%f) longitudeDegrees(%f)\n\
geoidheight(%f) altitude(%f)\n\
speed(%f) angle(%f) magvariation(%f) HDOP(%f)\n\
lat(%d) lon(%d) mag(%d)\n\
fix(%d)\n\
fixquality(%d) satellites(%d)\n",
type,
data.hour, data.minute, data.seconds, data.year, data.month, data.day,
data.milliseconds,
data.latitude, data.longitude,
data.latitude_fixed, data.longitude_fixed,
data.latitudeDegrees, data.longitudeDegrees,
data.geoidheight, data.altitude,
data.speed, data.angle, data.magvariation, data.HDOP,
data.lat, data.lon, data.mag,
data.fix,
data.fixquality, data.satellites);
#endif
}
_EINT();
}
if (newNMEAreceived())
{
_DINT();
#ifdef _DEBUG
debug_printf("\nNew NMEA: %s\n", lastNMEA());
#endif
//MACHING ICI
_EINT();
}
}
}*/