Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
ins_vn100.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2010 ENAC
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  */
22 
29 #ifndef INS_VN100_H
30 #define INS_VN100_H
31 
32 #include "std.h"
33 #include "VN100.h"
35 
36 /* neutrals */
37 extern float ins_roll_neutral;
38 extern float ins_pitch_neutral;
39 extern float ins_yaw_neutral;
40 
41 /* state */
42 extern struct FloatEulers ins_eulers;
43 extern struct FloatQuat ins_quat;
44 extern struct FloatRates ins_rates;
45 extern struct FloatRMat ins_rmat;
46 extern struct FloatVect3 ins_accel;
47 extern struct FloatVect3 ins_mag;
48 
49 extern volatile uint8_t ins_msg_received;
50 
51 extern void vn100_init(void);
52 extern void vn100_periodic_task(void);
53 extern void vn100_event_task(void);
54 extern void vn100_report_task(void);
55 
56 /* last received SPI packet */
58 /* last send packet */
60 
61 /* output mode */
62 extern uint32_t ins_ador;
63 extern uint32_t ins_adof;
64 extern uint32_t ins_baud;
65 
66 #ifndef VN100_ADOR
67 #define VN100_ADOR VN100_ADOR_OFF
68 #endif
69 #ifndef VN100_ADOF
70 #define VN100_ADOF VN100_ADOF_5HZ
71 #endif
72 #ifndef VN100_BAUD
73 #define VN100_BAUD VN100_Baud_57600
74 #endif
75 
76 /* Init sequence */
78 #define INS_VN100_SET_BAUD 0
79 #define INS_VN100_SET_ADOR 1
80 #define INS_VN100_SET_ADOF 2
81 #define INS_VN100_READY 3
82 
83 /* Telemetry */
84 #define PERIODIC_SEND_AHRS(_chan, _dev) DOWNLINK_SEND_AHRS_LKF(_chan, _dev, \
85  &ins_eulers.phi, &ins_eulers.theta, &ins_eulers.psi, \
86  &ins_quat.qi, &ins_quat.qx, &ins_quat.qy, &ins_quat.qz, \
87  &ins_rates.p, &ins_rates.q, &ins_rates.r, \
88  &ins_accel.x, &ins_accel.y, &ins_accel.z, \
89  &ins_mag.x, &ins_mag.y, &ins_mag.z)
90 
91 #endif /* INS_VN100_H */
ins_baud
uint32_t ins_baud
Definition: ins_vn100.c:74
uint32_t
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
Definition: vl53l1_types.h:78
uint8_t
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98
ins_mag
struct FloatVect3 ins_mag
Definition: ins_vn100.c:62
ins_ador
uint32_t ins_ador
Definition: ins_vn100.c:72
ins_quat
struct FloatQuat ins_quat
Definition: ins_vn100.c:58
VN100_Req_Packet
Definition: VN100.h:178
VN100_Res_Packet
Definition: VN100.h:187
vn100_periodic_task
void vn100_periodic_task(void)
Definition: ins_vn100.c:140
ins_rmat
struct FloatRMat ins_rmat
Definition: ins_vn100.c:60
pprz_algebra_float.h
Paparazzi floating point algebra.
FloatVect3
Definition: pprz_algebra_float.h:54
ins_yaw_neutral
float ins_yaw_neutral
Definition: ins_vn100.c:55
FloatQuat
Roation quaternion.
Definition: pprz_algebra_float.h:63
std.h
last_received_packet
VN100_Res_Packet last_received_packet
Definition: ins_vn100.c:67
ins_pitch_neutral
float ins_pitch_neutral
Definition: ins_arduimu.c:15
ins_init_status
uint8_t ins_init_status
Definition: ins_vn100.c:76
ins_adof
uint32_t ins_adof
Definition: ins_vn100.c:73
vn100_report_task
void vn100_report_task(void)
Definition: ins_vn100.c:311
vn100_event_task
void vn100_event_task(void)
Definition: ins_vn100.c:160
ins_msg_received
volatile uint8_t ins_msg_received
Definition: ins_vn100.c:64
ins_roll_neutral
float ins_roll_neutral
Definition: ins_arduimu.c:14
ins_rates
struct FloatRates ins_rates
Definition: ins_vn100.c:59
ins_eulers
struct FloatEulers ins_eulers
Definition: ins_vn100.c:57
VN100.h
vn100_init
void vn100_init(void)
Definition: ins_vn100.c:85
FloatRMat
rotation matrix
Definition: pprz_algebra_float.h:77
last_send_packet
VN100_Req_Packet last_send_packet
Definition: ins_vn100.c:69
ins_accel
struct FloatVect3 ins_accel
Definition: ins_vn100.c:61
FloatEulers
euler angles
Definition: pprz_algebra_float.h:84
FloatRates
angular rates
Definition: pprz_algebra_float.h:93