1932 Commits

Author SHA1 Message Date
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
Daniel_M_Williams
465989f837 [fixes #565] Fixes display of canted fins 2020-03-22 11:07:55 -04: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
f6ea1fc35d [fix] Sets Fins to be created with 3 instances instead of one 2020-03-21 19:02:39 -04:00
JoePfeiffer
efe0d9e28d Added missing instanceNumber parameter to String.format() call in toString()
Added explicit call to component.toString() so intellij can print component name
2020-03-19 19:28:47 -04:00
Neil
0f01a9c437 Address Integer().toString() and Double().toString() warnings. 2020-03-19 18:19:07 -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
Daniel Williams
59a01b3877
Merge pull request #577 from wolsen/issue-576
Fix ground hit velocity calculation
2020-03-14 00:14:54 -04:00
Daniel_M_Williams
630b5eca58 [upgrade][jar] upgrades slf4j logging libraries from 1.7.5 => 1.7.30
- updates ant build
- updates Intellij build
- updates Eclipse build
2020-03-13 23:27:34 -04:00
Daniel Williams
7251a63086
Merge pull request #583 from wolsen/fix-eclipse-classpaths
Update eclipse .classpath files
2020-03-11 08:12:33 -04:00
Billy Olsen
51fd9d47dc Update eclipse .classpath files
Update the eclipse .classpath files to point to the new and updated
jar files that were merged as part of the recent upgrade to Java 11/
Java 13 commits.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-10 19:25:44 -07: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
Daniel_M_Williams
92308c7665 [fix][build][ant] Fixes ant builds 2020-03-07 20:27:37 -05:00
Billy Olsen
a82d4085e2 Fix typo in method name
Fix the spelling of 'interesting' in the method
FlightData.calculateInterestingValues.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-06 07:37:46 -07:00
Billy Olsen
97c1112c56 Fix ground hit velocity calculation
The ground hit velocity is calculated by taking the last recorded
total velocity for the flight data and using that as the ground
hit velocity if the last altitude measurement is less than 10 m.

This method worked until commit f11a3e4 introduced the ability to
track and report all events that happened after a GROUND_HIT event.
That commit introduced a GroundStepper that will step between the
GROUND_HIT event and the SIMULATION_END event and will always
add a measurement to the flight data to record the rocket being on
the ground.

A better way of measuring the ground hit velocity is to interpolate
the velocity at the time the GROUND_HIT event, as that would actually
be the appropriate ground hit velocity.

Closes #576

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-06 07:33:33 -07:00
Daniel Williams
84203b014b
Travis CI now builds for Java 13 -- and fixed some issues for Java 13 (#572)
* [jar][Upgrade] Upgrade lib-tests libraries

* [fix][jar/upgrade] Upgraded jars in core/lib.  -- fixed Junit Failures due to missing jaxb bindings.

* [fix] Added openjdk 13 to travis auto-builds

* [fix][unittest][java8] fixes automated java8 unittests

* [fix][build][jar] Upgraded logback libraries; moved to core/lib

* [fix][build][jar] removes unused jars: jaxb-jxc.*.jar

* [upgrade][build][jar] Upgrade the guice .jar libraries
2020-03-06 08:52:20 -05:00
Daniel Williams
3aaf8c6802
Merge pull request #556 from neilbalch/java11-upgrade
Upgrade to Java 11/Java 13 and retire Android app
2020-03-03 21:36:44 -05:00
Billy Olsen
3995a330da Add new material types for rail buttons
Add two new material types for rail buttons, delrin and nylon.
The material densities are pulled from wikipedia and cross-referenced
with Dupont's material database.

Additionally, set Delrin as the default material for RailButtons.

Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-02 20:33:56 -07:00
Billy Olsen
f8993e89db Add rail button presets options
Allow rail buttons to define presets. This change doesn't actually add
any default presets to the library, but enables the ability to add some
preset options for rail buttons.

Partially Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-01 18:32:32 -07:00
Billy Olsen
232b363712 Fix large rail button default size.
The default values assigned to RailButton sizes were configured with
a 1.0 meter outer diameter and 0.8 meter internal diameter (for 1010
rail buttons) which resulted in overly large rail buttons when added
using the default values.

Presuming that 1010 rail buttons are the common and an acceptable
default, change the default button sizes to align with the 1010 size.

Additionally, this change fixes some of the layout issues present in
add railbutton dialog.

Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-01 18:26:30 -07:00
Daniel_M_Williams
aeab0c3d81 [fix] added example rockets to jarfile 2020-02-19 22:30:32 -05:00
Daniel Williams
95d497827d
Revert "Fix 525" 2020-02-15 09:23:01 -05:00
Daniel Williams
64514ed514
Merge pull request #521 from JoePfeiffer/fix-361 -- Extend simulation until last motor burns out
Fix 361
2020-02-14 21:58:10 -05:00
Daniel Williams
be02f99f7e
Merge pull request #543 from JoePfeiffer/fix-525
90% of this is just refactoring APIs, and I think those are migrating to a clearer, more succinct form. 👍 +1
2020-02-10 22:21:36 -05:00
Neil Balch
f26e3afcf3 Upgrade codebase to Java 11 2019-10-28 08:56:05 -07:00
bweissinger
778413c882 Correct InnerTube.getInstanceOffsets() returning Coordinate.ZERO instead of actual offset values 2019-09-01 00:42:39 -05:00
JoePfeiffer
934cccb811 Was thinking about getting rid of RocketUtils since it's only used by android app; there's no harm in leaving it... 2019-06-17 15:28:50 -06:00
JoePfeiffer
85c21e5812 This is a much bigger commit than I like to make, and will result in a much bigger
PR than I like as well.  All I can do is apologize...

Fixes length calculation in RocketPanel.

(1) Finished switching over from deprecated getBounds() function to getBoundingBox().
getBounds() function is removed.

(2) 3D rendering code had its own getBounds().  Switched this over to
RocketComponent:getBoundingBox() as well

(3) Made getBoundingBox() consistently get the bounding box relative to the component.
Implementations for some components were calculating box relative to start of rocket

(4) Used InstanceMap to iterate through all instances of components in creating bounding box.
2019-06-17 15:25:27 -06:00
JoePfeiffer
1b188e20be finished first draft of fixing lengths 2019-06-10 17:04:09 -06:00
JoePfeiffer
719576cc62 bunch of changes along the way to fixing length calculation 2019-06-10 17:04:08 -06:00
Wes Cravens
b5cde10824
Merge pull request #519 from JoePfeiffer/fix-516
fix issue 516
2019-05-29 10:25:33 -05:00
Wes Cravens
7acaaf18d5
Merge pull request #535 from teyrana/fix_497
[fix #497] Disables Fin-Thickness-Warnings on Phantom Fins
2019-05-29 10:25:24 -05: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
Wes Cravens
ef08041802
Merge pull request #530 from JoePfeiffer/fix-527
Fix #527
2019-04-10 10:47:26 -05:00
Daniel_M_Williams
0823de5e2a [fix #497] Disables Fin-Thickness-Warnings on Phantom Fins 2019-04-04 19:08:45 -04: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
d635ed4c74 Remove validation when modifying fin tab 2019-03-19 14:35:45 -06:00
JoePfeiffer
f51ce5e931 oops, that shouldn't have been in there 2019-03-13 14:51:06 -06:00
JoePfeiffer
18ce41d9e7 Modified setTabHeight, setTabLength, and setTabOffset to take a second
parameter, determining whether to validate fin tab, and made them
private.

Created two public wrappers for each, one calling for validation
(which has the same signature as the original three methods), and the
other not.

Called NoValidate versions of the three in file loading functions so
validation doesn't interfere with tab length when tab is read before
fin.

Tried to make the coding of the three more consistent with each
other.
2019-03-13 14:45:30 -06: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
fc5ef54d9d Modify comments on public accessors to match code 2019-03-04 11:23:49 -07:00