275 Commits

Author SHA1 Message Date
Sibo Van Gool
ae1ccd8320 [fixes #825] Implement dummy unit test
Whoops, apparently you can't just comment out everything...
2022-01-28 01:22:16 +01:00
Sibo Van Gool
ca813caa45 [fixes #825] Comment out old update unit test
For now I'm just gonna comment this unit test out, I'm sorry. Implementing a unit test for the new system would cost me extra time and headaches...
2022-01-28 00:00:33 +01:00
Joe Pfeiffer
affcc8b51f
Merge pull request #869 from teyrana/fix/868/fin-tab-offset
[fixes #868] Fin tabs correctly adjust their location when the fin tab _length_ is changed.
2022-01-11 11:24:15 -07:00
JoePfeiffer
2e01115932 Create unit test for ellipsoidal nose cone pressure drag interpolation 2022-01-10 08:43:15 -07:00
Billy Olsen
f78b6326ee
Merge pull request #1049 from SiboVG/fix-typos
Fix typos in OR codebase
2021-12-27 11:54:55 -07:00
Robert Sammelson
3a28f3b585
Adjust unit tests
Fixes unit test errors by changing hardcoded values to the values the
new code outputs. The new code is believed to be correct so this should
be alright.
2021-11-04 14:13:25 -04:00
Sibo Van Gool
e3af87eee5 Fix typos in OR codebase 2021-10-17 18:03:18 +02:00
Joe Pfeiffer
185ce54ed0
Merge pull request #1015 from SiboVG/code_cleanup-1
[code_cleanup-1] Clean up using IntelliJ's 'Silent Code Cleanup'
2021-10-16 15:30:07 -06:00
JoePfeiffer
3d0396bc00 update unit tests to match new motor code (also fixed a couple bugs the
unittests turned up!)
2021-09-25 14:20:06 -06:00
Sibo Van Gool
08dc009412 [code_cleanup-1] Clean up using IntelliJ's 'Silent Code Cleanup' 2021-09-10 00:36:29 +02:00
Daniel_M_Williams
f481bb3707 [fix] adjusted the validation and update functions in 'FinSet' to better meet user's expectations 2021-08-15 09:20:54 -04:00
Daniel_M_Williams
ac96222964 [fixes #868] Fin tabs correctly adjust their location when the fin tab _length_ is changed. 2021-08-14 16:01:03 -04:00
Sibo Van Gool
3f84149cb8 Updated unit tests to match new lug rotation 2021-06-26 15:23:50 -07:00
Billy Olsen
965311ff4e FlightConfigurableParameterSet Predictable Orders
Change to use a LinkedHashMap instead of a HashMap in the
FlightConfigurableParameterSet. This ensures that the ordering is
consistent with the way the user added the flight configurations.

This will also be true for when reading the flight configurations from
a file. Additionally, to preserve the ordering, do not sort the
FlightConfigurationIds in getIds().

Fixes #845

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-06-04 20:48:34 -07:00
Billy Olsen
1962cfac4e Fix FinSetTest.testTabLocation
Commit 936333a2 re-introduced the AxialMethod.ABSOLUTE as an offset
method but did not update the corresponding unit test. Add in the
expected offset value for AxialMethod.ABSOLUTE.

Fixes #931

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-06-02 19:52:35 -07:00
Billy Olsen
b248f74d5c Fix TrapezoidFinSetTest
Commit 312e90 updated finset count and tests for FinSets but not
the TrapezoidFinSetTest.testMultiplicity()

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-19 19:34:52 -07:00
Billy Olsen
312e90b9f7 Restore default fin count to 3 for TrapezoidFinSet
TrapezoidFinSet fin count was reduced to 1 in previous commits in order
to fix a bug. The actual problem was that the instancecount was not
persisted in the ork file. This change restores the default to 3.

Fixes #850

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-19 13:04:58 -07:00
Daniel_M_Williams
c9d408a8ee [fix #801] eliminate redundant angle-offset property in LaunchLug component 2020-11-01 19:38:16 -05:00
Daniel_M_Williams
ccc8e4ab80 [fixes #774] Override-component-mass works correctly on massive components 2020-10-15 10:28:08 -07:00
Daniel_M_Williams
a4e7f2175c [fixes #775] component override-CoM-x works correctly
mass calculations now correctly treat the center-of-mass offset as relative to the individual
component (whereas, previously, it was an absolute offset / relative to the center of the rocket)
2020-10-15 10:28:08 -07:00
JoePfeiffer
5e64b3e565 Correct FlightConfigurationTest to enable Stage 1 of Falcon9Heavy before using getActiveInstances() to obtain its component instances 2020-09-12 12:29:24 -06:00
JoePfeiffer
206ba58a7e Modified MassCalculator unit test to test at nonzero ignition time 2020-09-09 17:10:29 -06:00
Daniel_M_Williams
bd09354fd3 [fixes #755] Correctly calculates mass override (particularly on stages) 2020-09-02 22:33:39 -04:00
Daniel_M_Williams
5b94bedb5f [fixes #755] Correctly calculate cg.x override 2020-09-01 19:58:17 -04:00
Daniel_M_Williams
b9992674ef [fix] writes new tests to for BoundingBox behavior 2020-09-01 19:14:19 -04:00
Daniel_M_Williams
db79511184 [fix][comment] fixed test explanatory comment to be accurate 2020-08-14 18:09:39 -04:00
Daniel Williams
b17d03138a
Merge pull request #731 from teyrana/fix/726-positioning
[Fixes #726] Fixes multiple issues when changing Fin-Offset-Methods
2020-08-08 11:25:26 -04:00
Daniel_M_Williams
aeae4b1e03 [refactor] ported reduce360 -> reduce2Pi. Because the units are in radians 2020-08-02 16:49:32 -04:00
Daniel_M_Williams
6efbe1e2ab [refactor] ported reduce180 -> reducePi. Because the units are in radians 2020-08-02 16:49:32 -04:00
Daniel_M_Williams
dc9dc3ed63 [fix] Changing the AxialMethod on a RocketComponent now mantains the same position, but changes the internal offset 2020-08-02 16:24:59 -04:00
Daniel_M_Williams
358b3dc527 [fix] Added new BoundingBox tests; adjusted Falcon 9H Properties 2020-07-12 15:39:20 -04:00
Joe Pfeiffer
056c6b2b39
Merge pull request #688 from JoePfeiffer/fin-moi
fixes Fin MOI calculations
2020-07-11 11:33:48 -06:00
JoePfeiffer
69e45029a2 Adjust expected unit test results to account for modified longitudinal MOI calculation 2020-07-08 14:36:28 -06:00
Daniel_M_Williams
9f5d4a2d27 [enable] Re-enables, fixes ComponentAnalysisDialog 2020-07-03 10:05:09 -04:00
JoePfeiffer
87c26cccf4 Modified unit test expected results to match corrected fin MOI.
testAlphaIIIStructure
    Three fins in finset, so Ixx and Iyy are reduced by a factor of 3
    Ixx reduced from 5.2771946530250825E-5 to 1.7590648843416942E-5
    Iyy reduced from 1.3580770106050167E-4 to 4.526923368683389E-5

    Total rocket MOI changed to Ir=1.8763734635622462E-5 and
    It=2.1238394331365588E-4

testFalcon9HComponentMOI
    Three fins in finset, so
    finset rotational MOI  changed from 0.00413298 to 0.001377661595723823
    finset longitudinal MOI changed from 0.01215133 to 0.004050443797127646

testFalcon9HeavyBoosterLaunchMOIs
    Two finsets, each three fins.  Each finset's MOI are reduced as in
    testFalcon9HComponentMOI, resulting in change to totals
    Ir=0.013480523485489424, It=0.07017476021288252

testFalcon9HeavyBoosterSpentMOIs
    Two finsets, each three fins, as above
    Ir=0.010420016485489425, It=0.06398514917026163

testFalcon9HeavyBoosterStageMassOverride
    Two finsets, each three fins, as above
    Ir=0.007100144485489424, It=16.030625168315694

testFalcon9HeavyComponentCMxOverride
    Two finsets, each three fins, as above
    Ir=0.007100144485489424, It=0.047289449862727435

testFalcon9HeavyComponentMassOverride
    Two finsets, each three fins, as above
    Ir=0.026027963480146098, It=0.35928666329363634
2020-06-29 15:02:34 -06:00
Danylo
ce2d29cee0 Enhanced the javadoc of StringUtil's method and added a test.
I added parameter and return value desriptions for the method
StringUtil.isEmpty(String s).
Also, I added a test class StringUtilTest to test this method
(this method didn't have a test before).
2020-06-24 11:09:54 +03:00
Daniel Williams
90173c38a2
Merge pull request #657 from JoePfeiffer/fix-654
Pin CP to axis (Fix 654)
2020-05-08 11:02:16 -04:00
Daniel Williams
5e264c8604
Merge pull request #649 from teyrana/641-fix-cg
[fixes #641] MassCalculator now accounts for rotations in the tree
2020-05-07 18:32:29 -04:00
JoePfeiffer
f0e5902e00 Pin CP to axis when calculating in BarrowmanCalculator.calculateNonAxialForces()
It turns out that the assumption of radial symmetry is absolutely pervasive in our CP calculations.  Looking at FinSetCalc.calculateNonAxialForces(), we don't actually compute the CP of a fin -- we calculate its X value, and pin it to Y=Z=0.

The only exception to this is in BarrowmanCalculator.calculateNonAxialForces(), where the pinning only takes place if there are three or more fins in a FinSet.  If we remove the test for number of fins in the FinSet, we are in essence making the assumption that there are more fins *somewhere* which will end up being radially symmetric.
2020-05-06 16:57:04 -06:00
Daniel_M_Williams
cce900d408 [fix] MassCalculator now accounts for rotation in Component Assembly Instance Trees 2020-05-06 15:32:19 -04:00
Daniel_M_Williams
0c47f2eba3 [fix] adjusted RocketTest unit tests to match auto-radius across stages. 2020-05-03 15:01:12 -04:00
Daniel_M_Williams
bb3cdf2ce8 [refactor] renamed variables in TransitionTest to reflect their containing component type 2020-05-02 13:38:46 -04:00
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