2450 Commits

Author SHA1 Message Date
Billy Olsen
d98e2cb6f8 Remove unnecessary override of updateFigure in RocketFigure
Previously, updateFigure was overridden in RocketFigure in order to
ensure that all component shapes were added to the rocket prior to
calling the paintComponent method. This is superfluous as the
paintComponent method already adds the shapes prior to rendering.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
5977bfa95a Add scaleFactor back into some shapes
NoseCones aren't rendered correctly when printing/exporting as PDF
due to the scaleFactor not being honored correctly in TransitionShapes.
There was a good refactor to move some of the scaling pieces out,
however the PrintableNoseCone didn't benefit from these changes.

This restores part of the scaleFactor bits to the TransitionShapes
in order to get the printing to correctly work again. This code should
be transitioned to the new method for scaling.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07: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
Billy Olsen
d5598d7380 Clean up some code in DesignReport
Clean up some of the code in DesignReport, including some
refactoring TODOs in the addMotorData method.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
ca64e9e82a Fix issues with drawing rocket diagram in print/pdf
Some refactoring of the code for the RocketFigure class caused
changes which prevent the rocket from being rendered correctly
when printing a report or exporting as PDF. The issue was due
to shapes not being added to the rocket and pixel dimensions
being incorrect for the logic in the DesignReport.

This change ensures that rocket shapes are added when the
RocketFigure's updateFigure method is called. It also modifies
the PrintFigure to expose some of the underlying geometries of
the subject_bounds, which are necessary for the pixel and drawing
calculations used in the DesignReport.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
6dae530acc Fix IllegalStateException when export/print
Correct the logic for detecting if a motor has an invalid
FlightConfigurationId and throw an IllegalStateException only in the
case that it has an error.

Additionally, fix the lookup for the stageMass. The wrong value was
passed to the MassCalculator.getCGAnalysis(..) which resulted in
a NullPointerException.

Fixes #531

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Daniel Williams
dee887479d
Merge pull request #566 from teyrana/fix_finset_angle_units
[review-requested][fix] Adds explicit Angle Unit Conversion to/from FinSet cant and base angles.
2020-03-28 18:13:36 -04: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
af3d226b2b [fix #592] Fixes the 'Apocalypse with decals' example rocket 2020-03-21 20:53:40 -04:00
Daniel Williams
cd18c65088
Merge pull request #599 from wolsen/fix-eclipse-classpath
Remove OrangeExtensions-1.2.jar from eclipse classpath
2020-03-21 20:51:19 -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
Billy Olsen
c789da0389 Remove OrangeExtensions-1.2.jar from eclipse classpath
Commit a7c0cb2 removed the OrangeExtensions-1.2.jar file from the
swing project, but failed to remove it from the eclipse classpath.
This fixes that.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-21 09:15:15 -07: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
Daniel_M_Williams
b620360da0 [fix] runs jar with default jdk 2020-03-19 19:07:54 -04:00
Daniel_M_Williams
5a1347aafb [fix] Sets Intellij compiler to simply be '11'-- the default, included one 2020-03-19 19:01:24 -04:00
Daniel_M_Williams
cc1e39900a [fix] updates the Boosters example rocket 2020-03-19 18:20:15 -04:00
Daniel_M_Williams
154df7bb34 [fix] updates the Pods example rocket 2020-03-19 18:20:15 -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_M_Williams
3f2017782c [test] Change CI jdks; move to Ubuntu 18.04 LTS / Bionic Beaver 2020-03-14 16:07:57 -04:00
Daniel Williams
d7f0fcb91c
Merge pull request #589 from itshanney/feature/fix-macos-after-java11-upgrade
Fix macOS after java11 upgrade
2020-03-14 16:05:35 -04:00
Justin Hanney
b78b07e76e Merge branch 'unstable' into feature/fix-macos-after-java11-upgrade 2020-03-14 12:34:45 -04:00
Daniel Williams
cc8f0caaab
Merge pull request #575 from wolsen/issue-553
Notify all event listeners when DoubleModel.setValue called
2020-03-14 00:21:45 -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 Williams
c84fd74be2
Merge pull request #585 from teyrana/upgrade/slf4j
[upgrade][jar] upgrades slf4j logging libraries from 1.7.5 => 1.7.30
2020-03-13 23:31:39 -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
Billy Olsen
a2168ed84f Notify all event listeners when DoubleModel.setValue called
Previous refactoring of the event listeners lost notifications
to classes which care about changes to the DoubleModel. One
such example is the UnitSelector. Ensure that all the
ChangeEventListeners and StateChangeEventListeners are called
when the setValue method is invoked.

Closes #553

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-12 19:48:35 -07:00
Justin Hanney
de2ed1a4a1 Remove openjdk8 after switching to newer macOS java libs 2020-03-11 20:53:40 -04:00
Justin Hanney
3d3d9cca90 Revert build.xml source/target back to 1.8 2020-03-11 20:22:10 -04:00
Justin Hanney
a7c0cb2b8a Fix OSXSetup after migration to Java9+ 2020-03-11 20:16:46 -04:00
Daniel Williams
d9a3cbb39c
Merge pull request #574 from wolsen/issue-573
Use AWTTextureIO for creating textures from jpegs
2020-03-11 08:30:32 -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
Daniel Williams
c631d2c9cc
Merge pull request #581 from teyrana/fix/ant-build
Minimal change to re-enable ant builds -- add "script-api-1.0.jar"
2020-03-11 08:07:24 -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 Williams
52a4022f2c
[rollback] disables broken upload.sh in .travis.yml (#582) 2020-03-08 17:40:31 -04: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
Billy Olsen
57b928575f Use AWTTextureIO for creating textures from jpegs
The switch to using JOGL uses the current JPEGs, but these textures
cannot be read using the GL.GL_RGBA format which is eventually
propigated to the user by an error dialog showing a NullPointerException
for the texture which failed to load. Using GL.GL_RGB as the format when
loading the textures will resolve the texture loading issue, but the
images are inverted due to differences between AWT and JOGL
interpretation of where the image starts (top left vs bottom left).

Change instead to use the AWTTextureIO class to create the textures
which solves both problems - the loading of the texture as well as
presenting the image in the appropriate orientation.

Closes #573

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-04 19:35:46 -07: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
Daniel Williams
e51545d7f3
Merge pull request #570 from wolsen/add-railbutton-presets
Add railbutton presets
2020-03-03 18:44:53 -05:00
Neil
c0203b9267
Merge pull request #3 from teyrana/fix_java11_3d
[fix] Restores 3d Views to PR #556 -- Java 11 upgrade
2020-03-03 11:21:17 -08:00
Billy Olsen
e0983c05cc Add back instance panel dropped in previous commit
Adds back the instance options in the previous commit for specifying
instance details about rail buttons. This change adds it back but
slightly tweaks the layout and location in order to keep the config
panel in a 2 column arrangement.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-03 09:37:56 -07: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