Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
nps_sensors.c
Go to the documentation of this file.
1 #include "nps_sensors.h"
2 
3 #include "generated/airframe.h"
4 #include NPS_SENSORS_PARAMS
5 
7 
8 void nps_sensors_init(double time)
9 {
10 
11  struct DoubleEulers body_to_imu_eulers =
12  { NPS_BODY_TO_IMU_PHI, NPS_BODY_TO_IMU_THETA, NPS_BODY_TO_IMU_PSI };
13  double_rmat_of_eulers(&sensors.body_to_imu_rmat, &body_to_imu_eulers);
14 
25 }
26 
27 
28 void nps_sensors_run_step(double time)
29 {
40 }
41 
42 
44 {
47  return TRUE;
48  }
49  return FALSE;
50 }
51 
53 {
56  return TRUE;
57  }
58  return FALSE;
59 }
60 
62 {
65  return TRUE;
66  }
67  return FALSE;
68 }
69 
71 {
74  return TRUE;
75  }
76  return FALSE;
77 }
78 
80 {
83  return TRUE;
84  }
85  return FALSE;
86 }
87 
89 {
92  return TRUE;
93  }
94  return FALSE;
95 }
96 
98 {
101  return TRUE;
102  }
103  return FALSE;
104 }
105 
107 {
108  if (sensors.aoa.data_available) {
110  return TRUE;
111  }
112  return FALSE;
113 }
114 
116 {
119  return TRUE;
120  }
121  return FALSE;
122 }
double_rmat_of_eulers
static void double_rmat_of_eulers(struct DoubleRMat *rm, struct DoubleEulers *e)
Definition: pprz_algebra_double.h:190
nps_sensor_sonar_run_step
void nps_sensor_sonar_run_step(struct NpsSensorSonar *sonar, double time)
Definition: nps_sensor_sonar.c:63
NpsSensors::temp
struct NpsSensorTemperature temp
Definition: nps_sensors.h:25
nps_sensors_aoa_available
bool nps_sensors_aoa_available(void)
Definition: nps_sensors.c:106
nps_sensor_gps_init
void nps_sensor_gps_init(struct NpsSensorGps *gps, double time)
Definition: nps_sensor_gps.c:10
NpsSensors::gyro
struct NpsSensorGyro gyro
Definition: nps_sensors.h:18
nps_sensor_airspeed_init
void nps_sensor_airspeed_init(struct NpsSensorAirspeed *airspeed, double time)
Definition: nps_sensor_airspeed.c:53
nps_sensors_sonar_available
bool nps_sensors_sonar_available(void)
Definition: nps_sensors.c:79
nps_sensors_init
void nps_sensors_init(double time)
Definition: nps_sensors.c:8
NpsSensors::airspeed
struct NpsSensorAirspeed airspeed
Definition: nps_sensors.h:24
NpsSensors::baro
struct NpsSensorBaro baro
Definition: nps_sensors.h:21
nps_sensors_sideslip_available
bool nps_sensors_sideslip_available(void)
Definition: nps_sensors.c:115
NpsSensors::accel
struct NpsSensorAccel accel
Definition: nps_sensors.h:19
nps_sensors_gyro_available
bool nps_sensors_gyro_available(void)
Definition: nps_sensors.c:43
NpsSensorGps::data_available
bool data_available
Definition: nps_sensor_gps.h:30
NpsSensorSonar::data_available
bool data_available
Definition: nps_sensor_sonar.h:42
nps_sensor_gps_run_step
void nps_sensor_gps_run_step(struct NpsSensorGps *gps, double time)
Definition: nps_sensor_gps.c:39
nps_sensors_temperature_available
bool nps_sensors_temperature_available(void)
Definition: nps_sensors.c:97
NpsSensorBaro::data_available
bool data_available
Definition: nps_sensor_baro.h:13
nps_sensors_mag_available
bool nps_sensors_mag_available(void)
Definition: nps_sensors.c:52
nps_sensor_aoa_run_step
void nps_sensor_aoa_run_step(struct NpsSensorAngleOfAttack *aoa, double time)
Definition: nps_sensor_aoa.c:62
nps_sensors_baro_available
bool nps_sensors_baro_available(void)
Definition: nps_sensors.c:61
nps_sensor_sideslip_run_step
void nps_sensor_sideslip_run_step(struct NpsSensorSideSlip *sideslip, double time)
Definition: nps_sensor_sideslip.c:63
nps_sensors_airspeed_available
bool nps_sensors_airspeed_available(void)
Definition: nps_sensors.c:88
nps_sensor_gyro_run_step
void nps_sensor_gyro_run_step(struct NpsSensorGyro *gyro, double time, struct DoubleRMat *body_to_imu)
Definition: nps_sensor_gyro.c:31
NpsSensorGyro::data_available
bool data_available
Definition: nps_sensor_gyro.h:20
NpsSensors::aoa
struct NpsSensorAngleOfAttack aoa
Definition: nps_sensors.h:26
nps_sensor_aoa_init
void nps_sensor_aoa_init(struct NpsSensorAngleOfAttack *aoa, double time)
Definition: nps_sensor_aoa.c:52
NpsSensors::body_to_imu_rmat
struct DoubleRMat body_to_imu_rmat
Definition: nps_sensors.h:17
nps_sensor_mag_init
void nps_sensor_mag_init(struct NpsSensorMag *mag, double time)
Definition: nps_sensor_mag.c:8
NpsSensorMag::data_available
bool data_available
Definition: nps_sensor_mag.h:18
nps_sensors_gps_available
bool nps_sensors_gps_available(void)
Definition: nps_sensors.c:70
nps_sensor_gyro_init
void nps_sensor_gyro_init(struct NpsSensorGyro *gyro, double time)
Definition: nps_sensor_gyro.c:9
nps_sensor_baro_init
void nps_sensor_baro_init(struct NpsSensorBaro *baro, double time)
Definition: nps_sensor_baro.c:14
NpsSensorAngleOfAttack::data_available
bool data_available
Definition: nps_sensor_aoa.h:41
nps_sensors.h
nps_sensor_sonar_init
void nps_sensor_sonar_init(struct NpsSensorSonar *sonar, double time)
Definition: nps_sensor_sonar.c:53
nps_sensors_run_step
void nps_sensors_run_step(double time)
Definition: nps_sensors.c:28
nps_sensor_baro_run_step
void nps_sensor_baro_run_step(struct NpsSensorBaro *baro, double time)
Definition: nps_sensor_baro.c:23
nps_sensor_temperature_init
void nps_sensor_temperature_init(struct NpsSensorTemperature *temperature, double time)
Definition: nps_sensor_temperature.c:19
sensors
struct NpsSensors sensors
Definition: nps_sensors.c:6
NpsSensorTemperature::data_available
bool data_available
Definition: nps_sensor_temperature.h:13
nps_sensor_airspeed_run_step
void nps_sensor_airspeed_run_step(struct NpsSensorAirspeed *airspeed, double time)
Definition: nps_sensor_airspeed.c:63
nps_sensor_accel_init
void nps_sensor_accel_init(struct NpsSensorAccel *accel, double time)
Definition: nps_sensor_accel.c:10
nps_sensor_accel_run_step
void nps_sensor_accel_run_step(struct NpsSensorAccel *accel, double time, struct DoubleRMat *body_to_imu)
Definition: nps_sensor_accel.c:27
nps_sensor_temperature_run_step
void nps_sensor_temperature_run_step(struct NpsSensorTemperature *temperature, double time)
Definition: nps_sensor_temperature.c:28
NpsSensors::sonar
struct NpsSensorSonar sonar
Definition: nps_sensors.h:23
NpsSensors::mag
struct NpsSensorMag mag
Definition: nps_sensors.h:20
NpsSensorAirspeed::data_available
bool data_available
Definition: nps_sensor_airspeed.h:42
NpsSensors::gps
struct NpsSensorGps gps
Definition: nps_sensors.h:22
NpsSensors::sideslip
struct NpsSensorSideSlip sideslip
Definition: nps_sensors.h:27
FALSE
#define FALSE
Definition: std.h:5
TRUE
#define TRUE
Definition: std.h:4
nps_sensor_mag_run_step
void nps_sensor_mag_run_step(struct NpsSensorMag *mag, double time, struct DoubleRMat *body_to_imu)
Definition: nps_sensor_mag.c:26
NpsSensorSideSlip::data_available
bool data_available
Definition: nps_sensor_sideslip.h:41
nps_sensor_sideslip_init
void nps_sensor_sideslip_init(struct NpsSensorSideSlip *sideslip, double time)
Definition: nps_sensor_sideslip.c:53
NpsSensors
Definition: nps_sensors.h:16
DoubleEulers
euler angles
Definition: pprz_algebra_double.h:76