Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ahrs_vectornav.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Michal Podhradsky, michal.podhradsky@aggiemail.usu.edu
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  */
28 #ifndef AHRS_VECTORNAV_H
29 #define AHRS_VECTORNAV_H
30 
31 
32 // Peripheral
34 
35 // Systime
36 #include "mcu_periph/sys_time.h"
37 
38 // Math
39 #include "math/pprz_algebra.h"
42 #include "math/pprz_geodetic_int.h"
44 
45 
46 // Ahrs implementation state
47 struct AhrsVectornav {
48  // Packet data
50  struct VNData vn_data;
52  float vn_freq;
54 
55  // in fixed point for sending as ABI and telemetry msgs
58 
61 };
62 
63 
64 // AHRS struct
65 extern struct AhrsVectornav ahrs_vn;
66 
67 extern void ahrs_vectornav_init(void);
68 extern void ahrs_vectornav_event(void);
69 extern void ahrs_vectornav_propagate(void);
70 
71 #endif /* INS_VECTORNAV_H */
AhrsVectornav::body_to_imu
struct OrientationReps body_to_imu
body_to_imu rotation
Definition: ahrs_vectornav.h:60
OrientationReps
Definition: pprz_orientation_conversion.h:79
uint16_t
unsigned short uint16_t
Definition: types.h:16
Int32Rates
angular rates
Definition: pprz_algebra_int.h:179
AhrsVectornav
Definition: ahrs_vectornav.h:47
pprz_geodetic_int.h
Paparazzi fixed point math for geodetic calculations.
pprz_algebra_float.h
Paparazzi floating point algebra.
ahrs_vectornav_init
void ahrs_vectornav_init(void)
Initialize Vectornav struct.
Definition: ahrs_vectornav.c:96
AhrsVectornav::vn_chksm
uint16_t vn_chksm
aux variable for checksum
Definition: ahrs_vectornav.h:53
VNPacket
Definition: vn200_serial.h:62
pprz_geodetic_float.h
Paparazzi floating point math for geodetic calculations.
AhrsVectornav::vn_freq
float vn_freq
data frequency
Definition: ahrs_vectornav.h:52
ahrs_vn
struct AhrsVectornav ahrs_vn
Definition: ahrs_vectornav.c:33
Int32Vect3
Definition: pprz_algebra_int.h:88
sys_time.h
Architecture independent timing functions.
VNStatus
VNStatus
Definition: vn200_serial.h:78
ahrs_vectornav_event
void ahrs_vectornav_event(void)
Event handling for Vectornav.
Definition: ahrs_vectornav.c:68
AhrsVectornav::vn_status
enum VNStatus vn_status
VN status.
Definition: ahrs_vectornav.h:51
AhrsVectornav::vn_data
struct VNData vn_data
Data struct.
Definition: ahrs_vectornav.h:50
vn200_serial.h
AhrsVectornav::vn_packet
struct VNPacket vn_packet
Packet struct.
Definition: ahrs_vectornav.h:49
pprz_orientation_conversion.h
AhrsVectornav::accel_i
struct Int32Vect3 accel_i
Definition: ahrs_vectornav.h:56
pprz_algebra.h
Paparazzi generic algebra macros.
ahrs_vectornav_propagate
void ahrs_vectornav_propagate(void)
Read received data.
Definition: ahrs_vectornav.c:125
AhrsVectornav::gyro_i
struct Int32Rates gyro_i
Definition: ahrs_vectornav.h:57
VNData
Definition: vn200_serial.h:84