Description
Interface used to set an aircraft's external fuel tank.
Public Properties
CoClasses that Implement IAgAvtrFuelTankExternal
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] | 
|---|
      # 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;
         |  
  |