STK ObjectsSend comments on this topic.
IAgFacility Interface

Description

Provides access to the properties and methods used in defining a facility object.

Public Methods

Public Method GetAzElMaskMethod to get the az-el mask. A member of the AgEAzElMaskType enumeration.
Public Method GetAzElMaskDataMethod to get az-el mask data.
Public Method ResetAzElMaskMethod to reset the az-el mask.
Public Method SetAzElMaskMethod to set an az-el mask. A member of the AgEAzElMaskType enumeration.

Public Properties

Public Property AccessConstraintsGet the constraints imposed on the facility.
Public Property AltRefThe altitude reference of the object.
Public Property AtmosphereThis property is deprecated. The new RFEnvironment property can be used to configure atmospheric models.
Public Property GraphicsGet the 2D Graphics properties of the facility.
Public Property HeightAboveGroundHeight of facility above its model of the ground. Height is measured along the normal to surface defined by reference ellipsoid of the central body. Facility models the ground as an ellipsoid passing through the ground position. Uses Distance Dimension.
Public Property LaserEnvironmentGets the laser environment.
Public Property LightingMaxStepThe maximum step size to use when computing lighting. Only applies (and only can be set) when LightingObstructionModel is eLightingObstructionAzElMask or eLightingObstructionTerrain. Uses Time Dimension.
Public Property LightingObstructionModelThe obstruction model used in lighting computations.
Public Property LocalTimeOffsetThe amount of the time offset from GMT, if this option is used. Uses Time Dimension.
Public Property MaxRangeWhenComputingAzElMaskThe maximum range to use when computing the az el mask using terrain data. Zero indicates to use algorithm default. Only applies when GetAzElMask returns eTerrainData (cannot be set if eMaskFile). Uses Distance Dimension.
Public Property PositionGet the position of the facility.
Public Property RadarClutterMapReturns the radar clutter map.
Public Property RadarCrossSectionReturns the radar cross sectoin.
Public Property RFEnvironmentGets the RF environment.
Public Property SaveTerrainMaskDataInBinarySave terrain az-el mask data in binary.
Public Property TerrainNormThe method for determining the normal to the local terrain.
Public Property TerrainNormDataData used in specifying terrain slope.
Public Property UseLocalTimeOffsetOpt whether to use a local time offset from GMT.
Public Property UseTerrainOpt whether to set altitude automatically by using terrain data.
Public Property VOGet the 3D Graphics properties of the facility.

Interfaces

CoClasses that Implement IAgFacility

Example

Create a facility (on current scenario central body)
[C#]
// Create a facility on current scenario central body
IAgFacility facility = root.CurrentScenario.Children.New(AgESTKObjectType.eFacility, "MyFacility") as IAgFacility;
Create a facility on Earth at lat/lon/alt
[C#]
IAgFacility facility = root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.eFacility, "MyFacility", "Earth") as IAgFacility;

// Assuming unit preferences are set to radians for latitude and longitude and km for distance
facility.Position.AssignPlanetodetic(0.4506, -1.4011, 4); 
Create a facility on specified central body at lat/lon/alt
[C#]
IAgFacility facObject = root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.eFacility, "Facility1", "Mars") as IAgFacility;

// Assuming unit preferences are set to radians for latitude and longitude and km for distance
facObject.Position.AssignPlanetodetic(-5.4245, 0.1902, 0);
Create a facility from facility database
[C#]
// Get STK database location using Connect
IAgExecCmdResult result = root.ExecuteCommand("GetDirectory / Database Facility");
string facDataDir = result[0];
string filelocation = Path.Combine(facDataDir, @"stkFacility.fd");

// Import object from database using Connect
string command = "ImportFromDB * Facility \"" + filelocation + "\" Class Facility SiteName Weilheim";
root.ExecuteCommand(command);

IAgFacility facility = root.GetObjectFromPath("Facility/Weilheim") as IAgFacility;
Create a facility (on current scenario central body)
[Visual Basic .NET]
' Create a facility on current scenario central body
Dim facility As IAgFacility = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eFacility, "MyFacility"), IAgFacility)
Create a facility on Earth at lat/lon/alt
[Visual Basic .NET]
Dim facility As IAgFacility = TryCast(root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.eFacility, "MyFacility", "Earth"), IAgFacility)

' Assuming unit preferences are set to radians for latitude and longitude and km for distance
facility.Position.AssignPlanetodetic(0.4506, -1.4011, 4)
Create a facility on specified central body at lat/lon/alt
[Visual Basic .NET]
Dim facObject As IAgFacility = TryCast(root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.eFacility, "Facility1", "Mars"), IAgFacility)

' Assuming unit preferences are set to radians for latitude and longitude and km for distance
facObject.Position.AssignPlanetodetic(-5.4245, 0.1902, 0)
Create a facility from facility database
[Visual Basic .NET]
' Get STK database location using Connect
Dim result As IAgExecCmdResult = root.ExecuteCommand("GetDirectory / Database Facility")
Dim facDataDir As String = result(0)
Dim filelocation As String = Path.Combine(facDataDir, "stkFacility.fd")

' Import object from database using Connect
Dim command As String = "ImportFromDB * Facility """ + filelocation + """ Class Facility SiteName Weilheim"
root.ExecuteCommand(command)

Dim facility As IAgFacility = TryCast(root.GetObjectFromPath("Facility/Weilheim"), IAgFacility)
Create a facility (on the current scenario central body)
[Python - STK API]
# IAgStkObjectRoot root: STK Object Model Root
facility = root.CurrentScenario.Children.New(AgESTKObjectType.eFacility, 'MyFacility')

Set the geodetic position of the facility
[Python - STK API]
# IAgFacility facility: Facility Object
facility.Position.AssignGeodetic(41.9849, 21.4039, 0)  # Latitude, Longitude, Altitude

# Set altitude to height of terrain
facility.UseTerrain = True

# Set altitude to a distance above the ground
facility.HeightAboveGround = .05   # km

Add an AzEl Mask to a Facility
[Python - STK API]
# IAgFacility facility: Facility Object
facility.SetAzElMask(AgEAzElMaskType.eTerrainData, 0)

Create a facility (on the current scenario central body)
[MATLAB]
% IAgStkObjectRoot root: STK Object Model Root
facility = root.CurrentScenario.Children.New('eFacility', 'MyFacility');


        
Set the geodetic position of the facility
[MATLAB]
% IAgFacility facility: Facility Object
facility.Position.AssignGeodetic(41.9849, 21.4039, 0) % Latitude, Longitude, Altitude

% Set altitude to height of terrain
facility.UseTerrain = true;

% Set altitude to a distance above the ground
facility.HeightAboveGround = .05;   % km


        
Add an AzEl Mask to a Facility
[MATLAB]
% IAgFacility facility: Facility Object
facility.SetAzElMask('eTerrainData', 0);


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.