| 
    Paparazzi UAS v7.0_unstable
    
   Paparazzi is a free software Unmanned Aircraft System. 
   | 
 
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.   | |
| void | navdata_update (void) | 
| Update the navdata (event loop)   | |
| 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.   | |
| ssize_t | full_read (int fd, uint8_t *buf, size_t count) | 
| Read from fd even while being interrupted.   | |
Variables | |
| struct navdata_t | navdata | 
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.
| struct navdata_measure_t | 
Main navdata structure from the navdata board This is received from the navdata board at ~200Hz.
| 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 | |
| struct bmp180_calib_t | 
| struct navdata_t | 
 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 | |
Read from fd even while being interrupted.
Definition at line 131 of file navdata.c.
Referenced by actuators_ardrone_cmd(), and navdata_baro_calib().
 Here is the caller graph for this function:Write to fd even while being interrupted.
Definition at line 111 of file navdata.c.
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:Initialize the navdata board.
Definition at line 194 of file navdata.c.
References accel_neutral, accel_scale_f, ARDRONE_GPIO_PIN_NAVDATA, ARDRONE_GPIO_PORT, B460800, navdata_t::baro_available, navdata_t::baro_calibrated, navdata_t::checksum_errors, DefaultPeriodic, navdata_t::fd, foo, gpio_set(), gpio_setup_output(), gyro_scale_f, IMU_BOARD_ID, navdata_t::imu_lost, imu_set_defaults_accel(), imu_set_defaults_gyro(), imu_set_defaults_mag(), navdata_t::is_initialized, navdata_t::last_packet_number, navdata_t::lost_imu_frames, mag_scale_f, navdata, navdata_available, navdata_baro_calib(), navdata_cmd_send(), NAVDATA_CMD_START, NAVDATA_CMD_STOP, NAVDATA_PACKET_SIZE, navdata_read(), navdata_t::packetsRead, register_periodic_telemetry(), send_navdata(), and navdata_t::totalBytesRead.
Referenced by imu_ardrone2_init(), and navdata_update().
 Here is the call graph for this function:
 Here is the caller graph for this function:Update the navdata (event loop)
Definition at line 382 of file navdata.c.
References AGL_SONAR_ARDRONE2_ID, baro_update_logic(), foo, get_sys_time_usec(), navdata_t::is_initialized, navdata_t::last_packet_number, navdata_t::lost_imu_frames, mag_freeze_check(), navdata_t::measure, navdata, navdata_available, navdata_buffer, navdata_cond, navdata_init(), navdata_mutex, NAVDATA_PACKET_SIZE, navdata_publish_imu(), navdata_measure_t::nu_trame, p, navdata_t::packetsRead, navdata_measure_t::pressure, SONAR_OFFSET, SONAR_SCALE, navdata_measure_t::temperature_pressure, and navdata_measure_t::ultrasound.
 Here is the call graph for this function:
      
  | 
  extern | 
Definition at line 59 of file navdata.c.
Referenced by ardrone_baro_event(), baro_apply_calibration(), baro_apply_calibration_temp(), baro_update_logic(), mag_freeze_check(), navdata_baro_calib(), navdata_cmd_send(), navdata_init(), navdata_publish_imu(), navdata_read(), navdata_update(), and send_navdata().