|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Data Structures | |
| struct | point |
Macros | |
| #define | WaypointX(_wp) |
| #define | WaypointY(_wp) |
| #define | WaypointAlt(_wp) |
| waypoint altitude in m above MSL | |
| #define | Height(_h) |
| #define | NavSetGroundReferenceHere() |
| #define | NavSetAltitudeReferenceHere() |
| #define | NavSetWaypointHere(_wp) |
| #define | NavSetWaypointHereSend(_wp) |
| #define | NavSetWaypointPosAndAltHere(_wp) |
| #define | NavSetWaypointDistBehind(_wp, _ref, dist) |
Functions | |
| void | nav_move_waypoint (uint8_t wp_id, float utm_east, float utm_north, float alt) |
| Move a waypoint to given UTM coordinates. | |
| void | nav_move_waypoint_enu (uint8_t wp_id, float x, float y, float alt) |
| Move a waypoint in local frame. | |
| void | nav_move_waypoint_point (uint8_t wp_id, struct point *p) |
| Move a waypoint from point structure (local frame). | |
| void | nav_send_waypoint (uint8_t wp_id) |
| Send a waypoint throught default telemetry channel. | |
| void | compute_dist2_to_home (void) |
| Computes squared distance to the HOME waypoint potentially sets too_far_from_home. | |
| void | nav_reset_utm_zone (void) |
| Reset the UTM zone to current GPS fix. | |
| void | nav_reset_reference (void) |
| Reset the geographic reference to the current GPS fix. | |
| void | nav_reset_alt (void) |
| Reset the altitude reference to the current GPS alt. | |
| void | nav_update_waypoints_alt (void) |
| Shift altitude of the waypoint according to a new ground altitude. | |
| void | common_nav_periodic_task (void) |
| float | get_time_to_home (void) |
| Compute time to home use wind and airspeed when available. | |
Variables | |
| float | max_dist_from_home |
| float | dist2_to_home |
| float | dist2_to_wp |
| bool | too_far_from_home |
| const uint8_t | nb_waypoint |
| struct point | waypoints [] |
| float | ground_alt |
| size == nb_waypoint, waypoint 0 is a dummy waypoint | |
| int32_t | nav_utm_east0 |
| int32_t | nav_utm_north0 |
| uint8_t | nav_utm_zone0 |
| struct point |
Definition at line 39 of file common_nav.h.
| Data Fields | ||
|---|---|---|
| float | a | |
| float | x | |
| float | y | |
| #define Height | ( | _h | ) |
Definition at line 49 of file common_nav.h.
Referenced by calculate_wind_no_airspeed().
| #define NavSetAltitudeReferenceHere | ( | ) |
Definition at line 79 of file common_nav.h.
| #define NavSetGroundReferenceHere | ( | ) |
Definition at line 77 of file common_nav.h.
| #define NavSetWaypointDistBehind | ( | _wp, | |
| _ref, | |||
| dist ) |
Definition at line 101 of file common_nav.h.
| #define NavSetWaypointHere | ( | _wp | ) |
Definition at line 81 of file common_nav.h.
| #define NavSetWaypointHereSend | ( | _wp | ) |
Definition at line 87 of file common_nav.h.
| #define NavSetWaypointPosAndAltHere | ( | _wp | ) |
Definition at line 94 of file common_nav.h.
| #define WaypointAlt | ( | _wp | ) |
waypoint altitude in m above MSL
Definition at line 48 of file common_nav.h.
Referenced by compute_TOD(), gls_compute_TOD(), gls_run(), mavlink_send_wp(), nav_catapult_run(), nav_land_at_wp(), nav_land_run(), nav_line_border_run(), nav_line_run(), nav_survey_disc_run(), nav_survey_rectangle(), nav_vertical_raster_run(), snav_init(), and wedgebug_init().
| #define WaypointX | ( | _wp | ) |
Definition at line 45 of file common_nav.h.
Referenced by cam_gimbal_waypoint_target(), compute_TOD(), dc_survey(), gls_compute_TOD(), gls_run(), heading_towards_waypoint(), home_direction(), init_grid(), init_grid_4(), mav_exercise_periodic(), mavlink_send_wp(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_cube_setup(), nav_flower_run(), nav_flower_setup(), nav_gvf_ellipse_wp(), nav_gvf_ik_ellipse_wp(), nav_gvf_ik_line_wp1_wp2(), nav_gvf_ik_line_wp_heading(), nav_gvf_ik_segment_loop_wp1_wp2(), nav_gvf_ik_segment_wp1_wp2(), nav_gvf_ik_sin_wp1_wp2(), nav_gvf_ik_sin_wp_alpha(), nav_gvf_line_wp1_wp2(), nav_gvf_line_wp_heading(), nav_gvf_parametric_2D_bezier_wp(), nav_gvf_parametric_2D_trefoil_wp(), nav_gvf_segment_loop_wp1_wp2(), nav_gvf_segment_wp1_wp2(), nav_gvf_sin_wp1_wp2(), nav_gvf_sin_wp_alpha(), nav_land_at_wp(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_poles_init(), nav_set_heading_towards_waypoint(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), nav_takeoff_from_wp(), nav_vertical_raster_run(), orange_avoider_periodic(), snav_init(), snav_on_time(), and wedgebug_init().
| #define WaypointY | ( | _wp | ) |
Definition at line 46 of file common_nav.h.
Referenced by cam_gimbal_waypoint_target(), compute_TOD(), dc_survey(), gls_compute_TOD(), gls_run(), heading_towards_waypoint(), home_direction(), init_grid(), init_grid_4(), mav_exercise_periodic(), mavlink_send_wp(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_cube_setup(), nav_flower_run(), nav_flower_setup(), nav_gvf_ellipse_wp(), nav_gvf_ik_ellipse_wp(), nav_gvf_ik_line_wp1_wp2(), nav_gvf_ik_line_wp_heading(), nav_gvf_ik_segment_loop_wp1_wp2(), nav_gvf_ik_segment_wp1_wp2(), nav_gvf_ik_sin_wp1_wp2(), nav_gvf_ik_sin_wp_alpha(), nav_gvf_line_wp1_wp2(), nav_gvf_line_wp_heading(), nav_gvf_parametric_2D_bezier_wp(), nav_gvf_parametric_2D_trefoil_wp(), nav_gvf_segment_loop_wp1_wp2(), nav_gvf_segment_wp1_wp2(), nav_gvf_sin_wp1_wp2(), nav_gvf_sin_wp_alpha(), nav_land_at_wp(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_poles_init(), nav_set_heading_towards_waypoint(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), nav_takeoff_from_wp(), nav_vertical_raster_run(), orange_avoider_periodic(), snav_init(), snav_on_time(), and wedgebug_init().
|
extern |
Definition at line 169 of file common_nav.c.
References block_time, NAVIGATION_FREQUENCY, and stage_time.
Referenced by navigation_task().
|
extern |
Computes squared distance to the HOME waypoint potentially sets too_far_from_home.
Computes squared distance to the HOME waypoint potentially sets too_far_from_home.
Updates dist2_to_home and potentially sets too_far_from_home
Definition at line 326 of file navigation.c.
References dist2_to_home, get_dist2_to_waypoint(), max_dist2_from_home, nav, stateGetPositionEnu_f(), too_far_from_home, waypoints, EnuCoor_f::x, and EnuCoor_f::y.
Referenced by autopilot_static_periodic(), nav_home(), and nav_periodic_task().
|
extern |
Compute time to home use wind and airspeed when available.
Definition at line 71 of file common_nav.c.
References float_vect2_norm(), stateGetAirspeed_f(), stateGetHorizontalWindspeed_f(), stateGetPositionEnu_f(), stateIsAirspeedValid(), stateIsWindspeedValid(), waypoints, EnuCoor_f::x, FloatVect2::x, EnuCoor_f::y, and FloatVect2::y.
|
extern |
Move a waypoint to given UTM coordinates.
| [in] | wp_id | Waypoint ID |
| [in] | ux | UTM x (east) coordinate |
| [in] | uy | UTM y (north) coordinate |
| [in] | alt | Altitude above MSL. |
Definition at line 180 of file common_nav.c.
References LlaCoor_f::alt, max_dist_from_home, nav_utm_east0, nav_utm_north0, nb_waypoint, and waypoints.
Referenced by nav_parse_MOVE_WP().
|
extern |
Move a waypoint in local frame.
| [in] | wp_id | Waypoint ID |
| [in] | ux | x (east) coordinate |
| [in] | uy | y (north) coordinate |
| [in] | alt | Altitude above MSL. |
Definition at line 200 of file common_nav.c.
References LlaCoor_f::alt, max_dist_from_home, nb_waypoint, and waypoints.
Referenced by nav_lace_run(), nav_move_waypoint_point(), nav_rosette_run(), and nav_trinity_run().
Move a waypoint from point structure (local frame).
| [in] | wp_id | Waypoint ID |
| [in] | p | new point |
Definition at line 218 of file common_nav.c.
References nav_move_waypoint_enu(), and p.
Referenced by cloud_sim_move(), and cloud_sim_reset().
|
extern |
Reset the altitude reference to the current GPS alt.
Definition at line 241 of file navigation.c.
References ground_alt, INS_RESET_VERTICAL_REF, previous_ground_alt, stateGetHmslOrigin_f(), and waypoints_localize_all().
|
extern |
Reset the geographic reference to the current GPS fix.
Definition at line 234 of file navigation.c.
References UtmCoor_f::east, ground_alt, INS_RESET_REF, nav_utm_east0, nav_utm_north0, nav_utm_zone0, UtmCoor_f::north, previous_ground_alt, stateGetHmslOrigin_f(), stateGetUtmOrigin_f(), waypoints_localize_all(), and UtmCoor_f::zone.
|
extern |
Reset the UTM zone to current GPS fix.
Definition at line 107 of file common_nav.c.
References UtmCoor_f::alt, UtmCoor_f::east, gps, GPS_VALID_POS_UTM_BIT, ground_alt, lla_of_utm_f(), nav_utm_east0, nav_utm_north0, nav_utm_zone0, UtmCoor_f::north, stateSetLocalUtmOrigin_f(), utm_of_lla_f(), and UtmCoor_f::zone.
|
extern |
Send a waypoint throught default telemetry channel.
| [in] | wp_id | Waypoint ID |
Definition at line 226 of file common_nav.c.
References UtmCoor_f::alt, DefaultChannel, DefaultDevice, UtmCoor_f::east, nav_utm_east0, nav_utm_north0, nav_utm_zone0, nb_waypoint, UtmCoor_f::north, waypoints, and UtmCoor_f::zone.
Referenced by cloud_sim_move(), cloud_sim_reset(), nav_lace_run(), nav_rosette_run(), and nav_trinity_run().
|
extern |
Shift altitude of the waypoint according to a new ground altitude.
Definition at line 161 of file common_nav.c.
References ground_alt, previous_ground_alt, and waypoints.
|
extern |
Definition at line 38 of file common_nav.c.
Referenced by compute_dist2_to_home(), monitor_task(), and nav_home().
|
extern |
Definition at line 39 of file common_nav.c.
Referenced by nav_approaching_xy(), nav_home(), nav_periodic_task(), and rotwing_state_choose_state_by_dist().
|
extern |
size == nb_waypoint, waypoint 0 is a dummy waypoint
altitude of the ground in m above MSL
Definition at line 46 of file common_nav.c.
Referenced by baro_ets_read_event(), baro_MS5534A_event(), formation_flight(), formation_init(), ins_alt_float_update_baro(), nav_cube_run(), nav_home(), nav_init(), nav_lace_run(), nav_reset_alt(), nav_reset_reference(), nav_reset_utm_zone(), nav_rosette_run(), nav_trinity_run(), nav_update_waypoints_alt(), parachute_compute_approach(), send_nav_ref(), stop_formation(), tcas_init(), tcas_periodic_task_1Hz(), and tcas_periodic_task_4Hz().
|
extern |
Definition at line 53 of file navigation.c.
Referenced by mission_point_of_lla(), nav_move_waypoint(), and nav_move_waypoint_enu().
|
extern |
Definition at line 48 of file common_nav.c.
Referenced by copilot_parse_move_wp_dl(), DownlinkSendWp(), ins_alt_float_init(), ins_float_invariant_init(), ins_gps_passthrough_init(), ins_mekf_wind_wrapper_init(), ins_xsens700_init(), ins_xsens_init(), mission_point_of_lla(), nav_move_waypoint(), nav_parse_MOVE_WP(), nav_reset_reference(), nav_reset_utm_zone(), nav_send_waypoint(), put_lat_lon_home(), and send_nav_ref().
|
extern |
Definition at line 49 of file common_nav.c.
Referenced by copilot_parse_move_wp_dl(), DownlinkSendWp(), ins_alt_float_init(), ins_float_invariant_init(), ins_gps_passthrough_init(), ins_mekf_wind_wrapper_init(), ins_xsens700_init(), ins_xsens_init(), mission_point_of_lla(), nav_move_waypoint(), nav_parse_MOVE_WP(), nav_reset_reference(), nav_reset_utm_zone(), nav_send_waypoint(), put_lat_lon_home(), and send_nav_ref().
|
extern |
Definition at line 50 of file common_nav.c.
Referenced by copilot_parse_move_wp_dl(), DownlinkSendWp(), gps_cb(), gps_cb(), gps_cb(), gps_cb(), ins_alt_float_init(), ins_alt_float_update_gps(), ins_float_invariant_init(), ins_float_invariant_update_gps(), ins_gps_passthrough_init(), ins_mekf_wind_wrapper_init(), ins_xsens700_init(), ins_xsens_init(), mission_point_of_lla(), nav_parse_MOVE_WP(), nav_reset_reference(), nav_reset_utm_zone(), nav_send_waypoint(), put_lat_lon_home(), and send_nav_ref().
|
extern |
Definition at line 43 of file common_nav.c.
|
extern |
Definition at line 41 of file common_nav.c.
Referenced by autopilot_failsafe_checks(), and compute_dist2_to_home().
|
extern |
Definition at line 44 of file common_nav.c.