Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
navdata.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016 The Paparazzi Team
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, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
21/* Thanks to TU Delft by assigning students Dino Hensen, Vincent van Hoek */
22
33#ifndef NAVDATA_H_
34#define NAVDATA_H_
35
36#include "std.h"
37#include <unistd.h>
38
85
86/* The baro calibration received from the navboard */
103
104/* Navdata board defines */
105#define NAVDATA_PACKET_SIZE 60
106#define NAVDATA_START_BYTE 0x3A
107#define NAVDATA_CMD_START 0x01
108#define NAVDATA_CMD_STOP 0x02
109#define NAVDATA_CMD_BARO_CALIB 0x17
110
111#define ARDRONE_GPIO_PORT 0x32524
112#define ARDRONE_GPIO_PIN_NAVDATA 177
113
114/* Main navdata structure */
132extern struct navdata_t navdata;
133
134
135bool navdata_init(void);
136void navdata_update(void);
138
139/* FIXME: This should be moved to the uart handling part! */
140ssize_t full_write(int fd, const uint8_t *buf, size_t count);
141ssize_t full_read(int fd, uint8_t *buf, size_t count);
142
143#endif /* NAVDATA_H_ */
uint16_t foo
Definition main_demo5.c:58
int32_t pressure
Definition navdata.h:75
uint16_t nb_echo
Definition navdata.h:68
struct bmp180_calib_t bmp180_calib
BMP180 calibration receieved from navboard.
Definition navdata.h:126
int16_t ac2
Definition navdata.h:89
uint16_t ac4
Definition navdata.h:91
uint32_t totalBytesRead
Definition navdata.h:119
int16_t gradient
Definition navdata.h:71
uint16_t temperature_gyro
Definition navdata.h:55
int16_t ac3
Definition navdata.h:90
uint16_t ay
Definition navdata.h:48
int16_t mc
Definition navdata.h:97
uint16_t us_debut_echo
Definition navdata.h:59
ssize_t full_write(int fd, const uint8_t *buf, size_t count)
Write to fd even while being interrupted.
Definition navdata.c:119
struct navdata_measure_t measure
Main navdata packet receieved from navboard.
Definition navdata.h:125
bool imu_lost
Whenever the imu is lost.
Definition navdata.h:130
int16_t ac1
Definition navdata.h:88
uint16_t flag_echo_ini
Definition navdata.h:73
uint16_t ac6
Definition navdata.h:93
int16_t navdata_height(void)
uint32_t lost_imu_frames
Definition navdata.h:122
bool baro_calibrated
Whenever the baro is calibrated.
Definition navdata.h:128
uint32_t packetsRead
Definition navdata.h:120
uint16_t chksum
Definition navdata.h:82
struct navdata_t navdata
Definition navdata.c:59
bool navdata_init(void)
Initialize the navdata board.
Definition navdata.c:202
uint16_t ultrasound
Definition navdata.h:57
uint16_t us_curve_ref
Definition navdata.h:66
uint16_t nu_trame
Definition navdata.h:45
uint16_t taille
Definition navdata.h:44
int16_t b1
Definition navdata.h:94
int fd
The navdata file pointer.
Definition navdata.h:117
uint16_t temperature_acc
Definition navdata.h:54
bool baro_available
Whenever the baro is available.
Definition navdata.h:129
int16_t md
Definition navdata.h:98
uint16_t us_distance_echo
Definition navdata.h:62
int32_t b5
Definition navdata.h:101
uint16_t us_curve_value
Definition navdata.h:65
uint32_t checksum_errors
Definition navdata.h:121
int16_t b2
Definition navdata.h:95
void navdata_update(void)
Update the navdata (event loop)
Definition navdata.c:390
uint16_t us_fin_echo
Definition navdata.h:60
uint16_t last_packet_number
Definition navdata.h:123
ssize_t full_read(int fd, uint8_t *buf, size_t count)
Read from fd even while being interrupted.
Definition navdata.c:139
uint16_t ac5
Definition navdata.h:92
uint32_t sum_echo
Definition navdata.h:70
bool is_initialized
Check if the navdata board is initialized.
Definition navdata.h:116
uint16_t us_association_echo
Definition navdata.h:61
uint16_t az
Definition navdata.h:49
uint16_t us_curve_time
Definition navdata.h:64
int16_t mb
Definition navdata.h:96
uint16_t temperature_pressure
Definition navdata.h:76
uint16_t ax
Definition navdata.h:47
Main navdata structure from the navdata board This is received from the navdata board at ~200Hz.
Definition navdata.h:43
int fd
Definition serial.c:26
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.