Using the API

The API for MDS Solaris is written in Python.

After installation, in Help_API_and_Examples, you will see the following directory structure:

  • assets
  • Configs
  • data
  • examples
  • mds_api
  • mds_python
  • MDS-Data-Visualization
  • mds-docs
  • install_mds_api_venv_windows.bat
  • run_python_examples.bat

mds_python contains the virtual environment. To activate this virtual environment in cmd, run 'run_python_examples' batch filew hich will allow to launch the example scripts available.

Available example scenarios

In the /examples/ directory you will find many Python example scripts, showcasing the main functionality of the API and explaining how to perform routine tasks. These scripts are prebuilt scenarios, ready to launch, and showcase specific MDS features.

Available scenario templates

In the /scenario_templates/ directory you will find python scripts tailored to custom scenarios for several MDS use cases. These involve attitude controllers, synthetic data generation, satellite formation flying and power/communication subsystem modelling.

Creating Scenarios

To build MDS scenarios, you will first need to import the mds_api library using from mds_api import mds_api.

The typical structure to build and modify a scenario is best copied from our examples or templates libraries

Find below an overview for the most common operations one would want to perform. For a detailed description of all API functions check the API reference.

Adding objects

The API calls which add objects to the simulation start with add: add_solar_sat add_sat add_sat_from_elements add_sensor add_polygons_from_csv add_ground_asset

Retrieving data

The API calls which retrieve data from MDS generally start with 'get'. The following options are currently available: get_config get_config_part get_celestial_body_data get_ground_asset_data get_sat_data get_camera_frame get_julian_date get_utc_date get_tle.

Setting parameters

The API calls which set some MDS simulation parameter start with set. Currently, there are the following options: set_sat_attitude set_state_covariance set_attitude_covariance set_attitude_parameters set_pointing_mode set_sat_track set_pointing_target set_utc_date set_julian_date