通过COM连接STK,是将场景、卫星、地面站等作为对象,对象有很多属性、操作方法。
本文先给出查看卫星对象属性的示例。
uiap = actxserver(‘STK11.application’);
root = uiap.Personality2;
root.NewScenario(‘exam’);
sc = root.CurrentScenario;
sat = sc.Children.New(18,‘mysat’);
sat.Propagator.Propagate;
%执行sat.get即可查看对象的属性
sat.get
输出以下结果:
PropagatorType: ‘ePropagatorJ2Perturbation’
Propagator: [1x1 Interface.AGI_STK_Objects_11._IAgVePropagatorJ2Perturbation]
AttitudeType: ‘eAttitudeStandard’
AttitudeSupportedTypes: {2x2 cell}
Attitude: [1x1 Interface.AGI_STK_Objects_11._IAgVeOrbitAttitudeStandard]
MassProperties: [1x1 Interface.AGI_STK_Objects_11._IAgVeMassProperties]
PassBreak: [1x1 Interface.AGI_STK_Objects_11._IAgVePassBreak]
GroundEllipses: [1x1 Interface.AGI_STK_Objects_11.IAgVeGroundEllipsesCollection]
Graphics: [1x1 Interface.AGI_STK_Objects_11._IAgSaGraphics]
VO: [1x1 Interface.AGI_STK_Objects_11._IAgSaVO]
AccessConstraints: [1x1 Interface.AGI_STK_Objects_11.IAgAccessConstraintCollection]
Parent: [1x1 Interface.AGI_STK_Objects_11._IAgScenario]
Path: ‘/Application/STK/Scenario/exam/Satellite/mysat’
InstanceName: ‘mysat’
ClassType: ‘eSatellite’
ClassName: ‘Satellite’
Children: [1x1 Interface.AGI_STK_Objects_11.IAgStkObjectCollection]
Root: [1x1 Interface.AGI_STK_Objects_11._IAgStkObjectRoot]
DataProviders: [1x1 Interface.AGI_STK_Objects_11.IAgDataProviderCollection]
ShortDescription: ‘’
LongDescription: ‘’
HasChildren: 0
ObjectCoverage: [1x1 Interface.AGI_STK_Objects_11._IAgStkObjectCoverage]
HasBeenDeleted: 0
EclipseBodies: [1x1 Interface.AGI_STK_Objects_11._IAgVeEclipseBodies]
PropagatorSupportedTypes: {14x2 cell}
ExportTools: [1x1 Interface.AGI_STK_Objects_11._IAgSaExportTools]
ObjectFiles: {10x1 cell}
SpaceEnvironment: [1x1 Interface.AGI_STK_Objects_11._IAgVeSpEnvSpaceEnvironment]
Vgt: [1x1 Interface.AGI_STK_VGT_11._IAgCrdnProvider]
ReferenceVehicle: [1x1 Interface.AGI_STK_Objects_11._IAgLinkToObject]
RadarClutterMap: [1x1 Interface.AGI_STK_Objects_11._IAgRadarClutterMapInheritable]
RadarCrossSection: [1x1 Interface.AGI_STK_Objects_11._IAgRadarCrossSectionInheritable]
CentralBodyName: ‘Earth’
Metadata: [1x1 Interface.AGI_STK_Objects_11.IAgKeyValueCollection]