UsingVehicleClass 4.5.1 : Différence entre versions
De Wiki
(Page créée avec « <syntaxhighlight lang="java"> public class UsingVehicleClass { public static void main(String[] args) throws PatriusException { Vehicle veh = new Veh... ») |
(Aucune différence)
|
Version actuelle en date du 17 août 2020 à 09:16
public class UsingVehicleClass { public static void main(String[] args) throws PatriusException { Vehicle veh = new Vehicle(); // Dry mass final double dryMass = 1000.; veh.setDryMass(dryMass); // Shape : A vehicle object must have a main shape ! final double lref = 1.; veh.setMainShape(new Sphere(Vector3D.ZERO, lref)); // Getting the corresponding assembly final Assembly assembly = veh.createAssembly(FramesFactory.getCIRF()); // Getting the corresponding mass model (useful for propagation, maneuvres, ...) final MassProvider mm = new MassModel(assembly); System.out.println("Name of the main part: " + assembly.getMainPart().getName()); System.out.println("Total mass: " + mm.getTotalMass()); } }