Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
navdata.h File Reference

ardrone2 navdata aquisition driver. More...

#include "std.h"
#include <unistd.h>
+ Include dependency graph for navdata.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  navdata_measure_t
 Main navdata structure from the navdata board This is received from the navdata board at ~200Hz. More...
 
struct  bmp180_calib_t
 
struct  navdata_t
 

Macros

#define NAVDATA_PACKET_SIZE   60
 
#define NAVDATA_START_BYTE   0x3A
 
#define NAVDATA_CMD_START   0x01
 
#define NAVDATA_CMD_STOP   0x02
 
#define NAVDATA_CMD_BARO_CALIB   0x17
 
#define ARDRONE_GPIO_PORT   0x32524
 
#define ARDRONE_GPIO_PIN_NAVDATA   177
 

Functions

bool navdata_init (void)
 Initialize the navdata board. More...
 
void navdata_update (void)
 Update the navdata (event loop) More...
 
int16_t navdata_height (void)
 
ssize_t full_write (int fd, const uint8_t *buf, size_t count)
 Write to fd even while being interrupted. More...
 
ssize_t full_read (int fd, uint8_t *buf, size_t count)
 Read from fd even while being interrupted. More...
 

Variables

struct navdata_t navdata
 

Detailed Description

ardrone2 navdata aquisition driver.

The ardrone2 provides a navdata stream of packets containing info about all sensors at a rate of 200Hz.

Definition in file navdata.h.


Data Structure Documentation

◆ navdata_measure_t

struct navdata_measure_t

Main navdata structure from the navdata board This is received from the navdata board at ~200Hz.

Definition at line 43 of file navdata.h.

Data Fields
uint16_t ax
uint16_t ay
uint16_t az
uint16_t chksum
uint16_t flag_echo_ini
int16_t gradient
int16_t mx
int16_t my
int16_t mz
uint16_t nb_echo
uint16_t nu_trame
int32_t pressure
uint32_t sum_echo
uint16_t taille
uint16_t temperature_acc
uint16_t temperature_gyro
uint16_t temperature_pressure
uint16_t ultrasound
uint16_t us_association_echo
uint16_t us_curve_ref
uint16_t us_curve_time
uint16_t us_curve_value
uint16_t us_debut_echo
uint16_t us_distance_echo
uint16_t us_fin_echo
int16_t vx
int16_t vy
int16_t vz

◆ bmp180_calib_t

struct bmp180_calib_t

Definition at line 87 of file navdata.h.

Data Fields
int16_t ac1
int16_t ac2
int16_t ac3
uint16_t ac4
uint16_t ac5
uint16_t ac6
int16_t b1
int16_t b2
int32_t b5
int16_t mb
int16_t mc
int16_t md

◆ navdata_t

struct navdata_t

Definition at line 115 of file navdata.h.

+ Collaboration diagram for navdata_t:
Data Fields
bool baro_available Whenever the baro is available.
bool baro_calibrated Whenever the baro is calibrated.
struct bmp180_calib_t bmp180_calib BMP180 calibration receieved from navboard.
uint32_t checksum_errors
int fd The navdata file pointer.
bool imu_lost Whenever the imu is lost.
bool is_initialized Check if the navdata board is initialized.
uint16_t last_packet_number
uint32_t lost_imu_frames
struct navdata_measure_t measure Main navdata packet receieved from navboard.
uint32_t packetsRead
uint32_t totalBytesRead

Macro Definition Documentation

◆ ARDRONE_GPIO_PIN_NAVDATA

#define ARDRONE_GPIO_PIN_NAVDATA   177

Definition at line 112 of file navdata.h.

◆ ARDRONE_GPIO_PORT

#define ARDRONE_GPIO_PORT   0x32524

Definition at line 111 of file navdata.h.

◆ NAVDATA_CMD_BARO_CALIB

#define NAVDATA_CMD_BARO_CALIB   0x17

Definition at line 109 of file navdata.h.

◆ NAVDATA_CMD_START

#define NAVDATA_CMD_START   0x01

Definition at line 107 of file navdata.h.

◆ NAVDATA_CMD_STOP

#define NAVDATA_CMD_STOP   0x02

Definition at line 108 of file navdata.h.

◆ NAVDATA_PACKET_SIZE

#define NAVDATA_PACKET_SIZE   60

Definition at line 105 of file navdata.h.

◆ NAVDATA_START_BYTE

#define NAVDATA_START_BYTE   0x3A

Definition at line 106 of file navdata.h.

Function Documentation

◆ full_read()

ssize_t full_read ( int  fd,
uint8_t buf,
size_t  count 
)

Read from fd even while being interrupted.

Definition at line 139 of file navdata.c.

References fd.

Referenced by actuators_ardrone_cmd(), and navdata_baro_calib().

+ Here is the caller graph for this function:

◆ full_write()

ssize_t full_write ( int  fd,
const uint8_t buf,
size_t  count 
)

Write to fd even while being interrupted.

Definition at line 119 of file navdata.c.

References fd.

Referenced by actuators_ardrone_cmd(), actuators_ardrone_set_leds(), actuators_ardrone_set_pwm(), and navdata_cmd_send().

+ Here is the caller graph for this function:

◆ navdata_height()

int16_t navdata_height ( void  )

◆ navdata_init()

◆ navdata_update()

Variable Documentation

◆ navdata