1448 Commits

Author SHA1 Message Date
Kevin Ruland
6532743c3f Revising previous commit to include the missing files. 2016-10-10 19:50:17 -05:00
Kevin Ruland
f121def910 Significantly modified management of motor information provided by
OpenRocket.  At build time, it will utilize the Thrustcurve.org xml api
to download the current information (curve files and supplemental
information).  OpenRocket uses the supplemental information to populate
case-info, propellant type, availability as well as correct diameters
and length. Modified motor search dialog to hide unavailable motors and
show case-info.
2016-10-10 17:27:25 -05:00
kruland2607
05d439bd1e Merge pull request #280 from teyrana/axialoffsetfix
[Refactor] Replaced redundant method: 'PositionValue(...)' with 'AxialOffset(...)'
2016-10-07 19:28:17 -05:00
kruland2607
b158485a2d Merge pull request #281 from teyrana/massfix
Cleaning up the code from: PR #273
2016-09-28 14:23:47 -05:00
kruland2607
4024324bab Merge pull request #276 from wcravens/move-tech-docs
Put technical documents in one place
2016-09-28 14:16:48 -05:00
Daniel_M_Williams
c1e2ed0c28 [Refactor] Replaced redundant method: 'PositionValue(...)' with 'AxialOffset(...)'
- These two methods did the same thing, so this patch removes the former from RocketComponent and descendants
- Wherever used, "PositionValue(...)" was replace with "AxialOffset(...)"
- Removed some extraneous redirect definitions of PositionValue(...)
- Fixed some UI references to the old method
2016-09-28 10:05:35 -04:00
Daniel_M_Williams
9d07aaff5c [Minor] Removed dead / debug code from mass calculation code 2016-09-28 09:51:35 -04:00
Daniel_M_Williams
6698dbfc67 [Minor] added exception throws upon detected invalid inertia values during simulation. 2016-09-28 09:32:37 -04:00
Luiz Victor Linhares Rocha
a126d76e3a fixes false negative tests for comma decimal locale 2016-09-28 00:06:17 -03:00
Wes Cravens
13615351bd Put technical documents in one place 2016-09-27 08:10:59 -05:00
Daniel_M_Williams
04c0914d0a [bugfix] Overhauled MassCalculator Methods.
- Rocket total mass is split into 'dryMass' and 'propellantMass'
    -- each mass type has a corresponding calculation method in MassCalculator
  - Calculating Inertias and Center-of-Mass FOR MOTORS assume:
    - time-invariant x-coordinate
    - time-decreasing density
  - mass correctly tracks propellant usage, as measured by thrustCurves
  - elimated MassCalcType enum: was not actually solving a problem.
     - simply use motorTime: 0 for launch Double.MAX_VALUE for burnout
     - NO_MOTORS is represented by a configuration without attached motors
       -- try:  "rocket.setSelectedConfiguration( rocket.getEmptyConfiguration())"
     - 'dry mass' vs 'total mass': 90% of the time, a caller wanted 'total mass'
     - total_mass = dry_mass + propellant_mass
     - mass @ simulation time wasn't represented by the enum, had existing overloads anyway
  - get vs calculate methods:
    -- gets revalidate the cache, then retreive specific information
    -- calculate simple calculate the desired information, and ignore the cache.
       --- I'm particularly confident about cache reliability:
           particularly as it doesn't account for changing time during simulation.
  - reduced / simplified debugging messages
2016-07-01 16:26:02 -04:00
Daniel_M_Williams
56463b02fc [Bugfix] ThrustCurve motor interpolation fixed. 2016-06-25 11:11:28 -04:00
Daniel_M_Williams
7b2e195392 [Cleanup] Cleaned up the ThrustCurveMotor class Interface
- Cleaned up the ThrustCurveMotor api interface
  -- Converted 'getTimePoints().length' -> 'getSampleSize()'
  -- Unified ThrustCurveMotor gets to the form getXXXX(double motorTime)
  -- Restricted access for several methods from public -> protected
- Updated ThrustCurveMotorTest.java
2016-06-25 11:09:45 -04:00
Kevin Ruland
a5b083ade7 Use actual burn time for determination of burnout event. Compute
average thrust while simulating.
2016-06-07 20:54:10 -05:00
Daniel_M_Williams
a6990dddc5 [Bugfix] Fixed additional Translation, Configuration Issues
- Fixed translation messages
   - FlightConfiguration, MotorConfiguration
   - correctly display under debug & production
- Fixed exception throw when adding empty-MotorConfiguration to a FlightConfig
2016-05-20 18:46:47 -04:00
Daniel_M_Williams
2ee7464038 [Bugfix] FlightConfiguration now uses i8n for its empty-motors description 2016-04-27 21:36:31 -04:00
Daniel_M_Williams
5f9eb87fde [Bugfix] resolved classpath errors in Eclipse 2016-04-24 14:04:20 -04:00
Daniel_M_Williams
915d401370 [Bugfix] Configuration Selection ComboBox now correctly updates
- adjusted some type cast warnings
- Added 'ignore if new==current' paths in rocket configuration functions
  -- These if paths break potential infinite loops
