p6dof_object_type¶
A p6dof_object_type is a critical component of a WSF_P6DOF_MOVER. It is the p6dof_object_type that defines the characteristics of the various components (mass properties, aerodynamics, propulsion, etc.) that determine how a WSF_P6DOF_MOVER will perform. A p6dof_object_type must be defined before being referenced in a WSF_P6DOF_MOVER. A p6dof_object_type may be derived from another p6dof_object_type or from P6DOF_BASE_TYPE (the base class for P6Dof object types).
- p6dof_object_type <type_name> <derived_from_object_name> … end_p6dof_object_type¶
The definition of a p6dof_object_type is performed within a p6dof_object_type block. Each p6dof_object_type defines a ‘type’ of vehicle, ranging from a simple, hand-launched drone to a complex spacecraft. A p6dof_object_type may include the definition of mass properties, primary aerodynamics, propulsion system components (including engines and fuel systems), subobjects (such as weapons, fuel tanks, etc.), sequencers (which can produce an “action” based on an “event”), controls providers (which include manual pilots, synthetic pilots, autopilots, and guidance systems), flight control systems (which determine how control inputs are routed/mixed to move control surfaces), secondary aerodynamics (which includes control surface aerodynamics), size factor parameters (which allow an object’s size to vary, such as that of a parachute or balloon), relative positioning (which defines how a subobject is positioned relative to its parent while captive), separation effects (which impart a delta-V or angular rate to a subobject when it is jettisoned from its parent), and other special properties.
p6dof_object_type F-86_Saber P6DOF_BASE_TYPE // Mass Properties mass ... moment_of_inertia_ixx ... moment_of_inertia_iyy ... moment_of_inertia_izz ... center_of_mass_x1 ... center_of_mass_y1 ... center_of_mass_z1 ... // P6DOF Mass Properties Data mass_properties ... end_mass_properties // P6DOF Aerodynamics Data aero_data ... end_aero_data aero_component ... end_aero_component // P6DOF Pilot Manager and Control Inputs pilot_manager ... end_pilot_manager // P6DOF Flight Control System Definition flight_controls ... end_flight_controls // P6DOF Propulsion System Definition propulsion_data ... end_propulsion_data // P6DOF Integrator p6dof_integrator ... // P6DOF Landing Gear landing_gear ... end_landing_gear // Fuel Transfers fuel_transfer ... end_fuel_transfer remove_fuel_transfer ... // Fuel System Modification remove_fuel_tank ... modify_fuel_quantity ... end_modify_fuel_quantity // P6DOF Subobjects subobject ... end_subobject // P6DOF Sequencers sequencer ... end_sequencer remove_sequencer ... // Parent-Relative Positioning and Separation parent_rel_x ... parent_rel_y ... parent_rel_z ... parent_rel_yaw ... parent_rel_pitch ... parent_rel_roll ... separation_vx ... separation_vy ... separation_vz ... separation_omega_x ... separation_omega_y ... separation_omega_z ... // Size Factor Parameters size_factor_radius ... size_factor_min ... size_factor_max ... size_factor_volume_rate_m3_per_sec ... size_factor_area_rate_m2_per_sec ... size_factor_radius_rate_m_per_sec ... // Special Properties use_spherical_earth ... use_rotating_earth ... ignore_jettisoned_objects ... fixed_object ... // Object Creation Support nominal_max_mach ... nominal_max_alpha ... nominal_min_alpha ... nominal_max_beta ... // Analysis Tool Support object_graphical_type_num ... object_graphical_alt_type1_num ... object_graphical_alt_type2_num ... object_graphical_alt_type3_num ... end_p6dof_object_type
Mass Properties¶
Mass properties include the mass and moments of inertia for the object when empty (no fuel or payload). Additional mass properties contributions by fuel and payload are considered separately.
- mass <mass-value>¶
The (empty) mass of the object, not including fuel.
- moment_of_inertia_ixx <angular-inertia-value>¶
The (empty) moment of inertia about the x-axis the object, not including fuel.
- moment_of_inertia_iyy <angular-inertia-value>¶
The (empty) moment of inertia about the y-axis the object, not including fuel.
- moment_of_inertia_izz <angular-inertia-value>¶
The (empty) moment of inertia about the z-axis the object, not including fuel.
- center_of_mass_x1 <length-value>¶
The empty center of mass (in the object’s x-direction) relative to the reference point.
- center_of_mass_y1 <length-value>¶
The empty center of mass (in the object’s y-direction) relative to the reference point.
- center_of_mass_z1 <length-value>¶
The empty center of mass (in the object’s z-direction) relative to the reference point.
P6DOF Integrator¶
- p6dof_integrator <string>¶
This sets the object’s integrator type to the specified name. If no integrator with the specified name exists, an exception will be thrown, since P6DOF objects cannot function without an integrator.
If no p6dof_integrator is specified, the object will use the default integrator.
Fuel Transfers¶
Typically, fuel transfers are defined within the propulsion_data block. However, when external tanks (in subobjects) are present, fuel transfers may be defined outside of the propulsion system block (but still within the p6dof_object_type block).
- fuel_transfer … end_fuel_transfer¶
Regardless of whether a fuel transfer is defined within the propulsion_data block or the p6dof_object_type block, a fuel transfer always consists of a source tank and a target tank. During runtime, the source tank will attempt to transfer fuel to the target tank, limited by the transfer rates of the two tanks.
fuel_transfer <string> source_tank ... target_tank ... end_fuel_transfer Each transfer is named, using the first argument after fuel_transfer.
Fuel System Modification¶
A fuel system can be modified (often modifying an inherited fuel system from a parent object), using the remove_fuel_tank and modify_fuel_quantity commands.
- remove_fuel_tank <string>¶
This removes the fuel tank with the specified name. If a no tank exists with the name, the command is ignored.
- modify_fuel_quantity .. end_modify_fuel_quantity¶
modify_fuel_quantity <string> fuel_quantity <mass-value> end_modify_fuel_quantity
This modifies the quantity of fuel in the fuel tank with the specified name. If a no tank exists with the name, the command is ignored.
Parent-Relative Positioning and Separation¶
The following commands specify how a subobject should be positioned relative to its parent while captive.
- parent_rel_x <length-value>¶
This specifies the x-location of the object’s reference point relative to the parent’s reference point using the parent’s body coordinate system.
Default: 0.0
- parent_rel_y <length-value>¶
This specifies the y-location of the object’s reference point relative to the parent’s reference point using the parent’s body coordinate system.
Default: 0.0
- parent_rel_z <length-value>¶
This specifies the z-location of the object’s reference point relative to the parent’s reference point using the parent’s body coordinate system.
Default: 0.0
- parent_rel_yaw <angle-value>¶
This specifies the yaw of the object about its reference point relative to the parent’s body coordinate system.
Default: 0.0
- parent_rel_pitch <angle-value>¶
This specifies the pitch of the object about its reference point relative to the parent’s body coordinate system.
- parent_rel_roll <angle-value>¶
This specifies the roll of the object about its reference point relative to the parent’s body coordinate system.
Default: 0.0
The following commands specify the perturbation that will be applied to a subobject when it is jettisoned from its parent.
- separation_vx <length-value>¶
This specifies the x-component of velocity (in parent body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
- separation_vy <length-value>¶
This specifies the y-component of velocity (in parent body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
- separation_vz <length-value>¶
This specifies the z-component of velocity (in parent body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
- separation_omega_x <length-value>¶
This specifies the x-component of angular velocity (in subobject body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
- separation_omega_y <length-value>¶
This specifies the y-component of angular velocity (in subobject body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
- separation_omega_z <length-value>¶
This specifies the z-component of angular velocity (in subobject body coordinates) that is imparted to the subobject when it separates from the parent.
Default: 0.0
Size Factor Parameters¶
The size factor parameters provide a means to adjust the size of an object. This is useful for things like parachutes or balloons which can change their size and their size determines (in part) their aerodynamic drag. Size factor supports rate of change based on radius, area, or volume. When enabled, using a sequencer action (action_enable_size_factor), the size factor will change based on the rate type selected and will “grow” or “shrink” until reaching a minimum or maximum size factor limit.
- size_factor_radius <length-value>¶
This is the “reference” radius that is the starting radius of the object. This radius is also used to calculate a reference area and a reference volume.
Default: 1.0 m
- size_factor_min <real-value>¶
This is the minimum factor (multiplier) that the reference radius is allowed to achieve.
Default: 1.0
- size_factor_max <real-value>¶
This is the maximum factor (multiplier) that the reference radius is allowed to achieve.
Default: 1.0
- size_factor_volume_rate_m3_per_sec <real-value>¶
This provides a volume-based rate of change of cubic meters per second. When volume-based mode is used, the area and radius modes should not be used.
Default: 0.0
- size_factor_area_rate_m2_per_sec <real-value>¶
This provides an area-based rate of change of square meters per second. When area-based mode is used, the volume and radius modes should not be used.
Default: 0.0
- size_factor_radius_rate_m_per_sec <real-value>¶
This provides an radius-based rate of change of meters per second. When radius-based mode is used, the volume and area modes should not be used.
Default: 0.0
Special Properties¶
Several ‘special properties’ are available to modify how a P6DOF object will behave.
- use_spherical_earth <boolean-value>¶
If ‘true’, the P6DOF object will use a spherical earth model rather than a WGS84 (oblate) earth model. This is often a useful simplification when using ballistic missiles and space launch vehicles, since it eliminates latitude issues for guidance associated with an oblate earth.
Default: false
- use_rotating_earth <boolean-value>¶
If ‘true’, the P6DOF object will use a rotating earth model rather than a non-rotating earth model. This function is not yet support/implemented.
Default: false
- ignore_jettisoned_objects <boolean-value>¶
If ‘true’, any subobjects that are jettisoned from the P6DOF object will be removed immediately and will never have an AFSIM platform. This is often used to speed up runtimes when spent stages from a ballistic missile or space launch vehicle are not needed.
Default: false
- fixed_object <boolean-value>¶
If ‘true’, the P6DOF object will not perform kinematic calculations as part of its “update” but will instead remain motionless.
Default: false
Object Creation Support¶
These commands are used by functions that will help create P6DOF models. They are used to define limits to the performance envelope.
- nominal_max_mach <real-value>¶
This defines the maximum Mach expected by the object. This does not impose a limit on performance, rather it is a hint for functions that calculate performance and/or analysis.
- nominal_max_alpha <angle-value>¶
This defines the maximum alpha (angle of attack) expected by the object. This does not impose a limit on performance, rather it is a hint for functions that calculate performance and/or analysis.
- nominal_min_alpha <angle-value>¶
This defines the minimum alpha (angle of attack) expected by the object. This does not impose a limit on performance, rather it is a hint for functions that calculate performance and/or analysis.
- nominal_max_beta <angle-value>¶
This defines the maximum beta (angle of sideslip) expected by the object. This does not impose a limit on performance, rather it is a hint for functions that calculate performance and/or analysis.
Analysis Tool Support¶
These commands may be used by analysis tools. They provide a means to indicate a graphical object that can be used to depict the object.
- object_graphical_type_num <integer-value>¶
This defines an index number for the object’s graphical type. The index number is dependent on the networked analysis tool being used. This graphical object will be the default graphical object.
- object_graphical_alt_type1_num <integer-value>¶
This defines an alternate object #1 for the object’s graphical type. The tool may use an alternate graphical object as desired and/or commanded.
- object_graphical_alt_type2_num <integer-value>¶
This defines an alternate object #2 for the object’s graphical type. The tool may use an alternate graphical object as desired and/or commanded.
- object_graphical_alt_type3_num <integer-value>¶
This defines an alternate object #3 for the object’s graphical type. The tool may use an alternate graphical object as desired and/or commanded.