AGI STK Objects 11 Send comments on this topic.
IAgFacility Interface





Description

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

Object Model








Public Methods

Public Method GetAzElMask Method to get the az-el mask. A member of the AgEAzElMaskType enumeration.
Public Method GetAzElMaskData Method to get az-el mask data.
Public Method ResetAzElMask Method to reset the az-el mask.
Public Method SetAzElMask Method to set an az-el mask. A member of the AgEAzElMaskType enumeration.

Public Properties

Public Property AccessConstraints Get the constraints imposed on the facility.
Public Property AltRef The altitude reference of the object.
Public Property Atmosphere The local atmosphere.
Public Property Graphics Get the 2D Graphics properties of the facility.
Public Property HeightAboveGround The height of the facility above its model of the ground. The height is measured along the normal to surface defined by reference ellipsoid of the central body. The facility models the ground as an ellipsoid passing through the ground position. Uses Distance Dimension.
Public Property LocalTimeOffset The amount of the time offset from GMT, if this option is used. Uses Time Dimension.
Public Property Position Get the position of the facility.
Public Property RadarClutterMap Returns the radar clutter map.
Public Property RadarCrossSection Returns the radar cross sectoin.
Public Property TerrainNorm The method for determining the normal to the local terrain.
Public Property TerrainNormData Data used in specifying terrain slope.
Public Property UseLocalTimeOffset Opt whether to use a local time offset from GMT.
Public Property UseTerrain Opt whether to set altitude automatically by using terrain data.
Public Property VO Get the 3D Graphics properties of the facility.

Example

Create a facility (on current scenario central body)
[C#] Copy Code
// 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#] Copy Code
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.40114); 
 

Create a facility on specified central body at lat/lon/alt
[C#] Copy Code
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.42450.19020); 
 

Create a facility from facility database
[C#] Copy Code
// Get STK database location using Connect 
<a href="STKUtil.chm::/STKUtil~AgExecCmdResult.html">AgExecCmdResult</a> 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] Copy Code
' 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] Copy Code
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] Copy Code
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] Copy Code
' Get STK database location using Connect
Dim result As AgExecCmdResult = 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)
[MATLAB] Copy Code
% IAgStkObjectRoot root: STK Object Model Root 
facility = root.CurrentScenario.Children.New('eFacility', 'MyFacility'); 
 
 
Set the geodetic position of the facility
[MATLAB] Copy Code
% 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 a AzEl Mask to a Facility
[MATLAB] Copy Code
% IAgFacility facility: Facility Object 
facility.SetAzElMask('eTerrainData',0); 
 
 

CoClasses that Implement IAgFacility

Name
AgFacility
© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1