VehicleWithMassProperty 4.5.1
De Wiki
Révision de 17 août 2020 à 09:16 par Admin (discussion | contributions) (Page créée avec « <syntaxhighlight lang="java"> public class VehicleWithMassProperty { →* * @param args * @throws OrekitException : public static void main(String... »)
public class VehicleWithMassProperty { /** * @param args * @throws OrekitException */ public static void main(String[] args) throws PatriusException { // Using an assembly builder final AssemblyBuilder builder = new AssemblyBuilder(); // Main part (the only one in this example) final double dryMass = 1000.; builder.addMainPart("MAIN"); builder.addProperty(new MassProperty(dryMass), "MAIN"); // Getting the corresponding assembly final Assembly assembly = builder.returnAssembly(); // 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()); } }