1912 Commits

Author SHA1 Message Date
JoePfeiffer
a44c90d522 Since FlightConfiguration:getContextListAt() is now only returning contexts which are active, change name to getActiveContextListAt(). Note that it's only ever called from FlightConfiguration:getActiveInstances() and recursively, so this is making the two method names consistent. 2020-09-12 14:49:21 -06:00
JoePfeiffer
5e64b3e565 Correct FlightConfigurationTest to enable Stage 1 of Falcon9Heavy before using getActiveInstances() to obtain its component instances 2020-09-12 12:29:24 -06:00
JoePfeiffer
20ab8ef8b1 Only calculate instancemap from active components
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.
2020-09-09 17:17:10 -06:00
JoePfeiffer
206ba58a7e Modified MassCalculator unit test to test at nonzero ignition time 2020-09-09 17:10:29 -06:00
JoePfeiffer
f5d56f6e99 Correct motor mass calculation for motor ignition time
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.
2020-09-09 17:10:29 -06:00
JoePfeiffer
b64a3b3fa8 The simulation now uses mass data from the entire motor as a unit,
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.
2020-09-09 17:10:29 -06:00
Daniel Williams
3f7009b9f7
Merge pull request #769 from teyrana/fix/755/cg-error
[fixes #755] Correctly calculate cg.x override
2020-09-05 15:11:47 -04:00
Daniel_M_Williams
bd09354fd3 [fixes #755] Correctly calculates mass override (particularly on stages) 2020-09-02 22:33:39 -04:00
Daniel_M_Williams
685b40ef2f [fix][ui] Change Display name for MassComponent from 'Unspecified' to 'Mass Component' 2020-09-01 20:14:49 -04:00
Daniel_M_Williams
5b94bedb5f [fixes #755] Correctly calculate cg.x override 2020-09-01 19:58:17 -04:00
Daniel_M_Williams
58712cb69f [fix] RocketFigure now zooms to whole rocket extents even iff stages are deactivated 2020-09-01 19:14:19 -04:00
Daniel_M_Williams
b9992674ef [fix] writes new tests to for BoundingBox behavior 2020-09-01 19:14:19 -04:00
Daniel_M_Williams
b0bc372ece [fix] FlightConfiguration now correctly calculates the bounds of partially-active rockets 2020-09-01 19:14:18 -04:00
Daniel_M_Williams
81b2f60e55 [feat] Implements BoxBounded interface on several RocketComponents 2020-09-01 19:14:18 -04:00
JoePfeiffer
94a5e1c2d9 fix typo -- two missing right parentheses 2020-08-30 11:44:19 -06:00
JoePfeiffer
724cd3f5dc Don't set a warning if recovery device is deployed (for instance, due to apogee detect) while motor is coasting.
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.
2020-08-30 11:18:57 -06:00
Daniel_M_Williams
e33353cf68 [fix] Restores functionality of OptimizationDialog 2020-08-23 22:00:53 -04:00
Daniel_M_Williams
a00636a1ed [fix] migrates calls from 'simulation.rocket.selected' -> 'simulation.activeconfig' 2020-08-23 22:00:53 -04:00
Daniel_M_Williams
728964531b [refactor][cleanup] refactored optimization.parameters.StabilityParameter -- shortened function, and removed deprecated function call 2020-08-23 22:00:52 -04:00
Daniel_M_Williams
7c72f3a231 [cleanup] adds 'final' keyword in RocketComponent.findComponent(...) 2020-08-23 22:00:52 -04:00
Daniel_M_Williams
41c06572a7 [fix] Rockets now correctly copy their FlightConfigurations 2020-08-23 22:00:51 -04:00
Daniel_M_Williams
1eb329b850 [fix] when copying documents, the simulation->FlightConfigurationId is correctly copied 2020-08-23 22:00:51 -04:00
Daniel_M_Williams
70cbc54daf [cleanup] Applies a bunch of changes suggested by the linter in the Optimization Code 2020-08-22 11:18:03 -04:00
Daniel_M_Williams
aa90feb61b [version] increments the build label to '20-08-alpha-15' 2020-08-22 09:47:22 -04:00
Daniel_M_Williams
28ba049975 [fix] Fixed compile issues; Dialog now opens cleanly 2020-08-22 09:47:22 -04:00
JoePfeiffer
99bdf71ba8 In FinSetCalc.calculateFinGeometry(), make sure x coordinates of interections
between lines defining fins and strips being used to estimate geometry aren't beyond bounds of fin.
2020-08-17 17:39:08 -06:00
Daniel_M_Williams
a9afb829ef [cleanup] cleans up some whitespace and redundant variables in FlightConfiguration 2020-08-16 14:34:22 -04:00
Daniel_M_Williams
8a14d98fcc [fixes #741] RailButtons will correctly identify their first parent BodyTube 2020-08-16 14:32:29 -04:00
Daniel_M_Williams
68927a0e53 [fixes #740] Railbuttons now correctly load instance-separation
Actual fix: removed debugging / dev hard-coding.  /facepalm
2020-08-14 19:29:24 -04:00
Daniel_M_Williams
eb197427f2 [fix] tightens up calculation of adjacent SymmetricComponents 2020-08-14 18:51:54 -04:00
Daniel_M_Williams
ac1d6b698a [refactor] streamlined null checks in SymmetricComponent.get{Prev|Next}SymmetricComponent 2020-08-14 18:40:10 -04:00
Daniel_M_Williams
bbf9c4d8a4 [refactor] adjusted variable names in SymmetricComponent.get{Prev|Next}SymmetricComponent to be more obvious 2020-08-14 18:40:10 -04:00
Daniel_M_Williams
db79511184 [fix][comment] fixed test explanatory comment to be accurate 2020-08-14 18:09:39 -04:00
Daniel_M_Williams
748a871e57 [fix] limits a FreeformFinSet maximum size to 2.5m x 2.5m. This prevents a stack-overflow while editing 2020-08-14 16:38:39 -04:00
Daniel Williams
b17d03138a
Merge pull request #731 from teyrana/fix/726-positioning
[Fixes #726] Fixes multiple issues when changing Fin-Offset-Methods
2020-08-08 11:25:26 -04:00
JoePfeiffer
23c39d5aef Don't create new SimulationStatus on landing.
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.
2020-08-06 14:19:33 -06:00
Daniel_M_Williams
aeae4b1e03 [refactor] ported reduce360 -> reduce2Pi. Because the units are in radians 2020-08-02 16:49:32 -04:00
Daniel_M_Williams
6efbe1e2ab [refactor] ported reduce180 -> reducePi. Because the units are in radians 2020-08-02 16:49:32 -04:00
Daniel Williams
14bbcecc1e
Merge pull request #729 from teyrana/update/version
[Resolves #680][doc] Updates build string to: '20-08-alpha-14'
2020-08-02 16:39:08 -04:00
Daniel_M_Williams
dc9dc3ed63 [fix] Changing the AxialMethod on a RocketComponent now mantains the same position, but changes the internal offset 2020-08-02 16:24:59 -04:00
Daniel_M_Williams
2437188afe [doc] Updates build string to: '20-08-alpha-14' 2020-08-01 12:05:22 -04:00
Daniel_M_Williams
4825c7a1ee [fix][mass] Added a negative-mass check, which rarely happens during inconstitent component updates -- during scaling 2020-08-01 11:56:53 -04:00
Daniel_M_Williams
834f4763f5 [refactor][cleanup] condensed some code lines (mostly to silence a linter warning) 2020-08-01 11:56:06 -04:00
Billy Olsen
78a315409a Check rocketBounds.isEmpty() rather than activeStages for length
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>
2020-07-29 09:07:30 -07:00
JoePfeiffer
16d7ce7f1f Fixes Issue #718
Reset rocket's relative position when its absolute position is reset.
Make sure rocket has lifted off before setting launch rod as cleared.
2020-07-27 11:59:25 -06:00
Billy Olsen
908e6359ff Add BoxBounded interface to TubeFinSet
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>
2020-07-25 18:28:54 -07:00
Daniel_M_Williams
ac7d606423 [fix] fixes rotation issues in TubeFinSet 2d rendering. 2020-07-25 18:28:54 -07:00
Billy Olsen
74ec0be340 Make TubeFinSet RingInstanceable
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>
2020-07-25 18:26:07 -07:00
Daniel_M_Williams
e9981aff28 [debug] removed excess debug output in FinSet 2020-07-19 11:30:54 -04:00
Daniel_M_Williams
69a338f440 [feat] Add a return value to BoundingBox.update(Coordinate) 2020-07-12 15:39:33 -04:00