AP_L1_Control: fix for new AP_Math API
Pair-Programmed-With: Brandon Jones <brnjones@gmail.com>
This commit is contained in:
parent
612ede81f4
commit
cf4a74cfb8
@ -88,10 +88,10 @@ void AP_L1_Control::update_waypoint(const struct Location &prev_WP, const struct
|
|||||||
float K_L1 = 4.0f * _L1_damping * _L1_damping;
|
float K_L1 = 4.0f * _L1_damping * _L1_damping;
|
||||||
|
|
||||||
// Get current position and velocity
|
// Get current position and velocity
|
||||||
_ahrs->get_position(&_current_loc);
|
_ahrs->get_position(_current_loc);
|
||||||
|
|
||||||
// update _target_bearing_cd
|
// update _target_bearing_cd
|
||||||
_target_bearing_cd = get_bearing_cd(&_current_loc, &next_WP);
|
_target_bearing_cd = get_bearing_cd(_current_loc, next_WP);
|
||||||
|
|
||||||
Vector2f _groundspeed_vector = _ahrs->groundspeed_vector();
|
Vector2f _groundspeed_vector = _ahrs->groundspeed_vector();
|
||||||
|
|
||||||
@ -182,10 +182,10 @@ void AP_L1_Control::update_loiter(const struct Location ¢er_WP, float radius
|
|||||||
float K_L1 = 4.0f * _L1_damping * _L1_damping;
|
float K_L1 = 4.0f * _L1_damping * _L1_damping;
|
||||||
|
|
||||||
//Get current position and velocity
|
//Get current position and velocity
|
||||||
_ahrs->get_position(&_current_loc);
|
_ahrs->get_position(_current_loc);
|
||||||
|
|
||||||
// update _target_bearing_cd
|
// update _target_bearing_cd
|
||||||
_target_bearing_cd = get_bearing_cd(&_current_loc, ¢er_WP);
|
_target_bearing_cd = get_bearing_cd(_current_loc, center_WP);
|
||||||
|
|
||||||
Vector2f _groundspeed_vector = _ahrs->groundspeed_vector();
|
Vector2f _groundspeed_vector = _ahrs->groundspeed_vector();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user