8 #include "generated/airframe.h"
9 #include "generated/flight_plan.h"
17 #include <caml/mlvalues.h>
20 value
sim_use_gps_pos(value x, value y, value z, value c, value a, value
s, value cl, value t, value m, value lat,
23 gps.
fix = (Bool_val(m) ? 3 : 0);
26 gps.
hmsl = Double_val(a) * 1000.;
34 gps.
tow = Double_val(t) * 1000.;
37 lla_f.
lat = Double_val(
lat);
38 lla_f.
lon = Double_val(
lon);
40 lla_f.
alt = Double_val(a);
75 return sim_use_gps_pos(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10]);
struct GpsState gps
global GPS state
int16_t azim
azimuth in deg
uint32_t tow
GPS time of week in ms.
uint8_t qi
quality bitfield (GPS receiver specific)
int32_t hmsl
height above mean sea level (MSL) in mm
int8_t elev
elevation in deg
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
uint32_t sacc
speed accuracy in cm/s
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over MSL)
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
#define GPS_VALID_VEL_NED_BIT
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
#define GPS_VALID_POS_LLA_BIT
uint16_t pdop
position dilution of precision scaled by 100
#define GPS_VALID_HMSL_BIT
struct NedCoor_i ned_vel
speed NED in cm/s
uint8_t svid
Satellite ID.
uint8_t nb_channels
Number of scanned satellites.
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)
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
uint8_t flags
bitfield with GPS receiver specific flags
#define GPS_VALID_COURSE_BIT
#define GPS_VALID_POS_UTM_BIT
uint8_t num_sv
number of sat in fix
void gps_sim_publish(void)
int32_t alt
in millimeters (above WGS84 reference ellipsoid or above MSL)
uint8_t zone
UTM zone number.
int32_t east
in centimeters
int32_t north
in centimeters
#define LLA_BFP_OF_REAL(_o, _i)
Paparazzi floating point math for geodetic calculations.
float alt
in meters (normally above WGS84 reference ellipsoid)
vector in Latitude, Longitude and Altitude
Paparazzi fixed point math for geodetic calculations.
void ubxsend_cfg_rst(uint16_t a, uint8_t b)
value sim_use_gps_pos(value x, value y, value z, value c, value a, value s, value cl, value t, value m, value lat, value lon)
From airborne/autopilot/.
value sim_use_gps_pos_bytecode(value *a, int argn)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.