AP_Navigation: Whitespace (tab/spaces inconsistency)

This commit is contained in:
Michael du Breuil 2017-03-17 19:46:12 -07:00 committed by Andrew Tridgell
parent 6a837ca318
commit 336b4a64d7
1 changed files with 80 additions and 81 deletions

View File

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