Getting Started: Example Scenarios
nominalpy provides several helper functions for accessing the simulations and creating components. However, it does not provide any examples of how to use the modules. An additional repository contains some example scripts for running simulations via the cloud. This has been made into a publicly available GitHub repository.
Downloading the Examples
The nominalpy_examples
repository is available for anyone to download and provides access to some scenarios that can be run when testing the API and used as a base for constructing custom Nominal API simulations. It can be found in the link below:
https://github.com/NominalSystems/nominalpy_examples
The example scripts are found inside the scenarios
folder. This includes a credential_helper.py
which allows for easier access to the API with an API key. It is recommended that this repository is cloned or downloaded to your machine rather than copying single files.
Warning
Running an example script will not work without updates to the credential helper with a valid access key to the API. Please see the next document on getting the correct API token working in the API.
Example Files
As of v1.0, there are at least nine example scenarios that are provided with the examples. In future releases, this GitHub repository may include more examples that can be of use. Ensure that the correct version of the examples is pulled as future release versions of nominalpy
may be accessible in the repository on other branches. These files include:
credential_helper.py
: A script that stores the credentials of the API access allowing for easier API calls to be made.scenario_dv_propulsion_system.py
: An example showing how to use a thruster-fuel system to change the orbit of a spacecraft over time.scenario_momentum_management_mtb.py
: An example using magnetic torque bars to help with reaction wheel desaturation.scenario_power_system.py
: An example of flight software pointing the solar panel on a spacecraft towards the Sun to optimize power output, charging the spacecraft’s battery over time.