1573 Commits

Author SHA1 Message Date
Daniel Williams
83ce19cac4
Merge pull request #647 from teyrana/645-fix-auto-radius
[Fixes #645] fix auto radius calculation on Symmetric Components
2020-05-07 18:31:48 -04:00
JoePfeiffer
2d9239fe5b When determining worst-case CP, only consider cases where the CP's weight is non-zero 2020-05-05 10:46:31 -06:00
Daniel_M_Williams
d8a8c14449 [fix] get{Next|Prev}SymmetricComponent now searches across stages 2020-05-03 15:02: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
5bea957e50 [fix][doc] fixes comments in BarrowmanCalculator.java 2020-05-02 14:28:30 -04:00
Daniel_M_Williams
bbef167bbc [fix] fixes instancing on RocketComponent.toDebugTree 2020-05-02 13:38:47 -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
3e3b5dc655 [fix] SymmetricComponent.get{Next|Prev}SymmetricComponent simply retrieves next symmetric *sibling*. 2020-05-02 13:38:46 -04:00
JoePfeiffer
834fb73617 Some thrust curves had two data points at the end of the curve, one with a thrust of 0. We can delete the 0-thrust point and accept the curve.
One (KBA K1750) had a duplicate (time and thrust both equal) data point.  Delete the duplicate and accpept
2020-05-01 10:21:33 -06:00
JoePfeiffer
16091b456d Clarifying error message when there are two data points for a single time.
I wrote the original, and I still didn't understand it when I came across it for the first time in a few months!
2020-05-01 09:55:33 -06:00
Daniel_M_Williams
da2fea3468 [fix] fixed unit tests for FreeformFinSet, due to fixing #555 2020-04-25 17:51:52 -04:00
Daniel_M_Williams
77bc272e7b [fix] FreeformFins now update main RocketWindow when a point is changed 2020-04-25 17:13:51 -04:00
Justin Hanney
2a3950fce9 Remove core/TODO; Tweak README.md 2020-04-24 20:02:14 -07:00
Justin Hanney
1dae23133b Move ChangeLog and README.TXT to root folder 2020-04-24 20:01:12 -07:00
JoePfeiffer
bf6624fb70 I can't find anywhere that these classes are imported by anything else 2020-04-22 09:29:57 -06:00
JoePfeiffer
b9a881c5c9 The deleted methods (setTotalThrustEstimate(), setBurnTimeEstimate(), setAverageThrustEstimate(), and setMaxThrustEstimate()) were never called. The member variables maxThrust, burnTimeEstimate, averageThrust, totalImpulse are all calculated by computeStatistics() and the values (if any) from the thrustcurve file are ignored. 2020-04-22 09:29:57 -06: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_M_Williams
4326c71c71 [address 618] improves display of freeform fin tabs on transition bodies 2020-04-20 07:58:55 -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
355bfb61c1 Use FinSet.getBoundingBox() when computing bounds
Use the FinSet.getBoundingBox() when computing the bounds for the
current configuration in FlightConfiguration.calculateBounds().
The FinSet already contains a BoundingBox method, however it returns
a larger BoundingBox than necessary to encapsulate the component.

Change the FinSet.getBoundingBox() to create a bounding box of the
smallest size to ensure a tight bounds for the FinSet. This is done
by taking each of the locations for the component and determining
where the fin tip point is and updating the BoundingBox with this
location.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-19 19:15:14 -07:00
JoePfeiffer
839f555d55 Fixed spelling error getTotalImpuse() => getTotalImpulse() 2020-04-16 13:47:45 -06:00
JoePfeiffer
ede47666f9 Modified ThrustCurveMotor to ensure all fields have sane default values
Created MotorRowFilterTest unit test
2020-04-16 11:36:47 -06: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 Williams
7745563c0d
Merge pull request #614 from itshanney/bugfix/remove-guice-warnings
Update guice library to remove AOP; Fixes issue #609
2020-04-06 21:45:55 -04:00
Daniel_M_Williams
1ec588dff4 [refactor] converted Rocket.listenerList from ArrayList -> HashSet 2020-04-06 21:32:39 -04:00
Daniel_M_Williams
644404b070 [fix] Adds duplicate guard when add a 'ComponentChangeListener' to the rocket 2020-04-06 21:25:54 -04: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_M_Williams
67f806492e [cleanup] cleans up the TestRockets.java class
- Shares the configuration ID numbers

- moves to new setAngleOffset function
2020-04-05 20:54:14 -04:00
Justin Hanney
82a3506157 Adjust .iml files for IntelliJ 2020-04-05 12:36:07 -07:00
Justin Hanney
8302de21b1 Adjust IntelliJ and Eclipse classpaths to new guice 2020-04-02 19:22:42 -07:00
Justin Hanney
0fff7e2d50 Update guice library to remove AOP; Fixes issue #609 2020-04-02 15:56:55 -07:00
Daniel_M_Williams
e56e47e83d [fix] save all instance counts, even if ==1 (because different components have different default instance counts 2020-03-30 20:14:21 -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
06d101c775 remove old 3FNC rocket; not needed since using Alpha III as base for
pods test
2020-03-29 10:13:08 -06:00
JoePfeiffer
ecc8a32891 Modify "fins on pods" test to use a modified Alpha III 2020-03-28 18:57:32 -06:00
JoePfeiffer
b1643e4d14 create a dumpRockets() method to save a rocket to a file, so we can open and inspect it in OR 2020-03-28 18:22:43 -06:00
JoePfeiffer
67d507c4b4 Revert "commented out an import to avoid "unused import" warnings due to code commented out"
This reverts commit 6f9c023b1eca18528fe7300c9cb09c27d164c361.
2020-03-28 18:11:12 -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
6f9c023b1e commented out an import to avoid "unused import" warnings due to code commented out 2020-03-28 15:22:58 -06:00
JoePfeiffer
202bb5f1e4 style point -- moved a "continue;" to its own line for consistency 2020-03-28 15:05:10 -06: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
JoePfeiffer
9845decb20 Adjust calculation of axial length (for fineness friction adjustment) to be from tip of rocket to aft-most axial component instead of simply adding all axial component lengths together. Necessary so body tubes on pods don't add to length incorrectly.
TODO:  I suspect we actually ought to be calculating the fineness of the tubes on each pod and adjusting friction on each of them accordinging.
2020-03-25 14:59:52 -06:00
JoePfeiffer
5e5ce3d06e Corrected calculateBaseDrag to iterate through all instances of components
Corrected getPreviousSymmetricComponent and getNextSymmetricComponent to
stop searching and return null when a PodSet is encountered in search (so it
only returns the previous/next component if it's a child of the same pod).
2020-03-25 14:59:52 -06:00
JoePfeiffer
dd3bda8d7e Corrected calculatePressureDrag() to iterate through all instances.
Note this required modifying the function to explicitly get the radius
of the forward symmetric component rather than simply iterating
and assuming components would appear in order (as was the case with
iterating through getActiveComponents()).
The getPreviousSymmetricComponent() method contains a warning that it
doesn't account for external pods, so this will probably need to be
revisited and that method modified.
2020-03-25 14:59:52 -06:00
JoePfeiffer
05185ff3d6 Correct calculatePressureDrag() to iterate through all instances. 2020-03-25 14:59:52 -06:00
JoePfeiffer
5483c3e659 Correct calculateFrictionDrag() to iterate through all instances of components 2020-03-25 14:59:52 -06:00