Description | Example | Return Message | Group

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 allows the user 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, Star. The tables below show the details and options available for each type.

Warning: 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 that is created. The default is Facility.
Constellation <Name> If this option is included then all the cities created by the command will be placed in the specified constellation. If the constellation does not exist it will be created.
Rename <NewName> If this option is included then the imported City will be named using the <NewName> value. If multiple cities are imported then a number (1, 2, 3, etc) will be appended to <NewName> for each city. If this option is not included then, by default, added Cities will be named using the CityName from the database.

The following table describes the {SearchParameters} for the City database. At least one {SearchParameters} must be entered with the command. Values specified as <Name> are character values and can include a wildcard, e.g. CityName Lon*. If the desired value contains a space then the <Name> must be enclosed in double quotes, e.g. Country "Burkina Faso"

{SearchParameters} Description
CityName <Name> Specify the name of the city to be imported.
Province <Name> Specify the name of the name of the Canadian province or US state in which the city is located.
Country <Name> Specify 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. Values are entered in degrees and should be between -90.0 and 90.0.
Longitude <MinLon> <MaxLon> Specify the minimum and maximum search limits for longitude. Values are entered in degrees and should be 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 is created. The default is Facility.
Constellation <Name> If this option is included then all the facilities created by the command will be placed in the specified constellation. If the constellation does not exist it will be created.
Rename <NewName> If this option is included then the imported Facility will be named using the <NewName> value. If multiple facilities are imported then a number (1, 2, 3, etc) will be appended to <NewName> for each facility. If this option is not included then, by default, added facilities will be named using the SiteName from the database.

The following table describes the {SearchParameters} for the Facility database. At least one {SearchParameters} must be entered with the command. Values specified as <Name> are character values and can include a wildcard, e.g. Network NASA*. If the desired value contains a space then the <Name> must be enclosed in double quotes, e.g. Network "NASA GNR"

{SearchParameters} Description
SiteName <Name> Specify the name of the facility to be imported.
Network <NetworkName> Specify 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. Values are entered in degrees and should be between -90.0 and 90.0.
Longitude <MinLon> <MaxLon> Specify the minimum and maximum search limits for longitude. Values are entered in degrees and should be between -180.0 and 180.0.
Altitude <MinAlt> <MaxAlt> Specify the minimum and maximum search limits for altitude. Values are entered in Connect distance units and should be between -99999.9m and 99999.9m.

Satellite Database

The {Source} can be any of the following or can be omitted:

{Source} Description
DefaultSatDB Use the default Satellite database file.
"<TLEFilePath>" The full path of a tle file, this file should have the extension ".tle" or ".tce".

If this option is used, the specified satellite(s) must be in both the tle file and the default satellite database. The database is searched first, and if found then the tle data is retrieved from the file.

Note: 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, whose extension is ".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 no {Source} is entered, then the command will try to select the {Source} based on the SGP4 Propagator Defaults as follows.

If Update Mode is None, then the Default Satellite Database will be used as the source.

If Update Mode is Online, then the {Source} will be set to AGIServer.

If Update Mode is File, then the Source will be set to File. In this case, if a default file is not specified in Propagator Defaults then the command will Nack.

For information on setting SGP4 Propagator default values refer to the SetPropagatorDefaults command or Edit - Preferences - Propagator Defaults.

The next table lists the Source {Options} for the Satellite database. None of these options is required.

Source {Options} Description
SwitchMethod {Epoch | TCA | Midpoint} Set 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, this option will be ignored.
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. This value should be entered in seconds.
Propagate {On | Off | <PropName>} If On then the satellites that are imported will be propagated. If Off the satellites will not be propagated. Use <PropName> to select a different implementation of the SGP4 routine for propagating ephemeris for this satellite. For more information on changing SGP4 routines see the SetSGP4Prop command. If <PropName> is entered then the satellites will be propagated.
Constellation <Name> If this option is included then all the satellites created by the command will be placed in the specified constellation. If the constellation does not exist it will be created.

This option is only available with the STK Pro or STK Communications license.

