Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
navdata.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Dino Hensen, Vincent van Hoek
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 
30 #ifndef NAVDATA_H_
31 #define NAVDATA_H_
32 
33 #include <stdint.h>
34 
35 #define NAVDATA_PACKET_SIZE 60
36 #define NAVDATA_BUFFER_SIZE 80
37 #define NAVDATA_START_BYTE 0x3a
38 
39 typedef struct {
46 } navdata_port;
47 
48 typedef struct
49 {
52 
56 
62 
64 
69 
73 
75 
76  uint32_t sum_echo; //unsigned long
78 
80 
81  int32_t pressure; //long
83 
87 
89 
90 } __attribute__ ((packed)) measures_t;
91 
92 measures_t* navdata;
98 
99 int navdata_init(void);
100 void navdata_close(void);
101 
102 void navdata_read(void);
103 void navdata_update(void);
104 void navdata_CropBuffer(int cropsize);
105 
108 
109 #endif /* NAVDATA_H_ */
int16_t mz
Definition: navdata.h:86
unsigned short uint16_t
Definition: types.h:16
int16_t gradient
Definition: navdata.h:77
uint16_t us_curve_time
Definition: navdata.h:70
uint16_t us_fin_echo
Definition: navdata.h:66
uint16_t us_association_echo
Definition: navdata.h:67
uint8_t isOpen
Definition: navdata.h:41
uint32_t totalBytesRead
Definition: navdata.h:43
unsigned char buffer[4096]
Definition: ahrs_ardrone2.c:42
int16_t vx
Definition: navdata.h:57
uint16_t us_debut_echo
Definition: navdata.h:65
uint16_t ay
Definition: navdata.h:54
uint16_t bytesRead
Definition: navdata.h:42
int16_t vz
Definition: navdata.h:59
uint16_t az
Definition: navdata.h:55
int16_t my
Definition: navdata.h:85
uint32_t sum_echo
Definition: navdata.h:76
uint16_t taille
Definition: navdata.h:50
int32_t pressure
Definition: navdata.h:81
unsigned long uint32_t
Definition: types.h:18
signed short int16_t
Definition: types.h:17
uint16_t us_curve_value
Definition: navdata.h:71
int16_t mx
Definition: navdata.h:84
uint16_t nu_trame
Definition: navdata.h:51
signed long int32_t
Definition: types.h:19
uint16_t chksum
Definition: navdata.h:88
unsigned char uint8_t
Definition: types.h:14
uint32_t packetsRead
Definition: navdata.h:44
uint16_t us_distance_echo
Definition: navdata.h:68
int16_t temperature_pressure
Definition: navdata.h:82
uint16_t us_curve_ref
Definition: navdata.h:72
uint16_t temperature_gyro
Definition: navdata.h:61
int16_t vy
Definition: navdata.h:58
uint16_t flag_echo_ini
Definition: navdata.h:79
uint16_t nb_echo
Definition: navdata.h:74
uint16_t ultrasound
Definition: navdata.h:63
uint16_t ax
Definition: navdata.h:53
uint16_t temperature_acc
Definition: navdata.h:60
uint8_t isInitialized
Definition: navdata.h:40