One thing to mention is I had a choice of either adding a special case for the rocket itself, or change the result of isStageActive for stage -1 to be true instead of false as previously. I couldn't see a place where the previous version mattered, so I changed it.
Adds the MotorClusterState from the current SimulationState to the MassCalculation constructor. The ignition time of each motor is subtracted from the current simulationTime to calculate its current mass.
MassCalculation is also used for static analysis; in this case a synthetic time is passed (and there is no SimulationState). In this case, a null is passed in to the MassCalculation constructor; whether or not this the case is used to determine whether or not to calculate a motor time based on its ignition time.
Also clamp motorTime from MotorClusterState to be no less than 0 when calculating motor mass.
rather than separating out the propellant data. This commit clarifies
the code by replacing instances of "propellant" with "motor" in
variable names and messages where appropriate.
It does not update the translations into other languages.
Background: a motor that has burned out can be in one of two states: DELAYING (the delay charge has not yet fired) or SPENT (either the delay charge, if any, has fired or there was no delay charge).
The existing SimulationStatus:getActiveMotors() method returned a list of motors that were active for the stage, and which were not SPENT. The test for the warning redudantly tested for a SPENT motor, still didn't test for a DELAYING motr, and consequently set the warning.
This PR
(1) adds a boolean MotorClusterStatus:isDelaying() method, analogous to the existing state test methods
(2) modifies SimulationStatus.java:getActiveMotors() to return all the motors, not just the ones that aren't SPENT. This is to improve consistency with FlightConfiguration:getActiveMotors(), and to make for a more consistent usage between the two calls to the method.
(3) adds !isDelaying() to the test for the warning.
Makes consistent with BasicLandingStepper; more generally, if you don't need a more specialized derived from SimulationStatus (as is the case with RK4SimulationStepper), you don't need to create a new SimulationStatus when entering a new flight phase.
When no components are added, a rocket is showing -INFINITY for the
length. This is because the special case for length 0 is checking for
active stages, instead check the rocketBounds.isEmpty() to see if any
bounds have been added.
Fixes#714
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
TubeFinSets cause rocket size within the panel to be a bit off. Add
the BoxBounded interface to provide a tight BoundingBox.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
Make the TubeFinSet RingInstanceable. This change updates the rendering
of both the 2D and 3D views to handle the RingInstanceable shapes. This
also updates the DocumentConfig to parse the new XML formats properly.
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>