Click or drag to resize

Facility Database Files

To obtain information about ground stations and other facilities using STK database files, use the StkFacilityDatabase class. This type uses a directory and a base filename to identify a set of files with the same name but differing extensions which together define the database. For more information on the format of these files, see the section on the database format below.

Facility Databases in STK Components

After instantiating an instance of StkFacilityDatabase, queries can be made to obtain a set of facilities matching a set of criteria. Here is an example of how to query the database for facilities:

Java
StkFacilityDatabase db = new StkFacilityDatabase(dbDirectory, "stkFacility");

// Create a query object and then populate it with the properties to query on.
// Regular expressions are used to query on strings.
StkFacilityDatabaseQuery query = new StkFacilityDatabaseQuery();
query.setFacilityName(Pattern.compile("^Diyarbak"));

// Get the database entries matching the query and print out the Longitude and Latitude of each.
for (StkFacilityDatabaseEntry entry : db.getEntries(query)) {
    System.out.println(entry.getFacilityName() + ": Longitude " + entry.getLongitude() + ", Latitude " + entry.getLatitude());
}
Facility Database Format

The facility database is comprised of a total of three files. You can create your own facility database by following the required format. For example, the stkFacility database includes the following files:

File

Contents

stkFacility.fd

Main database file

stkFacility.fn

Facility networks

stkFacility.gd

Latest update information

The first file contains fixed-width fields, where one row represents a single entry. The remaining contain a standard text format.

stkFacility.fd File

This is the main facility database file; it contains all searchable fields. The format, starting at column zero (0) is as follows:

Column

Width

Description

0-36

37

Site Name

37-48

12

Network (e.g., USAF)

49-58

10

Latitude (deg)

59-69

11

East longitude (deg)

70-76

7

Altitude (m)

78-89

12

Central Body

stkFacility.fn File

This is the network file. It contains a list of all the valid facility network types. This file is used to build the list of facility networks available through the getNetwork method.

Example stkFacility.fn file
BEGIN Network
    CNES
    CRL
    DLR
    ESA
    INPE
    ISRO
    NASA DSN
    NASDA
    NOAA NESDIS
    Other
    SSC
    USGS
END Network

stkFacility.gd File

This is the generic database file. It contains information concerning the last update of the database.

Example stkCityDb.gd file
BEGIN DatabaseUpdate
    Version         5.0
    LastUpdate      20160601
END DatabaseUpdate