示例#1
0
 public void setTimeStep(double timeStep) {
   if (MathUtil.equals(
       this.getDouble(SIMULATION_TIME_STEP, RK4SimulationStepper.RECOMMENDED_TIME_STEP), timeStep))
     return;
   this.putDouble(SIMULATION_TIME_STEP, timeStep);
   fireChangeEvent();
 }
示例#2
0
 public void setLaunchTemperature(double launchTemperature) {
   if (MathUtil.equals(
       this.getDouble(LAUNCH_TEMPERATURE, ExtendedISAModel.STANDARD_TEMPERATURE),
       launchTemperature)) return;
   this.putDouble(LAUNCH_TEMPERATURE, launchTemperature);
   fireChangeEvent();
 }
示例#3
0
 public void setLaunchPressure(double launchPressure) {
   if (MathUtil.equals(
       this.getDouble(LAUNCH_PRESSURE, ExtendedISAModel.STANDARD_PRESSURE), launchPressure))
     return;
   this.putDouble(LAUNCH_PRESSURE, launchPressure);
   fireChangeEvent();
 }
示例#4
0
 public void setLaunchRodDirection(double launchRodDirection) {
   launchRodDirection = MathUtil.reduce360(launchRodDirection);
   if (MathUtil.equals(this.getDouble(LAUNCH_ROD_DIRECTION, Math.PI / 2.0), launchRodDirection))
     return;
   this.putDouble(LAUNCH_ROD_DIRECTION, launchRodDirection);
   fireChangeEvent();
 }
示例#5
0
  public final void setWindTurbulenceIntensity(double wti) {
    double oldWTI = Application.getPreferences().getChoice(Preferences.WIND_TURBULANCE, 0.9, 0.3);

    if (MathUtil.equals(oldWTI, wti)) return;
    this.putDouble(Preferences.WIND_TURBULANCE, wti);
    fireChangeEvent();
  }
示例#6
0
 public void setLaunchRodAngle(double launchRodAngle) {
   launchRodAngle = MathUtil.clamp(launchRodAngle, -Math.PI / 6.0, Math.PI / 6.0);
   if (MathUtil.equals(this.getDouble(LAUNCH_ROD_ANGLE, 0), launchRodAngle)) return;
   this.putDouble(LAUNCH_ROD_ANGLE, launchRodAngle);
   ;
   fireChangeEvent();
 }
 public void setDeployDelay(double deployDelay) {
   if (MathUtil.equals(this.deployDelay, deployDelay)) {
     return;
   }
   this.deployDelay = deployDelay;
   fireChangeEvent();
 }
 public void setDeployAltitude(double deployAltitude) {
   if (MathUtil.equals(this.deployAltitude, deployAltitude)) {
     return;
   }
   this.deployAltitude = deployAltitude;
   fireChangeEvent();
 }
示例#9
0
  public final void setDefaultMach(double dfn) {
    double oldDFN =
        Application.getPreferences().getChoice(Preferences.DEFAULT_MACH_NUMBER, 0.9, 0.3);

    if (MathUtil.equals(oldDFN, dfn)) return;
    this.putDouble(Preferences.DEFAULT_MACH_NUMBER, dfn);
    fireChangeEvent();
  }
示例#10
0
 public void setWindDirection(double direction) {
   direction = MathUtil.reduce360(direction);
   if (this.getBoolean(LAUNCH_INTO_WIND, true)) {
     this.setLaunchRodDirection(direction);
   }
   if (MathUtil.equals(this.getDouble(WIND_DIRECTION, Math.PI / 2), direction)) return;
   this.putDouble(WIND_DIRECTION, direction);
   fireChangeEvent();
 }
示例#11
0
 public void setLaunchLongitude(double launchLongitude) {
   launchLongitude = MathUtil.clamp(launchLongitude, -180, 180);
   if (MathUtil.equals(this.getDouble(LAUNCH_LONGITUDE, -80.60), launchLongitude)) return;
   this.putDouble(LAUNCH_LONGITUDE, launchLongitude);
   fireChangeEvent();
 }
示例#12
0
 public void setLaunchLatitude(double launchLatitude) {
   launchLatitude = MathUtil.clamp(launchLatitude, -90, 90);
   if (MathUtil.equals(this.getDouble(LAUNCH_LATITUDE, 28.61), launchLatitude)) return;
   this.putDouble(LAUNCH_LATITUDE, launchLatitude);
   fireChangeEvent();
 }
示例#13
0
 public void setLaunchAltitude(double altitude) {
   if (MathUtil.equals(this.getDouble(LAUNCH_ALTITUDE, 0), altitude)) return;
   this.putDouble(LAUNCH_ALTITUDE, altitude);
   fireChangeEvent();
 }
示例#14
0
 public void setWindSpeedAverage(double windAverage) {
   if (MathUtil.equals(this.getDouble(WIND_AVERAGE, 2), windAverage)) return;
   this.putDouble(WIND_AVERAGE, MathUtil.max(windAverage, 0));
   fireChangeEvent();
 }
示例#15
0
 public void setLaunchRodLength(double launchRodLength) {
   if (MathUtil.equals(this.getDouble(LAUNCH_ROD_LENGTH, 1), launchRodLength)) return;
   this.putDouble(LAUNCH_ROD_LENGTH, launchRodLength);
   fireChangeEvent();
 }
  @Override
  public boolean equals(Object obj) {
    if (this == obj) return true;
    if (!(obj instanceof AerodynamicForces)) return false;
    AerodynamicForces other = (AerodynamicForces) obj;

    return (MathUtil.equals(this.getCNa(), other.getCNa())
        && MathUtil.equals(this.getCN(), other.getCN())
        && MathUtil.equals(this.getCm(), other.getCm())
        && MathUtil.equals(this.getCside(), other.getCside())
        && MathUtil.equals(this.getCyaw(), other.getCyaw())
        && MathUtil.equals(this.getCroll(), other.getCroll())
        && MathUtil.equals(this.getCrollDamp(), other.getCrollDamp())
        && MathUtil.equals(this.getCrollForce(), other.getCrollForce())
        && MathUtil.equals(this.getCaxial(), other.getCaxial())
        && MathUtil.equals(this.getCD(), other.getCD())
        && MathUtil.equals(this.getPressureCD(), other.getPressureCD())
        && MathUtil.equals(this.getBaseCD(), other.getBaseCD())
        && MathUtil.equals(this.getFrictionCD(), other.getFrictionCD())
        && MathUtil.equals(this.getPitchDampingMoment(), other.getPitchDampingMoment())
        && MathUtil.equals(this.getYawDampingMoment(), other.getYawDampingMoment())
        && this.getCP().equals(other.getCP()));
  }