Configuration
After connecting to SOLIS, you are able to configure a spacecraft via automation. This example will use the Automation scenario from the "ExampleScenarios" folder provided in C:\ProgramData\AGI\STK 12\SOLIS\
. To follow along, click the Configuration Manager to force SOLIS to generate the default objects, if not done already. Select your desired language for connection and follow the provided steps:
Windows PowerShell
List Factories
List names of Factories for Satellite SOLISSat
.
$sat.FactoryNames # List names of Factories
List Accessors, Mutators, and Functions
List names of Accessors, Mutators, and Functions for Factory FSW_Ephemeris
$factory = $sat.GetFactory("FSW_Ephemeris"); # Get FSW_Ephemeris Factory
$factory.AccessorNames # List Accessors for FSW_Ephemeris Factory
$factory.MutatorNames # List Mutators for FSW_Ephemeris Factory
$factory.FunctionNames # List Functions for FSW_Ephemeris Factory
Get Factory Function
Get the factory functions for AddEphemTarget
and see the first argument and its type.
$func = $factory.GetFunction("AddEphemTarget"); # Get AddEphemTarget Function
$func # Look at AddEphemTarget Function
$func.GetArgument(0) # Look at first argument (index, type, and units)
Create a new Configuration
On Satellite SOLISSat
, create a new Configuration called Config1
$config = $sat.GetConfiguration(); # Get the default SOLIS Configuration
$newConfig = $config.Copy("Config1"); # Create new Configuration: Config1
Python
List Factories
List names of Factories for Satellite SOLISSat
.
print(list(sat.FactoryNames)) # List names of Factories
List Accessors, Mutators, and Functions
List names of Accessors, Mutators, and Functions for Factory FSW_Ephemeris
factory = sat.GetFactory("FSW_Ephemeris") # Get FSW_Ephemeris Factory
print(list(factory.AccessorNames)) # List Accessors for FSW_Ephemeris Factory
print(list(factory.MutatorNames)) # List Mutators for FSW_Ephemeris Factory
print(list(factory.FunctionNames)) # List Functions for FSW_Ephemeris Factory
Get Factory Function
Get the factory functions for AddEphemTarget
and see the first argument and its type.
func = factory.GetFunction("AddEphemTarget") # Get AddEphemTarget Function
print(func.GetArgument(0).Type) # Show the first Argument of Function
Create a new Configuration
On Satellite SOLISSat
, create a new Configuration called Config1
config = sat.GetConfiguration() # Get the default SOLIS Configuration
newConfig = config.Copy("Config1") # Create new Configuration: Config1
C#
List Factories
List names of Factories for Satellite SOLISSat
.
foreach (var fName in sat.FactoryNames)
Console.WriteLine(fName); // List names of Factories
List Accessors, Mutators, and Functions
List names of Accessors, Mutators, and Functions for Factory FSW_Ephemeris
var factory = sat.GetFactory("FSW_Ephemeris"); // Get FSW_Ephemeris Factory
foreach (var aName in factory.AccessorNames)
Console.WriteLine(aName); // List Accessors for FSW_Ephemeris Factory
foreach (var mName in factory.MutatorNames)
Console.WriteLine(mName); // List Mutators for FSW_Ephemeris Factory
foreach (var fName in factory.FunctionNames)
Console.WriteLine(fName); // List Functions for FSW_Ephemeris Factory
Get Factory Function
Get the factory functions for AddEphemTarget
and see the first argument and its type.
var func = factory.GetFunction("AddEphemTarget"); // Get AddEphemTarget Function
Console.WriteLine(func.GetArgument(0).Type); // Show the first Argument of Function
Create a new Configuration
On Satellite SOLISSat
, create a new Configuration called Config1
var config = sat.GetConfiguration(); // Get the default SOLIS Configuration
var newConfig = config.Copy("Config1"); // Create new Configuration: Config1
MATLAB
List Factories
List names of Factories for Satellite SOLISSat
.
StringArray2CellArray(STK.SOL_Satellite.FactoryNames) % List names of Factories
List Accessors, Mutators, and Functions
List names of Accessors, Mutators, and Functions for Factory FSW_Ephemeris
factory = STK.SOL_Satellite.GetFactory('FSW_Ephemeris'); % Get FSW_Ephemeris Factory
StringArray2CellArray(factory.AccessorNames) % List Accessors for FSW_Ephemeris Factory
StringArray2CellArray(factory.MutatorNames) % List Mutators for FSW_Ephemeris Factory
StringArray2CellArray(factory.FunctionNames) % List Functions for FSW_Ephemeris Factory
Get Factory Function
Get the factory functions for AddEphemTarget
and see the first argument and its type.
func = factory.GetFunction('AddEphemTarget'); % Get AddEphemTarget Function
func.GetArgument(0).Type % Show the first Argument of Function
Create a new Configuration
On Satellite SOLISSat
, create a new Configuration called Config1
config = STK.SOL_Satellite.GetConfiguration() % Get the default SOLIS Configuration
newConfig = config.Copy('Config1') % Create new Configuration: Config1