STK AviatorSend comments on this topic.
IAgAvtrStationCollection Interface

Description

Interface used to access the list of stations for an Aviator aircraft.

Public Methods

Public Method AddInternalFuelTankAdd an internal fuel tank.
Public Method AddPayloadStationAdd a payload station.
Public Method ContainsStationGet whether the station list contains an item with the given name.
Public Method GetInternalFuelTankByNameGet the internal fuel tank with the given name.
Public Method GetPayloadStationByNameGet the payload station with the given name.
Public Method RemoveAtIndexRemove procedure at the given index.
Public Method RemoveStationByNameRemove an station by name.

Public Properties

Public Property CountReturns the number of elements in a collection.
Public Property ItemGiven an index, returns an element in the collection.
Public Property StationNamesReturns the station names.

CoClasses that Implement IAgAvtrStationCollection

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

© 2024 Analytical Graphics, Inc. All Rights Reserved.