optimization updates
[debian/openrocket] / src / net / sf / openrocket / simulation / AbstractSimulationStepper.java
index 348feaa58e7f28845cee704b68c8fd7d4f367fe8..e39d6e6a77a4eec4b1d5c2e553e082e0e0778fe5 100644 (file)
@@ -114,7 +114,7 @@ public abstract class AbstractSimulationStepper implements SimulationStepper {
        protected MassData calculateMassData(SimulationStatus status) throws SimulationException {
                MassData mass;
                Coordinate cg;
-               double longitudalInertia, rotationalInertia;
+               double longitudinalInertia, rotationalInertia;
                
                // Call pre-listener
                mass = SimulationListenerHelper.firePreMassCalculation(status);
@@ -124,15 +124,15 @@ public abstract class AbstractSimulationStepper implements SimulationStepper {
                
                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;
@@ -208,7 +208,7 @@ public abstract class AbstractSimulationStepper implements SimulationStepper {
         */
        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);
                }
        }
        
@@ -221,7 +221,7 @@ public abstract class AbstractSimulationStepper implements SimulationStepper {
         */
        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);
                }
        }
 }