ConfiguringtheSTKPortblock

Parent Previous Next

VisualSim                                                                                                                              


Configuring the STK_Port block

To configure the STK_Port block, right click the block and select Configure. The following window is displayed to configure the parameters.

Edit??the Parameters for STK_Port

Figure 1. Sending individual command to STK

Single file can be used to send the group of commands. The commands to be sent to the STK can also be stored in a text file. The path should be specified. For If VisualSim has been installed on Drive C, then your STK_Command_Data parameter may be like:

"ConFile /E:/VisualSim/VS/VisualSim/interfaces/stk/connect_demo_begin.txt"

Click View in the menu bar and select Simulation Cockpit (Refer Figure 2). This is an optional process to run the model. You can also run the model by clicking Run Icon or Ctrl+R.


Simulation_Cockpit

Figure 2. Simulation Cockpit


Note: Start STK manually and create a scenario before running the command. Otherwise, an error message is displayed.

New / */Satellite Sat1

This creates a new satellite in the STK tool.

Now right click the block, then click Configure, and give following values for the fields.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “New / */Satellite Sat1”

Note: If you receive an error message after entering the STK_Command_Path_Data, then check for the parameters related to this field. For example: My_Command_Name: "concontrol", My_Object_Path: "/" and My_Command_Data: "verboseon". Delete the parameter value and then enter "New / */Satellite Sat1".

To monitor the values when the command is run, click View in the menu, and select Simulation cockpit. The model can also run by clicking Play on the tool bar. After this command is passed, a new satellite is created. The following screenshot is from the STK tool.

STK-Software

Figure 3. Screenshot from STK tool

This is the third command to be entered. The Set Classical command with the following parameters is used to define the satellite's orbit using Classical (Keplerian) elements: Now right click the block, then click Configure, and give the following values for the fields. Refer figure 4.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “SetStateClassical */Satellite/Sat1 J2Perturbation \"1 Jun 2002 12:00:00.00\" \"2 Jun 2002 12:00:00.00\" 60 J2000 \"1 Jun 2002 12:00:00.00\" 7163000.137079 0.0 68.5 0.0 139.7299 360.0”

Note: If quotes occur within in a command then it should be preceded by a \ (backslash).


Figure 4. Edit Parameters for STK_Port

Run the command from the Simulation Cockpit, and monitor the values form there (Refer Figure 2). Click Play in the tool bar. Now properties for the satellite are created.

STK

Figure 5. STK tool

New / */Facility Facility1

Use the New command again to create a new facility. Right click the block and enter the following values for the fields:

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “New / */Facility Facility1”

 

STK_Port

Figure 6. Creating new facility object

STK Tool

Figure 7. STK Tool

Then define its position using the SetPostion command:

SetPosition */Facility/Facility1 Geodetic 37.9 -75.5 0.

Now right click the block, then click configure, and give following values for the fields.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “SetPosition */Facility/Facility1 Geodetic 37.9 -75.5 0”

 

STK

Figure 8. Set the position of the facility object

Click Commit to save the changes.

Run the command from the Simulation cockpit, and monitor the values or click Play in the tool bar.

Access */Facility/Facility1 */Satellite/Sat1 ON ON ON

The Access command with the following parameters is used to calculate access from the facility to the satellite:

Right click the block, select Configure, and give the following values for the fields.

  1. STK_Interface_Name: STK_Intf_Name 2.STK_Command_Path_Data: “Access */Facility/Facility1 */Satellite/Sat1 ON ON ON”
  2. STK_Command_Path_Data: “Access */Facility/Facility1 */Satellite/Sat1 ON ON ON”

 

STK

Figure 9. Set the STK_Command_Path_Data

Click Commit to save the changes.

Run the command from the simulation cockpit, and monitor the values from there, else click Play in the tool bar. The following screenshot is from the STK tool.


Software image

Figure 10. Screenshot from the STK tool

Animate * Start Forward

This command starts the animation in the STK. Now right click the block, then click configure, and give the following parameters.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “Animate * Start Forward”

 

STK

Figure 11. Set the parameter STK_Command_Path_Data

Click Commit to save the changes.

Run the command from the simulation cockpit and monitor the values. Else, click Play in the tool bar. After this is done, the animation is started in the STK tool.

Animate * Reset

The Animate command is used again to stop the animation and reset the Map window graphics:

Right click the block and select Configure. Enter the following parameters:

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: “Animate * Reset”

 

STK

Figure 12. Animate the current STK Scenario

Click Commit to save the changes.

Run the command from the Simulation cockpit and monitor the value. Else, click Play in the tool bar. This resets the animation in the STK tool.

Report */Facility/Facility1 Display "AER" */Satellite/Sat1

This creates reports and graphs from the block. Now right click the block, click Configure, and give the following parameters.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data:“Report */Facility/Facility1Display \"AER\" Satellite/Sat1”

 

STK

Figure 13. Generate report for the scenario

Click Commit to save the changes.

Run the command from the Simulation cockpit and monitor the value. Else, click Play in the tool bar. After this is done, the animation is started in the STK tool. Report is generated after execution of this command.


Figure 14. STK Tool

Entering the commands in a single file

Instead of entering the commands individually, multiple statements can be entered. Save this in VisualSim directory. For example, C:/VisualSim/VS/VisualSim/interfaces/stk. Specify the file name as connect_demo_begin.txt.

 

Demo_Text

Figure 15. Commands in a text file

Now, the STK_port block has to be configured. Right click on the block, click Configure, and enter the following parameters.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data:
"ConFile /E:/VisualSim/VS/VisualSim/interfaces/stk/connect_demo_begin.txt"  /*Change the path for your machine */

Note: If the Install Folder is different, then save it in the respective path.

STK

Figure 16. Sending sequence of commands in a file

Click Commit and run the command from the simulation cockpit to monitor the values. Else, click Play in the tool bar. After this is done, the animation is started.

Now to reset the animation, enter the following commands in a text editor and save it as connect_demo_end.txt in E:/VisualSim/VS/VisualSim/interfaces/stk (Change the path for your machine).

 

Demo_end_text

Figure 17. connect_demo_end.txt file

Now, the STK_port block has to be configured again, before selecting Play. Right click on the block and click on configure and enter the following parameters.

  1. STK_Interface_Name: STK_Intf_Name
  2. STK_Command_Path_Data: "ConFile /E:/VisualSim/VS/VisualSim/interfaces/stk/connect_demo_begin.txt"  /*Change the path for your machine */

Click Commit. Run the command from Simulation cockpit to monitor the values, click Play in the tool bar. After this is done, the animation is reset and a report is generated in the STK tool.