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