StationCollection#

class ansys.stk.core.stkobjects.aviator.StationCollection#

Class defining a collection of payload stations for an Aviator aircraft.

Overview#

item

Given an index, returns an element in the collection.

get_internal_fuel_tank_by_name

Get the internal fuel tank with the given name.

add_internal_fuel_tank

Add an internal fuel tank.

get_payload_station_by_name

Get the payload station with the given name.

add_payload_station

Add a payload station.

contains_station

Get whether the station list contains an item with the given name.

remove_station_by_name

Remove an station by name.

remove_at_index

Remove procedure at the given index.

count

Return the number of elements in a collection.

_new_enum

Return an enumerator that can iterate through the collection.

station_names

Return the station names.

Examples#

Set the Configuration used for the Mission

# Mission mission: Aviator Mission object
# Get the configuration used for the mission
configuration = mission.configuration
# Set the max landing weight
configuration.max_landing_weight = 300000
# Set the empty weight
configuration.empty_weight = 210000
# Update the center of gravity of the aircraft when empty
configuration.set_empty_cg(2, 0, 1)

# Get the stations
stations = configuration.get_stations()
# Check if there is an internal fuel station
if stations.contains_station("Internal Fuel") is True:
    # Get the fuel tank
    fuelTank = stations.get_internal_fuel_tank_by_name("Internal Fuel")
    # Set the capacity of the fuel tank
    fuelTank.capacity = 175000
    # Set the initial state of the fuel tank
    fuelTank.initial_fuel_state = 125000

# Add a new payload station
newPayload = stations.add_payload_station()
# Set the position of the payload station
newPayload.set_position(0, 2, 0)
# Add an external fuel tank
externalTank = newPayload.add_external_fuel_tank()
# Set the empty weight of the tank
externalTank.empty_weight = 2000

Import detail#

from ansys.stk.core.stkobjects.aviator import StationCollection

Property detail#

property StationCollection.count: int#

Return the number of elements in a collection.

property StationCollection._new_enum: EnumeratorProxy#

Return an enumerator that can iterate through the collection.

property StationCollection.station_names: list#

Return the station names.

Method detail#

StationCollection.item(self, index: int) IStation#

Given an index, returns an element in the collection.

Parameters:

index : int

Returns:

IStation

StationCollection.get_internal_fuel_tank_by_name(self, name: str) FuelTankInternal#

Get the internal fuel tank with the given name.

Parameters:

name : str

Returns:

FuelTankInternal

StationCollection.add_internal_fuel_tank(self) FuelTankInternal#

Add an internal fuel tank.

Returns:

FuelTankInternal

StationCollection.get_payload_station_by_name(self, name: str) PayloadStation#

Get the payload station with the given name.

Parameters:

name : str

Returns:

PayloadStation

StationCollection.add_payload_station(self) PayloadStation#

Add a payload station.

Returns:

PayloadStation

StationCollection.contains_station(self, name: str) bool#

Get whether the station list contains an item with the given name.

Parameters:

name : str

Returns:

bool

StationCollection.remove_station_by_name(self, name: str) None#

Remove an station by name.

Parameters:

name : str

Returns:

None

StationCollection.remove_at_index(self, index: int) None#

Remove procedure at the given index.

Parameters:

index : int

Returns:

None