2260 Commits

Author SHA1 Message Date
Daniel_M_Williams
d0cb8ab99f [Bugfix / Refactor] Further Simulation Bugfixes / Streamlining
- Fixed bugs in the simulation event handling:
  -- removed extraneous BURNOUT checks
  -- added MotorClusterState.burnOut(..) update calls on BURNOUT event
  -- added MotorClusterState.expend(..) update calls on EJECTION_CHARGE event
- MotorInstanceId -> MotorConfigurationId (to reflect actual usage)
  -- removed name field (unnecessary)
- changed FlightConfiguration behavior to cache ALL motors, and return active motors as requested
  -- updated corresponding active-motor-list updating through to the simulation layers
2016-03-11 19:16:41 -05:00
Daniel_M_Williams
f6d9ad0487 [Bugfix / Refactor] Fixing simulation bugs and oddities.
- *Adjusted event handling in BasicEventSimulationEngine*
  -- combined redundant event-handling for IGNITION FlightEvent
  -- adjusted parameters for throwing IGNITION FlightEvents
- Added validation method internal to FlightEvent class.
  -- documents assumptions about classes are expected for what types of flight events.
- renamed MotorState -> MotorSimulation -> MotorClusterState
- renamed MotorState enums -> ThrustState
- Adjusted MotorConfigurations to be init-linked to a mount, and FCID
  -- these are final member fields, and required for construction. And immutable.
- moved IgnitionEvent to motor package
- Adjusted MotorInstanceId to represent a motorCluster key
  -- wraps a UUID, and uniquely keyed to its: mount, FCID
- fixed AxialStage methods isLaunchStage() and getPreviousStage()
- added methods to MotorMount interface to reduce extraneous, always-true casts
- various miscellaneous fixes to reflect method changes
- various test fixes
  -- added test to verify 'getPreviousStage()' method
2016-03-11 19:13:28 -05:00
Daniel_M_Williams
28689825a4 [Refactor ] Refactored motor state in preparation for debugging the simulation itself
- Created MotorState as an enum describing discrete states a motor may be in
- moved ThrustCurveMotorState info back into MotorSimulation
  -- MotorSimulation will be used by the simulation code.
  -- tracks simulation-time info, such as event times, and current state ( <MotorState> )
- MotorConfiguration no longer have any knowledge about their simulation info
- moved functionality (BUT NOT STATE) into ThrustCurveMotor
  -- can query about thrust(t), mass(t), cgx(t)
2016-03-11 19:13:28 -05:00
Daniel_M_Williams
438f58c438 [Bugfix] Fixed MassCalculator Issues - Instancing, CGx & CM Override
- Fixed Bug in MassCalculator
  -- demonstrated by MassCalculatorTest.testBoosterTotalCM() et al.
  -- errors: 1) under-counts instanced children
             2) erroneously required component have children before instancing mass
  -- N.B. This method is ripe for refactoring, to make it MUCH cleaner....
- Updated numbers on MassCalculator Unit Tests
- Added Test for motor configuration multiplicity (FlightConfigurationTest)
2016-03-11 19:13:23 -05:00
Daniel_M_Williams
7029dd0c3c [Rename] Changed variable names for clarity. 2016-03-11 18:42:32 -05:00
Daniel_M_Williams
2215d41cc2 [Test] added Transition Test file. 2016-03-11 17:31:33 -05:00
kruland2607
b2489f16ec Merge pull request #3 from teyrana/unstable
Fixed Simulation Id loading (and other bugfixes).
2016-01-31 07:34:33 -06:00
Daniel_M_Williams
4e64d817d1 [Bugfix] Added unit tests for Transition Shapes
- and refactored member names a bit
2016-01-24 21:37:13 -05:00
Daniel_M_Williams
cd829ff3fd [Bugfix] Enabled editing of default-on-open rocket
- added a judicious <Rocket>.enableEvents() call
2016-01-23 22:36:10 -05:00
Daniel_M_Williams
fbd40859a5 [Bugfix] Cleaned up event-handling, esp. with active stages & graphics
- added new ComponentChangeEvent type: GRAPHIC
  - does not change the rocket structure, nor behavior, but requires updates to the UI
- removed event handling from FlightConfiguration
  - caused a circular event loop
  - also, collected too many responsibilities in the class (bad code smell)
