ImpulsiveManeuverVehicleFrame 4.1

De Wiki
Aller à : navigation, rechercher
public class ImpulsiveManeuverVehicleFrame {
 
    public static void main(String[] args) throws PatriusException {
 
        // Creating a mass model with a main part and with a tank
        final AssemblyBuilder builder = new AssemblyBuilder();
 
        // Main part (dry mass)
        final double dryMass = 1000.;
        builder.addMainPart("MAIN");
        builder.addProperty(new MassProperty(dryMass), "MAIN");
 
        // Tank part (ergols mass)
        final double ergolsMass = 100.;
        builder.addPart("TANK", "MAIN", Transform.IDENTITY);
        builder.addProperty(new MassProperty(ergolsMass), "TANK");
 
        final Assembly assembly = builder.returnAssembly();
        final MassProvider mm = new MassModel(assembly);
 
        // Event corresponding to the criteria to trigger the impulsive maneuver
        // (when the S/C is at the apogee)
        final EventDetector event = new AnomalyDetector(PositionAngle.TRUE, FastMath.PI);
 
        // Creation of the impulsive maneuver (20 m/s int the x vehicle direction)
        final Vector3D deltaV = new Vector3D(20., 0., 0.);
        final double isp = 300.;
        // Warning : as the maneuver is defined in the vehicle frame,
        // it will be mandatory to define an attitude when propagating the orbit.
        final ImpulseManeuver imp = new ImpulseManeuver(event, deltaV, isp, mm, "TANK");
 
        System.out.println("DV components: "+imp.getDeltaVSat());
        System.out.println("Maneuver frame: "+imp.getFrame());
 
    }
 
}