|
Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
Include dependency graph for common_nav.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | point |
Macros | |
| #define | WaypointX(_wp) (waypoints[_wp].x) |
| #define | WaypointY(_wp) (waypoints[_wp].y) |
| #define | WaypointAlt(_wp) (waypoints[_wp].a) |
| #define | Height(_h) (_h + ground_alt) |
| #define | NavSetGroundReferenceHere() ({ nav_reset_reference(); nav_update_waypoints_alt(); FALSE; }) |
| #define | NavSetAltitudeReferenceHere() ({ nav_reset_alt(); nav_update_waypoints_alt(); FALSE; }) |
| #define | NavSetWaypointHere(_wp) |
| #define | NavSetWaypointPosAndAltHere(_wp) |
Functions | |
| void | nav_move_waypoint (uint8_t wp_id, float utm_east, float utm_north, float alt) |
| Move a waypoint to given UTM coordinates. More... | |
| void | compute_dist2_to_home (void) |
| Computes squared distance to the HOME waypoint potentially sets too_far_from_home. More... | |
| unit_t | nav_reset_utm_zone (void) |
| Reset the UTM zone to current GPS fix. More... | |
| unit_t | nav_reset_reference (void) |
| Reset the geographic reference to the current GPS fix. More... | |
| unit_t | nav_reset_alt (void) |
| Reset the altitude reference to the current GPS alt. More... | |
| unit_t | nav_update_waypoints_alt (void) |
| Shift altitude of the waypoint according to a new ground altitude. More... | |
| void | common_nav_periodic_task_4Hz (void) |
Variables | |
| float | max_dist_from_home |
| float | dist2_to_home |
| squared distance to home waypoint More... | |
| float | dist2_to_wp |
| squared distance to next waypoint More... | |
| bool_t | too_far_from_home |
| const uint8_t | nb_waypoint |
| struct point | waypoints [] |
| float | ground_alt |
| size == nb_waypoint, waypoint 0 is a dummy waypoint More... | |
| 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 | ) | (_h + ground_alt) |
Definition at line 48 of file common_nav.h.
| #define NavSetAltitudeReferenceHere | ( | ) | ({ nav_reset_alt(); nav_update_waypoints_alt(); FALSE; }) |
Definition at line 73 of file common_nav.h.
| #define NavSetGroundReferenceHere | ( | ) | ({ nav_reset_reference(); nav_update_waypoints_alt(); FALSE; }) |
Definition at line 71 of file common_nav.h.
| #define NavSetWaypointHere | ( | _wp | ) |
Definition at line 75 of file common_nav.h.
| #define NavSetWaypointPosAndAltHere | ( | _wp | ) |
Definition at line 81 of file common_nav.h.
| #define WaypointAlt | ( | _wp | ) | (waypoints[_wp].a) |
Definition at line 47 of file common_nav.h.
Referenced by compute_TOD(), gls_compute_TOD(), gls_run(), mavlink_send_wp(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_line_border_run(), nav_line_run(), nav_select_touch_down(), nav_survey_disc_run(), nav_survey_rectangle(), nav_vertical_raster_run(), and snav_init().
| #define WaypointX | ( | _wp | ) | (waypoints[_wp].x) |
Definition at line 45 of file common_nav.h.
Referenced by cam_waypoint_target(), compute_TOD(), dc_survey(), gls_compute_TOD(), gls_run(), mavlink_send_wp(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_cube_setup(), nav_flower_run(), nav_flower_setup(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_poles_init(), nav_select_touch_down(), nav_set_heading_towards_waypoint(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), nav_vertical_raster_run(), snav_init(), and snav_on_time().
| #define WaypointY | ( | _wp | ) | (waypoints[_wp].y) |
Definition at line 46 of file common_nav.h.
Referenced by cam_waypoint_target(), compute_TOD(), dc_survey(), gls_compute_TOD(), gls_run(), mavlink_send_wp(), nav_bungee_takeoff_setup(), nav_catapult_run(), nav_cube_setup(), nav_flower_run(), nav_flower_setup(), nav_line_border_run(), nav_line_osam_run(), nav_line_run(), nav_poles_init(), nav_select_touch_down(), nav_set_heading_towards_waypoint(), nav_survey_rectangle(), nav_survey_rectangle_init(), nav_survey_rectangle_rotorcraft_run(), nav_survey_rectangle_rotorcraft_setup(), nav_vertical_raster_run(), snav_init(), and snav_on_time().
| void common_nav_periodic_task_4Hz | ( | void | ) |
Definition at line 124 of file common_nav.c.
References block_time, and stage_time.
Referenced by navigation_task().
Here is the caller graph for this function:| void compute_dist2_to_home | ( | void | ) |
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 502 of file navigation.c.
References dist2_to_home, get_dist2_to_waypoint(), max_dist2_from_home, stateGetPositionEnu_f(), too_far_from_home, point::x, EnuCoor_f::x, point::y, and EnuCoor_f::y.
Referenced by autopilot_periodic(), nav_home(), and nav_periodic_task().
Here is the call graph for this function:
Here is the caller graph for this function:| void nav_move_waypoint | ( | uint8_t | wp_id, |
| float | ux, | ||
| float | uy, | ||
| float | alt | ||
| ) |
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 135 of file common_nav.c.
References point::a, UtmCoor_f::alt, max_dist_from_home, nav_utm_east0, nav_utm_north0, nb_waypoint, point::x, and point::y.
Referenced by dl_parse_msg().
Here is the caller graph for this function:| unit_t nav_reset_alt | ( | void | ) |
Reset the altitude reference to the current GPS alt.
Definition at line 400 of file navigation.c.
References UtmCoor_f::alt, ground_alt, ins_reset_altitude_ref(), previous_ground_alt, state, State::utm_origin_f, and waypoints_localize_all().
Here is the call graph for this function:| unit_t nav_reset_reference | ( | void | ) |
Reset the geographic reference to the current GPS fix.
Definition at line 392 of file navigation.c.
References UtmCoor_f::alt, UtmCoor_f::east, ground_alt, ins_reset_local_origin(), nav_utm_east0, nav_utm_north0, nav_utm_zone0, UtmCoor_f::north, previous_ground_alt, state, State::utm_origin_f, waypoints_localize_all(), and UtmCoor_f::zone.
Here is the call graph for this function:| unit_t nav_reset_utm_zone | ( | void | ) |
Reset the UTM zone to current GPS fix.
Definition at line 66 of file common_nav.c.
References UtmCoor_f::alt, UtmCoor_f::east, ground_alt, ins_reset_utm_zone(), nav_utm_east0, nav_utm_north0, nav_utm_zone0, UtmCoor_f::north, and UtmCoor_f::zone.
Here is the call graph for this function:| unit_t nav_update_waypoints_alt | ( | void | ) |
Shift altitude of the waypoint according to a new ground altitude.
Definition at line 115 of file common_nav.c.
References point::a, ground_alt, and previous_ground_alt.
| float dist2_to_home |
squared distance to home waypoint
Definition at line 66 of file navigation.c.
Referenced by autopilot_periodic(), compute_dist2_to_home(), monitor_task(), nav_home(), and nav_init().
| float dist2_to_wp |
squared distance to next waypoint
Definition at line 71 of file navigation.c.
Referenced by nav_approaching_xy(), nav_circle(), nav_home(), nav_init(), nav_periodic_task(), and nav_route().
| float ground_alt |
size == nb_waypoint, waypoint 0 is a dummy waypoint
Definition at line 40 of file common_nav.c.
Referenced by baro_ets_read_event(), baro_MS5534A_event(), cam_segment_periodic(), cam_waypoint_target(), formation_flight(), ins_alt_float_init(), ins_alt_float_update_baro(), nav_cube_run(), nav_follow(), nav_home(), nav_init(), nav_reset_alt(), nav_reset_reference(), nav_reset_utm_zone(), nav_update_waypoints_alt(), and vPoint().
| float max_dist_from_home |
Definition at line 63 of file navigation.c.
Referenced by mission_point_of_lla(), and nav_move_waypoint().
| int32_t nav_utm_east0 |
Definition at line 42 of file common_nav.c.
Referenced by dl_parse_msg(), ins_alt_float_init(), ins_float_invariant_init(), ins_gps_utm_init(), mission_point_of_lla(), nav_move_waypoint(), nav_reset_reference(), nav_reset_utm_zone(), and vPoint().
| int32_t nav_utm_north0 |
Definition at line 43 of file common_nav.c.
Referenced by dl_parse_msg(), ins_alt_float_init(), ins_float_invariant_init(), ins_gps_utm_init(), mission_point_of_lla(), nav_move_waypoint(), nav_reset_reference(), nav_reset_utm_zone(), and vPoint().
| uint8_t nav_utm_zone0 |
Definition at line 44 of file common_nav.c.
Referenced by dl_parse_msg(), gps_cb(), gps_feed_value(), gps_mtk_read_message(), gps_parse(), gps_skytraq_read_message(), gps_ubx_read_message(), ins_alt_float_init(), ins_alt_float_update_gps(), ins_float_invariant_init(), ins_gps_utm_init(), ins_vectornav_propagate(), mission_point_of_lla(), nav_reset_reference(), nav_reset_utm_zone(), nmea_parse_GGA(), parse_gps_datalink(), parse_ins_msg(), sbp_pos_llh_callback(), sim_use_gps_pos(), and sirf_parse_41().
| const uint8_t nb_waypoint |
Definition at line 37 of file common_nav.c.
| bool_t too_far_from_home |
Definition at line 67 of file navigation.c.
Referenced by autopilot_on_rc_frame(), autopilot_periodic(), compute_dist2_to_home(), nav_init(), and telecommand_task().
| struct point waypoints[] |
Definition at line 38 of file common_nav.c.