STK ObjectsSend comments on this topic.
IAgPlace Interface

Description

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

Public Methods

Public Method GetAzElMaskGet the az-el mask. A member of the AgEAzElMaskType enumeration.
Public Method GetAzElMaskDataGet az-el mask data.
Public Method ResetAzElMaskReset the az-el mask.
Public Method SetAzElMaskSet an az-el mask. A member of the AgEAzElMaskType enumeration.

Public Properties

Public Property AccessConstraintsGet the constraints imposed on the place.
Public Property AltRefGets or sets the 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 place.
Public Property HeightAboveGroundHeight of place above its model of the ground. Height is measured along the normal to surface defined by reference ellipsoid of the central body. Place models the ground as an ellipsoid passing through the ground position. Uses Distance Dimension.
Public Property LaserEnvironmentGets the laser environment.
Public Property LightingMaxStepGets or sets the 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 LightingObstructionModelGets or sets the 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 MaxRangeWhenComputingAzElMaskGets or sets the 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 place.
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 TerrainNormGet 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 place.

Interfaces

CoClasses that Implement IAgPlace

Example

Create a place (on current scenario central body)
[C#]
// Create a place on current scenario central body
IAgPlace place = root.CurrentScenario.Children.New(AgESTKObjectType.ePlace, "MyPlace") as IAgPlace;
Create a place on Earth at lat/lon/alt
[C#]
IAgPlace place = root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.ePlace, "MyPlace", "Earth") as IAgPlace;

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

// Assuming unit preferences are set to radians for latitude and longitude and km for distance
placeObject.Position.AssignPlanetodetic(-5.4245, 0.1902, 0);
Create a place 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 Place SiteName Weilheim";
root.ExecuteCommand(command);

IAgPlace place = root.GetObjectFromPath("Place/Weilheim") as IAgPlace;
Create a place (on current scenario central body)
[Visual Basic .NET]
' Create a place on current scenario central body
Dim place As IAgPlace = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.ePlace, "MyPlace"), IAgPlace)
Create a place on Earth at lat/lon/alt
[Visual Basic .NET]
Dim place As IAgPlace = TryCast(root.CurrentScenario.Children.NewOnCentralBody(AgESTKObjectType.ePlace, "MyPlace", "Earth"), IAgPlace)

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

' Assuming unit preferences are set to radians for latitude and longitude and km for distance
placeObject.Position.AssignPlanetodetic(-5.4245, 0.1902, 0)
Create a place 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 Place SiteName Weilheim"
root.ExecuteCommand(command)

Dim place As IAgPlace = TryCast(root.GetObjectFromPath("Place/Weilheim"), IAgPlace)
© 2024 Analytical Graphics, Inc. All Rights Reserved.