Description
Interface for the mission of an aircraft using the Aviator propagator.
Public Methods
Public Properties
AtmosphereModel | Get the mission atmosphere model. |
Configuration | Get the aircraft's configuration for the mission. |
IsValid | Check whether the mission is valid. Calling this property will propagate the mission. |
Phases | Get the mission phases. |
Vehicle | Gets or sets the vehicle used in the mission. |
WindModel | Get the mission wind model. |
CoClasses that Implement IAgAvtrMission
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;
|
|
Configure the weather and atmosphere of the Mission
[C#] |
---|
// Get the wind model used for the mission
IAgAvtrWindModel windModel = mission.WindModel;
// Let's use the mission model
windModel.WindModelSource = AgEAvtrWindAtmosModelSource.eMissionModel;
// Let's use constant wind
windModel.WindModelType = AgEAvtrWindModelType.eConstantWind;
// Get the constant wind model options
IAgAvtrWindModelConstant constantWind = windModel.ModeAsConstant;
// Set the wind bearing
constantWind.WindBearing = 30;
// Set the wind speed
constantWind.WindSpeed = 5;
// Get the atmosphere model used for the mission
IAgAvtrAtmosphereModel atmosphere = mission.AtmosphereModel;
// Let's use the mission model
atmosphere.AtmosphereModelSource = AgEAvtrWindAtmosModelSource.eMissionModel;
// Get the basic atmosphere options
IAgAvtrAtmosphereModelBasic basicAtmosphere = atmosphere.ModeAsBasic;
// Use standard 1976 atmosphere
basicAtmosphere.BasicModelType = AgEAvtrAtmosphereModel.eStandard1976;
// Opt to override the values
basicAtmosphere.UseNonStandardAtmosphere = true;
// Override the temperature
basicAtmosphere.Temperature = 290;
|
|
Set the aircraft used for the mission to an aircraft found in the Aviator catalog
[C#] |
---|
// Get the Aviator catalog
IAgAvtrCatalog catalog = propagator.AvtrCatalog;
// Get the aircraft category
IAgAvtrAircraftCategory category = catalog.AircraftCategory;
// Get the user aircraft models
IAgAvtrAircraftModels aircraftModels = category.AircraftModels;
// Get the basic fighter
IAgAvtrAircraft fighter = aircraftModels.GetAircraft("Basic Fighter");
// Get the mission
IAgAvtrMission mission = propagator.AvtrMission;
// Set the vehicle used for the mission
mission.Vehicle = fighter as IAgAvtrVehicle;
|
|
Add and remove procedures
[C#] |
---|
// Add a takeoff procedure with a runway as a site. This will add the procedure
IAgAvtrProcedure takeoff = procedures.Add(AgEAvtrSiteType.eSiteRunway, AgEAvtrProcedureType.eProcTakeoff);
// Add a procedure at a given index (starting from 0)
IAgAvtrProcedure enroute = procedures.AddAtIndex(1, AgEAvtrSiteType.eSiteEndOfPrevProcedure, AgEAvtrProcedureType.eProcEnroute);
// Make sure to propagate the mission to calculate the route
propagator.Propagate();
// Get the mission
IAgAvtrMission mission = propagator.AvtrMission;
// Check to see if the mission is valid (must first be propagated)
bool isValid = mission.IsValid;
// Get the number of procedures
int procedureCount = procedures.Count;
// Remove the procedure at the given index
procedures.RemoveAtIndex(1);
// Remove the given procedure
procedures.Remove(takeoff);
// Propagate the mission
propagator.Propagate();
|
|
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
|
|
Configure the weather and atmosphere of the Mission
[Visual Basic .NET] |
---|
' Get the wind model used for the mission
Dim windModel As IAgAvtrWindModel = mission.WindModel
' Let's use the mission model
windModel.WindModelSource = AgEAvtrWindAtmosModelSource.eMissionModel
' Let's use constant wind
windModel.WindModelType = AgEAvtrWindModelType.eConstantWind
' Get the constant wind model options
Dim constantWind As IAgAvtrWindModelConstant = windModel.ModeAsConstant
' Set the wind bearing
constantWind.WindBearing = 30
' Set the wind speed
constantWind.WindSpeed = 5
' Get the atmosphere model used for the mission
Dim atmosphere As IAgAvtrAtmosphereModel = mission.AtmosphereModel
' Let's use the mission model
atmosphere.AtmosphereModelSource = AgEAvtrWindAtmosModelSource.eMissionModel
' Get the basic atmosphere options
Dim basicAtmosphere As IAgAvtrAtmosphereModelBasic = atmosphere.ModeAsBasic
' Use standard 1976 atmosphere
basicAtmosphere.BasicModelType = AgEAvtrAtmosphereModel.eStandard1976
' Opt to override the values
basicAtmosphere.UseNonStandardAtmosphere = True
' Override the temperature
basicAtmosphere.Temperature = 290
|
|
Set the aircraft used for the mission to an aircraft found in the Aviator catalog
[Visual Basic .NET] |
---|
' Get the Aviator catalog
Dim catalog As IAgAvtrCatalog = propagator.AvtrCatalog
' Get the aircraft category
Dim category As IAgAvtrAircraftCategory = catalog.AircraftCategory
' Get the user aircraft models
Dim aircraftModels As IAgAvtrAircraftModels = category.AircraftModels
' Get the basic fighter
Dim fighter As IAgAvtrAircraft = aircraftModels.GetAircraft("Basic Fighter")
' Get the mission
Dim mission As IAgAvtrMission = propagator.AvtrMission
' Set the vehicle used for the mission
mission.Vehicle = TryCast(fighter, IAgAvtrVehicle)
|
|
Add and remove procedures
[Visual Basic .NET] |
---|
' Add a takeoff procedure with a runway as a site. This will add the procedure
Dim takeoff As IAgAvtrProcedure = procedures.Add(AgEAvtrSiteType.eSiteRunway, AgEAvtrProcedureType.eProcTakeoff)
' Add a procedure at a given index (starting from 0)
Dim enroute As IAgAvtrProcedure = procedures.AddAtIndex(1, AgEAvtrSiteType.eSiteEndOfPrevProcedure, AgEAvtrProcedureType.eProcEnroute)
' Make sure to propagate the mission to calculate the route
propagator.Propagate()
' Get the mission
Dim mission As IAgAvtrMission = propagator.AvtrMission
' Check to see if the mission is valid (must first be propagated)
Dim isValid As Boolean = mission.IsValid
' Get the number of procedures
Dim procedureCount As Integer = procedures.Count
' Remove the procedure at the given index
procedures.RemoveAtIndex(1)
' Remove the given procedure
procedures.Remove(takeoff)
' Propagate the mission
propagator.Propagate()
|
|
Add and remove procedures
[Python - STK API] |
---|
# IAgAvtrProcedureCollection procedures: Procedure Collection object
# IAgAvtrPropagator propagator: Aviator Propagator object
# Add a takeoff procedure with a runway as a site. This will add the procedure
takeoff = procedures.Add(AgEAvtrSiteType.eSiteRunway, AgEAvtrProcedureType.eProcTakeoff)
# Add a procedure at a given index (starting from 0)
enroute = procedures.AddAtIndex(1, AgEAvtrSiteType.eSiteEndOfPrevProcedure, AgEAvtrProcedureType.eProcEnroute)
# Make sure to propagate the mission to calculate the route
propagator.Propagate()
# Get the mission
mission = propagator.AvtrMission
# Check to see if the mission is valid (must first be propagated)
isValid = mission.IsValid
# Get the number of procedures
procedureCount = procedures.Count
# Remove the procedure at the given index
procedures.RemoveAtIndex(1)
# Remove the given procedure
procedures.Remove(takeoff)
# Propagate the mission
propagator.Propagate()
|
|
Configure the weather and atmosphere of the Mission
[Python - STK API] |
---|
# IAgAvtrMission mission: Aviator Mission object
# Get the wind model used for the mission
windModel = mission.WindModel
# Let's use the mission model
windModel.WindModelSource = AgEAvtrWindAtmosModelSource.eMissionModel
# Let's use constant wind
windModel.WindModelType = AgEAvtrWindModelType.eConstantWind
# Get the constant wind model options
constantWind = windModel.ModeAsConstant
# Set the wind bearing
constantWind.WindBearing = 30
# Set the wind speed
constantWind.WindSpeed = 5
# Get the atmosphere model used for the mission
atmosphere = mission.AtmosphereModel
# Let's use the mission model
atmosphere.AtmosphereModelSource = AgEAvtrWindAtmosModelSource.eMissionModel
# Get the basic atmosphere options
basicAtmosphere = atmosphere.ModeAsBasic
# Use standard 1976 atmosphere
basicAtmosphere.BasicModelType = AgEAvtrAtmosphereModel.eStandard1976
# Opt to override the values
basicAtmosphere.UseNonStandardAtmosphere = True
# Override the temperature
basicAtmosphere.Temperature = 290
|
|
Set the aircraft used for the mission to an aircraft found in the Aviator catalog
[Python - STK API] |
---|
# IAgAvtrPropagator propagator: Aviator Propagator object
# Get the Aviator catalog
catalog = propagator.AvtrCatalog
# Get the aircraft category
category = catalog.AircraftCategory
# Get the user aircraft models
aircraftModels = category.AircraftModels
# Get the basic fighter
fighter = aircraftModels.GetAircraft('Basic Fighter')
# Get the mission
mission = propagator.AvtrMission
# Set the vehicle used for the mission
mission.Vehicle = fighter
|
|
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;
|
|
Configure the weather and atmosphere of the Mission
[MATLAB] |
---|
% IAgAvtrMission mission: Aviator Mission object
% Get the wind model used for the mission
windModel = mission.WindModel;
% Let's use the mission model
windModel.WindModelSource = 'eMissionModel';
% Let's use constant wind
windModel.WindModelType = 'eConstantWind';
% Get the constant wind model options
constantWind = windModel.ModeAsConstant;
% Set the wind bearing
constantWind.WindBearing = 30;
% Set the wind speed
constantWind.WindSpeed = 5;
% Get the atmosphere model used for the mission
atmosphere = mission.AtmosphereModel;
% Let's use the mission model
atmosphere.AtmosphereModelSource = 'eMissionModel';
% Get the basic atmosphere options
basicAtmosphere = atmosphere.ModeAsBasic;
% Use standard 1976 atmosphere
basicAtmosphere.BasicModelType = 'eStandard1976';
% Opt to override the values
basicAtmosphere.UseNonStandardAtmosphere = 1;
% Override the temperature
basicAtmosphere.Temperature = 290;
|
|
Set the aircraft used for the mission to an aircraft found in the Aviator catalog
[MATLAB] |
---|
% IAgAvtrPropagator propagator: Aviator Propagator object
% Get the Aviator catalog
catalog = propagator.AvtrCatalog;
% Get the aircraft category
category = catalog.AircraftCategory;
% Get the user aircraft models
aircraftModels = category.AircraftModels;
% Get the basic fighter
fighter = aircraftModels.GetAircraft("Basic Fighter");
% Get the mission
mission = propagator.AvtrMission;
% Set the vehicle used for the mission
mission.Vehicle = fighter;
|
|
Add and remove procedures
[MATLAB] |
---|
% IAgAvtrProcedureCollection procedures: Procedure Collection object
% IAgAvtrPropagator propagator: Aviator Propagator object
% Add a takeoff procedure with a runway as a site. This will add the procedure
takeoff = procedures.Add('eSiteRunway', 'eProcTakeoff');
% Add a procedure at a given index (starting from 0)
enroute = procedures.AddAtIndex(1, 'eSiteEndOfPrevProcedure', 'eProcEnroute');
% Make sure to propagate the mission to calculate the route
propagator.Propagate();
% Get the mission
mission = propagator.AvtrMission;
% Check to see if the mission is valid (must first be propagated)
isValid = mission.IsValid;
% Get the number of procedures
procedureCount = procedures.Count;
% Remove the procedure at the given index
procedures.RemoveAtIndex(1);
% Remove the given procedure
procedures.Remove(takeoff);
% Propagate the mission
propagator.Propagate();
|
|