233 Commits

Author SHA1 Message Date
Daniel_M_Williams
e7ceafe31c [fix] fixed resultant test issues 2020-05-02 13:38:46 -04:00
Daniel_M_Williams
da2fea3468 [fix] fixed unit tests for FreeformFinSet, due to fixing #555 2020-04-25 17:51:52 -04:00
Billy Olsen
58b92be39e Fix FreeformFinSetTest unit test
FreeformFinSetTest.testFreeformCMComputation_triangleOnTransition
was broken with the last merge. This change updates the expected
area for the fin tab to be the area of the triangle under the
curve as well as update the new CG contants in the tests.

Identified in #631

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-21 14:40:09 -07:00
Daniel Williams
bd8bef2c85
Merge pull request #602 from wolsen/fix-stage-length
[Fixes 452] Reflect length of selected stages
2020-04-19 22:34:09 -04:00
Billy Olsen
25475a92fb Rework the FlightConfiguration.calculateBounds() for instances
Use the information provided in the getActiveInstances() in order to
calculate the length of the rocket. This change takes each component
instance and uses the component bounds and the instance's transform
in order to determine the instance's actual bounds. The length is
then calculated as the difference between the min and max X values,
using the BoundingBox.

Note, this particular change special-cases a few of the components
in order to get the right length. It is preferred to revisit each
special case in subsequent patches in order to keep this patch set
minimal for the time being.

The length calculations are already stressed during unit tests, but
the results are a bit more accurate and thus the unit tests are
updated to reflect the new values.

Fixes #452

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-12 18:18:17 -07:00
Daniel_M_Williams
ebf4d35299 [fix] refactors Testrockets to clone existing fins from Alpha III, instead of replacing with new ones 2020-04-05 20:54:14 -04:00
Daniel_M_Williams
b24184afc7 [fix] Adds 4-fin splits to unittests 2020-04-05 20:54:14 -04:00
Daniel_M_Williams
b8172305f8 [test] adds test to verify that splitting fins reproduces the same results 2020-04-05 20:54:14 -04:00
Daniel Williams
18a8caa5b7
Merge pull request #603 from JoePfeiffer/fix-568
[Fixes 568] Consider all instances of components when calculating drag
2020-03-29 19:53:46 -04:00
JoePfeiffer
ecc8a32891 Modify "fins on pods" test to use a modified Alpha III 2020-03-28 18:57:32 -06:00
Billy Olsen
5bf8a7af15 Update stage logic for DesignReport
Stages need to be activated correctly in order to properly
calculate the mass for all components that contribute to
the current launch scenario.

This change ensures that all of the stages from the top-most
stage to the currently active stage are set as activated when
stage mass is being calculated.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
94534ee8f8 Fix number of motors and stageMass for DesignReport
Fix the number of motors that are reported. A previous change made
the MotorMount.getMotorCount() return the number of motors which
have been configured. However, according to the javadocs of the
MotorMount interface, the getMotorCount() method is supposed to
return the number of motors that a MotorMount can take for
configuring it. This restores the InnerTube and BodyTube getMotorCount
behavior and adds a new getMotorConfigurationCount() method to
provide the new behavior.

