Fix motor CG
This commit is contained in:
parent
c8f79bbdf5
commit
66f7542bcc
@ -470,11 +470,12 @@ public class SimulationHandler extends AbstractElementHandler {
|
|||||||
|
|
||||||
Coordinate[] CGPoints = motor.getCGPoints();
|
Coordinate[] CGPoints = motor.getCGPoints();
|
||||||
if (CGPoints != null && CGPoints.length > 1) {
|
if (CGPoints != null && CGPoints.length > 1) {
|
||||||
double motorPositionXRel = mount.getMotorPosition(fcid).x; // Motor position relative to the mount
|
double mountLocationX = mount.getLocations()[0].x + mount.getLength(); // Bottom location of the mount
|
||||||
double mountLocationX = mount.getLocations()[0].x;
|
double motorLength = motor.getLength();
|
||||||
double motorLocationX = mountLocationX + motorPositionXRel;
|
|
||||||
double motorCG = motor.getCGPoints()[0].x + motorLocationX;
|
// RASAero assumes motor CG to be at half the motor length from the bottom of the parent
|
||||||
// TODO: RASAero assumes motor CG to be at half the motor length from the bottom of the parent
|
double motorCG = mountLocationX - motorLength / 2;
|
||||||
|
|
||||||
return combinedCG * (1 + motorMass / stageMass)
|
return combinedCG * (1 + motorMass / stageMass)
|
||||||
- motorCG * (motorMass / stageMass);
|
- motorCG * (motorMass / stageMass);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user