- minor refactor of event handling in Rocket. (no change in behavior)
- Fixed StageSelector behavior
  - should now pull selected configuration from rocket
  - should now correctly notify rocket (and indirectly, the graphics)
2016-01-23 20:03:53 -05:00
Daniel_M_Williams
39420ddfc0 [Bugfix] Cleaned up simulation and configuration Ids loading
- Simulations now load the configuration ids corresponding to it's file entry.
  - involved removing redundand flightconfig id fields
    - FROM simulation conditions and simulation options
    - TO "Simulation"
- Distilled some unit tests to use all rockets from the TestRocket class.
- Fixed a few warnings
2016-01-19 00:03:25 -05:00
Daniel_M_Williams
1226666a41 added missing (default) translation string 2016-01-17 13:05:24 -05:00
Daniel_M_Williams
e51f7a2827 [Minor] Cleaned up warnings
- Mostly un-parameterized generics
- adding 'serialVersionUID' member fields where javac complained
2016-01-17 11:58:06 -05:00
Kevin Ruland
e174e4f0f6 Fixes to make simulations finally work again. 2016-01-16 22:14:09 -06:00
kruland2607
dbde8a5a40 Merge pull request #2 from teyrana/unstable
[Unstable] Fixes to several unit tests
2016-01-11 10:35:45 -06:00
Daniel_M_Williams
77bb060d25 MERGE with commit f8cfebe... 2016-01-09 17:11:20 -05:00
Daniel_M_Williams
60395b32a3 [Major] Fixing Cp Unittests
Implemented unit tests for aerodynamic calculators:
- (new) SymmetricComponentCalcTest
- (new) FinSetCalcTest
- (fixed) BarrowmanCalculatorTest
  -- seems like bad truth values
2016-01-03 13:54:59 -05:00
Daniel_M_Williams
c0a372258a adjusted configuration descriptions in UI to include ejection delay 2016-01-02 15:21:32 -05:00
Daniel_M_Williams
04b4a45b2e fixed NPE-throwing Heisenbug in flight confiuration UI 2016-01-02 15:04:41 -05:00
Daniel_M_Williams
3f9be1387d [BugFix] Fixed Continuity Test
- Reimplemented the continuity test in BarrowmanCalculator
- Added corresponding unit tests, too
2016-01-01 22:05:13 -05:00
Daniel_M_Williams
0ab8dde5fb cleaned up FlightConfiguration naming code 2016-01-01 17:11:59 -05:00
Daniel_M_Williams
96f2cc048b adjusted getName() method to be more descriptive 2016-01-01 17:02:34 -05:00
Daniel_M_Williams
513e74fd15 Merge with commit f8cfebe from kruland2607/openrocket 2016-01-01 16:04:33 -05:00
Kevin Ruland
f8cfebe5f5 Fix the motor cg computation. Partial fix to barrowman aero. 2015-12-31 09:57:36 -06:00
Daniel_M_Williams
206214e47a [BugFix] Fixed MassCalculator Unit Tests
- Added debug statements to MassCalculator, enabled by a 'debug' flag
- Adjusted values in MassCalculatorTest
  -- added additional unit test cases
