STK
Using STK Connect
First, be sure to look at AGI's introductory tutorial on Connect
We can use this to quickly define components and tweak their parameters
Creating the Facilities and their Receiving Sensors
NewMulti / */Facility 5 NewYork StLouis Adelaide Nairobi Lima
New / */Facility/NewYork/Sensor NYC_Sensor
New / */Facility/StLouis/Sensor STL_Sensor
New / */Facility/Adelaide/Sensor ADL_Sensor
New / */Facility/Nairobi/Sensor NBK_Sensor
New / */Facility/Lima/Sensor LMP_Sensor
NewMulti creates many new objects of the same type. You define the object (Facility), the number (5) and then list the names of these new objects. These new objects have the default parameters for that object type
New by itself creates one object of the type (Sensor) with the name you decide (LMP_Sensor). Note that the object is in a "folder" beneath the parent: */Facility/Lima/Sensor means that the new Sensor is attached (part of) the Lima Facility. Which, of course, means you need to first create the Facility.
Note that if you try to create a New object with a name that already exists, the Connect script will halt. So if you're cutting-pasting this into a script, make sure that the definitions (below) are not part of the creating script (above).
Defining the Scenario Parameters
SetAnalysisTimePeriod * "1 Sep 2020 00:00:00.00" "8 Sep 2020 00:00:00.00"
Placing the Cities and Sensors in the right location and size
SetPosition */Facility/NewYork Geodetic 40.7142700 -74.0059700 Terrain
SetPosition */Facility/StLouis Geodetic 38.6272700 -90.1978900 Terrain
SetPosition */Facility/Adelaide Geodetic -34.9286600 138.5986300 Terrain
SetPosition */Facility/Nairobi Geodetic -1.2833300 36.8166700 Terrain
SetPosition */Facility/Lima Geodetic -12.0431800 -77.0282400 Terrain
Define */Facility/NewYork/Sensor/NYC_Sensor Conical 0 25 0 360
Define */Facility/StLouis/Sensor/STL_Sensor Conical 0 25 0 360
Define */Facility/Adelaide/Sensor/ADL_Sensor Conical 0 25 0 360
Define */Facility/Nairobi/Sensor/NBK_Sensor Conical 0 25 0 360
Define */Facility/Lima/Sensor/LMP_Sensor Conical 0 25 0 360
SetPosition moves the object to the location, in this case the Latitude, Longitude, Altitude using Geodetic coordinates. Note that you can use Terrain for altitude to set the object at the local altitude as defined by STK's terrain map.
Define allows you to define multiple parameters for a single object. In this case, we are defining the field of view for the Sensor: the inner and outer half-angle for the cone (0° and 25°, where 0° is pointing up) and the horizontal (azimuth) sweep of the cone (a full 360° in this case)
Creating a single constellation of spacecraft (6 spacecraft, one orbit)
Keep in mind that this first part just creates six spacecraft with the given names. The orbit-definition part comes next...
NewMulti / */Satellite 6 SatRing1_1 SatRing1_2 SatRing1_3 SatRing1_4 SatRing1_5 SatRing1_6
New / */Satellite/SatRing1_1/Sensor SR1_1_TX
New / */Satellite/SatRing1_2/Sensor SR1_2_TX
New / */Satellite/SatRing1_3/Sensor SR1_3_TX
New / */Satellite/SatRing1_4/Sensor SR1_4_TX
New / */Satellite/SatRing1_5/Sensor SR1_5_TX
New / */Satellite/SatRing1_6/Sensor SR1_6_TX
Setting orbit parameters
The SetState command allows us to define the orbit for each spacecraft. In this case, we're using Classical Keplerian elements and want STK to use the TwoBody model for orbit propagation. We want the spacecraft to be in the simulation for the entire time (UseScenarioInterval), to run the calculation at 60 second intervals, and we are defining moment of time where these elements are set (the epoch) as the start of the simulation (1 Sep 2020, etc.) using the J2000 definition for times/dates. The last six elements are in the command are the Keplerian elements. Watch your units (especially for semimajor axis and mean anomaly)!
<Semimajor Axis (meters)> <Eccentricity> <Inclination (degrees)> <Argument of Perigee (degrees)> <RAAN - aka Ω longitude of the ascending node (degrees)> <Mean Anomaly (degrees?!?!)>.
To put all spacecraft in the same orbit plane, make sure the first five are the same, and just vary Mean Anomaly:
SetState */Satellite/SatRing1_1 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 0
SetState */Satellite/SatRing1_2 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 60
SetState */Satellite/SatRing1_3 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 120
SetState */Satellite/SatRing1_4 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 180
SetState */Satellite/SatRing1_5 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 240
SetState */Satellite/SatRing1_6 Classical TwoBody UseScenarioInterval 60 J2000 "1 Sep 2020 00:00:00.00" 7000000 0.0 65.0 0 0 300
Define the Sensors on the Spacecraft
This follows the same process as the sensors on the facilities. In both cases, the default orientation of the sensors match our needs: the Facility sensors point straight up; the Spacecraft sensors are looking "down" from the bottom of the satellite.
Define */Satellite/SatRing1_1/Sensor/SR1_1_TX Conical 0 25 0 360
Define */Satellite/SatRing1_2/Sensor/SR1_2_TX Conical 0 25 0 360
Define */Satellite/SatRing1_3/Sensor/SR1_3_TX Conical 0 25 0 360
Define */Satellite/SatRing1_4/Sensor/SR1_4_TX Conical 0 25 0 360
Define */Satellite/SatRing1_5/Sensor/SR1_5_TX Conical 0 25 0 360
Define */Satellite/SatRing1_6/Sensor/SR1_6_TX Conical 0 25 0 360