Rename {<NewName> | UseCommonName} If this option is included then the imported Satellite will be named using the <NewName> value. If multiple satellites are imported then a number (1, 2, 3, etc) will be appended to <NewName> for each satellite.

Enter UseCommonName to name the satellites using the Common Name from the database.

If this option is not included then, by default, added satellites will be named <CommonName>_<SSCNumber>.

The following table describes the {SearchParameters} for the Satellite database. At least one {SearchParameters} must be entered with the command. Values specified as <Name> are character values and can include a wildcard, e.g. InternationalNumber 2003*. If the desired value contains a space then the <Name> must be enclosed in double quotes, e.g. 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.
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 an alpha indicator if there is more than one part of the satellite.
Status {Active | Inactive} Specify the status of the satellite.
Apogee <MinApo> <MaxApo> Specify the minimum and maximum search limits for apogee. Values are entered in Connect distance units and should be between 0.0 and 999999000.0m.
Perigee <MinPer> <MaxPer> Specify the minimum and maximum search limits for perigee. Values are entered in Connect distance units and should be between 0.0 and 999999000.0m.
Period <MinPer> <MaxPer> Specify the minimum and maximum search limits for period. Values are entered in Connect time units and should be between 0.0 and 5999940.0 seconds.
Inclination <MinInc> <MaxInc> Specify the minimum and maximum search limits for Inclination. Values are entered in degrees and should be 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 this option is included then all the stars created by the command will be placed in the specified constellation. If the constellation does not exist it will be created.
Rename <NewName> If this option is included then the imported Star will be named using the <NewName> value. If multiple stars are imported then a number (1, 2, 3, etc) will be appended to <NewName> for each star. If this option is not included then, by default, added stars will be named Star-<IDNumber>.

The following table describes the {SearchParameters} for the Star database. At least one {SearchParameters} must be entered with the command.

{SearchParameters} Description
ID <Number> Specify the identification number of the star to be imported.
CommonName <Name> Specify the common name of the star.
InConstellation "<Name>" Specify 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. Values are entered in degrees and should be between 0.0 and 360.0.
Declination <MinInc> <MaxInc> Specify the minimum and maximum search limits for declination. Values are entered in degrees and should be between -90.0 and 90.0.

Example

The following command will import Accra and London from the City database:

ImportFromDB * City "C:\ProgramData\AGI\STK 11\Databases\City\stkCityDb.cd" Type "National Capital" Province Gr*

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:

ImportFromDB * Facility "C:\ProgramData\AGI\STK 11\Databases\Facility\stkFacility.fd" Class Target Constellation Test4 Altitude 0.0 0.0 Latitude 10.0 20.0

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:

ImportFromDB * Facility "C:\ProgramData\AGI\STK 11\Databases\Facility\stkFacility.fd" Class Target Rename FacMan Altitude 0.0 0.0 Latitude 10.0 20.0

The following command will import the satellite with the SSC Number 23027:

ImportFromDB * Satellite DefaultSatDB SSCNumber 23027

The following command will import and propagate the satellites matching the search criteria:

ImportFromDB * Satellite DefaultSatDB Propagate On TimePeriod "1 Jun 2004 12:00:00.000" "1 Jun 2004 14:00:00.000" CommonName iss* Mission MANNED InternationalNumber 2003*

Import the satellite data from the AGI Server and propagate over the Scenario interval:

ImportFromDB * Satellite AGIServer Propagate On TimePeriod UseScenarioInterval SSCNumber 11417

The following command will import the two stars whose criteria fall within the magnitude and right ascension entered:

ImportFromDB * Star ScenarioCollection VisualMagnitude 0 1.0 RightAsc 200.0 230.0

The following command will import the stars in the constellation "Canis Major":

ImportFromDB * Star "Hipparcos 2 Mag 6" InConstellation "Canis Major"

ReturnMessage

If activated, Connect returns an acknowledgement message.

Group Membership

This command belongs to the following group(s):

Scenarios

Version

10

STK Programming Interface 11.0.1