STK ObjectsSend comments on this topic.
AddTrack Method (IAgMtoTrackCollection)
See Also
TrackId
The TrackID must be larger than all other TrackIDs existing for
the MTO.
TimeVals
LatVals
LonVals
AltVals
Windows





Windows & Linux

Description

Adds a new track with the specified point data.

Syntax

[Visual Basic .NET]
Public Function AddTrack( _
    ByVal TrackId As Integer, _
    ByVal TimeVals As System.Array, _
    ByVal LatVals As System.Array, _
    ByVal LonVals As System.Array, _
    ByVal AltVals As System.Array _
) As IAgMtoTrack
[C#]
public IAgMtoTrack AddTrack(
    int TrackId,
    System.Array TimeVals,
    System.Array LatVals,
    System.Array LonVals,
    System.Array AltVals
);
[Managed C++]
public: IAgMtoTrack^ AddTrack(
    int TrackId,
    System::Array ^ TimeVals,
    System::Array ^ LatVals,
    System::Array ^ LonVals,
    System::Array ^ AltVals
);
[Unmanaged C++]
public: HRESULT AddTrack(
    long TrackId,
    SAFEARRAY * * TimeVals,
    SAFEARRAY * * LatVals,
    SAFEARRAY * * LonVals,
    SAFEARRAY * * AltVals,
    IAgMtoTrack ** ppIAgMtoTrack
);
[Java]
public IAgMtoTrack addTrack(
    int TrackId,
    AgSafeArray TimeVals,
    AgSafeArray LatVals,
    AgSafeArray LonVals,
    AgSafeArray AltVals
);
[Python - STK API ]
def AddTrack(self, TrackId:int, TimeVals:list, LatVals:list, LonVals:list, AltVals:list) -> "IAgMtoTrack":

Parameters

TrackId
The TrackID must be larger than all other TrackIDs existing for
the MTO.
TimeVals
LatVals
LonVals
AltVals

See Also

Example

Add MTO track
[C#]
IAgMtoTrackCollection trackCollection = mto.Tracks;

Array time = new object[]
             {
                 "1 Jan 2012 12:10:00.000", "1 Jan 2012 12:20:00.000"
             };
Array latitude = new object[]
                 {
                     27.97, -26.51
                 };
Array longitude = new object[]
                  {
                      -80.01, 119.42
                  };
Array altitude = new object[]
                 {
                     20.1, 44.2
                 };

// AddTrack expects each safe array parameter to be two dimensional,
// all arrays must have the same length
IAgMtoTrack track = trackCollection.AddTrack(1, ref time, ref latitude, ref longitude, ref altitude);
Load MTO track points from file
[C#]
// LoadPoints expects the path an Ephemeris file path
track.Points.LoadPoints(filePath);
Add MTO track
[Visual Basic .NET]
Dim trackCollection As IAgMtoTrackCollection = mto.Tracks

Dim time As Array = New Object() {"1 Jan 2012 12:10:00.000", "1 Jan 2012 12:20:00.000"}
Dim latitude As Array = New Object() {27.97, -26.51}
Dim longitude As Array = New Object() {-80.01, 119.42}
Dim altitude As Array = New Object() {20.1, 44.2}

' AddTrack expects each safe array parameter to be two dimensional,
' all arrays must have the same length
Dim track As IAgMtoTrack = trackCollection.AddTrack(1, time, latitude, longitude, altitude)
Load MTO track points from file
[Visual Basic .NET]
' LoadPoints expects the path an Ephemeris file path
track.Points.LoadPoints(filePath)
© 2024 Analytical Graphics, Inc. All Rights Reserved.