Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Macros | |
#define | POS_ECEF_I 0 |
#define | POS_NED_I 1 |
#define | POS_ENU_I 2 |
#define | POS_LLA_I 3 |
#define | POS_UTM_I 4 |
#define | POS_ECEF_F 5 |
#define | POS_NED_F 6 |
#define | POS_ENU_F 7 |
#define | POS_LLA_F 8 |
#define | POS_UTM_F 9 |
#define | POS_LOCAL_COORD ((1<<POS_NED_I)|(1<<POS_NED_F)|(1<<POS_ENU_I)|(1<<POS_ENU_F)) |
#define | POS_GLOBAL_COORD ((1<<POS_ECEF_I)|(1<<POS_ECEF_F)|(1<<POS_LLA_I)|(1<<POS_LLA_F)|(1<<POS_UTM_I)|(1<<POS_UTM_F)) |
Functions | |
struct LlaCoor_i | stateGetLlaOrigin_i (void) |
Get the LLA position of the frame origin (int) More... | |
struct LlaCoor_f | stateGetLlaOrigin_f (void) |
Get the LLA position of the frame origin (float) More... | |
struct EcefCoor_i | stateGetEcefOrigin_i (void) |
Get the ECEF position of the frame origin (int) More... | |
struct EcefCoor_f | stateGetEcefOrigin_f (void) |
Get the ECEF position of the frame origin (float) More... | |
int32_t | stateGetHmslOrigin_i (void) |
Get the HMSL of the frame origin (int) More... | |
float | stateGetHmslOrigin_f (void) |
Get the HMSL of the frame origin (float) More... | |
void | stateCalcPositionEcef_i (void) |
void | stateCalcPositionNed_i (void) |
void | stateCalcPositionEnu_i (void) |
void | stateCalcPositionLla_i (void) |
Calculate LLA (int) from any other available representation. More... | |
void | stateCalcPositionUtm_f (void) |
void | stateCalcPositionEcef_f (void) |
void | stateCalcPositionNed_f (void) |
void | stateCalcPositionEnu_f (void) |
void | stateCalcPositionLla_f (void) |
static void | stateSetLocalOrigin_i (uint16_t id, struct LtpDef_i *ltp_def) |
Set the local (flat earth) coordinate frame origin (int). More... | |
static void | stateSetLocalUtmOrigin_f (uint16_t id, struct UtmCoor_f *utm_def) |
Set the local (flat earth) coordinate frame origin from UTM (float). More... | |
static struct LtpDef_i * | stateGetNedOrigin_i (void) |
Get the coordinate NED frame origin (int) More... | |
static struct LtpDef_f * | stateGetNedOrigin_f (void) |
Get the coordinate NED frame origin (float) More... | |
static struct UtmCoor_f * | stateGetUtmOrigin_f (void) |
Get the coordinate UTM frame origin (int) More... | |
static bool | stateIsLocalCoordinateValid (void) |
Test if local coordinates are valid. More... | |
static bool | stateIsGlobalCoordinateValid (void) |
Test if global coordinates are valid. More... | |
static void | stateSetPositionEcef_i (uint16_t id, struct EcefCoor_i *ecef_pos) |
Set position from ECEF coordinates (int). More... | |
static void | stateSetPositionNed_i (uint16_t id, struct NedCoor_i *ned_pos) |
Set position from local NED coordinates (int). More... | |
static void | stateSetPositionEnu_i (uint16_t id, struct EnuCoor_i *enu_pos) |
Set position from local ENU coordinates (int). More... | |
static void | stateSetPositionLla_i (uint16_t id, struct LlaCoor_i *lla_pos) |
Set position from LLA coordinates (int). More... | |
static void | stateSetPosition_i (uint16_t id, struct EcefCoor_i *ecef_pos, struct NedCoor_i *ned_pos, struct EnuCoor_i *enu_pos, struct LlaCoor_i *lla_pos) |
Set multiple position coordinates (int). More... | |
static void | stateSetPositionUtm_f (uint16_t id, struct UtmCoor_f *utm_pos) |
Set position from UTM coordinates (float). More... | |
static void | stateSetPositionEcef_f (uint16_t id, struct EcefCoor_f *ecef_pos) |
Set position from ECEF coordinates (float). More... | |
static void | stateSetPositionNed_f (uint16_t id, struct NedCoor_f *ned_pos) |
Set position from local NED coordinates (float). More... | |
static void | stateSetPositionEnu_f (uint16_t id, struct EnuCoor_f *enu_pos) |
Set position from local ENU coordinates (float). More... | |
static void | stateSetPositionLla_f (uint16_t id, struct LlaCoor_f *lla_pos) |
Set position from LLA coordinates (float). More... | |
static void | stateSetPosition_f (uint16_t id, struct EcefCoor_f *ecef_pos, struct NedCoor_f *ned_pos, struct EnuCoor_f *enu_pos, struct LlaCoor_f *lla_pos, struct UtmCoor_f *utm_pos) |
Set multiple position coordinates (float). More... | |
static struct EcefCoor_i * | stateGetPositionEcef_i (void) |
Get position in ECEF coordinates (int). More... | |
static struct NedCoor_i * | stateGetPositionNed_i (void) |
Get position in local NED coordinates (int). More... | |
static struct EnuCoor_i * | stateGetPositionEnu_i (void) |
Get position in local ENU coordinates (int). More... | |
static struct LlaCoor_i * | stateGetPositionLla_i (void) |
Get position in LLA coordinates (int). More... | |
static struct UtmCoor_f * | stateGetPositionUtm_f (void) |
Get position in UTM coordinates (float). More... | |
static struct EcefCoor_f * | stateGetPositionEcef_f (void) |
Get position in ECEF coordinates (float). More... | |
static struct NedCoor_f * | stateGetPositionNed_f (void) |
Get position in local NED coordinates (float). More... | |
static struct EnuCoor_f * | stateGetPositionEnu_f (void) |
Get position in local ENU coordinates (float). More... | |
static struct LlaCoor_f * | stateGetPositionLla_f (void) |
Get position in LLA coordinates (float). More... | |
Variables | |
uint16_t | State::origin_input_filter |
Holds the input filter id for state origin. More... | |
uint16_t | State::pos_status |
Holds the status bits for all position representations. More... | |
uint16_t | State::pos_input_filter |
Holds the input filter id for position. More... | |
struct EcefCoor_i | State::ecef_pos_i |
Position in EarthCenteredEarthFixed coordinates. More... | |
struct LlaCoor_i | State::lla_pos_i |
Position in Latitude, Longitude and Altitude. More... | |
struct LtpDef_i | State::ned_origin_i |
Definition of the local (flat earth) coordinate system. More... | |
bool | State::ned_initialized_i |
true if local int coordinate frame is initialsed More... | |
struct NedCoor_i | State::ned_pos_i |
Position in North East Down coordinates. More... | |
struct EnuCoor_i | State::enu_pos_i |
Position in East North Up coordinates. More... | |
struct UtmCoor_f | State::utm_pos_f |
Position in UTM coordinates. More... | |
float | State::alt_agl_f |
Altitude above ground level. More... | |
struct LlaCoor_f | State::lla_pos_f |
Position in Latitude, Longitude and Altitude. More... | |
struct EcefCoor_f | State::ecef_pos_f |
Position in EarthCenteredEarthFixed coordinates. More... | |
struct LtpDef_f | State::ned_origin_f |
Definition of the local (flat earth) coordinate system. More... | |
bool | State::ned_initialized_f |
True if local float coordinate frame is initialsed. More... | |
struct UtmCoor_f | State::utm_origin_f |
Definition of the origin of Utm coordinate system. More... | |
bool | State::utm_initialized_f |
True if utm origin (float) coordinate frame is initialsed. More... | |
struct NedCoor_f | State::ned_pos_f |
Position in North East Down coordinates. More... | |
struct EnuCoor_f | State::enu_pos_f |
Position in East North Up coordinates. More... | |
#define POS_GLOBAL_COORD ((1<<POS_ECEF_I)|(1<<POS_ECEF_F)|(1<<POS_LLA_I)|(1<<POS_LLA_F)|(1<<POS_UTM_I)|(1<<POS_UTM_F)) |
void stateCalcPositionEcef_f | ( | void | ) |
Definition at line 551 of file state.c.
References ECEF_FLOAT_OF_BFP, ecef_of_lla_f(), ecef_of_ned_point_f(), ecef_of_ned_pos_i(), State::ecef_pos_f, State::ecef_pos_i, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, State::ned_initialized_f, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, and state.
Referenced by stateGetPositionEcef_f().
void stateCalcPositionEcef_i | ( | void | ) |
Definition at line 217 of file state.c.
References ECEF_BFP_OF_REAL, ecef_of_lla_f(), ecef_of_lla_i(), ecef_of_ned_point_f(), ecef_of_ned_pos_i(), State::ecef_pos_f, State::ecef_pos_i, State::lla_pos_f, State::lla_pos_i, State::ned_initialized_f, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, and state.
Referenced by stateGetPositionEcef_i().
void stateCalcPositionEnu_f | ( | void | ) |
Definition at line 649 of file state.c.
References ecef_of_lla_i(), State::ecef_pos_f, State::ecef_pos_i, ENU_FLOAT_OF_BFP, enu_of_ecef_point_f(), enu_of_ecef_pos_i(), enu_of_lla_point_f(), ENU_OF_UTM_DIFF, State::enu_pos_f, State::enu_pos_i, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, NED_FLOAT_OF_BFP, State::ned_initialized_f, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, utm_of_lla_f(), State::utm_origin_f, State::utm_pos_f, and VECT3_ENU_OF_NED.
Referenced by stateGetPositionEnu_f().
void stateCalcPositionEnu_i | ( | void | ) |
Definition at line 329 of file state.c.
References ecef_of_lla_f(), State::ecef_pos_f, State::ecef_pos_i, ENU_BFP_OF_REAL, enu_of_ecef_point_f(), enu_of_ecef_pos_i(), enu_of_lla_pos_i(), ENU_OF_UTM_DIFF, State::enu_pos_f, State::enu_pos_i, INT32_VECT3_ENU_OF_NED, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, NED_BFP_OF_REAL, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, utm_of_lla_f(), State::utm_origin_f, and State::utm_pos_f.
Referenced by sim_overwrite_ins(), and stateGetPositionEnu_i().
void stateCalcPositionLla_f | ( | void | ) |
Definition at line 722 of file state.c.
References ECEF_FLOAT_OF_BFP, ecef_of_enu_point_f(), ecef_of_ned_point_f(), State::ecef_pos_f, State::ecef_pos_i, ENU_FLOAT_OF_BFP, State::enu_pos_f, State::enu_pos_i, LLA_FLOAT_OF_BFP, lla_of_ecef_f(), lla_of_utm_f(), State::lla_pos_f, NED_FLOAT_OF_BFP, State::ned_initialized_f, State::ned_origin_f, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, UTM_OF_ENU_ADD, UTM_OF_NED_ADD, State::utm_origin_f, and State::utm_pos_f.
Referenced by stateGetPositionLla_f().
void stateCalcPositionLla_i | ( | void | ) |
Calculate LLA (int) from any other available representation.
Note that since LLA in float has bad precision this is the last choice. So we mostly first convert to ECEF and then use lla_of_ecef_i which provides higher precision but is currently using the double function internally. When using UTM coordinates, NED/ENU are abused as "local" UTM.
Definition at line 416 of file state.c.
References ECEF_BFP_OF_REAL, ecef_of_enu_pos_i(), ecef_of_ned_pos_i(), State::ecef_pos_f, State::ecef_pos_i, ENU_BFP_OF_REAL, ENU_FLOAT_OF_BFP, State::enu_pos_f, State::enu_pos_i, LLA_BFP_OF_REAL, lla_of_ecef_i(), lla_of_utm_f(), State::lla_pos_f, State::lla_pos_i, NED_BFP_OF_REAL, NED_FLOAT_OF_BFP, State::ned_initialized_i, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, UTM_OF_ENU_ADD, UTM_OF_NED_ADD, State::utm_origin_f, and State::utm_pos_f.
Referenced by stateGetPositionLla_i().
void stateCalcPositionNed_f | ( | void | ) |
Definition at line 582 of file state.c.
References ecef_of_lla_i(), State::ecef_pos_f, State::ecef_pos_i, ENU_FLOAT_OF_BFP, State::enu_pos_f, State::enu_pos_i, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, NED_FLOAT_OF_BFP, State::ned_initialized_f, ned_of_ecef_point_f(), ned_of_ecef_pos_i(), ned_of_lla_point_f(), NED_OF_UTM_DIFF, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, utm_of_lla_f(), State::utm_origin_f, State::utm_pos_f, and VECT3_NED_OF_ENU.
Referenced by stateGetPositionNed_f().
void stateCalcPositionNed_i | ( | void | ) |
Definition at line 249 of file state.c.
References ecef_of_lla_f(), State::ecef_pos_f, State::ecef_pos_i, ENU_BFP_OF_REAL, State::enu_pos_f, State::enu_pos_i, INT32_VECT3_NED_OF_ENU, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, NED_BFP_OF_REAL, State::ned_initialized_i, ned_of_ecef_point_f(), ned_of_ecef_pos_i(), ned_of_lla_pos_i(), NED_OF_UTM_DIFF, State::ned_origin_f, State::ned_origin_i, State::ned_pos_f, State::ned_pos_i, POS_ECEF_F, POS_ECEF_I, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, utm_of_lla_f(), State::utm_origin_f, and State::utm_pos_f.
Referenced by stateGetPositionNed_i().
void stateCalcPositionUtm_f | ( | void | ) |
Definition at line 514 of file state.c.
References ENU_FLOAT_OF_BFP, State::enu_pos_f, State::enu_pos_i, LLA_FLOAT_OF_BFP, State::lla_pos_f, State::lla_pos_i, NED_FLOAT_OF_BFP, State::ned_pos_f, State::ned_pos_i, POS_ENU_F, POS_ENU_I, POS_LLA_F, POS_LLA_I, POS_NED_F, POS_NED_I, State::pos_status, POS_UTM_F, state, State::utm_initialized_f, UTM_OF_ENU_ADD, utm_of_lla_f(), UTM_OF_NED_ADD, State::utm_origin_f, and State::utm_pos_f.
Referenced by stateGetPositionUtm_f().
struct EcefCoor_f stateGetEcefOrigin_f | ( | void | ) |
Get the ECEF position of the frame origin (float)
Definition at line 85 of file state.c.
References State::accel_input_filter, State::attitude_input_filter, State::origin_input_filter, State::pos_input_filter, State::rates_input_filter, State::speed_input_filter, state, STATE_INPUT_ACCEL, STATE_INPUT_ATTITUDE, STATE_INPUT_ORIGIN, STATE_INPUT_POS, STATE_INPUT_RATES, STATE_INPUT_SPEED, STATE_INPUT_WIND_AIR, and State::wind_air_input_filter.
struct EcefCoor_i stateGetEcefOrigin_i | ( | void | ) |
Get the ECEF position of the frame origin (int)
Definition at line 85 of file state.c.
Referenced by send_ins_ref().
float stateGetHmslOrigin_f | ( | void | ) |
Get the HMSL of the frame origin (float)
Definition at line 204 of file state.c.
References UtmCoor_f::alt, LtpDef_f::hmsl, LtpDef_i::hmsl, M_OF_MM, State::ned_initialized_f, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, state, State::utm_initialized_f, and State::utm_origin_f.
Referenced by gps_cb(), ins_float_invariant_update_gps(), mavlink_send_vfr_hud(), nav_reset_alt(), nav_reset_reference(), nav_set_altitude(), and pressure_abs_cb().
int32_t stateGetHmslOrigin_i | ( | void | ) |
Get the HMSL of the frame origin (int)
Definition at line 190 of file state.c.
References UtmCoor_f::alt, LtpDef_f::hmsl, LtpDef_i::hmsl, MM_OF_M, State::ned_initialized_f, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, state, State::utm_initialized_f, and State::utm_origin_f.
Referenced by copilot_parse_move_wp_dl(), mavlink_common_message_handler(), mavlink_send_global_position_int(), mavlink_send_gps_global_origin(), mavlink_wp_message_handler(), mission_point_of_lla(), nav_parse_MOVE_WP(), send_ins_ref(), waypoint_move_here_2d(), and waypoint_move_lla().
struct LlaCoor_f stateGetLlaOrigin_f | ( | void | ) |
Get the LLA position of the frame origin (float)
Definition at line 85 of file state.c.
Referenced by mavlink_send_vfr_hud(), nav_land_at_loc(), and pressure_abs_cb().
struct LlaCoor_i stateGetLlaOrigin_i | ( | void | ) |
Get the LLA position of the frame origin (int)
Definition at line 85 of file state.c.
Referenced by copilot_parse_move_wp_dl(), ins_float_invariant_reset_vertical_ref(), mavlink_send_global_position_int(), mavlink_send_gps_global_origin(), mission_point_of_lla(), nav_parse_MOVE_WP(), reset_vertical_ref(), send_ins_ref(), waypoint_get_lla_alt(), waypoint_move_here_2d(), and waypoint_move_lla().
|
inlinestatic |
Get the coordinate NED frame origin (float)
Definition at line 566 of file state.h.
References State::ned_initialized_f, State::ned_origin_f, and state.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), detection_cb(), gps_cb(), ins_float_invariant_update_gps(), nav_land_at_loc(), and tag_tracking_report().
|
inlinestatic |
Get the coordinate NED frame origin (int)
Definition at line 556 of file state.h.
References State::ned_initialized_i, State::ned_origin_i, and state.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), follow_me_periodic(), follow_me_set_wp(), gps_cb(), ins_float_invariant_update_gps(), mavlink_common_message_handler(), mavlink_send_global_position_int(), mission_point_of_lla(), reset_vertical_ref(), target_get_pos(), target_pos_set_current_offset(), waypoint_globalize(), and waypoint_localize().
|
inlinestatic |
Get position in ECEF coordinates (float).
Definition at line 830 of file state.h.
References State::ecef_pos_f, POS_ECEF_F, State::pos_status, state, and stateCalcPositionEcef_f().
|
inlinestatic |
Get position in ECEF coordinates (int).
Definition at line 785 of file state.h.
References State::ecef_pos_i, POS_ECEF_I, State::pos_status, state, and stateCalcPositionEcef_i().
Referenced by ins_vectornav_propagate().
|
inlinestatic |
Get position in local ENU coordinates (float).
Definition at line 848 of file state.h.
References State::enu_pos_f, POS_ENU_F, State::pos_status, state, and stateCalcPositionEnu_f().
Referenced by ballistic_touchdown_run(), baro_cb(), bf_getEstimatedAltitudeCm(), calculate_new_heading(), calculateForwards(), cam_nadir(), cam_target(), check_parachute_arming(), cloud_sim_detect(), collective_tracking_control(), compute_dist2_to_home(), compute_points_from_bungee(), ctc_target_send_info_to_nei(), dc_ctrl_parrot_mykonos_autoshoot(), dc_ctrl_parrot_mykonos_command(), dc_periodic(), dc_survey(), decawave_anchorless_communication_periodic(), distributed_circular(), draw_osd(), flight_benchmark_periodic(), fly_to_xy(), formation_flight(), formation_pre_call(), get_dist2_to_point(), get_time_to_home(), gls_run(), gvf_ellipse_info(), gvf_line_info(), gvf_parametric_control_2D(), gvf_segment_XY1_XY2(), gvf_sin_info(), hackhd_autoshoot(), hackhd_command(), home_direction(), jevois_send_state(), mission_nav_path(), mission_nav_segment(), mission_nav_wp(), mission_wait_pattern(), nav_advance_carrot(), nav_approaching(), nav_approaching_xy(), nav_bungee_takeoff_run(), nav_catapult_run(), nav_check_wp_time(), nav_circle(), nav_circle_XY(), nav_flower_run(), nav_flower_setup(), nav_glide_points(), nav_hybrid_approaching(), nav_hybrid_circle(), nav_hybrid_goto(), nav_hybrid_route(), nav_init_stage(), nav_lace_setup(), nav_land_here(), nav_land_run(), nav_launcher_run(), nav_launcher_setup(), nav_line_osam_run(), nav_rosette_setup(), nav_route(), nav_route_xy(), nav_set_heading_towards(), nav_skid_landing_glide(), nav_spiral_run(), nav_spiral_setup(), nav_survey_disc_setup(), nav_survey_hybrid_run(), nav_survey_poly_osam_run(), nav_survey_poly_run(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), nav_takeoff_from_here(), nav_takeoff_from_wp(), nav_takeoff_run(), nav_trinity_setup(), out_of_segment_area(), potential_task(), process_data(), range_msg_callback(), reset_all_vars(), rover_guidance_run(), snav_init(), snav_on_time(), sonar_adc_read(), sonar_pwm_read(), sonar_vl53l1x_read(), stereo_avoid_run(), tcas_periodic_task_1Hz(), tfmini_i2c_periodic(), and vertical_ctrl_module_run().
|
inlinestatic |
Get position in local ENU coordinates (int).
Definition at line 803 of file state.h.
References State::enu_pos_i, POS_ENU_I, State::pos_status, state, and stateCalcPositionEnu_i().
Referenced by calculateForwards(), follow_wp(), hott_update_eam_msg(), logger_control_effectiveness_periodic(), rotorcraft_cam_periodic(), run_avoid_navigation_onvision(), send_fp(), send_fp_min(), waypoint_set_here(), and waypoint_set_here_2d().
|
inlinestatic |
Get position in LLA coordinates (float).
Definition at line 857 of file state.h.
References State::lla_pos_f, POS_LLA_F, State::pos_status, state, and stateCalcPositionLla_f().
Referenced by air_data_get_amsl(), cv_target_localization_report_mark(), mavlink_send_vfr_hud(), mf_daq_send_state(), nav_takeoff_from_loc(), parse_mf_daq_msg(), pressure_abs_cb(), send_amsl(), and send_minimal_com().
|
inlinestatic |
Get position in LLA coordinates (int).
Definition at line 812 of file state.h.
References State::lla_pos_i, POS_LLA_I, State::pos_status, state, and stateCalcPositionLla_i().
Referenced by dc_info(), dc_send_command(), dc_send_shot_position(), mavlink_send_global_position_int(), meteo_stick_send_data(), push_gps_to_vision(), put_lat(), put_lon(), send_cloud_sensor_data(), waypoint_set_here(), and waypoint_set_here_2d().
|
inlinestatic |
Get position in local NED coordinates (float).
Definition at line 839 of file state.h.
References State::ned_pos_f, POS_NED_F, State::pos_status, state, and stateCalcPositionNed_f().
Referenced by CN_calculate_target(), detection_cb(), ekf_aw_wrapper_periodic(), guidance_h_hover_enter(), guidance_v_guided_enter(), logger_file_write_row(), mavlink_send_local_position_ned(), oneloop_andi_run(), oneloop_from_nav(), print_true_state(), rotwing_state_choose_circle_direction(), rotwing_state_set_transition_wp(), rover_holo_guidance_run(), send_ins_flow(), tag_tracking_compute_speed(), target_pos_set_current_offset(), and update_tag_position().
|
inlinestatic |
Get position in local NED coordinates (int).
Definition at line 794 of file state.h.
References State::ned_pos_i, POS_NED_I, State::pos_status, state, and stateCalcPositionNed_i().
Referenced by computeOptiTrack(), georeference_project(), guidance_h_update_reference(), guidance_module_enter(), guidance_v_guided_enter(), guidance_v_mode_changed(), guidance_v_set_th(), guidance_v_z_enter(), ins_vectornav_propagate(), reset_guidance_reference_from_current_position(), save_shot_on_disk(), send_gh(), send_hover_loop(), send_hybrid_guidance(), send_tune_vert(), and send_vert_loop().
|
inlinestatic |
Get position in UTM coordinates (float).
Definition at line 821 of file state.h.
References State::pos_status, POS_UTM_F, state, stateCalcPositionUtm_f(), and State::utm_pos_f.
Referenced by cam_target(), cloud_sensor_callback(), flight_benchmark_periodic(), gvf_nav_survey_polygon_run(), home_direction(), ins_alt_float_update_baro(), mf_daq_send_report(), nav_bungee_takeoff_run(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_launcher_run(), nav_launcher_setup(), nav_skid_landing_glide(), nav_skid_landing_run(), nav_skid_landing_setup(), nav_spiral_run(), nav_spiral_setup(), nav_survey_poly_osam_run(), nav_survey_polygon_run(), nav_vertical_raster_run(), send_estimator(), send_minimal_com(), tcas_periodic_task_1Hz(), tcas_periodic_task_4Hz(), v_ctl_altitude_loop(), v_ctl_landing_loop(), and vPoint().
|
inlinestatic |
Get the coordinate UTM frame origin (int)
Definition at line 576 of file state.h.
References state, State::utm_initialized_f, and State::utm_origin_f.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), acInfoCalcPositionUtm_f(), acInfoCalcPositionUtm_i(), gps_cb(), ins_float_invariant_reset_vertical_ref(), ins_float_invariant_update_gps(), nav_land_at_loc(), nav_reset_reference(), nav_takeoff_from_loc(), reset_vertical_ref(), and set_ac_info_utm().
|
inlinestatic |
Test if global coordinates are valid.
Definition at line 620 of file state.h.
References POS_GLOBAL_COORD, State::pos_status, state, and stateIsLocalCoordinateValid().
Referenced by pressure_abs_cb().
|
inlinestatic |
Test if local coordinates are valid.
Definition at line 613 of file state.h.
References State::ned_initialized_f, State::ned_initialized_i, POS_LOCAL_COORD, State::pos_status, state, and State::utm_initialized_f.
Referenced by copilot_parse_move_wp_dl(), nav_parse_MOVE_WP(), and stateIsGlobalCoordinateValid().
Set the local (flat earth) coordinate frame origin (int).
Definition at line 519 of file state.h.
References ACCEL_NED_F, ACCEL_NED_I, State::accel_status, LtpDef_f::ecef, LtpDef_i::ecef, ECEF_FLOAT_OF_BFP, HIGH_RES_RMAT_FLOAT_OF_BFP, LtpDef_f::hmsl, LtpDef_i::hmsl, LtpDef_f::lla, LtpDef_i::lla, LLA_FLOAT_OF_BFP, ltp_def, LtpDef_f::ltp_of_ecef, LtpDef_i::ltp_of_ecef, M_OF_MM, State::ned_initialized_f, State::ned_initialized_i, State::ned_origin_f, State::ned_origin_i, State::origin_input_filter, POS_LOCAL_COORD, State::pos_status, SPEED_LOCAL_COORD, State::speed_status, state, and STATE_CHECK_INPUT_AND_RETURN.
Referenced by ins_ekf2_init(), ins_ekf2_update(), ins_ext_pose_init_from_flightplan(), ins_float_invariant_init(), ins_float_invariant_reset_ref(), ins_float_invariant_reset_vertical_ref(), ins_flow_init(), ins_gps_passthrough_init(), ins_init_origin_i_from_flightplan(), ins_mekf_wind_wrapper_init(), reset_cb(), reset_ref(), and reset_vertical_ref().
Set the local (flat earth) coordinate frame origin from UTM (float).
Definition at line 541 of file state.h.
References ACCEL_NED_F, ACCEL_NED_I, State::accel_status, State::origin_input_filter, POS_LOCAL_COORD, State::pos_status, SPEED_LOCAL_COORD, State::speed_status, state, STATE_CHECK_INPUT_AND_RETURN, State::utm_initialized_f, and State::utm_origin_f.
Referenced by ins_alt_float_init(), ins_float_invariant_init(), ins_float_invariant_reset_ref(), ins_float_invariant_reset_vertical_ref(), ins_gps_passthrough_init(), ins_mekf_wind_wrapper_init(), ins_xsens700_init(), ins_xsens_init(), nav_reset_utm_zone(), reset_ref(), and reset_vertical_ref().
|
inlinestatic |
Set multiple position coordinates (float).
Definition at line 748 of file state.h.
References State::ecef_pos_f, State::enu_pos_f, LLA_COPY, State::lla_pos_f, State::ned_pos_f, POS_ECEF_F, POS_ENU_F, State::pos_input_filter, POS_LLA_F, POS_NED_F, State::pos_status, POS_UTM_F, state, STATE_CHECK_INPUT_AND_RETURN, State::utm_pos_f, and VECT3_COPY.
|
inlinestatic |
Set multiple position coordinates (int).
Definition at line 668 of file state.h.
References State::ecef_pos_i, State::enu_pos_i, LLA_COPY, State::lla_pos_i, State::ned_pos_i, POS_ECEF_I, POS_ENU_I, State::pos_input_filter, POS_LLA_I, POS_NED_I, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
|
inlinestatic |
Set position from ECEF coordinates (float).
Definition at line 708 of file state.h.
References State::ecef_pos_f, POS_ECEF_F, State::pos_input_filter, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
|
inlinestatic |
Set position from ECEF coordinates (int).
Definition at line 628 of file state.h.
References State::ecef_pos_i, POS_ECEF_I, State::pos_input_filter, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
Set position from local ENU coordinates (float).
Definition at line 728 of file state.h.
References State::enu_pos_f, POS_ENU_F, State::pos_input_filter, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
Set position from local ENU coordinates (int).
Definition at line 648 of file state.h.
References State::enu_pos_i, POS_ENU_I, State::pos_input_filter, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
Set position from LLA coordinates (float).
Definition at line 738 of file state.h.
References LLA_COPY, State::lla_pos_f, State::pos_input_filter, POS_LLA_F, State::pos_status, state, and STATE_CHECK_INPUT_AND_RETURN.
Set position from LLA coordinates (int).
Definition at line 658 of file state.h.
References LLA_COPY, State::lla_pos_i, State::pos_input_filter, POS_LLA_I, State::pos_status, state, and STATE_CHECK_INPUT_AND_RETURN.
Referenced by ins_vectornav_propagate().
Set position from local NED coordinates (float).
Definition at line 718 of file state.h.
References State::ned_pos_f, State::pos_input_filter, POS_NED_F, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
Referenced by ekf_run(), ins_ekf2_update(), ins_float_invariant_propagate(), set_state_from_ins(), and sim_overwrite_ins().
Set position from local NED coordinates (int).
Definition at line 638 of file state.h.
References State::ned_pos_i, State::pos_input_filter, POS_NED_I, State::pos_status, state, STATE_CHECK_INPUT_AND_RETURN, and VECT3_COPY.
Referenced by gps_cb(), and ins_ned_to_state().
Set position from UTM coordinates (float).
Definition at line 698 of file state.h.
References State::pos_input_filter, State::pos_status, POS_UTM_F, state, STATE_CHECK_INPUT_AND_RETURN, and State::utm_pos_f.
Referenced by gps_cb(), ins_alt_float_init(), ins_alt_float_update_baro(), ins_alt_float_update_gps(), ins_float_invariant_init(), ins_gps_passthrough_init(), ins_mekf_wind_wrapper_init(), ins_xsens700_init(), ins_xsens_init(), and sim_overwrite_ins().
float State::alt_agl_f |
Altitude above ground level.
Unit: meters
Definition at line 226 of file state.h.
Referenced by dc_send_command().
struct EcefCoor_f State::ecef_pos_f |
Position in EarthCenteredEarthFixed coordinates.
Units: meters
Definition at line 226 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateGetPositionEcef_f(), stateSetPosition_f(), and stateSetPositionEcef_f().
struct EcefCoor_i State::ecef_pos_i |
Position in EarthCenteredEarthFixed coordinates.
Units: centimeters
Definition at line 172 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateGetPositionEcef_i(), stateSetPosition_i(), and stateSetPositionEcef_i().
struct EnuCoor_f State::enu_pos_f |
Position in East North Up coordinates.
with respect to ned_origin_i (flat earth) Units: meters
Definition at line 264 of file state.h.
Referenced by stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionEnu_f(), stateSetPosition_f(), and stateSetPositionEnu_f().
struct EnuCoor_i State::enu_pos_i |
Position in East North Up coordinates.
with respect to ned_origin_i (flat earth) Units: m in BFP with INT32_POS_FRAC
Definition at line 199 of file state.h.
Referenced by stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionEnu_i(), stateSetPosition_i(), and stateSetPositionEnu_i().
struct LlaCoor_f State::lla_pos_f |
Position in Latitude, Longitude and Altitude.
Units lat,lon: radians Units alt: meters above reference ellipsoid
Definition at line 226 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionLla_f(), stateSetPosition_f(), and stateSetPositionLla_f().
struct LlaCoor_i State::lla_pos_i |
Position in Latitude, Longitude and Altitude.
Units lat,lon: degrees*1e7 Units alt: milimeters above reference ellipsoid
Definition at line 172 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionLla_i(), stateSetPosition_i(), and stateSetPositionLla_i().
bool State::ned_initialized_f |
True if local float coordinate frame is initialsed.
Definition at line 251 of file state.h.
Referenced by error_output(), gps_cb(), ins_float_invariant_update_gps(), pressure_abs_cb(), sim_overwrite_ins(), stateCalcAccelEcef_f(), stateCalcAccelNed_f(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionLla_f(), stateCalcPositionNed_f(), stateCalcSpeedEnu_f(), stateCalcSpeedNed_f(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetNedOrigin_f(), stateInit(), stateIsLocalCoordinateValid(), and stateSetLocalOrigin_i().
bool State::ned_initialized_i |
true if local int coordinate frame is initialsed
Definition at line 199 of file state.h.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), follow_me_set_wp(), mavlink_send_gps_global_origin(), mission_point_of_lla(), send_ins_ref(), sim_overwrite_ins(), stateCalcAccelEcef_i(), stateCalcAccelNed_i(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_i(), stateCalcPositionLla_i(), stateCalcPositionNed_i(), stateCalcSpeedEnu_i(), stateCalcSpeedNed_i(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetNedOrigin_i(), stateInit(), stateIsLocalCoordinateValid(), stateSetLocalOrigin_i(), target_get_pos(), target_get_vel(), target_pos_set_current_offset(), waypoint_globalize(), and waypoint_localize().
struct LtpDef_f State::ned_origin_f |
Definition of the local (flat earth) coordinate system.
Defines the origin of the local NorthEastDown coordinate system in ECEF (EarthCenteredEarthFixed) and LLA (LatitudeLongitudeAlt) coordinates and the roation matrix from ECEF to local frame. (float version)
Definition at line 226 of file state.h.
Referenced by gazebo_read(), stateCalcAccelEcef_f(), stateCalcAccelNed_f(), stateCalcHorizontalSpeedNorm_i(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcSpeedEcef_f(), stateCalcSpeedEnu_f(), stateCalcSpeedNed_f(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetNedOrigin_f(), and stateSetLocalOrigin_i().
struct LtpDef_i State::ned_origin_i |
Definition of the local (flat earth) coordinate system.
Defines the origin of the local NorthEastDown coordinate system in ECEF (EarthCenteredEarthFixed) and LLA (LatitudeLongitudeAlt) coordinates and the roation matrix from ECEF to local frame. (int version)
Definition at line 172 of file state.h.
Referenced by stateCalcAccelEcef_i(), stateCalcAccelNed_i(), stateCalcHorizontalSpeedNorm_i(), stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcSpeedEcef_i(), stateCalcSpeedEnu_i(), stateCalcSpeedNed_i(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetNedOrigin_i(), and stateSetLocalOrigin_i().
struct NedCoor_f State::ned_pos_f |
Position in North East Down coordinates.
with respect to ned_origin_i (flat earth) Units: meters
Definition at line 264 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionNed_f(), stateSetPosition_f(), and stateSetPositionNed_f().
struct NedCoor_i State::ned_pos_i |
Position in North East Down coordinates.
with respect to ned_origin_i (flat earth) Units: m in BFP with INT32_POS_FRAC
Definition at line 199 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionNed_i(), stateSetPosition_i(), and stateSetPositionNed_i().
uint16_t State::origin_input_filter |
Holds the input filter id for state origin.
Definition at line 160 of file state.h.
Referenced by stateGetEcefOrigin_f(), stateInit(), stateSetLocalOrigin_i(), and stateSetLocalUtmOrigin_f().
uint16_t State::pos_input_filter |
Holds the input filter id for position.
Definition at line 172 of file state.h.
Referenced by stateGetEcefOrigin_f(), stateInit(), stateSetPosition_f(), stateSetPosition_i(), stateSetPositionEcef_f(), stateSetPositionEcef_i(), stateSetPositionEnu_f(), stateSetPositionEnu_i(), stateSetPositionLla_f(), stateSetPositionLla_i(), stateSetPositionNed_f(), stateSetPositionNed_i(), and stateSetPositionUtm_f().
uint16_t State::pos_status |
Holds the status bits for all position representations.
When the corresponding bit is set the representation is already computed.
Definition at line 167 of file state.h.
Referenced by stateCalcPositionEcef_f(), stateCalcPositionEcef_i(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionEcef_f(), stateGetPositionEcef_i(), stateGetPositionEnu_f(), stateGetPositionEnu_i(), stateGetPositionLla_f(), stateGetPositionLla_i(), stateGetPositionNed_f(), stateGetPositionNed_i(), stateGetPositionUtm_f(), stateInit(), stateIsGlobalCoordinateValid(), stateIsLocalCoordinateValid(), stateSetLocalOrigin_i(), stateSetLocalUtmOrigin_f(), stateSetPosition_f(), stateSetPosition_i(), stateSetPositionEcef_f(), stateSetPositionEcef_i(), stateSetPositionEnu_f(), stateSetPositionEnu_i(), stateSetPositionLla_f(), stateSetPositionLla_i(), stateSetPositionNed_f(), stateSetPositionNed_i(), and stateSetPositionUtm_f().
bool State::utm_initialized_f |
True if utm origin (float) coordinate frame is initialsed.
Definition at line 264 of file state.h.
Referenced by acInfoCalcPositionEnu_f(), acInfoCalcPositionEnu_i(), error_output(), gps_cb(), ins_float_invariant_update_gps(), sim_overwrite_ins(), stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateCalcSpeedEnu_f(), stateCalcSpeedEnu_i(), stateCalcSpeedNed_f(), stateCalcSpeedNed_i(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetUtmOrigin_f(), stateInit(), stateIsLocalCoordinateValid(), and stateSetLocalUtmOrigin_f().
struct UtmCoor_f State::utm_origin_f |
Definition of the origin of Utm coordinate system.
Defines the origin of the local NorthEastDown coordinate system in UTM coordinates, used as a reference when ned_origin is not initialized. Altitude is height above MSL. (float version)
Definition at line 251 of file state.h.
Referenced by stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetHmslOrigin_f(), stateGetHmslOrigin_i(), stateGetUtmOrigin_f(), stateInit(), and stateSetLocalUtmOrigin_f().
struct UtmCoor_f State::utm_pos_f |
Position in UTM coordinates.
Units x,y: meters. Units z: meters above MSL
Definition at line 199 of file state.h.
Referenced by stateCalcPositionEnu_f(), stateCalcPositionEnu_i(), stateCalcPositionLla_f(), stateCalcPositionLla_i(), stateCalcPositionNed_f(), stateCalcPositionNed_i(), stateCalcPositionUtm_f(), stateGetPositionUtm_f(), stateSetPosition_f(), and stateSetPositionUtm_f().