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





Description

Provides access to the properties and methods defining an AreaTarget object.

Object Model






Public Properties

Public Property AccessConstraints Get the constraints imposed on the area target. Basic constraints for area targets apply to all points within or along the area target. If the constraint is satisfied for at least one point, access to the area target is considered valid.
Public Property AllowObjectAccess Opt whether access to the object is constrained with respect to the entire object, as opposed to any part of it.
Public Property AreaType The method for defining the area target boundary. A member of the AgEAreaType enumeration.
Public Property AreaTypeData Get the data defining the boundary with the selected method.
Public Property AutoCentroid Opt whether to have the centroid automatically computed.
Public Property CommonTasks Common tasks associated with AreaTargets.
Public Property Graphics Get the area target's 2D Graphics properties.
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 area target centroid.
Public Property UseLocalTimeOffset Opt whether to use a local time offset from GMT.
Public Property UseTerrainData Opt whether to use terrain data for altitude updates.
Public Property VO Get the area target's 3D Graphics properties.

Example

Create an area target (on the current scenario central body)
[C#] Copy Code
// Create the AreaTarget on the current scenario central body (use 
// NewOnCentralBody to specify explicitly the central body) 
IAgAreaTarget areaTarget = root.CurrentScenario.Children.New(AgESTKObjectType.eAreaTarget, "MyAreaTarget"as IAgAreaTarget; 
 

Create an area target (on the current scenario central body)
[Visual Basic .NET] Copy Code
' Create the AreaTarget on the current scenario central body (use
' NewOnCentralBody to specify explicitly the central body)
Dim areaTarget As IAgAreaTarget = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eAreaTarget, "MyAreaTarget"), IAgAreaTarget)

Create an area target (on the current scenario central body)
[MATLAB] Copy Code
%IAgStkObjectRoot root: STK Object Model Root 
 
% Create the AreaTarget on the current scenario central body (use 
% NewOnCentralBody to specify explicitly the central body) 
areaTarget = root.CurrentScenario.Children.New('eAreaTarget', 'MyAreaTarget'); 
 
 
Set an elliptical area target
[MATLAB] Copy Code
% IAgStkObjectRoot root: STK Object Model Root 
% IAgAreaTarget areaTarget: AreaTarget object 
 
% By using the fine grained interfaces, 
% BeginUpdate/EndUpdate prevent intermediate redraws 
root.BeginUpdate(); 
areaTarget.AreaType = 'eEllipse'; 
ellipse = areaTarget.AreaTypeData; 
ellipse.SemiMajorAxis = 85.25; % in km (distance dimension) 
ellipse.SemiMinorAxis = 80.75; % in km (distance dimension) 
ellipse.Bearing = 44; % in deg (angle dimension) 
root.EndUpdate(); 
 
 
Set an elliptical area target (using common tasks)
[MATLAB] Copy Code
% IAgStkObjectRoot root: STK Object Model Root 
% IAgAreaTarget areaTarget: AreaTarget object 
 
% By using the CommonTasks interface 
areaTarget.CommonTasks.SetAreaTypeEllipse(85.25, 80.75, 44); 
 
 
Define area target boundary and position from list of lat/lon/alt
[MATLAB] Copy Code
% IAgStkObjectRoot root: STK Object Model Root 
% IAgAreaTarget areaTarget: AreaTarget object 
 
% By using the fine grained interfaces, 
% BeginUpdate/EndUpdate prevent intermediate redraws 
root.BeginUpdate(); 
areaTarget.AreaType = 'ePattern'; 
patterns = areaTarget.AreaTypeData; 
patterns.Add(48.897, 18.637); 
patterns.Add(46.534, 13.919); 
patterns.Add(44.173, 21.476); 
root.EndUpdate(); 
areaTarget.AutoCentroid = true; 
 
 
Define area target boundary and position from list of lat/lon/alt (using common tasks)
[MATLAB] Copy Code
% IAgStkObjectRoot root: STK Object Model Root 
% IAgAreaTarget areaTarget: AreaTarget object 
% Remove all points in the area target 
areaTarget.AreaTypeData.RemoveAll; 
 
% By using the CommonTasks interface, 
% make an array of lattitude and longitude boundary points 
boundary = {29, -12; 
            29, 34; 
            6, 34; 
            6, -12}; 
 
% SetAreaTypePattern expects a two dimensional array of latitude and longitude values 
areaTarget.CommonTasks.SetAreaTypePattern(boundary); 
 
 
List all points in an area target
[MATLAB] Copy Code
% IAgAreaTarget areaTarget: AreaTarget object 
if strcmp(areaTarget.AreaType,'ePattern') 
 
    % Get IAgAreaTypePatternCollection interface from AreaTypeData 
    patternPoints = areaTarget.AreaTypeData; 
 
    % ToArray returns a two dimensional array of latitude and longitude points 
    areaTargetPoints = patternPoints.ToArray(); 
 
    disp('All points in Area Target'); 
    for i= 1:length(areaTargetPoints) 
        disp(['Latitude ' num2str(areaTargetPoints{i,1}) ' Longitude: ' num2str(areaTargetPoints{i,2})]); 
    end 
end 
 
 

CoClasses that Implement IAgAreaTarget

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1