correct linear interpolation of motor CG
This commit is contained in:
parent
519379cf56
commit
1942f70b67
@ -563,11 +563,11 @@ public class ThrustCurveMotor implements Motor, Comparable<ThrustCurveMotor>, Se
|
||||
return cg[ (int)upperIndex ];
|
||||
}
|
||||
|
||||
// return simple linear interpolation
|
||||
final Coordinate lowerValue = cg[lowerIndex].multiply(lowerFrac);
|
||||
final Coordinate upperValue = cg[upperIndex].multiply(upperFrac);
|
||||
|
||||
// return simple linear interpolation
|
||||
return lowerValue.average( upperValue );
|
||||
return lowerValue.add( upperValue );
|
||||
}
|
||||
|
||||
public int getDataSize() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user