scenarioDataToViz

Overview

Demonstrates how to convert spacecraft states, stored in a text file from another program, into Basilisk messages using Module: dataFileToViz. These messages are red by Module: vizInterface to save a Vizard compatible data play for offline playback and analysis. In this simulation a servicer is holding a relative position with respect to an uncontrolled satellite. Custom spacecraft models are specified for Vizard in the folder dataForExamples.

The script is found in the folder basilisk/examples and executed by using:

python3 scenarioDataToViz.py

The simulation layout is shown in the following illustration. A single simulation process is created which contains both modules.

../_images/test_scenarioDataToViz.svg

When the simulation completes several plots are shown for the MRP norm attitude history and the inertial relative position vector components. A servicer spacecraft approaches a target and holds a specific target-frame fixed location even while the target itself is slowly rotating. The servicer and target orientations are controlled to be the same to prepare for a final docking maneuver. If the data is saved to a Vizard file, then the visualization should look like:

../_images/vizard-DataFile.jpg

Illustration of Simulation Results

show_plots = True
../_images/scenarioDataToViz1.svg ../_images/scenarioDataToViz2.svg
scenarioDataToViz.run(show_plots, attType)[source]

The scenarios can be run with the followings setups parameters:

Parameters:
  • show_plots (bool) – Determines if the script should display plots

  • attType (int) – Specify if MRP (0) or Quaternions (1) are used