Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_udp.h
Go to the documentation of this file.
1 #ifndef GPS_UDP_H
2 #define GPS_UDP_H
3 
4 #include "std.h"
5 
6 #define GPS_NB_CHANNELS 16
7 
8 extern bool_t gps_available;
9 
10 extern void gps_parse(void);
11 
12 #define GpsEvent(_sol_available_callback) { \
13  gps_parse(); \
14  if (gps_available) { \
15  gps.last_msg_ticks = sys_time.nb_sec_rem; \
16  gps.last_msg_time = sys_time.nb_sec; \
17  if (gps.fix == GPS_FIX_3D) { \
18  gps.last_3dfix_ticks = sys_time.nb_sec_rem; \
19  gps.last_3dfix_time = sys_time.nb_sec; \
20  } \
21  _sol_available_callback(); \
22  gps_available = FALSE; \
23  } \
24  }
25 
26 
27 #endif /* GPS_UDP_H */
bool_t gps_available
Is set to TRUE when a new REMOTE_GPS packet is received and parsed.
Definition: gps_datalink.c:32
void gps_parse(void)
Definition: gps_udp.c:57