ImportFromDB
Import Cities, Facilities, and Satellites from the database or Stars from a collection.
Syntax
ImportFromDB <ScenarioPath> {Type} {Source} [{Options}] {SearchParameters}
Related commands
Description
The ImportFromDB command enables you to import Cities, Facilities, and Satellites from the STK database and Stars from a Star catalog or collection. Valid values for {Type} are City, Facility, Satellite, and Star. The tables below show the details and options available for each type.
Please use caution with this command. Use the search parameters to limit the number of imported objects. If you enter a command that results in hundreds or thousands of objects being loaded, be prepared to wait until the loading is completed.
This command will Nack if no matches are found using the search criteria.
City database
The {Source} is a "<FilePath>" for the city database and should have the extension ".cd".
The first table lists the Create {Options} for the City database. None of these options is required.
Create {Options} | Description |
---|---|
Class {Facility | Place | Target} | Specify the class of the object for STK to create. The default is Facility. |
Constellation <Name> | If you include this option, then STK will place all the cities created by the command in the specified constellation. If the constellation does not exist, STK will create it. |
Rename <NewName> | If you include this option, then STK will name the imported city using the <NewName> value. If you import two or more cities, then STK will append a number (1, 2, 3, etc.) to <NewName> for each city. If you do not include this option, then by default STK will name the added cities using the CityName from the database. |
The following table describes the {SearchParameters} for the City database. You must enter at least one {SearchParameters} with the command. Values specified as <Name> are character values and can include a wildcard, for example, CityName Lon*. If the desired value contains a space, then you must enclose the <Name> in double quotes, for example, Country "Burkina Faso".
{SearchParameters} | Description |
---|---|
CityName <Name> | Enter the name of the city to be imported. |
Province <Name> | Enter the name of the Canadian province or US state in which the city is located. |
Country <Name> | Enter the name of the country in which the city is located. |
Type {"National Capital" | "Administration Center" | "Populated Place"} | Specify the type of city. |
Latitude <MinLat> <MaxLat> | Specify the minimum and maximum search limits for latitude. Enter values in degrees between -90.0 and 90.0. |
Longitude <MinLon> <MaxLon> | Specify the minimum and maximum search limits for longitude. Enter values in degrees between -180.0 and 180.0. |
Facility Database
The {Source} is a "<FilePath>" for the facility database and should have the extension ".fd".
The first table lists the Create {Options} for the Facility database. None of these options is required.
Create {Options} | Description |
---|---|
Class {Facility | Place | Target} | Specify the class of the object that you want STK to create. The default is Facility. |
Constellation <Name> | If you include this option, then STK will place all the facilities created by the command in the specified constellation. If the constellation does not exist, STK will create it. |
Rename <NewName> | If you include this option, then STK will name the imported Facility using the <NewName> value. If you import two or more facilities, then STK will append a number (1, 2, 3, etc.) to <NewName> for each facility. If you do not include this option, then by default STK will name added facilities using the SiteName from the database. |
The following table describes the {SearchParameters} for the Facility database. You must enter at least one {SearchParameters} with the command. Values specified as <Name> are character values and can include a wildcard, for example, Network NASA*. If the desired value contains a space, then you must enclose the <Name> in double quotes, for example, Network "NASA GNR".
{SearchParameters} | Description |
---|---|
SiteName <Name> | Enter the name of the facility to be imported. |
Network <NetworkName> | Enter the type of network of which the object is part, such as USAF. |
Latitude <MinLat> <MaxLat> | Specify the minimum and maximum search limits for latitude. Enter values in degrees between -90.0 and 90.0. |
Longitude <MinLon> <MaxLon> | Specify the minimum and maximum search limits for longitude. Enter values in degrees between -180.0 and 180.0. |
Altitude <MinAlt> <MaxAlt> | Specify the minimum and maximum search limits for altitude. Enter values in Connect distance units between -99999.9 meters and 99999.9 meters. |
Satellite Database
The {Source} can be any of the following or can be omitted:
{Source} | Description |
---|---|
DefaultSatDB | Tells STK to use the default Satellite database file. |
"<TLEFilePath>" | Enter the full path of an external file containing GP data (like TLEs). You can use any file containing GP element data, including TLE files (with extension .tce or .tle) and files containing CCSDS OMM content in XML, KVN (using file extension .OMM), and CSV formats.
If you use this option, the specified satellite(s) must be in both the external file and the default satellite database. STK searches the database first, and if it finds the satellite(s) then it retrieves the GP element(s) from the file. To import TLEs from a file for a satellite that is not in the database, use the ImportTLEFile (Satellites) command. |
AGIServer | Indicates that the source is the AGI Server. |
"<SatelliteDBFile>" | Enter the full path of a Satellite database file with an extension ".sd". For the TLE Source, STK will use the TLE file that it finds in the same directory and with the same name as the input <SatelliteDBFile>. |
If you do not enter a {Source}, then the command will try to select the {Source} based on the SGP4 Propagator Defaults, as follows:
If Update Mode is None, then the command will use the Default Satellite Database as the source. If Update Mode is Online, then the command will set the {Source} to AGIServer. If Update Mode is File, then the command will set the Source to File. In this case, if you do not specify a default file in Propagator Defaults, then the command will Nack. |
For information on setting SGP4 Propagator default values, refer to the SetPropagatorDefaults command or the Edit - Preferences - Propagator Defaults page in STK.
The next table lists the Source {Options} for the Satellite database. None of these options is required.
Source {Options} | Description |
---|---|
SwitchMethod {Epoch | TCA | Midpoint} | Specify the TLE epoch switch method. The default value is the value set for SGP4 Propagator Defaults. If the default SGP4 RetrieveMethod is set to First, then STK will ignore this option. |
AutoUpdate {On | Off} | The default value is the value set for SGP4 Propagator Defaults. This option is only valid if {Source} is AGIServer or "<TLEFilePath>". |
The next table lists the Create {Options} for the Satellite database. None of these options is required.
Create {Options} | Description |
---|---|
TimePeriod {TimeInterval} | Specify the time period for the satellite.
For valid {TimeInterval} values, see Time Options. |
TimeStep <Value> | Specify the time step. Enter this value in seconds. |
Routine {SGP4 | Default | <Name>} | Specify the implementation of the SGP4 propagator to be used, where SGP4 is the internal SGP4 routine implemented by STK, Default is the propagator selected in the Edit-Preferences-Propagator Defaults page, and <Name> is an installed SGP4 plugin routine, for example, ASTROSTDS_SGP4_V9.
Astro Standards routines may be available as an option if STK has been properly configured to support it. It is only available if you have obtained the official SGP4 DLL (and related files) from USSF (US Space Force) and performed a minor install procedure. STK provides an interface to the USSF SGP4 routines; contact customer support for more information. |
Propagate {On | Off} | If you enter On, then STK will propagate the imported satellites. If you enter Off, STK will not propagate the satellites. |
OutOfDateDuration {<valueInDays> | Off} | This option requires the GP element sets to have an epoch not earlier than the time interval before the propagation start interval or after the propagation stop interval. |
Constellation <Name> | If you include this option, then STK will place all the satellites created by the command in the specified constellation. If the constellation does not exist, STK will create it.
For STK 12.2 and previous, this option is only available with the STK Core license. |
Rename {<NewName> | UseCommonName} | If you include this option, then STK will name the imported Satellite using the <NewName> value. If you are importing two or more satellites, then STK will append a number (1, 2, 3, etc.) to <NewName> for each satellite.
Enter UseCommonName to name the satellites using the Common Name from the database. If you do not include this option, then by default STK will name added satellites <CommonName>_<SSCNumber>. |
NameStyle {SSCNumber | CommonName | CommonNameSSCNumber | SSCNumberCommonName | PrefixSSCNumber <prefix> | SSCNumberSuffix <suffix>} | Determines the naming convention used when creating satellites. For example, using CommonNameSSCNumber for ISS produces the name ISS_25544. The default option is CommonNameSSCNumber. |
The following table describes the {SearchParameters} for the Satellite database. You must enter at least one {SearchParameters} with the command. Values specified as <Name> are character values and can include a wildcard, for example, InternationalNumber 2003*. If the desired value contains a space, then you must enclose the <Name> in double quotes, for example, Owner "Burkina Faso".
{SearchParameters} | Description |
---|---|
SSCNumber <Value> | Specify the SSC number of the satellite to be imported. |
CommonName <Name> | Specify the common name of the satellite to be imported. |
OfficialName <Name> | Specify the official name of the satellite to be imported. |
NameOrID <Name> | Specify the name that STK searches in the fields: SSC Number, Common Name, Official Name, and International Designator. A match occurs if any field contains <Name>. |
Owner <Name> | Specify the country that owns the satellite. |
Mission <Name> | Specify the mission that the satellite performs. |
InternationalNumber <Name> | Specify the international number of the satellite to be imported. The international number format is YYYY-DDD and includes an alpha indicator if there is more than one part of the satellite. |
LaunchSite | Enter the three-character abbreviation for the launch site associatated with this satellite. |
LaunchDate <MinDate> <MaxDate> | Enter the minimum and maximum dates for the launch. Specify the date format using the current Connect date unit format. |
Status {Active | Inactive | Unknown} | Specify the status of the satellite. |
Apogee <MinApo> <MaxApo> | Specify the minimum and maximum search limits for apogee. Enter the values in Connect distance units between 0.0 meters and 999999000.0 meters. |
Perigee <MinPer> <MaxPer> | Specify the minimum and maximum search limits for perigee. Enter the values in Connect distance units between 0.0 meters and 999999000.0 meters. |
Period <MinPer> <MaxPer> | Specify the minimum and maximum search limits for period. Enter the values in Connect time units between 0.0 seconds and 5999940.0 seconds. |
Inclination <MinInc> <MaxInc> | Specify the minimum and maximum search limits for Inclination. Enter the values in degrees between 0.0 and 180.0. |
Star Collection or Catalog
The {Source} is a "<StarCatalog>", "<StarCollection>", or ScenarioCollection. Enter the name of a Star catalog or collection, or enter the keyword ScenarioCollection to use the current default Star collection.
The first table lists the Create {Options} for the Star collection or catalog. None of these options is required.
Create {Options} | Description |
---|---|
Constellation <Name> | If you include this option, then STK will place all the stars created by the command in the specified constellation. If the constellation does not exist, STK will create it. |
Rename <NewName> | If you include this option, then STK will name the imported Star using the <NewName> value. If you are importing two or more stars, then STK will append a number (1, 2, 3, etc.) to <NewName> for each star. If you do not include this option, then by default STK will name added stars Star-<IDNumber>. |
The following table describes the {SearchParameters} for the Star database. You must enter at least one {SearchParameters} with the command.
{SearchParameters} | Description |
---|---|
ID <Number> | Specify the identification number of the star to be imported. |
CommonName <Name> | Enter the common name of the star. |
InConstellation "<Name>" | Enter the name of the constellation in which the star(s) are located, such as Andromeda. |
VisualMagnitude <MinMag> <MaxMag> | Specify the minimum and maximum search limits for visual magnitude. Values should be between -99.99 and 999.9. |
RightAsc <MinRA> <MaxRA> | Specify the minimum and maximum search limits for right ascension. Enter values in degrees between 0.0 and 360.0. |
Declination <MinInc> <MaxInc> | Specify the minimum and maximum search limits for declination. Enter values in degrees between -90.0 and 90.0. |
Examples
The following command will import Accra and London from the City database:
Import the four facilities that have an altitude of 0.0 and lie between 10.0 and 20.0 degrees latitude, create the facilities as Target objects, and place them in a constellation named Test4:
Import the facilities that have an altitude of 0.0 and lie between 10.0 and 20.0 degrees latitude, create the facilities as Target objects, and name them FacMan, FacMan1, etc.:
The following command will import the satellite with the SSC Number 23027:
The following command will import and propagate the satellites matching the search criteria:
Import the satellite data from the AGI Server and propagate over the Scenario interval:
The following command will import the two stars with criteria falling within the magnitude and right ascension entered:
The following command will import the stars in the constellation "Canis Major":
To set the routine to preinstalled STK SGP4:
Return message
Group membership
This command belongs to the following group(s):
Version
10