|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
37 #define GPS_FIX_NONE 0x00
38 #define GPS_FIX_2D 0x02
39 #define GPS_FIX_3D 0x03
40 #define GPS_FIX_DGPS 0x04
41 #define GPS_FIX_RTK 0x05
43 #define GpsFixValid() (gps.fix >= GPS_FIX_3D)
45 #define GpsIsLost() !GpsFixValid()
48 #define GPS_VALID_POS_ECEF_BIT 0
49 #define GPS_VALID_POS_LLA_BIT 1
50 #define GPS_VALID_POS_UTM_BIT 2
51 #define GPS_VALID_VEL_ECEF_BIT 3
52 #define GPS_VALID_VEL_NED_BIT 4
53 #define GPS_VALID_HMSL_BIT 5
54 #define GPS_VALID_COURSE_BIT 6
56 #ifndef GPS_NB_CHANNELS
57 #define GPS_NB_CHANNELS 40
60 #define GPS_MODE_AUTO 0
61 #define GPS_MODE_PRIMARY 1
62 #define GPS_MODE_SECONDARY 2
64 #ifndef MULTI_GPS_MODE
65 #define MULTI_GPS_MODE GPS_MODE_AUTO
69 #define __GpsId(_x) _x ## _ID
70 #define _GpsId(_x) __GpsId(_x)
71 #define GpsId(_x) _GpsId(_x)
164 #ifdef GPS_SECONDARY_TYPE_H
165 #include GPS_SECONDARY_TYPE_H
176 #define GPS_TIMEOUT 2
181 static bool gps_had_valid_fix =
false;
183 gps_had_valid_fix =
true;
185 return gps_had_valid_fix;
uint8_t valid_fields
bitfield indicating valid fields (GPS_VALID_x_BIT)
data structure for Space Vehicle Information of a single satellite
struct UtmCoor_i utm_int_from_gps(struct GpsState *gps_s, uint8_t zone)
Convenience function to get utm position in int from GPS structure.
struct UtmCoor_f utm_float_from_gps(struct GpsState *gps_s, uint8_t zone)
Convenience function to get utm position in float from GPS structure.
int16_t azim
azimuth in deg
uint8_t flags
bitfield with GPS receiver specific flags
uint32_t tow
GPS time of week in ms.
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.
uint8_t nb_channels
Number of scanned satellites.
Paparazzi fixed point math for geodetic calculations.
data structure for GPS information
uint32_t pacc
position accuracy in cm
uint32_t sacc
speed accuracy in cm/s
uint32_t vacc
vertical accuracy in cm
struct NedCoor_i ned_vel
speed NED in cm/s
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
Paparazzi floating point math for geodetic calculations.
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
void gps_periodic_check(struct GpsState *gps_s)
Periodic GPS check.
uint32_t hacc
horizontal accuracy in cm
uint16_t gps_day_number(uint16_t year, uint8_t month, uint8_t day)
Number of days since navigation epoch (6 January 1980)
static bool gps_has_been_good(void)
uint16_t speed_3d
norm of 3d speed in cm/s
uint8_t zone
UTM zone number.
data structure for GPS time sync
vector in EarthCenteredEarthFixed coordinates
vector in North East Down coordinates
uint8_t svid
Satellite ID.
int32_t t0_tow_frac
fractional ns remainder of tow [ms], range -500000 .. 500000
Architecture independent timing functions.
uint16_t gspeed
norm of 2d ground speed in cm/s
data structures for GPS with RTK capabilities
uint16_t reset
hotstart, warmstart, coldstart
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over MSL)
uint8_t comp_id
id of current gps
struct GpsState gps
global GPS state
void gps_init(void)
initialize the global GPS state
struct GpsTimeSync gps_time_sync
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
uint32_t last_msg_time
cpu time in sec at last received GPS message
struct EcefCoor_i ecef_pos
position in ECEF in cm
vector in Latitude, Longitude and Altitude
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
position in UTM coordinates Units: meters
uint8_t num_sv
number of sat in fix
int32_t hmsl
height above mean sea level (MSL) in mm
uint32_t t0_ticks
hw clock ticks when GPS message is received
int8_t elev
elevation in deg
uint16_t pdop
position dilution of precision scaled by 100
position in UTM coordinates
uint16_t gps_week_number(uint16_t year, uint8_t month, uint8_t day)
Number of weeks since navigation epoch (6 January 1980)
uint32_t cacc
course accuracy in rad*1e7
void gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
GPS packet injection (default empty)
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
uint8_t zone
UTM zone number.