[fix] both pods and boosters now obey the 'auto-radius' option

- update ParallelStage#update to use the parent-class
  which contains 'getOuterRadius'
This commit is contained in:
Daniel_M_Williams 2017-06-10 22:25:54 -04:00
parent f1c9ebb25f
commit aa5545a973
2 changed files with 16 additions and 3 deletions

View File

@ -218,11 +218,11 @@ public class ParallelStage extends AxialStage implements FlightConfigurableCompo
super.update(); super.update();
if( this.autoRadialPosition ){ if( this.autoRadialPosition ){
AxialStage parentStage = (AxialStage)this.parent; ComponentAssembly parentAssembly = (ComponentAssembly)this.parent;
if( null == parentStage ){ if( null == parentAssembly ){
this.radialPosition_m = this.getOuterRadius(); this.radialPosition_m = this.getOuterRadius();
}else{ }else{
this.radialPosition_m = this.getOuterRadius() + parentStage.getOuterRadius(); this.radialPosition_m = this.getOuterRadius() + parentAssembly.getOuterRadius();
} }
} }
} }

View File

@ -238,4 +238,17 @@ public class PodSet extends ComponentAssembly implements RingInstanceable {
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE); fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
} }
@Override
protected void update(){
super.update();
if( this.autoRadialPosition){
ComponentAssembly parentAssembly = (ComponentAssembly)this.parent;
if( null == parentAssembly ){
this.radialPosition_m = this.getOuterRadius();
}else{
this.radialPosition_m = this.getOuterRadius() + parentAssembly.getOuterRadius();
}
}
}
} }