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 File Reference

ardrone2 navdata aquisition driver. More...

#include <stdint.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_port
 
struct  measures_t
 

Macros

#define NAVDATA_PACKET_SIZE   60
 
#define NAVDATA_BUFFER_SIZE   80
 
#define NAVDATA_START_BYTE   0x3a
 

Functions

int navdata_init (void)
 
void navdata_close (void)
 
void navdata_read (void)
 
void navdata_update (void)
 
void navdata_CropBuffer (int cropsize)
 
uint16_t navdata_checksum (void)
 
int16_t navdata_getHeight (void)
 

Variables

measures_tnavdata
 
navdata_portport
 
uint16_t navdata_cks
 
uint8_t navdata_imu_available
 
uint8_t navdata_baro_available
 
int16_t previousUltrasoundHeight
 

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.

Macro Definition Documentation

#define NAVDATA_BUFFER_SIZE   80

Definition at line 36 of file navdata.h.

Referenced by navdata_CropBuffer(), and navdata_read().

#define NAVDATA_PACKET_SIZE   60

Definition at line 35 of file navdata.h.

Referenced by navdata_update().

#define NAVDATA_START_BYTE   0x3a

Definition at line 37 of file navdata.h.

Referenced by navdata_update().

Function Documentation

void navdata_close ( void  )

Definition at line 93 of file navdata.c.

References navdata_port::isOpen, nav_fd, and port.

void navdata_CropBuffer ( int  cropsize)

Definition at line 159 of file navdata.c.

References navdata_port::buffer, navdata_port::bytesRead, NAVDATA_BUFFER_SIZE, and port.

Referenced by navdata_update().

+ Here is the caller graph for this function:

int16_t navdata_getHeight ( void  )

Definition at line 171 of file navdata.c.

References navdata, previousUltrasoundHeight, and measures_t::ultrasound.

Referenced by navdata_update().

+ Here is the caller graph for this function:

void navdata_read ( void  )

Definition at line 99 of file navdata.c.

References navdata_port::buffer, navdata_port::bytesRead, navdata_port::isInitialized, navdata_port::isOpen, nav_fd, NAVDATA_BUFFER_SIZE, navdata_init(), port, and navdata_port::totalBytesRead.

Referenced by navdata_update().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void navdata_update ( void  )

Definition at line 120 of file navdata.c.

References navdata_port::buffer, navdata_port::bytesRead, navdata, navdata_baro_available, navdata_CropBuffer(), navdata_getHeight(), navdata_imu_available, NAVDATA_PACKET_SIZE, navdata_read(), NAVDATA_START_BYTE, navdata_port::packetsRead, and port.

Referenced by imu_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

measures_t* navdata
uint8_t navdata_baro_available

Definition at line 96 of file navdata.h.

Referenced by baro_periodic(), navdata_init(), and navdata_update().

uint16_t navdata_cks

Definition at line 94 of file navdata.h.

Referenced by navdata_checksum().

uint8_t navdata_imu_available

Definition at line 95 of file navdata.h.

Referenced by imu_periodic(), navdata_init(), and navdata_update().

int16_t previousUltrasoundHeight

Definition at line 97 of file navdata.h.

Referenced by navdata_getHeight(), and navdata_init().