Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
sensors_hitl.c File Reference
#include "modules/sensors/sensors_hitl.h"
#include "modules/imu/imu.h"
#include "modules/gps/gps.h"
#include "modules/core/abi.h"
#include "mcu_periph/sys_time.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"
Include dependency graph for sensors_hitl.c:

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 = {0}
bool gps_has_fix
static bool sensors_hitl_msg_available = false
static uint8_t sensors_hitl_dl_buffer [DATALINK_MSG_SIZE]
static struct pprz_transport sensors_hitl_tp

Data Structure Documentation

◆ ImuHitl

struct ImuHitl

Definition at line 35 of file sensors_hitl.c.

Collaboration diagram for ImuHitl:
Data Fields
struct Int32Vect3 accel
uint8_t accel_available
struct Int32Rates gyro
uint8_t gyro_available
struct Int32Vect3 mag
uint8_t mag_available

Function Documentation

◆ gps_feed_value()

void gps_feed_value ( void )

Definition at line 224 of file sensors_hitl.c.

◆ imu_feed_gyro_accel()

void imu_feed_gyro_accel ( void )

Definition at line 222 of file sensors_hitl.c.

◆ imu_feed_mag()

void imu_feed_mag ( void )

Definition at line 223 of file sensors_hitl.c.

◆ sensors_hitl_event()

void sensors_hitl_event ( void )

Definition at line 201 of file sensors_hitl.c.

References DlCheckAndParse(), get_sys_time_usec(), imu_hitl, IMU_NPS_ID, sensors_hitl_dl_buffer, sensors_hitl_msg_available, and sensors_hitl_tp.

Here is the call graph for this function:

◆ sensors_hitl_init()

void sensors_hitl_init ( void )

◆ sensors_hitl_parse_HITL_AIR_DATA()

void sensors_hitl_parse_HITL_AIR_DATA ( uint8_t * buf)

Definition at line 178 of file sensors_hitl.c.

References AIRSPEED_NPS_ID, BARO_SIM_SENDER_ID, get_sys_time_usec(), and INCIDENCE_NPS_ID.

Here is the call graph for this function:

◆ sensors_hitl_parse_HITL_GPS()

◆ sensors_hitl_parse_HITL_IMU()

void sensors_hitl_parse_HITL_IMU ( uint8_t * buf)

Definition at line 87 of file sensors_hitl.c.

References imu_hitl, RATES_ASSIGN, and VECT3_ASSIGN.

◆ sensors_hitl_periodic()

void sensors_hitl_periodic ( void )

Definition at line 76 of file sensors_hitl.c.

References electrical.

Variable Documentation

◆ gps_has_fix

bool gps_has_fix

Definition at line 47 of file sensors_hitl.c.

◆ gps_hitl

struct GpsState gps_hitl = {0}

Definition at line 46 of file sensors_hitl.c.

Referenced by sensors_hitl_parse_HITL_GPS().

◆ imu_hitl

struct ImuHitl imu_hitl

◆ sensors_hitl_dl_buffer

uint8_t sensors_hitl_dl_buffer[DATALINK_MSG_SIZE]
static

Definition at line 50 of file sensors_hitl.c.

Referenced by sensors_hitl_event().

◆ sensors_hitl_msg_available

bool sensors_hitl_msg_available = false
static

Definition at line 49 of file sensors_hitl.c.

Referenced by sensors_hitl_event().

◆ sensors_hitl_tp

struct pprz_transport sensors_hitl_tp
static

Definition at line 51 of file sensors_hitl.c.

Referenced by sensors_hitl_event(), and sensors_hitl_init().