159 Commits

Author SHA1 Message Date
Daniel_M_Williams
366cd6473f [Bugfix] Updated verification numbers in BarrowmanCalculatorTest 2016-04-03 12:34:42 -04:00
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
2215d41cc2 [Test] added Transition Test file. 2016-03-11 17:31:33 -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
e51f7a2827 [Minor] Cleaned up warnings
- Mostly un-parameterized generics
- adding 'serialVersionUID' member fields where javac complained
2016-01-17 11:58:06 -05: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
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
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
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
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
b6c30a59ba fixed extra capitalization of FlightConfigurationId 2015-12-16 20:19:32 -05: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
66f1e0b901 Rename some classes for clarity. 2015-12-14 22:46:36 -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
Kevin Ruland
b998bd30c5 Rebase and fix MotorMountHandler. 2015-12-14 21:02:02 -06:00
Daniel_M_Williams
3537748005 Merge branch 'master' of https://github.com/openrocket/openrocket into parallel_staging 2015-12-14 20:14:52 -05:00
Daniel_M_Williams
fb278b3566 fixed FinSetTest 2015-12-14 20:13:51 -05:00
Kevin Ruland
9edf111a56 Changed Unit to go at most 3 digits (I think java changed something in
the number formatting code).  Exclude some methods from ComponentCompare
test which were added recently.
2015-12-13 14:08:57 -06:00
Daniel_M_Williams
729effd690 [Bugfix] Merged FlightConfiguration MotorInstanceConfiguration
fixed ignition configuration load / save
2015-12-03 21:44:34 -05:00
Daniel_M_Williams
890d390b4b [Refactor]ed SimpleStack class to JDK 'ArrayDeque' class 2015-12-03 13:40:21 -05:00
Daniel_M_Williams
82e3a7ff1c [Feature] Implemented more RailButton code:
RailButtons can be loaded, and edited, but not really displayed.
    - data entry has defined file parameters, but needs some debugging.
    - added icons for component creation.  The button just needs to be uncommented
    - display works, but only for rotation = 0;
       - requires a new type of shape drawing.  Not inherently hard, just tedious.
2015-11-22 22:28:51 -05:00
Daniel_M_Williams
e3250c9a91 added exploratory code for non-axisymmetric CPs 2015-11-22 10:12:30 -05:00
Daniel_M_Williams
2501bc2b8f [Bugfix] Enabled auto-positioning of parallel stages
AutoRadialOffset is a boolean flag on parallel stages
    - when enabled, the radialOffset is automatically
    - auto radius is based on the max radius of contained components
2015-11-21 10:02:16 -05:00
Daniel_M_Williams
ec5a3119c5 [Bugfix] Fixed Core Positioning Code
- Launch Lugs correctly position themselves
    (used to default to the centerline of the rocket)
    added LaunchLugTest class
- Booster Sets automatically adjust radial distance
    - based on own, and others' body radius.
- Refactored shiftCoordinates(...) => getInstanceLocations()
2015-11-19 17:53:28 -05:00
Daniel_M_Williams
afe56365f4 Added BarrowmanCalculator tests 2015-11-18 12:05:36 -05:00
Daniel_M_Williams
ee887cae08 [Bugfix] Tested/Fixed Mass Override Calculation Code
- MassCalculator class:
    fixed mass
    fixed CG x-value overrides
- MassCalculatorTest class:
    added tests for:
        setOverrideMass(...)
        setOverrideCGX(...)
2015-11-17 10:04:30 -05:00
Daniel_M_Williams
9d78d823b6 cleaned up extra debug statements 2015-11-15 11:23:20 -05:00
Daniel_M_Williams
4c7c3be9f7 [Bugfix] Verify / Fix Mass Calculation Code
- MassCalculator class:
    Debug toggle will print debug-level output to stderr
    fixed / reimplemented:
        getCG(...) -> getCM( FlightConfiguration, MassCalcType);
        -> getRotationalInertia( FlightConfiguration, MassCalcType);
        -> getLongitudinalInertia( FlightConfiguration, MassCalcType);
