mirror of https://github.com/ArduPilot/ardupilot
AP_Navigation: Whitespace (tab/spaces inconsistency)
This commit is contained in:
parent
6a837ca318
commit
336b4a64d7
|
@ -13,96 +13,95 @@
|
||||||
|
|
||||||
class AP_Navigation {
|
class AP_Navigation {
|
||||||
public:
|
public:
|
||||||
// return the desired roll angle in centi-degrees to move towards
|
// return the desired roll angle in centi-degrees to move towards
|
||||||
// the target waypoint
|
// the target waypoint
|
||||||
virtual int32_t nav_roll_cd(void) const = 0;
|
virtual int32_t nav_roll_cd(void) const = 0;
|
||||||
|
|
||||||
// return the desired lateral acceleration in m/s/s to move towards
|
// return the desired lateral acceleration in m/s/s to move towards
|
||||||
// the target waypoint
|
// the target waypoint
|
||||||
virtual float lateral_acceleration(void) const = 0;
|
virtual float lateral_acceleration(void) const = 0;
|
||||||
|
|
||||||
// note: all centi-degree values returned in AP_Navigation should
|
// note: all centi-degree values returned in AP_Navigation should
|
||||||
// be wrapped at -18000 to 18000 in centi-degrees.
|
// be wrapped at -18000 to 18000 in centi-degrees.
|
||||||
|
|
||||||
// return the tracking bearing that the navigation controller is
|
// return the tracking bearing that the navigation controller is
|
||||||
// using in centi-degrees. This is used to display an arrow on
|
// using in centi-degrees. This is used to display an arrow on
|
||||||
// ground stations showing the effect of the cross-tracking in the
|
// ground stations showing the effect of the cross-tracking in the
|
||||||
// controller
|
// controller
|
||||||
virtual int32_t nav_bearing_cd(void) const = 0;
|
virtual int32_t nav_bearing_cd(void) const = 0;
|
||||||
|
|
||||||
// return the difference between the vehicles current course and
|
// return the difference between the vehicles current course and
|
||||||
// the nav_bearing_cd() in centi-degrees. A positive value means
|
// the nav_bearing_cd() in centi-degrees. A positive value means
|
||||||
// the vehicle is tracking too far to the left of the correct
|
// the vehicle is tracking too far to the left of the correct
|
||||||
// bearing.
|
// bearing.
|
||||||
virtual int32_t bearing_error_cd(void) const = 0;
|
virtual int32_t bearing_error_cd(void) const = 0;
|
||||||
|
|
||||||
// return the target bearing in centi-degrees. This is the bearing
|
// return the target bearing in centi-degrees. This is the bearing
|
||||||
// from the vehicles current position to the target waypoint. This
|
// from the vehicles current position to the target waypoint. This
|
||||||
// should be calculated in the update_*() functions below.
|
// should be calculated in the update_*() functions below.
|
||||||
virtual int32_t target_bearing_cd(void) const = 0;
|
virtual int32_t target_bearing_cd(void) const = 0;
|
||||||
|
|
||||||
// return the crosstrack error in meters. This is the distance in
|
// return the crosstrack error in meters. This is the distance in
|
||||||
// the X-Y plane that we are off the desired track
|
// the X-Y plane that we are off the desired track
|
||||||
virtual float crosstrack_error(void) const = 0;
|
virtual float crosstrack_error(void) const = 0;
|
||||||
virtual float crosstrack_error_integrator(void) const { return 0; }
|
virtual float crosstrack_error_integrator(void) const { return 0; }
|
||||||
|
|
||||||
|
// return the distance in meters at which a turn should commence
|
||||||
// return the distance in meters at which a turn should commence
|
// to allow the vehicle to neatly move to the next track in the
|
||||||
// to allow the vehicle to neatly move to the next track in the
|
// mission when approaching a waypoint. Assumes 90 degree turn
|
||||||
// mission when approaching a waypoint. Assumes 90 degree turn
|
virtual float turn_distance(float wp_radius) const = 0;
|
||||||
virtual float turn_distance(float wp_radius) const = 0;
|
|
||||||
|
|
||||||
// return the distance in meters at which a turn should commence
|
// return the distance in meters at which a turn should commence
|
||||||
// to allow the vehicle to neatly move to the next track in the
|
// to allow the vehicle to neatly move to the next track in the
|
||||||
// mission when approaching a waypoint
|
// mission when approaching a waypoint
|
||||||
virtual float turn_distance(float wp_radius, float turn_angle) const = 0;
|
virtual float turn_distance(float wp_radius, float turn_angle) const = 0;
|
||||||
|
|
||||||
// update the internal state of the navigation controller, given
|
// update the internal state of the navigation controller, given
|
||||||
// the previous and next waypoints. This is the step function for
|
// the previous and next waypoints. This is the step function for
|
||||||
// navigation control for path following between two points. This
|
// navigation control for path following between two points. This
|
||||||
// function is called at regular intervals (typically 10Hz). The
|
// function is called at regular intervals (typically 10Hz). The
|
||||||
// main flight code will call an output function (such as
|
// main flight code will call an output function (such as
|
||||||
// nav_roll_cd()) after this function to ask for the new required
|
// nav_roll_cd()) after this function to ask for the new required
|
||||||
// navigation attitude/steering.
|
// navigation attitude/steering.
|
||||||
virtual void update_waypoint(const struct Location &prev_WP, const struct Location &next_WP) = 0;
|
virtual void update_waypoint(const struct Location &prev_WP, const struct Location &next_WP) = 0;
|
||||||
|
|
||||||
// update the internal state of the navigation controller for when
|
// update the internal state of the navigation controller for when
|
||||||
// the vehicle has been commanded to circle about a point. This
|
// the vehicle has been commanded to circle about a point. This
|
||||||
// is the step function for navigation control for circling. This
|
// is the step function for navigation control for circling. This
|
||||||
// function is called at regular intervals (typically 10Hz). The
|
// function is called at regular intervals (typically 10Hz). The
|
||||||
// main flight code will call an output function (such as
|
// main flight code will call an output function (such as
|
||||||
// nav_roll_cd()) after this function to ask for the new required
|
// nav_roll_cd()) after this function to ask for the new required
|
||||||
// navigation attitude/steering.
|
// navigation attitude/steering.
|
||||||
virtual void update_loiter(const struct Location ¢er_WP, float radius, int8_t loiter_direction) = 0;
|
virtual void update_loiter(const struct Location ¢er_WP, float radius, int8_t loiter_direction) = 0;
|
||||||
|
|
||||||
// update the internal state of the navigation controller, given a
|
// update the internal state of the navigation controller, given a
|
||||||
// fixed heading. This is the step function for navigation control
|
// fixed heading. This is the step function for navigation control
|
||||||
// for a fixed heading. This function is called at regular
|
// for a fixed heading. This function is called at regular
|
||||||
// intervals (typically 10Hz). The main flight code will call an
|
// intervals (typically 10Hz). The main flight code will call an
|
||||||
// output function (such as nav_roll_cd()) after this function to
|
// output function (such as nav_roll_cd()) after this function to
|
||||||
// ask for the new required navigation attitude/steering.
|
// ask for the new required navigation attitude/steering.
|
||||||
virtual void update_heading_hold(int32_t navigation_heading_cd) = 0;
|
virtual void update_heading_hold(int32_t navigation_heading_cd) = 0;
|
||||||
|
|
||||||
// update the internal state of the navigation controller for
|
// update the internal state of the navigation controller for
|
||||||
// level flight on the current heading. This is the step function
|
// level flight on the current heading. This is the step function
|
||||||
// for navigation control for level flight. This function is
|
// for navigation control for level flight. This function is
|
||||||
// called at regular intervals (typically 10Hz). The main flight
|
// called at regular intervals (typically 10Hz). The main flight
|
||||||
// code will call an output function (such as nav_roll_cd()) after
|
// code will call an output function (such as nav_roll_cd()) after
|
||||||
// this function to ask for the new required navigation
|
// this function to ask for the new required navigation
|
||||||
// attitude/steering.
|
// attitude/steering.
|
||||||
virtual void update_level_flight(void) = 0;
|
virtual void update_level_flight(void) = 0;
|
||||||
|
|
||||||
// return true if we have reached the target loiter location. This
|
// return true if we have reached the target loiter location. This
|
||||||
// may be a fuzzy decision, depending on internal navigation
|
// may be a fuzzy decision, depending on internal navigation
|
||||||
// parameters. For example the controller may return true only
|
// parameters. For example the controller may return true only
|
||||||
// when on the circular path around the waypoint, and not when
|
// when on the circular path around the waypoint, and not when
|
||||||
// tracking towards the center. This function is only valid when
|
// tracking towards the center. This function is only valid when
|
||||||
// the update_loiter() method is used
|
// the update_loiter() method is used
|
||||||
virtual bool reached_loiter_target(void) = 0;
|
virtual bool reached_loiter_target(void) = 0;
|
||||||
|
|
||||||
// notify Navigation controller that a new waypoint has just been
|
// notify Navigation controller that a new waypoint has just been
|
||||||
// processed. This means that until we handle an update_XXX() function
|
// processed. This means that until we handle an update_XXX() function
|
||||||
// the data is stale with old navigation information.
|
// the data is stale with old navigation information.
|
||||||
virtual void set_data_is_stale(void) = 0;
|
virtual void set_data_is_stale(void) = 0;
|
||||||
|
|
||||||
// return true if a new waypoint has been processed by mission
|
// return true if a new waypoint has been processed by mission
|
||||||
|
@ -113,11 +112,11 @@ public:
|
||||||
|
|
||||||
virtual void set_reverse(bool reverse) = 0;
|
virtual void set_reverse(bool reverse) = 0;
|
||||||
|
|
||||||
// add new navigation controllers to this enum. Users can then
|
// add new navigation controllers to this enum. Users can then
|
||||||
// select which navigation controller to use by setting the
|
// select which navigation controller to use by setting the
|
||||||
// NAV_CONTROLLER parameter
|
// NAV_CONTROLLER parameter
|
||||||
enum ControllerType {
|
enum ControllerType {
|
||||||
CONTROLLER_DEFAULT = 0,
|
CONTROLLER_DEFAULT = 0,
|
||||||
CONTROLLER_L1 = 1
|
CONTROLLER_L1 = 1
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue