Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
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 
21 value provide_attitude(value phi, value theta, value psi)
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 
30 value provide_rates(value p, value q, value r)
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 
provide_attitude
value provide_attitude(value phi, value theta, value psi)
Definition: sim_ahrs.c:21
sim_psi
float sim_psi
in radians
Definition: sim_ahrs.c:14
std.h
sim_r
float sim_r
in radians/s
Definition: sim_ahrs.c:17
sim_p
float sim_p
in radians/s
Definition: sim_ahrs.c:15
sim_theta
float sim_theta
in radians
Definition: sim_ahrs.c:13
sim_phi
float sim_phi
in radians
Definition: sim_ahrs.c:12
provide_rates
value provide_rates(value p, value q, value r)
Definition: sim_ahrs.c:30
sim_q
float sim_q
in radians/s
Definition: sim_ahrs.c:16
inttypes.h
p
static float p[2][2]
Definition: ins_alt_float.c:268