Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Data Structures | |
struct | target_pos_t |
struct | target_offset_t |
struct | target_t |
Functions | |
void | target_pos_init (void) |
void | target_parse_target_pos (uint8_t *buf) |
Receive a TARGET_POS message from the ground. More... | |
bool | target_get_pos (struct NedCoor_f *pos, float *heading) |
Get the current target position (NED) and heading. More... | |
bool | target_get_vel (struct NedCoor_f *vel) |
Get the current target velocity (NED) More... | |
bool | target_pos_set_current_offset (float unk) |
Set the current measured distance and heading as offset. More... | |
Variables | |
struct target_t | target |
Definition in file target_pos.h.
struct target_pos_t |
Definition at line 33 of file target_pos.h.
Data Fields | ||
---|---|---|
float | climb | Climb speed, z-up [m/s]. |
float | course | Ground course of the target [deg]. |
float | ground_speed | Ground speed of the target [m/s]. |
float | heading | Heading of the target [deg]. |
struct LlaCoor_i | lla | Lat, lon and altitude position of the target. |
uint32_t | recv_time | Time of when the target position message was received [msec]. |
uint32_t | tow | Time of week of the target position measurement. |
bool | valid | If the data of the target position is valid. |
struct target_offset_t |
Definition at line 44 of file target_pos.h.
Data Fields | ||
---|---|---|
float | distance | Target offset distance. |
float | heading | Target offset heading. |
float | height | Target offset height. |
struct target_t |
Definition at line 50 of file target_pos.h.
Data Fields | ||
---|---|---|
struct LlaCoor_i | gps_lla | GPS LLA position. |
bool | integrate_xy | Enable integration of the position in X-Y (North/East) frame. |
bool | integrate_z | Enable integration of the position in Z (Up) frame. |
struct target_offset_t | offset | The target offset relative to ground heading. |
struct target_pos_t | pos | The target position message. |
uint32_t | rtk_timeout | RTK message timeout [msec]. |
uint32_t | target_pos_timeout | Ground target position message timeout [msec]. |
bool target_get_pos | ( | struct NedCoor_f * | pos, |
float * | heading | ||
) |
Get the current target position (NED) and heading.
Definition at line 143 of file target_pos.c.
References target_offset_t::distance, get_sys_time_msec(), target_t::gps_lla, target_pos_t::heading, target_offset_t::heading, heading, target_offset_t::height, target_t::integrate_xy, target_t::integrate_z, target_pos_t::lla, State::ned_initialized_i, ned_of_lla_point_i(), target_t::offset, target_t::pos, target_pos_t::recv_time, state, stateGetNedOrigin_i(), target, target_get_vel(), target_t::target_pos_timeout, target_pos_t::valid, NedCoor_f::x, NedCoor_i::x, NedCoor_f::y, NedCoor_i::y, NedCoor_f::z, and NedCoor_i::z.
bool target_get_vel | ( | struct NedCoor_f * | vel | ) |
Get the current target velocity (NED)
Definition at line 192 of file target_pos.c.
References target_pos_t::climb, target_pos_t::course, get_sys_time_msec(), target_pos_t::ground_speed, State::ned_initialized_i, target_t::pos, target_pos_t::recv_time, state, target, target_t::target_pos_timeout, target_pos_t::valid, NedCoor_f::x, NedCoor_f::y, and NedCoor_f::z.
Referenced by target_get_pos().
void target_parse_target_pos | ( | uint8_t * | buf | ) |
Receive a TARGET_POS message from the ground.
Definition at line 122 of file target_pos.c.
References LlaCoor_i::alt, target_pos_t::climb, target_pos_t::course, get_sys_time_msec(), gps_tow_from_sys_ticks(), target_pos_t::ground_speed, target_pos_t::heading, LlaCoor_i::lat, target_pos_t::lla, LlaCoor_i::lon, sys_time::nb_tick, target_t::pos, target_pos_t::recv_time, target, target_pos_t::tow, and target_pos_t::valid.
void target_pos_init | ( | void | ) |
Definition at line 100 of file target_pos.c.
References ABI_BROADCAST, DefaultPeriodic, gps_cb(), gps_ev, register_periodic_telemetry(), and send_target_pos_info().
bool target_pos_set_current_offset | ( | float | unk | ) |
Set the current measured distance and heading as offset.
Definition at line 210 of file target_pos.c.
References target_offset_t::distance, get_sys_time_msec(), target_pos_t::heading, target_offset_t::heading, target_offset_t::height, target_pos_t::lla, State::ned_initialized_i, ned_of_lla_point_i(), target_t::offset, target_t::pos, target_pos_t::recv_time, state, stateGetNedOrigin_i(), stateGetPositionNed_f(), target, target_t::target_pos_timeout, target_pos_t::valid, NedCoor_f::x, NedCoor_i::x, NedCoor_f::y, NedCoor_i::y, NedCoor_f::z, and NedCoor_i::z.
|
extern |
Definition at line 1 of file target_pos.c.
Referenced by CN_calculate_target(), georeference_run(), gps_cb(), lsm303d_spi_init(), mavlink_common_message_handler(), nav_eight(), nav_set_heading_towards(), px4flash_event(), recursive_least_squares(), send_target_pos_info(), target_get_pos(), target_get_vel(), target_parse_target_pos(), target_pos_set_current_offset(), and update_target_point().