Refactor: Use new matrix::Vector2f constructor

This commit is contained in:
Matthias Grob
2018-10-01 08:10:21 -04:00
committed by Daniel Agar
parent ada0179cda
commit bee6a6b8b0
13 changed files with 98 additions and 95 deletions
@@ -143,7 +143,7 @@ void FlightTaskAutoMapper::_generateVelocitySetpoints()
// TODO: Remove velocity force logic from navigator, since
// navigator should only send out waypoints.
_position_setpoint = Vector3f(NAN, NAN, _position(2));
Vector2f vel_sp_xy = Vector2f(&_velocity(0)).unit_or_zero() * _mc_cruise_speed;
Vector2f vel_sp_xy = Vector2f(_velocity).unit_or_zero() * _mc_cruise_speed;
_velocity_setpoint = Vector3f(vel_sp_xy(0), vel_sp_xy(1), NAN);
}