Additionally, the stageMass calculations in the DesignReport were
using a deprecated method which does not return proper component
weights. Change this to use the MassCalculator.calculateLaunch(...)
method, which is consistent with the RocketPanel behavior.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
JoePfeiffer
00abce96ff Add unit test "testPhantomTubes" comparing a simple 3FNC rocket against the same rocket, implemented by replacing the fins by three pods, putting a 0-diameter body tube on each pod, and putting one fin on each pod. 2020-03-25 14:59:52 -06:00
Daniel_M_Williams
d23d25ed15 [fix] Fixes error when loading FinSet angles 2020-03-22 11:07:55 -04:00
Daniel_M_Williams
c4cff028b4 [fixes #540] Fins are now created with a default count of 3 2020-03-21 19:02:39 -04:00
Daniel_M_Williams
65a4698d37 [fix][Intellij] Intellij now correctly builds jars and tests with all the new libraries 2020-03-19 18:19:07 -04:00
Billy Olsen
ddfe7c5c90 Add unit tests for FlightData
Add unit tests to cover some of the FlightData object and
some of the calculations. This specifically covers the bits
for FlightData.getGroundHitVelocity() where the ground hit
velocity is calculated from a FlightDataBranch consisting
of a series of data points and events occuring during flight.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-10 19:14:24 -07:00
Neil Balch
f26e3afcf3 Upgrade codebase to Java 11 2019-10-28 08:56:05 -07:00
Wes Cravens
02634fef6f
Merge pull request #533 from teyrana/fix_525_zero_diameter
Fixes #525; Main Figure display rocket diameter again.
2019-04-10 10:47:46 -05:00
Daniel_M_Williams
93a60c94f7 [fixes #525] main window (again) displays max diameter of centerline components
-- added FlightConfiguration::getCoreComponents() method
2019-03-31 09:34:08 -04:00
JoePfeiffer
efacebf5d8 Refactored MassCalculation.calculateAssembly() to separate calculation
of structure from calculation of motors, so mass and CG overrides
don't affect motors

Modified structure calculation so that when an override is in effect
and children are also being overridden, don't include root of tree as
an element in its own right when computing MOI.

Modified MassCalculatorTest to look for correct MOI value.
2019-03-07 18:05:44 -07:00
JoePfeiffer
eb3a129e67 Modify FinSetCalc to only produce result for one fin, to be summed in
BarrowmanCalculator

Modify BarrowmanCalculator to actually sum fin nonaxial forces

Modify FinSetCalcTest to sum fins in test3Fin() and test4Fin()

Extra bonus:  if at some point we allow fins to be other than radially
symmetrical, this code should still work (not tested)
2019-02-11 15:37:21 -07:00
JoePfeiffer
13f7c583fd Changed logging in BarrowmanCalculator.java to use stderr (easier to
use with unittest)

Added "End Plate Test" rocket to TestRockets and BarrowmanCalcTest
2019-02-04 11:34:35 -07:00
JoePfeiffer
2e7b3da1c0 Addresses Issue 481
Modify BarrowmanCalculator to use InstanceMap and InstanceContext to
iterate through all components.  This addresses 481 by actually
computing nonaxial forces for all components, instead of computing a
single instanceable component and using it as a representative of all
instances.

Modify calculateNonAxialForces to accept a Transformation argument, so
they can use rotations from instances (only actually affects
FinSetCalc and TubeFinSetCalc)
2019-01-30 15:10:41 -07:00
Wes Cravens
1abf0d3834
Merge pull request #513 from teyrana/refactor_instance_map
Refactor instance map
2019-01-26 07:14:39 -06:00
Wes Cravens
7b0724ab0a
Merge pull request #507 from teyrana/fix_387_cp
Increase accuracy of Center-Of-Pressure calculations
2019-01-26 07:13:47 -06:00
Daniel_M_Williams
efabe81790 [feat] FlightConfiguration may now generate an InstanceMap 2019-01-25 22:27:15 -05:00
Daniel M Williams
01fd20ebcc [refactor] added code to tests for negative inertia / intersection case 2019-01-02 19:23:11 -05:00
Daniel M Williams
cf4a935302 [test] Refactored FreeformFinSetTest to de-dup code execution. 2019-01-02 19:11:32 -05:00
Daniel_M_Williams
eed5863790 [fixes #387] Increases accuracy of Center-Of-Pressure calculations on instanced assemblies 2019-01-02 19:06:46 -05:00
Daniel_M_Williams
055132aa99 [test] expands aerodynamics unit-test to verify CP.y, and .z coordinates (of fins on boosters) 2019-01-02 19:06:46 -05:00
Daniel_M_Williams
70b7537614 [fixes #500] May now calculate CG for fins attached to zero-dimension mounts 2018-12-22 04:50:01 -05:00
Daniel_M_Williams
51418e34bc [fixes #387] Fixes one source of off-axis CP error 2018-12-01 13:05:21 -05:00
Daniel_M_Williams
72c6f1d64d [fixes #471] Refactoring FreeformFinSet to accept root points outside of the base. (which generates bridge-points on-load) 2018-11-26 13:53:51 -05:00
Daniel_M_Williams
8ab739a304 [fix] Fixed RocketComponent::setAfter() => added unittest in TestRocket => fixed IntegrationTest 2018-10-27 16:10:31 -04:00
Daniel_M_Williams
166d358c14 [Feature] Freeform Fins may not be attched to variable-shaped body components
- Fins may be attached to Transitions (and subclass NoseCones )

  [Fix] FinSet now implements the Ring-Instanceable interface
  [Refactor] Rocket inherits from ComponentAssembly instead of RocketComponent
  [Fix][Refactor] Fin tabs are now correctly validated upon change
  [Fix] Fin tabs are now corrected to be no-bigger-than their fins
  [Refactor] FinSet.getBodyRadius(..) now requires an argument
  [Fix] restricted fin tab positioning to be strictly top/middle/bottom
  [Refactor] Reimplement FreeformFinSet.setPoint(...)
  [Fix] Prevent Freeform Fins movement past parent's top/front
  [bugfix] Fins are now addable to transitions from the GUI
  [Fix] Fins, Transitions are now drawn correctly in fin-design window
  [Minor] Added makeV2 rocket to TestRockets

  [fix] getRootPoints() impl & test
2018-10-27 14:41:01 -04:00
Daniel_M_Williams
b268d3aa59 [refactor] RocketComponent positioning is now centralized in AxialMethod class
- also relaxed visibility for Component::setAxialMethod(...)
2018-10-27 14:41:01 -04:00
Daniel_M_Williams
8656dd287d [fix] Fixes repeated bug in Presets/Material Loading -- inconsistent test criteria 2018-09-09 12:37:29 -04:00
Daniel_M_Williams
8dc851e1db [fix] cleanup up unused imports in core/test/net/sf/openrocket/rocketcomponent/* 2018-09-03 22:51:00 -04:00
Daniel_M_Williams
e4b6b25a8b [fixes #419] Adding new points to FreeformFins are now placed at the mouse cursor 2018-08-26 17:31:46 -04:00
Daniel_M_Williams
f3dbceba37 [refactor] separated FinSet Tests into files corresponding to FinSet, TrapezoidalFinSet, and FreeformFinSet 2018-08-26 17:27:41 -04:00
Daniel_M_Williams
fab167abdc [fix] Fixes the way BarrowmanCalculator handles instancing, particularly for ComponentAssemblies 2018-08-26 16:59:01 -04:00
Daniel_M_Williams
e6b788cb0b [test] Moved fins from core-body to booster-body; (they are now doubly-instanced); adjusted tests to accept this. 2018-08-26 16:59:01 -04:00
Daniel_M_Williams
7e5ab5de32 [fix] Revert patch 6289aef0... which introduced simulation anomalies 2018-08-26 16:59:01 -04:00
Daniel_M_Williams
1418cb902b [fixes #431] Fins default to instance count / fin count == 1
- Fixed init bug
- added unittests for fin count loading/saving/creation
2018-08-26 16:59:01 -04:00
Daniel_M_Williams
20473dbf82 [fix] file version 108 now correctly loads angle-offsets for all ComponentAssemblies 2018-02-03 10:52:44 -05:00
Daniel_M_Williams
4a874b6ba9 [fix] Fixed OpenRocketSaverTest: minimum file version is now 108 2018-01-27 20:35:49 -05:00
Daniel_M_Williams
0498900078 [feat] Added Positioning methods and interfaces for Axial, Radius, and Angle directions
- also added minor angle-wrapping function to MathUtil
2018-01-21 12:06:25 -05:00
Daniel_M_Williams
23d7397fa6 [refactor] Pods and ParallelStages are now attached to BodyTubes *only* 2018-01-13 14:35:16 -05:00
Daniel_M_Williams
20eff575f4 [fix] Fix MassCalculator Unittests.
(Effectively a re-write of the MassCalculation code)
- renamed some mass calculator accesor methods
- MassData, InertiaMatrix refactored into 'RigidBody' class

- refactors out cache code to separate wrapper class
- calculations now use the Transform class to translate masses, CM, and MOI

- new class: MassCalculation
  - contains relevant context for a given calculation: tree-root, type, time, config
  - contains most actual calculation code
  - calculations are tracked with a context class: MassCalculation
2017-12-25 20:56:11 -05:00