STK AviatorSend comments on this topic.
IAgAvtrPayloadStation Interface

Description

Interface used to set an aircraft's payload station.

Public Methods

Public Method AddExternalFuelTankAdd an external fuel tank to the payload station.
Public Method GetExternalFuelTankGet the external fuel tank attached to the payload station.
Public Method RemoveSubItemRemove any sub item that may be attached to the payload station.
Public Method SetPositionSet the payload station's parent relative position.

Public Properties

Public Property NameGets or sets the name of the payload station.
Public Property PositionXGet the X value of the payload station's parent relative position.
Public Property PositionYGet the Y value of the payload station's parent relative position.
Public Property PositionZGet the Z value of the payload station's parent relative position.

Interfaces

Implemented Interface
IAgAvtrStation

CoClasses that Implement IAgAvtrPayloadStation

Example

Set the Configuration used for the Mission
[C#]
// Get the configuration used for the mission
IAgAvtrConfiguration configuration = mission.Configuration;
// Set the max landing weight
configuration.MaxLandingWeight = 300000;
// Set the empty weight
configuration.EmptyWeight = 210000;
// Update the center of gravity of the aircraft when empty
configuration.SetEmptyCG(2, 0, 1);

// Get the stations
IAgAvtrStationCollection stations = configuration.GetStations();
// Check if there is an internal fuel station
bool hasInternalFuel = stations.ContainsStation("Internal Fuel");

if (hasInternalFuel)
{
    // Get the fuel tank
    IAgAvtrFuelTankInternal fuelTank = stations.GetInternalFuelTankByName("Internal Fuel");
    // Set the capacity of the fuel tank
    fuelTank.Capacity = 175000;
    // Set the initial state of the fuel tank
    fuelTank.InitialFuelState = 125000;
}

// Add a new payload station
IAgAvtrPayloadStation newPayload = stations.AddPayloadStation();
// Set the position of the payload station
newPayload.SetPosition(0, 2, 0);
// Add an external fuel tank
IAgAvtrFuelTankExternal externalTank = newPayload.AddExternalFuelTank();
// Set the empty weight of the tank
externalTank.EmptyWeight = 2000;

Set the Configuration used for the Mission
[Visual Basic .NET]
' Get the configuration used for the mission
Dim configuration As IAgAvtrConfiguration = mission.Configuration
' Set the max landing weight
configuration.MaxLandingWeight = 300000
' Set the empty weight
configuration.EmptyWeight = 210000
' Update the center of gravity of the aircraft when empty
configuration.SetEmptyCG(2, 0, 1)

' Get the stations
Dim stations As IAgAvtrStationCollection = configuration.GetStations()
' Check if there is an internal fuel station
Dim hasInternalFuel As Boolean = stations.ContainsStation("Internal Fuel")

If hasInternalFuel Then
	' Get the fuel tank
	Dim fuelTank As IAgAvtrFuelTankInternal = stations.GetInternalFuelTankByName("Internal Fuel")
	' Set the capacity of the fuel tank
	fuelTank.Capacity = 175000
	' Set the initial state of the fuel tank
	fuelTank.InitialFuelState = 125000
End If

' Add a new payload station
Dim newPayload As IAgAvtrPayloadStation = stations.AddPayloadStation()
' Set the position of the payload station
newPayload.SetPosition(0, 2, 0)
' Add an external fuel tank
Dim externalTank As IAgAvtrFuelTankExternal = newPayload.AddExternalFuelTank()
' Set the empty weight of the tank
externalTank.EmptyWeight = 2000

Set the Configuration used for the Mission
[Python - STK API]
      # IAgAvtrMission mission: Aviator Mission object
# Get the configuration used for the mission
configuration = mission.Configuration
# Set the max landing weight
configuration.MaxLandingWeight = 300000
# Set the empty weight
configuration.EmptyWeight = 210000
# Update the center of gravity of the aircraft when empty
configuration.SetEmptyCG(2, 0, 1)

# Get the stations
stations = configuration.GetStations()
# Check if there is an internal fuel station
if stations.ContainsStation('Internal Fuel') is True:
    # Get the fuel tank
    fuelTank = stations.GetInternalFuelTankByName('Internal Fuel')
    # Set the capacity of the fuel tank
    fuelTank.Capacity = 175000
    # Set the initial state of the fuel tank
    fuelTank.InitialFuelState = 125000

# Add a new payload station
newPayload = stations.AddPayloadStation()
# Set the position of the payload station
newPayload.SetPosition(0, 2, 0)
# Add an external fuel tank
externalTank = newPayload.AddExternalFuelTank()
# Set the empty weight of the tank
externalTank.EmptyWeight = 2000

Set the Configuration used for the Mission
[MATLAB]
% IAgAvtrMission mission: Aviator Mission object
% Get the configuration used for the mission
configuration = mission.Configuration;
% Set the max landing weight
configuration.MaxLandingWeight = 300000;
% Set the empty weight
configuration.EmptyWeight = 210000;
% Update the center of gravity of the aircraft when empty
configuration.SetEmptyCG(2, 0, 1);

% Get the stations
stations = configuration.GetStations();
% Check if there is an internal fuel station
hasInternalFuel = stations.ContainsStation("Internal Fuel");

if (hasInternalFuel > 0)
    % Get the fuel tank
    fuelTank = stations.GetInternalFuelTankByName("Internal Fuel");
    % Set the capacity of the fuel tank
    fuelTank.Capacity = 175000;
    % Set the initial state of the fuel tank
    fuelTank.InitialFuelState = 125000;
end

% Add a new payload station
newPayload = stations.AddPayloadStation();
% Set the position of the payload station
newPayload.SetPosition(0, 2, 0);
% Add an external fuel tank
externalTank = newPayload.AddExternalFuelTank();
% Set the empty weight of the tank
externalTank.EmptyWeight = 2000;


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.