STK AviatorSend comments on this topic.
IAgAvtrConfiguration Interface

Description

Interface used to change an aircraft's configuration for an Aviator mission.

Public Methods

Public Method GetStationsGet a collection of the aircraft's payload stations.
Public Method PasteConfigurationPaste the aircraft's configuration.
Public Method SaveSave.
Public Method SetEmptyCGSet the aircraft's Empty CG position.

Public Properties

Public Property BaseDragIndexThe base drag index of the aircraft.
Public Property EmptyCGXThe X value of the aircraft's Empty CG position.
Public Property EmptyCGYThe Y value of the aircraft's Empty CG position.
Public Property EmptyCGZThe Z value of the aircraft's Empty CG position.
Public Property EmptyWeightThe empty weight of the aircraft.
Public Property InitialFuelStateThe initial fuel state of the aircraft.
Public Property MaxLandingWeightThe max landing weight of the aircraft.
Public Property TotalCapacityThe total fuel capacity of the aircraft.
Public Property TotalCGXThe X value of the aircraft's Total CG position.
Public Property TotalCGYThe Y value of the aircraft's Total CG position.
Public Property TotalCGZThe Z value of the aircraft's Total CG position.
Public Property TotalDragIndexThe total drag index of the aircraft.
Public Property TotalWeightThe total weight of the aircraft.
Public Property TotalWeightMaxFuelThe total weight of the aircraft with all fuel tanks full.

CoClasses that Implement IAgAvtrConfiguration

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;


        
© 2023 Analytical Graphics, Inc. All Rights Reserved.