Remove/changed comments
Revised comments re suggestion of SiboVG; checking on global cd change.
This commit is contained in:
parent
687d460f0d
commit
cf7763ab6e
@ -95,7 +95,7 @@ public class Streamer extends RecoveryDevice {
|
|||||||
double area = getArea();
|
double area = getArea();
|
||||||
stripWidth = MathUtil.safeSqrt(area / ratio);
|
stripWidth = MathUtil.safeSqrt(area / ratio);
|
||||||
stripLength = ratio * stripWidth;
|
stripLength = ratio * stripWidth;
|
||||||
clearPreset(); // ----
|
clearPreset();
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +118,7 @@ public class Streamer extends RecoveryDevice {
|
|||||||
double ratio = Math.max(getAspectRatio(), 0.01);
|
double ratio = Math.max(getAspectRatio(), 0.01);
|
||||||
stripWidth = MathUtil.safeSqrt(area / ratio);
|
stripWidth = MathUtil.safeSqrt(area / ratio);
|
||||||
stripLength = ratio * stripWidth;
|
stripLength = ratio * stripWidth;
|
||||||
clearPreset(); // ----
|
clearPreset();
|
||||||
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,14 +138,14 @@ public class Streamer extends RecoveryDevice {
|
|||||||
if ( preset.has(ComponentPreset.WIDTH)) {
|
if ( preset.has(ComponentPreset.WIDTH)) {
|
||||||
this.stripWidth = preset.get(ComponentPreset.WIDTH);
|
this.stripWidth = preset.get(ComponentPreset.WIDTH);
|
||||||
}
|
}
|
||||||
// ---- Set Cd value when preset is selected after manual Cd change
|
// Set Cd value when preset is selected after manual Cd change
|
||||||
double density = this.getMaterial().getDensity();
|
double density = this.getMaterial().getDensity();
|
||||||
double cd;
|
double cd;
|
||||||
cd = 0.034 * ((density + 0.025) / 0.105) * (stripLength + 1) / stripLength;
|
cd = 0.034 * ((density + 0.025) / 0.105) * (stripLength + 1) / stripLength;
|
||||||
cd = MathUtil.min(cd, MAX_COMPUTED_CD);
|
cd = MathUtil.min(cd, MAX_COMPUTED_CD);
|
||||||
this.cd = cd;
|
this.cd = cd;
|
||||||
this.cdAutomatic = true;
|
this.cdAutomatic = true;
|
||||||
// ----
|
|
||||||
super.loadFromPreset(preset);
|
super.loadFromPreset(preset);
|
||||||
// Fix the length to the stripWidth since RocketComponent assigns ComponentPreset.LENGTH to length.
|
// Fix the length to the stripWidth since RocketComponent assigns ComponentPreset.LENGTH to length.
|
||||||
this.length = this.stripWidth;
|
this.length = this.stripWidth;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user