Skip to content

Commit

Permalink
use reference instead of copy
Browse files Browse the repository at this point in the history
Signed-off-by: RomanBapst <[email protected]>
  • Loading branch information
RomanBapst committed Dec 4, 2024
1 parent 28a1be8 commit b959774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/fw_pos_control/FixedwingPositionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ void FixedwingPositionControl::control_backtransition_heading_hold()
}

const Vector2f airspeed_vector = Vector2f(cosf(_local_pos.heading), sinf(_local_pos.heading)) * true_airspeed;
const Vector2f ground_speed = airspeed_vector;
const Vector2f &ground_speed = airspeed_vector;

_npfg.setAirspeedNom(_performance_model.getCalibratedTrimAirspeed() * _eas2tas);
_npfg.setAirspeedMax(_performance_model.getMaximumCalibratedAirspeed() * _eas2tas);
Expand Down

0 comments on commit b959774

Please sign in to comment.