Use FlightConfiguration.getLength() in RocketPanel
Use the curConfig.getLength() for the length displayed in the RocketPanel rather than calculating it based off the bounds. The length method provided by the FlightConfiguration takes everything into account that is needed (active stages, etc) to calculate the length. Closes #452 Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
This commit is contained in:
parent
faf770450c
commit
3f17363807
@ -606,19 +606,7 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
|
||||
figure3d.setCG(cg);
|
||||
figure3d.setCP(cp);
|
||||
|
||||
// Length bound is assumed to be tight
|
||||
double length = 0;
|
||||
Collection<Coordinate> bounds = curConfig.getBounds();
|
||||
if (!bounds.isEmpty()) {
|
||||
double minX = Double.POSITIVE_INFINITY, maxX = Double.NEGATIVE_INFINITY;
|
||||
for (Coordinate c : bounds) {
|
||||
if (c.x < minX)
|
||||
minX = c.x;
|
||||
if (c.x > maxX)
|
||||
maxX = c.x;
|
||||
}
|
||||
length = maxX - minX;
|
||||
}
|
||||
double length = curConfig.getLength();
|
||||
|
||||
double diameter = Double.NaN;
|
||||
for (RocketComponent c : curConfig.getCoreComponents()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user