Add extra rocket test
This commit is contained in:
parent
4dfe63bc69
commit
2252a31f97
@ -0,0 +1,289 @@
|
||||
<RASAeroDocument>
|
||||
<FileVersion>2</FileVersion>
|
||||
<RocketDesign>
|
||||
<NoseCone>
|
||||
<PartType>NoseCone</PartType>
|
||||
<Length>12</Length>
|
||||
<Diameter>3</Diameter>
|
||||
<Shape>Tangent Ogive</Shape>
|
||||
<BluntRadius>0.25</BluntRadius>
|
||||
<Location>0</Location>
|
||||
<Color>Black</Color>
|
||||
</NoseCone>
|
||||
<BodyTube>
|
||||
<PartType>BodyTube</PartType>
|
||||
<Length>6</Length>
|
||||
<Diameter>3</Diameter>
|
||||
<LaunchLugDiameter>0</LaunchLugDiameter>
|
||||
<LaunchLugLength>0</LaunchLugLength>
|
||||
<RailGuideDiameter>0</RailGuideDiameter>
|
||||
<RailGuideHeight>0</RailGuideHeight>
|
||||
<LaunchShoeArea>0</LaunchShoeArea>
|
||||
<Location>12</Location>
|
||||
<Color>Black</Color>
|
||||
<BoattailLength>0</BoattailLength>
|
||||
<BoattailRearDiameter>0</BoattailRearDiameter>
|
||||
<BoattailOffset>0</BoattailOffset>
|
||||
<Overhang>0</Overhang>
|
||||
<Fin>
|
||||
<Count>3</Count>
|
||||
<Chord>1</Chord>
|
||||
<Span>1</Span>
|
||||
<SweepDistance>1</SweepDistance>
|
||||
<TipChord>0</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>1</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
</BodyTube>
|
||||
<Transition>
|
||||
<PartType>Transition</PartType>
|
||||
<Length>0.25</Length>
|
||||
<Diameter>2.5</Diameter>
|
||||
<Location>18</Location>
|
||||
<RearDiameter>2.5</RearDiameter>
|
||||
<Color>Black</Color>
|
||||
</Transition>
|
||||
<BodyTube>
|
||||
<PartType>BodyTube</PartType>
|
||||
<Length>0.5</Length>
|
||||
<Diameter>2.5</Diameter>
|
||||
<LaunchLugDiameter>0</LaunchLugDiameter>
|
||||
<LaunchLugLength>0</LaunchLugLength>
|
||||
<RailGuideDiameter>0</RailGuideDiameter>
|
||||
<RailGuideHeight>0</RailGuideHeight>
|
||||
<LaunchShoeArea>0</LaunchShoeArea>
|
||||
<Location>18.25</Location>
|
||||
<Color>Black</Color>
|
||||
<BoattailLength>0</BoattailLength>
|
||||
<BoattailRearDiameter>0</BoattailRearDiameter>
|
||||
<BoattailOffset>0</BoattailOffset>
|
||||
<Overhang>0</Overhang>
|
||||
<Fin>
|
||||
<Count>6</Count>
|
||||
<Chord>0.25</Chord>
|
||||
<Span>2</Span>
|
||||
<SweepDistance>2</SweepDistance>
|
||||
<TipChord>0.125</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>0.25</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
</BodyTube>
|
||||
<Transition>
|
||||
<PartType>Transition</PartType>
|
||||
<Length>0.25</Length>
|
||||
<Diameter>3</Diameter>
|
||||
<Location>18.75</Location>
|
||||
<RearDiameter>3</RearDiameter>
|
||||
<Color>Black</Color>
|
||||
</Transition>
|
||||
<BodyTube>
|
||||
<PartType>BodyTube</PartType>
|
||||
<Length>36</Length>
|
||||
<Diameter>3</Diameter>
|
||||
<LaunchLugDiameter>0</LaunchLugDiameter>
|
||||
<LaunchLugLength>0</LaunchLugLength>
|
||||
<RailGuideDiameter>0</RailGuideDiameter>
|
||||
<RailGuideHeight>0</RailGuideHeight>
|
||||
<LaunchShoeArea>0</LaunchShoeArea>
|
||||
<Location>19</Location>
|
||||
<Color>Black</Color>
|
||||
<BoattailLength>0</BoattailLength>
|
||||
<BoattailRearDiameter>0</BoattailRearDiameter>
|
||||
<BoattailOffset>0</BoattailOffset>
|
||||
<Overhang>0</Overhang>
|
||||
<Fin>
|
||||
<Count>6</Count>
|
||||
<Chord>1</Chord>
|
||||
<Span>1</Span>
|
||||
<SweepDistance>1</SweepDistance>
|
||||
<TipChord>0</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>36</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
<Protuberance>
|
||||
<StreamlinedNoBaseDrag>0</StreamlinedNoBaseDrag>
|
||||
<StreamlinedWithBaseDrag>0.25</StreamlinedWithBaseDrag>
|
||||
<InclinedPlate1Angle>30</InclinedPlate1Angle>
|
||||
<InclinedPlate1FrontalArea>0.25</InclinedPlate1FrontalArea>
|
||||
<InclinedPlate2Angle>0</InclinedPlate2Angle>
|
||||
<InclinedPlate2FrontalArea>0</InclinedPlate2FrontalArea>
|
||||
</Protuberance>
|
||||
</BodyTube>
|
||||
<FinCan>
|
||||
<PartType>FinCan</PartType>
|
||||
<Length>6</Length>
|
||||
<Diameter>3.25</Diameter>
|
||||
<InsideDiameter>3</InsideDiameter>
|
||||
<LaunchLugDiameter>0</LaunchLugDiameter>
|
||||
<LaunchLugLength>0</LaunchLugLength>
|
||||
<RailGuideDiameter>0.5</RailGuideDiameter>
|
||||
<RailGuideHeight>0.375</RailGuideHeight>
|
||||
<LaunchShoeArea>0</LaunchShoeArea>
|
||||
<Location>55</Location>
|
||||
<ShoulderLength>0.25</ShoulderLength>
|
||||
<Offset>-6</Offset>
|
||||
<Color>Black</Color>
|
||||
<Fin>
|
||||
<Count>5</Count>
|
||||
<Chord>6</Chord>
|
||||
<Span>4</Span>
|
||||
<SweepDistance>3</SweepDistance>
|
||||
<TipChord>2</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>6</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
</FinCan>
|
||||
<BoatTail>
|
||||
<PartType>BoatTail</PartType>
|
||||
<Length>3</Length>
|
||||
<Diameter>3.25</Diameter>
|
||||
<RearDiameter>2.75</RearDiameter>
|
||||
<Location>55</Location>
|
||||
<Color>Black</Color>
|
||||
<Fin>
|
||||
<Count>4</Count>
|
||||
<Chord>2</Chord>
|
||||
<Span>1</Span>
|
||||
<SweepDistance>1.3125</SweepDistance>
|
||||
<TipChord>0</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>2.5</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
</BoatTail>
|
||||
<Booster>
|
||||
<PartType>Booster</PartType>
|
||||
<Length>7.5</Length>
|
||||
<Diameter>6</Diameter>
|
||||
<InsideDiameter>3.25</InsideDiameter>
|
||||
<LaunchLugDiameter>0</LaunchLugDiameter>
|
||||
<LaunchLugLength>0</LaunchLugLength>
|
||||
<RailGuideDiameter>0</RailGuideDiameter>
|
||||
<RailGuideHeight>0</RailGuideHeight>
|
||||
<LaunchShoeArea>0</LaunchShoeArea>
|
||||
<Location>55</Location>
|
||||
<ShoulderLength>2</ShoulderLength>
|
||||
<Color>Black</Color>
|
||||
<NozzleExitDiameter>0</NozzleExitDiameter>
|
||||
<BoattailLength>0.5</BoattailLength>
|
||||
<BoattailRearDiameter>6.5</BoattailRearDiameter>
|
||||
<Fin>
|
||||
<Count>3</Count>
|
||||
<Chord>4</Chord>
|
||||
<Span>3</Span>
|
||||
<SweepDistance>3</SweepDistance>
|
||||
<TipChord>1</TipChord>
|
||||
<Thickness>0.1</Thickness>
|
||||
<LERadius>0</LERadius>
|
||||
<Location>4.5</Location>
|
||||
<AirfoilSection>Square</AirfoilSection>
|
||||
<FX1>0</FX1>
|
||||
<FX3>0</FX3>
|
||||
</Fin>
|
||||
</Booster>
|
||||
<Surface>Smooth Paint</Surface>
|
||||
<CP>0</CP>
|
||||
<ModifiedBarrowman>False</ModifiedBarrowman>
|
||||
<Turbulence>False</Turbulence>
|
||||
<SustainerNozzle>0</SustainerNozzle>
|
||||
<Booster1Nozzle>0</Booster1Nozzle>
|
||||
<Booster2Nozzle>0</Booster2Nozzle>
|
||||
<UseBooster1>False</UseBooster1>
|
||||
<UseBooster2>False</UseBooster2>
|
||||
<Comments />
|
||||
</RocketDesign>
|
||||
<LaunchSite>
|
||||
<Altitude>3750</Altitude>
|
||||
<Pressure>0</Pressure>
|
||||
<RodAngle>7.64</RodAngle>
|
||||
<RodLength>12</RodLength>
|
||||
<Temperature>80</Temperature>
|
||||
<WindSpeed>0</WindSpeed>
|
||||
</LaunchSite>
|
||||
<Recovery>
|
||||
<Altitude1>1000</Altitude1>
|
||||
<Altitude2>600</Altitude2>
|
||||
<DeviceType1>Parachute</DeviceType1>
|
||||
<DeviceType2>Parachute</DeviceType2>
|
||||
<Event1>True</Event1>
|
||||
<Event2>True</Event2>
|
||||
<Size1>12</Size1>
|
||||
<Size2>24</Size2>
|
||||
<EventType1>Apogee</EventType1>
|
||||
<EventType2>Altitude</EventType2>
|
||||
<CD1>0.8</CD1>
|
||||
<CD2>0.8</CD2>
|
||||
</Recovery>
|
||||
<MachAlt />
|
||||
<SimulationList>
|
||||
<Simulation>
|
||||
<SustainerEngine>J90W (AT)</SustainerEngine>
|
||||
<SustainerLaunchWt>4.06</SustainerLaunchWt>
|
||||
<SustainerNozzleDiameter>0</SustainerNozzleDiameter>
|
||||
<SustainerCG>35.96</SustainerCG>
|
||||
<SustainerIgnitionDelay>0</SustainerIgnitionDelay>
|
||||
<Booster1Engine>I170G (AT)</Booster1Engine>
|
||||
<Booster1LaunchWt>5.64</Booster1LaunchWt>
|
||||
<Booster1SeparationDelay>2</Booster1SeparationDelay>
|
||||
<Booster1IgnitionDelay>0</Booster1IgnitionDelay>
|
||||
<Booster1CG>43.06</Booster1CG>
|
||||
<Booster1NozzleDiameter>0</Booster1NozzleDiameter>
|
||||
<IncludeBooster1>True</IncludeBooster1>
|
||||
<Booster2LaunchWt>0</Booster2LaunchWt>
|
||||
<Booster2Delay>0</Booster2Delay>
|
||||
<Booster2CG>0</Booster2CG>
|
||||
<Booster2NozzleDiameter>0</Booster2NozzleDiameter>
|
||||
<IncludeBooster2>False</IncludeBooster2>
|
||||
<FlightTime>0</FlightTime>
|
||||
<TimetoApogee>16.75019</TimetoApogee>
|
||||
<MaxAltitude>4351.988</MaxAltitude>
|
||||
<MaxVelocity>577.8134</MaxVelocity>
|
||||
<OptimumWt>0</OptimumWt>
|
||||
<OptimumMaxAlt>0</OptimumMaxAlt>
|
||||
</Simulation>
|
||||
<Simulation>
|
||||
<SustainerEngine>J180T (AT)</SustainerEngine>
|
||||
<SustainerLaunchWt>3.97</SustainerLaunchWt>
|
||||
<SustainerNozzleDiameter>0</SustainerNozzleDiameter>
|
||||
<SustainerCG>35.72</SustainerCG>
|
||||
<SustainerIgnitionDelay>0</SustainerIgnitionDelay>
|
||||
<Booster1Engine>I215R (AT)</Booster1Engine>
|
||||
<Booster1LaunchWt>5.54</Booster1LaunchWt>
|
||||
<Booster1SeparationDelay>2</Booster1SeparationDelay>
|
||||
<Booster1IgnitionDelay>0</Booster1IgnitionDelay>
|
||||
<Booster1CG>42.95</Booster1CG>
|
||||
<Booster1NozzleDiameter>0</Booster1NozzleDiameter>
|
||||
<IncludeBooster1>True</IncludeBooster1>
|
||||
<Booster2LaunchWt>0</Booster2LaunchWt>
|
||||
<Booster2Delay>0</Booster2Delay>
|
||||
<Booster2CG>0</Booster2CG>
|
||||
<Booster2NozzleDiameter>0</Booster2NozzleDiameter>
|
||||
<IncludeBooster2>False</IncludeBooster2>
|
||||
<FlightTime>0</FlightTime>
|
||||
<TimetoApogee>15.07016</TimetoApogee>
|
||||
<MaxAltitude>4358.963</MaxAltitude>
|
||||
<MaxVelocity>717.1073</MaxVelocity>
|
||||
<OptimumWt>0</OptimumWt>
|
||||
<OptimumMaxAlt>0</OptimumMaxAlt>
|
||||
</Simulation>
|
||||
</SimulationList>
|
||||
</RASAeroDocument>
|
@ -153,7 +153,7 @@ public class RASAeroLoaderTest extends BaseTestCase {
|
||||
}
|
||||
|
||||
/**
|
||||
* Test whether we can load a very complex rocket with practically all RASAero features.
|
||||
* Test whether we can load a very complex, unrealistic rocket with practically all RASAero features.
|
||||
*/
|
||||
@Test
|
||||
public void testShowRocket() {
|
||||
@ -175,4 +175,30 @@ public class RASAeroLoaderTest extends BaseTestCase {
|
||||
}
|
||||
assertEquals(5, loader.getWarnings().size());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a complex two-stage rocket with practically all RASAero features.
|
||||
*/
|
||||
@Test
|
||||
public void testComplexTwoStageRocket() {
|
||||
RASAeroLoader loader = new RASAeroLoader();
|
||||
InputStream stream = this.getClass().getResourceAsStream("Complex.Two-Stage.CDX1");
|
||||
assertNotNull("Could not open Complex.Two-Stage.CDX1", stream);
|
||||
try {
|
||||
OpenRocketDocument doc = OpenRocketDocumentFactory.createEmptyRocket();
|
||||
DocumentLoadingContext context = new DocumentLoadingContext();
|
||||
context.setOpenRocketDocument(doc);
|
||||
context.setMotorFinder(new DatabaseMotorFinder());
|
||||
loader.loadFromStream(context, new BufferedInputStream(stream), null);
|
||||
Rocket rocket = doc.getRocket();
|
||||
assertNotNull(rocket);
|
||||
|
||||
// TODO: fetch components and test their parameters
|
||||
} catch (IllegalStateException ise) {
|
||||
fail(ise.getMessage());
|
||||
} catch (RocketLoadException | IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
assertEquals(5, loader.getWarnings().size());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user