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>
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>
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>
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.
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)
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)
- 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
(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
This is a relatively major refactor / rewrite of the 3d rendering code.
- components geometries are rendered recursively
- components inherit parents' transformations ( translation, rotation)
- implemented Transformation#toGLMatrix()
-- openrocket transformations can be directly fed into Java OpenGL
- added: FinSet#getBoundingBox()
- improved documentation on RocketComponent Location methods
- Refactor RocketRenderer:
- render component trees recursively
- removed RocketRendere#isDrawn(c) -- return true in all implementations
- Refactor ComponentRenderer
- renamed variables to be more descriptive
- changed RocketComponent#toAbsolute(...) => RocketComponent#getComponentLocations()
- Adjust FinRender Code:
- Render Single Fin Instance at-a-time
- takes in an angle for the instance
- assumes the fin is already at it's desired position.
- renames 'fs' -> 'finSet'