- added update code for the main-window selected configuration dropdown
  -- now updates when the currently-selected configuration is removed.
2016-04-24 14:04:20 -04:00
Daniel_M_Williams
3362c03279 [bugfix] Fixed several FlightConfiguration bugs
- adjusted some class member names to be more descriptive
- When a component lacks an entry for the currently selected FC
  -- Code would sometimes fail to create a new motor entry
- removing a flight configuration from a rocket
  -- removes all component configurations tied to that configuration Id
2016-04-24 14:04:20 -04:00
Daniel_M_Williams
f7090afd79 [bugfix] Removing the selected configuration selects the default 2016-04-24 14:04:20 -04:00
Daniel_M_Williams
b02e164bce [bugfix] RocketPanel configuration list now updates changes
- Pulled JComboBoxModel<FlightConfiguration> into its own class: ConfigurationModel
  -- removed Rocket.toConfigArray() --> getFlightConfigurationByIndex(int,bool)
-Refactored document.getDefaultConfiguration -> getSelected...
  -- because that's what it does. Default is a different thing.
-minor: minor spelling errors and unused fields/functions
2016-04-24 14:04:15 -04:00
Daniel_M_Williams
df328c1555 [Bugfix] Rolled back the selected=default => new config 'feature' 2016-04-24 14:03:48 -04:00
Daniel_M_Williams
fedda3278e [Refine] Refining the FlightConfiguration UI behavior
- the selected configuration in a rocket is now specified by id instead of instance
- tighted up Configuration UI behavior - operations should now start from selected configuration row
2016-04-24 14:03:48 -04:00
Daniel_M_Williams
345d5952c6 [Refine] Copying a FlightConfiguration in the UI now updates correctly.
- involved adjusting clone() -> copy(...) in FlightConfigurableParameters
2016-04-24 14:03:48 -04:00
Daniel_M_Williams
d7faf0d273 [Refine] Refining Configuration Fixes
- Rocket.getSelectedConfiguration will now create a new
  configuration if only the default config exists
  -- added additional unit tests for this behavior in: FLightConfigurationTest
- added test for saving ver 1.08 files to OpenRocketSaverTest
- Converted : "private static final long serialVersionUID ..." declarations to:
  "@SuppressWarnings("serial")"
- cleaned up some other random errors:
  -- tightened excessive permission modifiers -- public ->
  -- change some methods from 'public' to '/*package-local*/'
2016-04-24 14:02:32 -04:00
Daniel_M_Williams
5b687b5bcc [Bugfix] Fixes a few configuration bugs.
- Fixes out-of-date javadoc comments
- Fixes FlightConfigurationTest
  -- fixes TestRocket instantiation.
- Simplified FlightConfiguration class function API
-
2016-04-24 14:02:29 -04:00
Daniel_M_Williams
9c49b6336a [bugfix] Added back in the default no-motor configuration. 2016-04-06 22:33:15 -04:00
Daniel_M_Williams
e36aee38d5 [Bugfix] Partial fix for Swing Tests
-Changed default Motor Ignition event to AUTOMATIC
-enabled swing-test path under intellij
-fixed some simple compile errors in swing/test ... IntegrationTest
2016-04-03 15:25:26 -04:00
Daniel_M_Williams
366cd6473f [Bugfix] Updated verification numbers in BarrowmanCalculatorTest 2016-04-03 12:34:42 -04:00
Kevin Ruland
4b4a7c74fc Merge remote-tracking branch 'upstream/master' into unstable
Conflicts:
	swing/src/net/sf/openrocket/gui/figureelements/RocketInfo.java
2016-04-02 16:49:15 -05:00
kruland2607
512f572879 Merge pull request #259 from wcravens/mass-info-both-with-and-without-motor
Mass info both with and without motor - Includes IntelliJ CE Configuration files
2016-03-24 17:36:30 -05:00
Kevin Ruland
5a79c210cd Fix the test for recovery deplyed under thrust. 2016-03-24 17:34:13 -05:00
Wes Cravens
9ffcad37c8 Merge branch 'mass-info-both-with-and-without-motor' into intellij-ce-settings 2016-03-23 21:26:50 -05:00
Wes Cravens
b8c5604433 Add SerializeMotors run configuration 2016-03-23 21:26:16 -05:00
Wes Cravens
e2efefb296 IntelliJ CE integration and build 2016-03-23 17:15:26 -05:00
Wes Cravens
74d636bf33 Add concurrent mass info for both with and without motor configuration 2016-03-23 13:23:40 -05:00
Daniel_M_Williams
a75b1816a4 [Bugfix] Fixed Motor Ignition Default Loading
- added MotorConfiguration constructor which takes a template
  -- this allows copy-constructing from the default
  -- removed 'name' field: instead, call 'to?Description()'
- condensed & refactored a few debug methods.
2016-03-11 19:17:02 -05: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
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
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