Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 }
struct NpsSensorAccel accel
Definition: nps_sensors.h:19
void nps_sensor_baro_run_step(struct NpsSensorBaro *baro, double time)
void nps_sensor_mag_run_step(struct NpsSensorMag *mag, double time, struct DoubleRMat *body_to_imu)
bool nps_sensors_gps_available(void)
Definition: nps_sensors.c:70
bool nps_sensors_aoa_available(void)
Definition: nps_sensors.c:106
euler angles
void nps_sensors_run_step(double time)
Definition: nps_sensors.c:28
void nps_sensor_gyro_run_step(struct NpsSensorGyro *gyro, double time, struct DoubleRMat *body_to_imu)
bool nps_sensors_mag_available(void)
Definition: nps_sensors.c:52
void nps_sensor_sonar_init(struct NpsSensorSonar *sonar, double time)
void nps_sensor_accel_run_step(struct NpsSensorAccel *accel, double time, struct DoubleRMat *body_to_imu)
bool nps_sensors_baro_available(void)
Definition: nps_sensors.c:61
void nps_sensor_accel_init(struct NpsSensorAccel *accel, double time)
struct NpsSensorBaro baro
Definition: nps_sensors.h:21
struct NpsSensorGyro gyro
Definition: nps_sensors.h:18
struct DoubleRMat body_to_imu_rmat
Definition: nps_sensors.h:17
void nps_sensor_airspeed_run_step(struct NpsSensorAirspeed *airspeed, double time)
struct NpsSensorSonar sonar
Definition: nps_sensors.h:23
void nps_sensor_gps_run_step(struct NpsSensorGps *gps, double time)
void nps_sensor_mag_init(struct NpsSensorMag *mag, double time)
Definition: nps_sensor_mag.c:8
#define FALSE
Definition: std.h:5
void nps_sensor_gyro_init(struct NpsSensorGyro *gyro, double time)
#define TRUE
Definition: std.h:4
static void double_rmat_of_eulers(struct DoubleRMat *rm, struct DoubleEulers *e)
void nps_sensor_temperature_init(struct NpsSensorTemperature *temperature, double time)
bool nps_sensors_sideslip_available(void)
Definition: nps_sensors.c:115
struct NpsSensorAngleOfAttack aoa
Definition: nps_sensors.h:26
void nps_sensor_sideslip_run_step(struct NpsSensorSideSlip *sideslip, double time)
void nps_sensor_sonar_run_step(struct NpsSensorSonar *sonar, double time)
void nps_sensor_temperature_run_step(struct NpsSensorTemperature *temperature, double time)
void nps_sensor_aoa_run_step(struct NpsSensorAngleOfAttack *aoa, double time)
struct NpsSensors sensors
Definition: nps_sensors.c:6
bool nps_sensors_temperature_available(void)
Definition: nps_sensors.c:97
struct NpsSensorSideSlip sideslip
Definition: nps_sensors.h:27
bool nps_sensors_airspeed_available(void)
Definition: nps_sensors.c:88
void nps_sensor_sideslip_init(struct NpsSensorSideSlip *sideslip, double time)
bool nps_sensors_gyro_available(void)
Definition: nps_sensors.c:43
void nps_sensor_gps_init(struct NpsSensorGps *gps, double time)
void nps_sensor_baro_init(struct NpsSensorBaro *baro, double time)
struct NpsSensorAirspeed airspeed
Definition: nps_sensors.h:24
void nps_sensor_airspeed_init(struct NpsSensorAirspeed *airspeed, double time)
bool nps_sensors_sonar_available(void)
Definition: nps_sensors.c:79
struct NpsSensorTemperature temp
Definition: nps_sensors.h:25
void nps_sensors_init(double time)
Definition: nps_sensors.c:8
struct NpsSensorMag mag
Definition: nps_sensors.h:20
struct NpsSensorGps gps
Definition: nps_sensors.h:22
void nps_sensor_aoa_init(struct NpsSensorAngleOfAttack *aoa, double time)