protected MassData calculateMassData(SimulationStatus status) throws SimulationException {
MassData mass;
Coordinate cg;
- double longitudalInertia, rotationalInertia;
+ double longitudinalInertia, rotationalInertia;
// Call pre-listener
mass = SimulationListenerHelper.firePreMassCalculation(status);
MassCalculator calc = status.getSimulationConditions().getMassCalculator();
cg = calc.getCG(status.getConfiguration(), status.getMotorConfiguration());
- longitudalInertia = calc.getLongitudalInertia(status.getConfiguration(), status.getMotorConfiguration());
+ longitudinalInertia = calc.getLongitudinalInertia(status.getConfiguration(), status.getMotorConfiguration());
rotationalInertia = calc.getRotationalInertia(status.getConfiguration(), status.getMotorConfiguration());
- mass = new MassData(cg, longitudalInertia, rotationalInertia);
+ mass = new MassData(cg, longitudinalInertia, rotationalInertia);
// Call post-listener
mass = SimulationListenerHelper.firePostMassCalculation(status, mass);
checkNaN(mass.getCG());
- checkNaN(mass.getLongitudalInertia());
+ checkNaN(mass.getLongitudinalInertia());
checkNaN(mass.getRotationalInertia());
return mass;
*/
protected void checkNaN(Coordinate c) {
if (c.isNaN()) {
- throw new BugException("Simulation resulted in not-a-number (NaN) value, please report a bug.");
+ throw new BugException("Simulation resulted in not-a-number (NaN) value, please report a bug, c=" + c);
}
}
*/
protected void checkNaN(Quaternion q) {
if (q.isNaN()) {
- throw new BugException("Simulation resulted in not-a-number (NaN) value, please report a bug.");
+ throw new BugException("Simulation resulted in not-a-number (NaN) value, please report a bug, q=" + q);
}
}
}