Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules 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;
18 
19 // Updates from Ocaml sim
20 
22 {
23  sim_phi = Double_val(phi);
24  sim_theta = Double_val(theta);
25  sim_psi = - Double_val(psi) + M_PI / 2.;
26 
27  return Val_unit;
28 }
29 
31 {
32  sim_p = Double_val(p);
33  sim_q = Double_val(q);
34  sim_r = Double_val(r);
35 
36  return Val_unit;
37 }
38 
float sim_phi
in radians
Definition: sim_ahrs.c:12
value provide_rates(value p, value q, value r)
Definition: sim_ahrs.c:30
uint16_t value
Definition: adc_arch.c:586
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
value provide_attitude(value phi, value theta, value psi)
Definition: sim_ahrs.c:21
static float p[2][2]
float sim_r
in radians/s
Definition: sim_ahrs.c:17