Forgot conversions, doh!
This commit is contained in:
		
							parent
							
								
									b696e6f4b1
								
							
						
					
					
						commit
						546e9b5ee8
					
				@ -200,6 +200,10 @@ public class RASAeroCommonConstants {
 | 
				
			|||||||
     * Angle conversion from OpenRocket units to RASAero units.  RASAero is in degrees, OpenRocket in rad.
 | 
					     * Angle conversion from OpenRocket units to RASAero units.  RASAero is in degrees, OpenRocket in rad.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    public static final double OPENROCKET_TO_RASAERO_ANGLE = 180 / Math.PI;
 | 
					    public static final double OPENROCKET_TO_RASAERO_ANGLE = 180 / Math.PI;
 | 
				
			||||||
 | 
					    /**
 | 
				
			||||||
 | 
					     * Weight conversion from OpenRocket units to RASAero units.  RASAero is in pounds (lb), OpenRocket in kilograms (kg).
 | 
				
			||||||
 | 
					     */
 | 
				
			||||||
 | 
					    public static final double OPENROCKET_TO_RASAERO_WEIGHT = 2.20462262;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Temperature conversion from OpenRocket units to RASAero units.  RASAero is in Fahrenheit, OpenRocket in Kelvin.
 | 
					     * Temperature conversion from OpenRocket units to RASAero units.  RASAero is in Fahrenheit, OpenRocket in Kelvin.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
 | 
				
			|||||||
@ -140,12 +140,12 @@ public class SimulationDTO {
 | 
				
			|||||||
                // Sustainer
 | 
					                // Sustainer
 | 
				
			||||||
                case 0:
 | 
					                case 0:
 | 
				
			||||||
                    setSustainerEngine(getRASAeroMotor(motors, motorConfig.getMotor(), warnings));
 | 
					                    setSustainerEngine(getRASAeroMotor(motors, motorConfig.getMotor(), warnings));
 | 
				
			||||||
                    setSustainerLaunchWt(stage.getSectionMass());
 | 
					                    setSustainerLaunchWt(stage.getSectionMass() * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_WEIGHT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Calculate CG of sustainer
 | 
					                    // Calculate CG of sustainer
 | 
				
			||||||
                    CGCalcConfig.setOnlyStage(0);
 | 
					                    CGCalcConfig.setOnlyStage(0);
 | 
				
			||||||
                    double sustainerCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
					                    double sustainerCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
				
			||||||
                    setSustainerCG(sustainerCG);
 | 
					                    setSustainerCG(sustainerCG * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_LENGTH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    setSustainerIgnitionDelay(motorConfig.getIgnitionDelay());
 | 
					                    setSustainerIgnitionDelay(motorConfig.getIgnitionDelay());
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
@ -154,7 +154,8 @@ public class SimulationDTO {
 | 
				
			|||||||
                    setBooster1Engine(getRASAeroMotor(motors, motorConfig.getMotor(), warnings));
 | 
					                    setBooster1Engine(getRASAeroMotor(motors, motorConfig.getMotor(), warnings));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Aggregate mass of sustainer and booster 1
 | 
					                    // Aggregate mass of sustainer and booster 1
 | 
				
			||||||
                    setBooster1LaunchWt(rocket.getChild(0).getSectionMass() + stage.getSectionMass());
 | 
					                    setBooster1LaunchWt(rocket.getChild(0).getSectionMass() + stage.getSectionMass()
 | 
				
			||||||
 | 
					                            * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_WEIGHT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Aggregate CG of sustainer and booster 1
 | 
					                    // Aggregate CG of sustainer and booster 1
 | 
				
			||||||
                    CGCalcConfig.setOnlyStage(0);
 | 
					                    CGCalcConfig.setOnlyStage(0);
 | 
				
			||||||
@ -162,7 +163,7 @@ public class SimulationDTO {
 | 
				
			|||||||
                        CGCalcConfig._setStageActive(i, true);
 | 
					                        CGCalcConfig._setStageActive(i, true);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    double totalCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
					                    double totalCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
				
			||||||
                    setBooster1CG(totalCG);
 | 
					                    setBooster1CG(totalCG * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_LENGTH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    setBooster1IgnitionDelay(motorConfig.getIgnitionDelay());
 | 
					                    setBooster1IgnitionDelay(motorConfig.getIgnitionDelay());
 | 
				
			||||||
                    setBooster1SeparationDelay(separationConfig.getSeparationDelay());      // TODO: this could be handled a bit better (look at separation delay, upper stage ignition event etc.)
 | 
					                    setBooster1SeparationDelay(separationConfig.getSeparationDelay());      // TODO: this could be handled a bit better (look at separation delay, upper stage ignition event etc.)
 | 
				
			||||||
@ -174,7 +175,7 @@ public class SimulationDTO {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
                    // Aggregate mass of sustainer, booster 1 and booster 2
 | 
					                    // Aggregate mass of sustainer, booster 1 and booster 2
 | 
				
			||||||
                    setBooster2LaunchWt(rocket.getChild(0).getSectionMass() + rocket.getChild(1).getSectionMass() +
 | 
					                    setBooster2LaunchWt(rocket.getChild(0).getSectionMass() + rocket.getChild(1).getSectionMass() +
 | 
				
			||||||
                            stage.getSectionMass());
 | 
					                            stage.getSectionMass()  * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_WEIGHT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    // Calculate the aggregated CG of the sustainer, booster and booster 2
 | 
					                    // Calculate the aggregated CG of the sustainer, booster and booster 2
 | 
				
			||||||
                    CGCalcConfig.setOnlyStage(0);
 | 
					                    CGCalcConfig.setOnlyStage(0);
 | 
				
			||||||
@ -182,7 +183,7 @@ public class SimulationDTO {
 | 
				
			|||||||
                        CGCalcConfig._setStageActive(i, true);
 | 
					                        CGCalcConfig._setStageActive(i, true);
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    totalCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
					                    totalCG = MassCalculator.calculateStructure(CGCalcConfig).getCM().x;
 | 
				
			||||||
                    setBooster2CG(totalCG);
 | 
					                    setBooster2CG(totalCG * RASAeroCommonConstants.OPENROCKET_TO_RASAERO_LENGTH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    setBooster2Delay(separationConfig.getSeparationDelay());      // TODO: this could be handled a bit better (look at separation delay, upper stage ignition event etc.)
 | 
					                    setBooster2Delay(separationConfig.getSeparationDelay());      // TODO: this could be handled a bit better (look at separation delay, upper stage ignition event etc.)
 | 
				
			||||||
                    setIncludeBooster2(mount.isMotorMount());
 | 
					                    setIncludeBooster2(mount.isMotorMount());
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user