TODO
This commit is contained in:
parent
cc6a39c34d
commit
2c64e83a6f
@ -12,6 +12,7 @@ import net.sf.openrocket.models.wind.WindModel;
|
||||
import net.sf.openrocket.rocketcomponent.Rocket;
|
||||
import net.sf.openrocket.simulation.listeners.SimulationListener;
|
||||
import net.sf.openrocket.util.BugException;
|
||||
import net.sf.openrocket.util.Coordinate;
|
||||
import net.sf.openrocket.util.GeodeticComputationStrategy;
|
||||
import net.sf.openrocket.util.Monitorable;
|
||||
import net.sf.openrocket.util.WorldCoordinate;
|
||||
@ -38,11 +39,14 @@ public class SimulationConditions implements Monitorable, Cloneable {
|
||||
/** Launch rod direction, 0 = upwind, PI = downwind. */
|
||||
private double launchRodDirection = 0;
|
||||
|
||||
// TODO: Depreciate these and use worldCoordinate only.
|
||||
//private double launchAltitude = 0;
|
||||
//private double launchLatitude = 45;
|
||||
//private double launchLongitude = 0;
|
||||
// Launch site location (lat, lon, alt)
|
||||
private WorldCoordinate launchSite = new WorldCoordinate(0, 0, 0);
|
||||
|
||||
// Launch location in simulation coordinates (normally always 0, air-start would override this)
|
||||
private Coordinate launchPosition = Coordinate.NUL;
|
||||
|
||||
private Coordinate launchVelocity = Coordinate.NUL;
|
||||
|
||||
private GeodeticComputationStrategy geodeticComputation = GeodeticComputationStrategy.SPHERICAL;
|
||||
|
||||
|
||||
@ -166,6 +170,29 @@ public class SimulationConditions implements Monitorable, Cloneable {
|
||||
}
|
||||
|
||||
|
||||
public Coordinate getLaunchPosition() {
|
||||
return launchPosition;
|
||||
}
|
||||
|
||||
public void setLaunchPosition(Coordinate launchPosition) {
|
||||
if (this.launchPosition.equals(launchPosition))
|
||||
return;
|
||||
this.launchPosition = launchPosition;
|
||||
this.modID++;
|
||||
}
|
||||
|
||||
public Coordinate getLaunchVelocity() {
|
||||
return launchVelocity;
|
||||
}
|
||||
|
||||
public void setLaunchVelocity(Coordinate launchVelocity) {
|
||||
if (this.launchVelocity.equals(launchVelocity))
|
||||
return;
|
||||
this.launchVelocity = launchVelocity;
|
||||
this.modID++;
|
||||
}
|
||||
|
||||
|
||||
public GeodeticComputationStrategy getGeodeticComputation() {
|
||||
return geodeticComputation;
|
||||
}
|
||||
|
@ -97,8 +97,8 @@ public class SimulationStatus implements Monitorable {
|
||||
|
||||
this.time = 0;
|
||||
this.previousTimeStep = this.simulationConditions.getTimeStep();
|
||||
this.position = Coordinate.NUL;
|
||||
this.velocity = Coordinate.NUL;
|
||||
this.position = this.simulationConditions.getLaunchPosition();
|
||||
this.velocity = this.simulationConditions.getLaunchVelocity();
|
||||
this.worldPosition = this.simulationConditions.getLaunchSite();
|
||||
|
||||
// Initialize to roll angle with least stability w.r.t. the wind
|
||||
|
Loading…
x
Reference in New Issue
Block a user