- Fixed implementations in MassCalculator
- Implemented getPosition() and getX() in MotorConfiguration
- added motor to test rocket Estes Alpha 3 in TestRockets
2015-12-26 14:57:17 -05:00
Daniel_M_Williams
c649292f56 'fixed' ComponentCompareTest (removed; because the test is superflous 2015-12-25 19:36:24 -05:00
Daniel_M_Williams
711f71e2c8 Fixed TestRocketOptimizationFunction unit tests 2015-12-25 13:33:46 -05:00
Daniel_M_Williams
53b20eb999 (re)fixed parallel stage unit test 2015-12-25 11:02:33 -05:00
Daniel_M_Williams
ab643d5ab5 [Major] Removed Rocket FlightConfiguration event code
# FlightConfigurations have stubs of eventListening and dispatching code.
  - Removed code from FlightConfigurations
  - Removed code from calling classes
2015-12-23 23:25:03 -05:00
Daniel_M_Williams
0979cff505 fixed bugs in the Photo Renderer 2015-12-23 23:17:59 -05:00
Daniel_M_Williams
efd1656fc8 [Major] Re-Implemented Rocket configuration list
# FlightConfigurations behave differently than the ...ParameterSet instance
  - Rockets no longer have a defaultConfig, but have a selectedConfiguration
  - therefore these function were completely re-implemented native to the Rocket class
  - FlightConfigurationTest verifies this functionality
  - simplified several function calls through the code base
  - added convenience methods for getting the config[] to the UI
# expanded RocketTest to verify Rocket.copyWithOriginalID():
  - rocket is cloned, so non-trivial members must be cloned as well.
2015-12-23 22:32:52 -05:00
Daniel_M_Williams
f59ebdd06e [Major] Re-Implemented ..ParameterSet to represent the default more simply
- the default value is now simply an entry in the map
  - size() returns only the number of overrides
  - getIds() returns only the ids of overrides
- added ParemeterSetTest to test FlightConfigurableParameterSet
- removed (already defanged) event handling functions from MotorConfig
- removed (already defanged) event handling functions from DeploymentConfig
- removed (already defanged) event handling functions from IgnitionConfig
- FlightConfigurableParameter no longer extends ChangeSet
- fully parameterized DoubleModel to <T extends Enum<T> >
- fully parameterized EnumModel to <T extends Enum<T> >
2015-12-23 00:21:09 -05:00
Daniel_M_Williams
612f64fa4c [Bugfix] Merge with commit 4c00a206531968aab2e048ea4f9ef7e27e12dd52 2015-12-22 21:17:35 -05:00
Daniel_M_Williams
bc906c6652 [Bugfix] moved ConfigurationTest to FlightConfigurationTest
- in FlightConfiguration:
  -- adjusted functions to consistently refer to <x>ActiveMotors()
  -- corresponding functions now act the same way
- removed '.release()' calls from FlightConfiguration
2015-12-20 22:21:33 -05:00
Daniel_M_Williams
af56da4162 removed event handling from deploy & separate configs 2015-12-20 22:07:14 -05:00
Daniel_M_Williams
3f4cf696c1 [Bugfix] Test Patch which replaces event-passing in FlightConfiguration with a simple 'update()'
- listener lists removed from FlightConfiguration
- listener lists removed from MotorConfiguration
- added update() calles to Rocket FlightConfigurationSet, other configs
- merged FlightConfigurable into FlightConfigurableParameterSet
- Fixed ParallelStageTest
- updated some function calls in/to FlightConfiguration
2015-12-20 21:47:13 -05:00
Daniel_M_Williams
8e2d4f1b95 minor unit test fixes: pstage, finset 2015-12-20 12:21:21 -05:00
Daniel_M_Williams
4a075fcc2e fixed instance count saving for parallel stages 2015-12-20 12:05:19 -05:00
Daniel_M_Williams
ce215a4bb0 added rocket.enableEvents() calls to TestRockets.java 2015-12-18 13:32:19 -05:00
Daniel_M_Williams
b6c30a59ba fixed extra capitalization of FlightConfigurationId 2015-12-16 20:19:32 -05:00
Kevin Ruland
4c00a20653 Remove the unnecessary class FlightConfigurationSet. 2015-12-15 23:36:39 -06:00
Daniel_M_Williams
c3b2316cbf fixed ParallelStageTest 2015-12-15 22:10:12 -05:00
Daniel_M_Williams
f1eb3d75d8 fixed LaunchLugTest 2015-12-15 22:08:11 -05:00
Kevin Ruland
470799da72 flightConfiguration clone was creating two copies of each
MotorConfiguration.
2015-12-15 07:33:25 -06:00
kruland2607
8fb7d16a66 Merge pull request #255 from kruland2607/master
Work on Motor Instance.
2015-12-14 22:48:20 -06:00
Kevin Ruland
66f1e0b901 Rename some classes for clarity. 2015-12-14 22:46:36 -06:00
Kevin Ruland
f429255801 Merge remote-tracking branch 'upstream/master' 2015-12-14 22:13:41 -06:00
kruland2607
34447b9588 Merge pull request #254 from kruland2607/motorinstance
Motorinstance
2015-12-14 21:50:37 -06:00
Kevin Ruland
e89754bbb2 Fix RocketTest.testCopyFrom. 2015-12-14 21:45:48 -06:00
Kevin Ruland
d840f302ba Only write back through version 1.6. Added test motor to support
OpenRocketSaverTest.
2015-12-14 21:40:51 -06:00