Paparazzi UAS  v6.2_unstable
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 struct NpsSensors sensors;
4 
5 void nps_sensors_init(double time)
6 {
7 
8  struct DoubleEulers body_to_imu_eulers =
9  { NPS_BODY_TO_IMU_PHI, NPS_BODY_TO_IMU_THETA, NPS_BODY_TO_IMU_PSI };
10  double_rmat_of_eulers(&sensors.body_to_imu_rmat, &body_to_imu_eulers);
11 
22 }
23 
24 
25 void nps_sensors_run_step(double time)
26 {
37 }
38 
39 
41 {
44  return TRUE;
45  }
46  return FALSE;
47 }
48 
50 {
53  return TRUE;
54  }
55  return FALSE;
56 }
57 
59 {
62  return TRUE;
63  }
64  return FALSE;
65 }
66 
68 {
71  return TRUE;
72  }
73  return FALSE;
74 }
75 
77 {
80  return TRUE;
81  }
82  return FALSE;
83 }
84 
86 {
89  return TRUE;
90  }
91  return FALSE;
92 }
93 
95 {
98  return TRUE;
99  }
100  return FALSE;
101 }
102 
104 {
105  if (sensors.aoa.data_available) {
107  return TRUE;
108  }
109  return FALSE;
110 }
111 
113 {
116  return TRUE;
117  }
118  return FALSE;
119 }
static void double_rmat_of_eulers(struct DoubleRMat *rm, struct DoubleEulers *e)
euler angles
void nps_sensor_accel_init(struct NpsSensorAccel *accel, double time)
void nps_sensor_accel_run_step(struct NpsSensorAccel *accel, double time, struct DoubleRMat *body_to_imu)
void nps_sensor_airspeed_init(struct NpsSensorAirspeed *airspeed, double time)
void nps_sensor_airspeed_run_step(struct NpsSensorAirspeed *airspeed, double time)
void nps_sensor_aoa_init(struct NpsSensorAngleOfAttack *aoa, double time)
void nps_sensor_aoa_run_step(struct NpsSensorAngleOfAttack *aoa, double time)
void nps_sensor_baro_init(struct NpsSensorBaro *baro, double time)
void nps_sensor_baro_run_step(struct NpsSensorBaro *baro, double time)
void nps_sensor_gps_init(struct NpsSensorGps *gps, double time)
void nps_sensor_gps_run_step(struct NpsSensorGps *gps, double time)
void nps_sensor_gyro_init(struct NpsSensorGyro *gyro, double time)
void nps_sensor_gyro_run_step(struct NpsSensorGyro *gyro, double time, struct DoubleRMat *body_to_imu)
void nps_sensor_mag_init(struct NpsSensorMag *mag, double time)
Definition: nps_sensor_mag.c:8
void nps_sensor_mag_run_step(struct NpsSensorMag *mag, double time, struct DoubleRMat *body_to_imu)
void nps_sensor_sideslip_run_step(struct NpsSensorSideSlip *sideslip, double time)
void nps_sensor_sideslip_init(struct NpsSensorSideSlip *sideslip, double time)
void nps_sensor_sonar_run_step(struct NpsSensorSonar *sonar, double time)
void nps_sensor_sonar_init(struct NpsSensorSonar *sonar, double time)
void nps_sensor_temperature_init(struct NpsSensorTemperature *temperature, double time)
void nps_sensor_temperature_run_step(struct NpsSensorTemperature *temperature, double time)
void nps_sensors_init(double time)
Definition: nps_sensors.c:5
struct NpsSensors sensors
Definition: nps_sensors.c:3
bool nps_sensors_airspeed_available(void)
Definition: nps_sensors.c:85
bool nps_sensors_sonar_available(void)
Definition: nps_sensors.c:76
bool nps_sensors_mag_available(void)
Definition: nps_sensors.c:49
bool nps_sensors_gps_available(void)
Definition: nps_sensors.c:67
bool nps_sensors_sideslip_available(void)
Definition: nps_sensors.c:112
bool nps_sensors_aoa_available(void)
Definition: nps_sensors.c:103
bool nps_sensors_baro_available(void)
Definition: nps_sensors.c:58
bool nps_sensors_gyro_available(void)
Definition: nps_sensors.c:40
void nps_sensors_run_step(double time)
Definition: nps_sensors.c:25
bool nps_sensors_temperature_available(void)
Definition: nps_sensors.c:94
struct NpsSensorGps gps
Definition: nps_sensors.h:28
struct DoubleRMat body_to_imu_rmat
Definition: nps_sensors.h:23
struct NpsSensorMag mag
Definition: nps_sensors.h:26
struct NpsSensorAirspeed airspeed
Definition: nps_sensors.h:30
struct NpsSensorGyro gyro
Definition: nps_sensors.h:24
struct NpsSensorTemperature temp
Definition: nps_sensors.h:31
struct NpsSensorAccel accel
Definition: nps_sensors.h:25
struct NpsSensorSideSlip sideslip
Definition: nps_sensors.h:33
struct NpsSensorAngleOfAttack aoa
Definition: nps_sensors.h:32
struct NpsSensorBaro baro
Definition: nps_sensors.h:27
struct NpsSensorSonar sonar
Definition: nps_sensors.h:29
#define TRUE
Definition: std.h:4
#define FALSE
Definition: std.h:5