246 Commits

Author SHA1 Message Date
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
Daniel_M_Williams
0c01123551 refactored Stages (Axial & Booster) now load correctly. 2015-08-25 22:38:13 -04:00
Daniel_M_Williams
c8a3d675d8 messy commit: refactored Stage => AxialStage, BoosterSet, PodSet 2015-08-25 09:57:23 -04:00
Daniel_M_Williams
0fbdc33188 Fixed numerous display bugs-- including stage placement, engine instancing. 2015-08-12 14:02:24 -04:00
Daniel_M_Williams
6f039a992b changing internal positioning back to top-top 2015-08-01 14:57:10 -04:00
Daniel_M_Williams
5f42a10c20 [Major Refactor] Parallel stages are children of centerline stages 2015-07-24 16:44:10 -04:00
Daniel_M_Williams
2f42594acb fixed many display issues relating to refactoring of RocketComponent axialOffset code. 2015-07-21 14:16:13 -04:00
Doug Pedrick
f1cf8c88bd Added support for Rocksim Tube Fin Set file elements (import and export). 2015-03-29 11:56:15 -05:00
Sampo Niskanen
8c00dbf159 Add unit tests for file version 1.7 (simulation extensions) 2015-01-10 18:36:24 +02:00
Sampo Niskanen
a6c2092379 Move TestScriptingUtil to test/ directory 2015-01-10 17:50:11 +02:00
Sampo Niskanen
a1f6782195 Disable untrusted scripts on loading files 2015-01-06 19:25:13 +02:00
Sampo Niskanen
a39a3fce15 Add support for multiple scripting languages 2014-12-27 23:50:54 +02:00
Sampo Niskanen
82af205e3e Merge remote-tracking branch 'upstream/master' into feature/simulationextensions
Conflicts:
	core/src/net/sf/openrocket/simulation/SimulationStatus.java
2014-12-23 21:01:48 +02:00
Daniel_M_Williams
67e741a2df [Fix][Cont] Added Unit test for RSE-load negative mass bug.
- Added Test case in TestMotorLoader.java
  - Added Test load file 'test3.rse' which would previously raise an IOException on load.
  - Added this test case to the 'testGeneralMotorLoader' method as well.
  - Adjusted the digest string so that 'test3.rse' will pass the unit tests.
  - TestMotorLoader currently passes 5/5 unit tests.
2014-10-29 14:55:32 -06:00