Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
#include "modules/sensors/sensors_hitl.h"
#include "modules/imu/imu.h"
#include "modules/gps/gps.h"
#include "modules/core/abi.h"
#include "modules/energy/electrical.h"
#include "generated/airframe.h"
#include "modules/datalink/datalink.h"
#include "modules/datalink/telemetry.h"
#include "nps_sensors_params_common.h"
Go to the source code of this file.
Data Structures | |
struct | ImuHitl |
Functions | |
void | sensors_hitl_init (void) |
void | sensors_hitl_periodic (void) |
void | sensors_hitl_parse_HITL_IMU (uint8_t *buf) |
void | sensors_hitl_parse_HITL_GPS (uint8_t *buf) |
void | sensors_hitl_parse_HITL_AIR_DATA (uint8_t *buf) |
void | sensors_hitl_event (void) |
void | imu_feed_gyro_accel (void) |
void | imu_feed_mag (void) |
void | gps_feed_value (void) |
Variables | |
struct ImuHitl | imu_hitl |
struct GpsState | gps_hitl |
bool | gps_has_fix |
static bool | sensors_hitl_msg_available = false |
static uint8_t | sensors_hitl_dl_buffer [MSG_SIZE] |
static struct pprz_transport | sensors_hitl_tp |
struct ImuHitl |
Definition at line 34 of file sensors_hitl.c.
Data Fields | ||
---|---|---|
struct Int32Vect3 | accel | |
uint8_t | accel_available | |
struct Int32Rates | gyro | |
uint8_t | gyro_available | |
struct Int32Vect3 | mag | |
uint8_t | mag_available |
void gps_feed_value | ( | void | ) |
Definition at line 237 of file sensors_hitl.c.
void imu_feed_gyro_accel | ( | void | ) |
Definition at line 235 of file sensors_hitl.c.
void imu_feed_mag | ( | void | ) |
Definition at line 236 of file sensors_hitl.c.
void sensors_hitl_event | ( | void | ) |
Definition at line 214 of file sensors_hitl.c.
References ImuHitl::accel, ImuHitl::accel_available, DlCheckAndParse(), get_sys_time_usec(), ImuHitl::gyro, ImuHitl::gyro_available, imu_hitl, IMU_NPS_ID, ImuHitl::mag, ImuHitl::mag_available, sensors_hitl_dl_buffer, sensors_hitl_msg_available, and sensors_hitl_tp.
void sensors_hitl_init | ( | void | ) |
Definition at line 52 of file sensors_hitl.c.
References ImuHitl::accel_available, accel_neutral, accel_scale, gps_has_fix, ImuHitl::gyro_available, gyro_scale, imu_hitl, IMU_NPS_ID, imu_set_defaults_accel(), imu_set_defaults_gyro(), imu_set_defaults_mag(), ImuHitl::mag_available, mag_scale, and sensors_hitl_tp.
void sensors_hitl_parse_HITL_AIR_DATA | ( | uint8_t * | buf | ) |
Definition at line 191 of file sensors_hitl.c.
References AIRSPEED_NPS_ID, BARO_SIM_SENDER_ID, get_sys_time_usec(), and INCIDENCE_NPS_ID.
void sensors_hitl_parse_HITL_GPS | ( | uint8_t * | buf | ) |
Definition at line 124 of file sensors_hitl.c.
References LlaCoor_i::alt, GpsState::course, GpsState::ecef_vel, GpsState::fix, get_sys_time_usec(), GPS_FIX_3D, GPS_FIX_NONE, gps_has_fix, gps_hitl, GPS_SIM_ID, GPS_VALID_COURSE_BIT, GPS_VALID_HMSL_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, GpsState::gspeed, GpsState::hacc, GpsState::hmsl, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, LlaCoor_i::lat, GpsState::lla_pos, LlaCoor_i::lon, ltp_def_from_lla_i(), sys_time::nb_sec, sys_time::nb_sec_rem, ned_of_ecef_vect_i(), GpsState::ned_vel, GpsState::num_sv, GpsState::pacc, GpsState::pdop, GpsState::sacc, GpsState::speed_3d, GpsState::tow, GpsState::vacc, GpsState::valid_fields, VECT3_FLOAT_OF_CM, GpsState::week, NedCoor_f::x, EcefCoor_i::x, NedCoor_i::x, NedCoor_f::y, EcefCoor_i::y, NedCoor_i::y, NedCoor_f::z, EcefCoor_i::z, and NedCoor_i::z.
void sensors_hitl_parse_HITL_IMU | ( | uint8_t * | buf | ) |
Definition at line 100 of file sensors_hitl.c.
References ImuHitl::accel, ImuHitl::accel_available, ImuHitl::gyro, ImuHitl::gyro_available, imu_hitl, ImuHitl::mag, ImuHitl::mag_available, RATES_ASSIGN, and VECT3_ASSIGN.
void sensors_hitl_periodic | ( | void | ) |
Definition at line 89 of file sensors_hitl.c.
References electrical, and Electrical::vsupply.
bool gps_has_fix |
Definition at line 46 of file sensors_hitl.c.
Referenced by sensors_hitl_init(), and sensors_hitl_parse_HITL_GPS().
struct GpsState gps_hitl |
Definition at line 1 of file sensors_hitl.c.
Referenced by sensors_hitl_parse_HITL_GPS().
struct ImuHitl imu_hitl |
Definition at line 1 of file sensors_hitl.c.
Referenced by sensors_hitl_event(), sensors_hitl_init(), and sensors_hitl_parse_HITL_IMU().
Definition at line 49 of file sensors_hitl.c.
Referenced by sensors_hitl_event().
|
static |
Definition at line 48 of file sensors_hitl.c.
Referenced by sensors_hitl_event().
|
static |
Definition at line 49 of file sensors_hitl.c.
Referenced by sensors_hitl_event(), and sensors_hitl_init().