326 Commits

Author SHA1 Message Date
Kevin Ruland
f390d1f305 Fix PodSet Rendering. 2016-10-26 19:42:16 -05:00
Kevin Ruland
10bd864ef6 Fix 3d rendering issues with AxialStage and ParallelStage. Renamed
example to get rid of underscores.
2016-10-26 18:39:10 -05:00
Kevin Ruland
f2d76e3b2b Merge remote-tracking branch 'upstream/master' into unstable 2016-10-23 13:50:08 -05:00
Kevin Ruland
d3240ec1a4 Merge remote-tracking branch 'upstream/unstable' into unstable 2016-10-23 13:16:06 -05:00
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
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
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
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
ChrisMickelson
c0597e71a2 Add transparent render capability to RealisticRenderer.java
Current limitations: Alpha value does not seem to be saved in .ork file, Depends on color chooser having alpha capability. Does not show up as transparent in "3D Unfinished"
2016-06-09 13:45:20 -04:00
Daniel_M_Williams
5f9eb87fde [Bugfix] resolved classpath errors in Eclipse 2016-04-24 14:04:20 -04:00
Daniel_M_Williams
a94e14c2a6 [Bugfix] Main Window Config chooser now updates for new Configurations
-
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
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
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
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
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
Wes Cravens
1c4bf57a0c Fix massWithoutMotors: Put back changes lost while tinkering with IntelliJ 2016-03-23 21:34:52 -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
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
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
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
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
04b4a45b2e fixed NPE-throwing Heisenbug in flight confiuration UI 2016-01-02 15:04:41 -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
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
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
b6c30a59ba fixed extra capitalization of FlightConfigurationId 2015-12-16 20:19:32 -05:00
Kevin Ruland
66f1e0b901 Rename some classes for clarity. 2015-12-14 22:46:36 -06:00
Kevin Ruland
88f84396d0 Initial refactoring of MotorInstance and ThrustCurveMotorInstance 2015-12-14 18:41:02 -06:00
Kevin Ruland
4c56c53135 Added CaseInfo enum and compatible case information to
MotorInformationPanl.
2015-12-13 10:58:47 -06:00
Daniel_M_Williams
6af57134aa [Bugfix] Removed "Automatic" ignition Option
Removed Automatic ignition Option
    - "bottom" core stage is ill-defined in current configuration
    - 'automatic' values in files get loaded as 'launch'
Fixed file values for loading Pods
2015-12-13 11:08:32 -05:00
Daniel_M_Williams
ec05e46a0e [Bugfix] Fixed Stage Separation Bugs
UI elements now change per-configuration separations not the defaults
   fixed separation configuration file-write code.
Added max-time guard for simulations at 1200 seconds.
2015-12-12 19:38:38 -05:00
Daniel_M_Williams
238726f371 Merge branch 'master' of https://github.com/openrocket/openrocket into parallel_staging
Conflicts:
	swing/src/net/sf/openrocket/gui/main/BasicFrame.java (resolved)
2015-12-12 11:14:13 -05:00
Daniel_M_Williams
fc3e19fbcd [Bugfix] Fixed Display (and other) bugs
FlightConfiguration.clone() now correctly clones internal data
    -> caused mysterious disapearing-rocket-display bug
    -> added FlightConfiguration.instanceNumber for debugging
Refined stage-set-active methods to fine tune event firings
Improved output of various debug methods.
Fixed various warnings
2015-12-12 11:00:17 -05:00
Kevin Ruland
b415238a02 Changed Motor to support additional fields case info, prop info, and
availability flag provided by Thrustcurve.org.  Change serialization
process to pull current files from Thrustcurve.org using the xml api,
use the corrected data for diameter and length, and use a consistent
motor designation.  Added fields to the Motor chooser - case info is a
column in the listing (replacing MotorType), the other info is in the
motor details tab.  Added toggle to hide motors which are OOP.
2015-12-07 22:27:05 -06:00