1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-14 11:59:56 +03:00

[maths.c] Add two news functions

This commit is contained in:
JuliooCesarMDM 2022-01-11 21:39:45 -03:00
parent ac6650e25f
commit 930c6cf859
16 changed files with 41 additions and 24 deletions

View file

@ -537,7 +537,7 @@ static int logicConditionGetFlightOperandValue(int operand) {
break;
case LOGIC_CONDITION_OPERAND_FLIGHT_3D_HOME_DISTANCE: //in m
return constrain(fast_fsqrtf(sq(GPS_distanceToHome) + sq(getEstimatedActualPosition(Z)/100)), 0, INT16_MAX);
return constrain(calc_length_pythagorean_2D(GPS_distanceToHome, getEstimatedActualPosition(Z) / 100.0f), 0, INT16_MAX);
break;
case LOGIC_CONDITION_OPERAND_FLIGHT_CRSF_LQ: