41 #define GPS_FIX_NONE 0x00
42 #define GPS_FIX_2D 0x02
43 #define GPS_FIX_3D 0x03
44 #define GPS_FIX_DGPS 0x04
45 #define GPS_FIX_RTK 0x05
47 #define GpsFixValid() (gps.fix >= GPS_FIX_3D)
49 #define GpsIsLost() !GpsFixValid()
52 #ifndef GPS_NB_CHANNELS
53 #define GPS_NB_CHANNELS 1
117 #define GPS_TIMEOUT 2
122 static bool_t gps_had_valid_fix =
FALSE;
124 gps_had_valid_fix =
TRUE;
126 return gps_had_valid_fix;
139 #define gps_Reset(_val) { \
uint8_t qi
quality bitfield (GPS receiver specific)
uint32_t t0_tow
GPS time of week in ms from last message.
uint32_t gps_tow_from_sys_ticks(uint32_t sys_ticks)
Convert time in sys_time ticks to GPS time of week.
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
int16_t azim
azimuth in deg
uint32_t pacc
position accuracy in cm
uint8_t nb_channels
Number of scanned satellites.
uint32_t t0_ticks
hw clock ticks when GPS message is received
vector in EarthCenteredEarthFixed coordinates
void gps_impl_init(void)
GPS model specific init implementation.
void gps_periodic_check(void)
Periodic GPS check.
void gps_init(void)
initialize the global GPS state
uint16_t reset
hotstart, warmstart, coldstart
static bool_t gps_has_been_good(void)
uint8_t svid
Satellite ID.
vector in Latitude, Longitude and Altitude
uint16_t speed_3d
norm of 3d speed in cm/s
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over ellipsoid)
void gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
GPS packet injection (default empty)
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
int8_t elev
elevation in deg
struct GpsState gps
global GPS state
uint32_t sacc
speed accuracy in cm/s
uint32_t last_msg_time
cpu time in sec at last received GPS message
uint32_t cacc
course accuracy in rad*1e7
struct GpsTimeSync gps_time_sync
int32_t hmsl
height above mean sea level in mm
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
Architecture independent timing functions.
data structure for GPS information
uint32_t tow
GPS time of week in ms.
data structure for Space Vehicle Information of a single satellite
uint16_t pdop
position dilution of precision scaled by 100
struct EcefCoor_i ecef_pos
position in ECEF in cm
Paparazzi fixed point math for geodetic calculations.
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
vector in North East Down coordinates
int32_t t0_tow_frac
fractional ns remainder of tow [ms], range -500000 .. 500000
uint8_t flags
bitfield with GPS receiver specific flags
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
uint8_t num_sv
number of sat in fix
uint16_t gspeed
norm of 2d ground speed in cm/s
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
data structure for GPS time sync
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
struct NedCoor_i ned_vel
speed NED in cm/s
position in UTM coordinates