Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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 */
void ahrs_vectornav_event(void)
Event handling for Vectornav.
unsigned short uint16_t
Definition: types.h:16
float vn_freq
data frequency
angular rates
struct VNData vn_data
Data struct.
void ahrs_vectornav_propagate(void)
Read received data.
enum VNStatus vn_status
VN status.
struct Int32Vect3 accel_i
Paparazzi floating point math for geodetic calculations.
struct OrientationReps body_to_imu
body_to_imu rotation
struct AhrsVectornav ahrs_vn
Paparazzi floating point algebra.
Architecture independent timing functions.
Vectornav VN-200 INS subsystem.
Paparazzi generic algebra macros.
VNStatus
Definition: vn200_serial.h:78
Paparazzi fixed point math for geodetic calculations.
struct Int32Rates gyro_i
uint16_t vn_chksm
aux variable for checksum
void ahrs_vectornav_init(void)
Initialize Vectornav struct.
Generic orientation representation and conversions.
struct VNPacket vn_packet
Packet struct.