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

ardrone2 navdata aquisition driver. More...

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "navdata.h"
+ Include dependency graph for navdata.c:

Go to the source code of this file.

Functions

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

Variables

int nav_fd
 

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.c.

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

int nav_fd

Definition at line 39 of file navdata.c.

Referenced by navdata_close(), navdata_init(), and navdata_read().