42 Configuration

File Paths:

nos3/support/packages/42_amd64.zip - 42 built & packaged for NOS3

mos3/sim/sim_common/cfg/Nos3-42InOut - Configuration files can be found here.

Common Problems:

  1. 42 expects the input files to be plain vanilla text files. If your text editor adds formatting, makes straight quotes into smart quotes, etc, 42 may get confused. The most common symptom is generating the "Bogus input in DecodeString" error.
  2. Also text-related, 42 is very simple-minded about reading the input files. Adding extra lines, or accidentally deleting a line, or swapping lines, will throw things out of synch. Again, the most common symptom is the "Bogus input in DecodeString" error. Use your debugger to trace back where the error was generating. (The actual mistake may be at that line, or may be somewhere upstream.)

42 Overview

Some of the simulated hardware components require dynamic environmental data. 42 is an open source visualization and simulation tool for spacecraft attitude and orbital dynamics and environmental data developed by NASA’s Goddard Space Flight Center (GSFC). The role of 42 within NOS3 is to provide dynamic environmental data required by the simulated hardware components.

The presentation material on 42 describes it as a general-purpose, multi-body, multi-spacecraft simulation. The presentation materials describe the following features of 42 which are of interest to NOS3 (other features are described as well):

  1. Multiple spacecraft, anywhere in the solar system
    1. Two-body, three-body orbit dynamics (with seamless transition between)
    2. One sun, nine planets, 45 major moons

The presentation materials also list the following environmental models which are of interest to NOS3 (other models are described as well):

  1. Planetary Ephemerides
    1. From Meeus, “Astronomical Algorithms”
    2. Good enough for GNC validation, not intended for mission planning
  2. Gravity Models have coefficients up to 18th order and degree
    1. Earth: EGM96
  3. Planetary Magnetic Field Models
    1. IGRF up to 10th order (Earth only)
  4. Earth Atmospheric Density Models
    1. MSIS-86 (thanks to John Downing)
    2. Jacchia-Roberts Atmospheric Density Model (NASA SP-8021)

42 uses a collection of input files to control its execution. For NOS3, the main configuration files of interest are the following:

  1. Inp_Sim.txt – The main configuration file which defines items such as the environment (epoch, gravity models, celestial bodies, etc.), spacecraft reference orbits and configuration files, spacecraft and configuration files, and ground station locations.
  2. Orb_LEO.txt – Spacecraft reference orbit file referred to by Inp_Sim.txt. This file specifies the orbit center (Earth) and refers to the two line element set file which defines the spacecraft orbit.
  3. STF1-TLE.txt – A two line element set for STF-1 referred to by Orb_LEO.txt. A two-line element set (TLE) is a data format encoding a list of orbital elements of an Earth-orbiting object for a given point in time, the epoch. Using suitable prediction formula, the state (position and velocity) at any point in the past or future can be estimated to some accuracy. The TLE data representation is specific to the simplified perturbations models (SGP, SGP4, SDP4, SGP8 and SDP8), so any algorithm using a TLE as a data source must implement one of the SGP models to correctly compute the state at a time of interest. Prior to STF-1 launch the orbital elements are notional, based on a probable STF-1 orbit.
  4. SC_STF1.txt – Spacecraft definition file referred to by Inp_Sim.txt. This file defines labels, orbit parameters, initial attitude, body parameters, and other parameters specific to the spacecraft.
  5. Inp_IPC.txt – File defining the TCP/IP or file parameters for communicating input and output to and from 42.
  6. Inp_Graphics.txt – File defining the GUI configuration for 42, including what windows to display, parameters for the point of view, various display elements such as grids and labels, and other graphic elements properties.
  7. There are several other input files which are not used much for NOS3, including Inp_Cmd.txt (defining a command script for 42), Inp_FOV.txt (defining fields of view), Inp_Region.txt (defining regions for 42), and Inp_TDRS.txt (defining TDRS satellites for 42).