35 #include "pprzlink/pprzlink_device.h"
39 #define Invert2Bytes(x) ((x>>8) | (x<<8))
40 #define Invert4Bytes(x) ((x>>24) | ((x<<8) & 0x00FF0000) | ((x>>8) & 0x0000FF00) | (x<<24))
69 } __attribute__((packed));
110 } __attribute__((packed));
221 if ((
p->nav_type >> 8 & 0x7) >= 0x4) {
223 }
else if ((
p->nav_type >> 8 & 0x7) >= 0x1) {
276 switch (message_id) {
289 struct link_device *
dev = &((SIRF_GPS_LINK).device);
291 while (
dev->char_available(
dev->periph)) {
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Device independent GPS code (interface)
uint32_t tow
GPS time of week in ms.
int32_t hmsl
height above mean sea level (MSL) in mm
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
uint32_t sacc
speed accuracy in cm/s
uint32_t cacc
course accuracy in rad*1e7
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
#define GPS_VALID_VEL_ECEF_BIT
struct EcefCoor_i ecef_pos
position in ECEF in cm
#define GPS_VALID_POS_LLA_BIT
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
uint16_t pdop
position dilution of precision scaled by 100
#define GPS_FIX_NONE
No GPS fix.
#define GPS_VALID_POS_ECEF_BIT
#define GPS_VALID_HMSL_BIT
uint32_t last_msg_time
cpu time in sec at last received GPS message
uint8_t nb_channels
Number of scanned satellites.
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
uint32_t pacc
position accuracy in cm
uint16_t gspeed
norm of 2d ground speed in cm/s
uint8_t valid_fields
bitfield indicating valid fields (GPS_VALID_x_BIT)
#define GPS_FIX_2D
2D GPS fix
#define GPS_FIX_3D
3D GPS fix
#define GPS_VALID_COURSE_BIT
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
uint8_t num_sv
number of sat in fix
uint16_t extended_week_number
int32_t alt_msl
in meters *10^2
int32_t y_pos
y-position in m
uint8_t ch1prn
pseudo-random noise, 12 channels
int32_t clock_bias
in m * 10^2
uint8_t num_sat
Number of satellites used for solution.
uint8_t msg_id
hex value 0x29 (= decimal 41)
uint32_t ehpe
estimated horizontal position error, in meters * 10^2
int32_t longitude
in degrees (+= East) *10*7
uint32_t evpe
estimated vertical position error, in meters * 10^2
int32_t latitude
in degrees (+= North) *10^7
uint8_t add_info
Additional mode info.
uint32_t tow
time of week in seconds * 10^2
void sirf_parse_char(uint8_t c)
uint16_t ehve
estimated horizontal velocity error in m/s * 10^2
uint16_t cog
course over ground, in degrees clockwise from true north * 10^2
uint16_t distance_err
in meters
uint32_t clock_drift_err
in m/s * 10^2
uint32_t tow
time of week in seconds *10^3]
uint8_t hdop
Horizontal dilution of precision x 5 (0.2 precision)
uint16_t sog
speed over ground, in m/s * 10^2
void sirf_parse_msg(void)
void gps_sirf_event(void)
int16_t mag_var
not implemented
uint16_t heading_err
in degrees * 10^2
uint16_t nav_valid
if equal to 0x0000, then navigation solution is valid
int32_t x_pos
x-position in m
int16_t vy
y-velocity * 8 in m/s
uint8_t hdop
horizontal dilution of precision *5 (0.2 precision)
int16_t heading_rate
in deg/s * 10^2
uint32_t distance
Distance traveled since reset in m.
uint32_t clock_bias_err
in m * 10^2
uint8_t msg_id
hex value 0x02 ( = decimal 2)
int32_t alt_ellipsoid
in meters *10^2
int32_t clock_drift
in m/s * 10^2
int32_t z_pos
z-position in m
uint32_t sat_id
satellites used in solution. Each satellite corresponds with a bit, e.g. bit 1 ON = SV 1 is used in s...
int16_t vz
z-velocity * 8 in m/s
int16_t climb_rate
in m/s * 10^2
uint8_t num_sat
Number of satellites in fix.
int16_t vx
x-velocity * 8 in m/s
uint32_t ete
estimated time error, in seconds * 10^2
Sirf protocol specific code.
char msg_buf[SIRF_MAXLEN]
buffer for storing one nmea-line
int32_t lat
in degrees*1e7
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t lon
in degrees*1e7
arch independent LED (Light Emitting Diodes) API
Paparazzi floating point math for geodetic calculations.
#define UNINIT
Receiving pprz messages.
static const struct usb_device_descriptor dev
volatile uint32_t nb_sec
full seconds since startup
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.