34 #ifndef GPS_POWER_GPIO_ON
35 #define GPS_POWER_GPIO_ON gpio_set
39 #define MSEC_PER_WEEK (1000*60*60*24*7)
45 #if PERIODIC_TELEMETRY
52 pprz_msg_send_SVINFO(trans, dev, AC_ID, &svid,
64 send_svinfo_id(trans, dev, i);
80 send_svinfo_id(trans, dev, i);
82 send_svinfo_id(trans, dev, i);
93 pprz_msg_send_GPS(trans, dev, AC_ID, &
gps.
fix,
98 send_svinfo_available(trans, dev);
103 pprz_msg_send_GPS_INT(trans, dev, AC_ID,
114 send_svinfo_available(trans, dev);
122 pprz_msg_send_GPS_LLA(trans, dev, AC_ID,
146 #ifdef GPS_POWER_GPIO
157 #if PERIODIC_TELEMETRY
uint8_t qi
quality bitfield (GPS receiver specific)
uint32_t t0_tow
GPS time of week in ms from last message.
int32_t north
in centimeters
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
Generic transmission transport header.
uint8_t nb_channels
Number of scanned satellites.
void gps_impl_init(void)
GPS initialization.
uint32_t t0_ticks
hw clock ticks when GPS message is received
Periodic telemetry system header (includes downlink utility and generated code).
Some architecture independent helper functions for GPIOs.
static uint32_t msec_of_sys_time_ticks(uint32_t ticks)
int32_t east
in centimeters
uint8_t svid
Satellite ID.
#define GPS_FIX_3D
3D GPS fix
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over ellipsoid)
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
int8_t elev
elevation in deg
int32_t alt
in millimeters above WGS84 reference ellipsoid
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
uint8_t zone
UTM zone number.
int32_t hmsl
height above mean sea level in mm
void WEAK gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
Default parser for GPS injected data.
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
data structure for GPS information
uint32_t tow
GPS time of week in ms.
#define GPS_FIX_NONE
No GPS fix.
Device independent GPS code (interface)
uint16_t pdop
position dilution of precision scaled by 100
struct EcefCoor_i ecef_pos
position in ECEF in cm
#define DefaultPeriodic
Set default periodic telemetry.
int32_t lon
in degrees*1e7
static const struct usb_device_descriptor dev
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)
volatile uint32_t nb_sec
full seconds since startup
void gps_periodic_check(void)
Periodic GPS check.
uint8_t flags
bitfield with GPS receiver specific flags
struct GpsTimeSync gps_time_sync
uint32_t last_msg_ticks
cpu time ticks at last received GPS 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 num_sv
number of sat in fix
arch independent LED (Light Emitting Diodes) API
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
#define GPS_TIMEOUT
GPS timeout in seconds.
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
int32_t lat
in degrees*1e7
struct NedCoor_i ned_vel
speed NED in cm/s
struct GpsState gps
global GPS state
void gpio_setup_output(uint32_t port, uint16_t gpios)
Setup one or more pins of the given GPIO port as outputs.
void gps_init(void)
initialize the global GPS state
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.