Clean up imports.
This commit is contained in:
parent
db286c3293
commit
faf5f12d27
@ -2,9 +2,6 @@ package net.sf.openrocket.simulation;
|
|||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import net.sf.openrocket.aerodynamics.AerodynamicForces;
|
|
||||||
import net.sf.openrocket.aerodynamics.FlightConditions;
|
|
||||||
import net.sf.openrocket.aerodynamics.WarningSet;
|
|
||||||
import net.sf.openrocket.motor.MotorInstanceConfiguration;
|
import net.sf.openrocket.motor.MotorInstanceConfiguration;
|
||||||
import net.sf.openrocket.rocketcomponent.Configuration;
|
import net.sf.openrocket.rocketcomponent.Configuration;
|
||||||
import net.sf.openrocket.rocketcomponent.FinSet;
|
import net.sf.openrocket.rocketcomponent.FinSet;
|
||||||
@ -32,12 +29,12 @@ public class BasicTumbleStatus extends SimulationStatus {
|
|||||||
|
|
||||||
public BasicTumbleStatus(SimulationStatus orig) {
|
public BasicTumbleStatus(SimulationStatus orig) {
|
||||||
super(orig);
|
super(orig);
|
||||||
if ( orig instanceof BasicTumbleStatus ) {
|
if (orig instanceof BasicTumbleStatus) {
|
||||||
this.drag = ((BasicTumbleStatus) orig).drag;
|
this.drag = ((BasicTumbleStatus) orig).drag;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public double getTumbleDrag( ) {
|
public double getTumbleDrag() {
|
||||||
return drag;
|
return drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,27 +48,27 @@ public class BasicTumbleStatus extends SimulationStatus {
|
|||||||
double aBt = 0.0;
|
double aBt = 0.0;
|
||||||
Rocket r = this.getConfiguration().getRocket();
|
Rocket r = this.getConfiguration().getRocket();
|
||||||
Iterator<RocketComponent> componentIterator = r.iterator();
|
Iterator<RocketComponent> componentIterator = r.iterator();
|
||||||
while ( componentIterator.hasNext() ) {
|
while (componentIterator.hasNext()) {
|
||||||
RocketComponent component = componentIterator.next();
|
RocketComponent component = componentIterator.next();
|
||||||
if ( ! component.isAerodynamic() ) {
|
if (!component.isAerodynamic()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ( component instanceof FinSet ) {
|
if (component instanceof FinSet) {
|
||||||
|
|
||||||
double finComponent = ((FinSet)component).getFinArea();
|
double finComponent = ((FinSet) component).getFinArea();
|
||||||
int finCount = ((FinSet)component).getFinCount();
|
int finCount = ((FinSet) component).getFinCount();
|
||||||
// check bounds on finCount.
|
// check bounds on finCount.
|
||||||
if ( finCount >= finEff.length ) {
|
if (finCount >= finEff.length) {
|
||||||
finCount = finEff.length-1;
|
finCount = finEff.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
aFins += finComponent * finEff[finCount];
|
aFins += finComponent * finEff[finCount];
|
||||||
|
|
||||||
} else if (component instanceof SymmetricComponent ){
|
} else if (component instanceof SymmetricComponent) {
|
||||||
aBt += ((SymmetricComponent) component) .getComponentPlanformArea();
|
aBt += ((SymmetricComponent) component).getComponentPlanformArea();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drag = ( cDFin * aFins + cDBt * aBt );
|
drag = (cDFin * aFins + cDBt * aBt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user