Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
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 */
37extern float ins_roll_neutral;
38extern float ins_pitch_neutral;
39extern float ins_yaw_neutral;
40
41/* state */
42extern struct FloatEulers ins_eulers;
43extern struct FloatQuat ins_quat;
44extern struct FloatRates ins_rates;
45extern struct FloatRMat ins_rmat;
46extern struct FloatVect3 ins_accel;
47extern struct FloatVect3 ins_mag;
48
49extern volatile uint8_t ins_msg_received;
50
51extern void vn100_init(void);
52extern void vn100_periodic_task(void);
53extern void vn100_event_task(void);
54extern void vn100_report_task(void);
55
56/* last received SPI packet */
58/* last send packet */
60
61/* output mode */
62extern uint32_t ins_ador;
63extern uint32_t ins_adof;
64extern 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 */
euler angles
Roation quaternion.
rotation matrix
angular rates
float ins_yaw_neutral
Definition ins_vn100.c:55
VN100_Req_Packet last_send_packet
Definition ins_vn100.c:69
struct FloatRMat ins_rmat
Definition ins_vn100.c:60
VN100_Res_Packet last_received_packet
Definition ins_vn100.c:67
uint32_t ins_adof
Definition ins_vn100.c:73
void vn100_periodic_task(void)
Definition ins_vn100.c:140
void vn100_report_task(void)
Definition ins_vn100.c:311
void vn100_event_task(void)
Definition ins_vn100.c:160
void vn100_init(void)
Definition ins_vn100.c:85
float ins_roll_neutral
Definition ins_arduimu.c:14
uint8_t ins_init_status
Definition ins_vn100.c:76
struct FloatVect3 ins_mag
Definition ins_vn100.c:62
uint32_t ins_baud
Definition ins_vn100.c:74
float ins_pitch_neutral
Definition ins_arduimu.c:15
struct FloatVect3 ins_accel
Definition ins_vn100.c:61
struct FloatEulers ins_eulers
Definition ins_vn100.c:57
struct FloatRates ins_rates
Definition ins_vn100.c:59
struct FloatQuat ins_quat
Definition ins_vn100.c:58
uint32_t ins_ador
Definition ins_vn100.c:72
volatile uint8_t ins_msg_received
Definition ins_vn100.c:64
Paparazzi floating point algebra.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.