Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
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) 2013 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 #include <sys/types.h>
35 
36 typedef struct
37 {
40 
44 
50 
52 
57 
61 
63 
64  uint32_t sum_echo; //unsigned long
66 
68 
71 
75 
77 
78 } __attribute__ ((packed)) measures_t;
79 
81 {
93 
94  // These values are calculated
96 };
97 
98 #define NAVDATA_BUFFER_SIZE 80
99 typedef struct {
108 } navdata_port;
109 
110 extern measures_t navdata;
111 extern navdata_port nav_port;
118 
119 bool_t navdata_init(void);
120 void navdata_read(void);
121 void navdata_update(void);
122 int16_t navdata_height(void);
123 
124 ssize_t full_write(int fd, const uint8_t *buf, size_t count);
125 ssize_t full_read(int fd, uint8_t *buf, size_t count);
126 
127 #endif /* NAVDATA_H_ */
int16_t mz
Definition: navdata.h:74
unsigned short uint16_t
Definition: types.h:16
int16_t gradient
Definition: navdata.h:65
uint16_t us_curve_time
Definition: navdata.h:58
uint16_t us_fin_echo
Definition: navdata.h:54
uint16_t us_association_echo
Definition: navdata.h:55
uint32_t totalBytesRead
Definition: navdata.h:102
int fd
unsigned char buffer[4096]
Definition: ahrs_ardrone2.c:47
int16_t vx
Definition: navdata.h:45
uint16_t us_debut_echo
Definition: navdata.h:53
uint16_t ay
Definition: navdata.h:42
uint16_t bytesRead
Definition: navdata.h:101
uint32_t lost_imu_frames
Definition: navdata.h:105
int16_t vz
Definition: navdata.h:47
uint16_t az
Definition: navdata.h:43
uint16_t temperature_pressure
Definition: navdata.h:70
int16_t my
Definition: navdata.h:72
uint32_t sum_echo
Definition: navdata.h:64
uint16_t taille
Definition: navdata.h:38
int32_t pressure
Definition: navdata.h:69
unsigned long uint32_t
Definition: types.h:18
signed short int16_t
Definition: types.h:17
uint16_t us_curve_value
Definition: navdata.h:59
int16_t mx
Definition: navdata.h:73
uint16_t nu_trame
Definition: navdata.h:39
uint16_t last_packet_number
Definition: navdata.h:106
signed long int32_t
Definition: types.h:19
struct adc_buf * buf
Definition: adc_arch.c:586
uint16_t chksum
Definition: navdata.h:76
unsigned char uint8_t
Definition: types.h:14
uint32_t packetsRead
Definition: navdata.h:103
uint16_t us_distance_echo
Definition: navdata.h:56
uint16_t us_curve_ref
Definition: navdata.h:60
uint16_t temperature_gyro
Definition: navdata.h:49
uint32_t checksum_errors
Definition: navdata.h:104
int16_t vy
Definition: navdata.h:46
uint16_t flag_echo_ini
Definition: navdata.h:67
uint16_t nb_echo
Definition: navdata.h:62
uint16_t ultrasound
Definition: navdata.h:51
uint16_t ax
Definition: navdata.h:41
uint16_t temperature_acc
Definition: navdata.h:48
uint8_t isInitialized
Definition: navdata.h:100