- MassData class:
    can now add MassData classes
    Instanced componets w/children:
       take into account component mass...
    propellantMass field is vague: no indication whether it's include in the inertia or not.
    longitudinalInertia => rollMOI (?)
    rotationalInertia => yaw / pitch MOI (?)
    assorted other fixes
- added unit test classes:
    ... .masscalc.MassCalculatorTest;
    ... .masscalc.MassDataTest;
2015-11-14 11:19:08 -05:00
Daniel_M_Williams
3ae4b0d277 [Bugfix] Fixed some FlightConfiguration-related UI elements
- Removed configuration from the document class -- please retrieve it from the rocket instead
- Refined debug code points, particularly in InnerTube
- Fixed <RocketComponent>.removeChild( component ) to function correctly
- fixed UI element: FlightConfiguration ComboBox chooser
    - Renamed FlightConfigurationSet -> ParameterSet
    - FlightConfigurationModel -> ParamaterSetModel
- fixed engine drawing (partially. Still needs Testing.
2015-10-22 20:13:36 -04:00
Daniel_M_Williams
8e78a314cd [Bugfix] Ironing out motor-instance model changes.
- renamed <RocketComponent>.getLocation() => getLocations()
    - trailing 's' matches return type
- made <RocketComponent>.shiftCoordinates protected (from public)
    => references converted to <>.getLocation() calls
- Reduced functions in "Instanceable" interface.
- Fixed Motor Instancing Code
- Removed 'isCenterline()' tester method
- added 'isAfter()' tester method
- OutsideComponent interface removed.
    => was redundant with RingInstanceable.
2015-10-20 17:22:55 -04:00
Daniel_M_Williams
0a55f59548 [Minor] Harmonized interface for instanceable components
Implemented 'Instanceable' Interface
    - MotorMount implements instanceable
        - BodyTube
        - Innertube
    -RingInstance interface
        - BoosterSet
        - PodSet
    -LineInstanceable interface [This feature is not exposed in UI)
        - LaunchLug
        - LaunchButton (Stub only, ATT)
        - RingComponent (abstract ancestor class)
-Reverted MotorMount Function names to "[is|set]MotorMount"
2015-10-06 12:02:57 -04:00
Daniel_M_Williams
1401d99528 [Major] Overhauled Configuration class to be more useful/ powerful.
-Each configuration has an fcid (FlightConfigurationId)
-FlightConfigurationID is a new type.
    - small wrapper class around String
    - provides better traceability, error detection, readability
    - the fcid is now the hashMap key for any FlightConfigurationSet
-rename Configuration => FlightConfiguration (to be more explicit about class purpose)
-combine MotorInstance =><= motorConfiguration
-Refactor ThrustCurveMotorInstance into an outer public class
-MotorId => (ren) => MotorInstanceID
-fold IgnitionConfiguration => <MotorInstance>.<IgnitionConfiguration>
-Created IgnitionEvent class
-Implemented partial checking for file version 1.8
-rename FlightConfigurationImpl => FlightConfigurationSet
-rename MotorFlightConfigurationImpl => MotorConfigurationSet

- Rockets now list all configurations
    -implemented a FlightConfigurationSet of FlightConfigurations
2015-10-05 14:32:03 -04:00
Daniel_M_Williams
1d327e6dbb [Bugfix] Configuration.getActiveComponents() fixed 2015-09-17 09:16:47 -04:00
Daniel_M_Williams
5f3bbc3103 added unit tests for masscalculator 2015-09-16 16:12:47 -04:00
Daniel_M_Williams
6c11fb2751 [Bugfix] Refactored Configurations:
-Configuration refactor
  -stages are toggled individually
  -removed set-up-to-stage method
-MotorInstance refactor: multiple Lists -> one map<MotorId,MotorInstance>
    moved most of the fields to MotorInstance.java
2015-09-16 15:52:20 -04:00
Daniel_M_Williams
ea8066f63c Fixed GUI elements & function f/Boosters/Pods
Model
  Refactored code from AxialStage, BoosterSet, PodSet => ComponentAssembly

GUI
  BoosterSet: Fixed bugs, allowed boosters and pods to be correctly located.
2015-08-27 08:54:35 -04:00