Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
sim_ahrs.c
Go to the documentation of this file.
1 
8 #include <inttypes.h>
9 #include <caml/mlvalues.h>
10 #include "std.h"
11 
12 float sim_phi;
13 float sim_theta;
14 float sim_psi;
15 float sim_p;
16 float sim_q;
17 float sim_r;
19 
20 // Updates from Ocaml sim
21 
22 value provide_attitude(value phi, value theta, value psi) {
23  sim_phi = Double_val(phi);
24  sim_theta = Double_val(theta);
25  sim_psi = - Double_val(psi) + M_PI/2.;
26 
28 
29  return Val_unit;
30 }
31 
32 value provide_rates(value p, value q, value r) {
33  sim_p = Double_val(p);
34  sim_q = Double_val(q);
35  sim_r = Double_val(r);
36 
38 
39  return Val_unit;
40 }
41 
float sim_phi
in radians
Definition: sim_ahrs.c:12
value provide_rates(value p, value q, value r)
Definition: sim_ahrs.c:32
bool_t ahrs_sim_available
Definition: sim_ahrs.c:18
float sim_q
in radians/s
Definition: sim_ahrs.c:16
float sim_p
in radians/s
Definition: sim_ahrs.c:15
float sim_theta
in radians
Definition: sim_ahrs.c:13
float sim_psi
in radians
Definition: sim_ahrs.c:14
#define TRUE
Definition: imu_chimu.h:144
value provide_attitude(value phi, value theta, value psi)
Definition: sim_ahrs.c:22
float sim_r
in radians/s
Definition: sim_ahrs.c:17