The goal of the OpNav Scenarios is to simulate Optical Navigation methods and performance in Basilisk.
All of the scenarios provided in
basilisk/examples/OpNavScenarios put a spacecraft on orbit about Mars. By extracting
limbs are circles from the images, the spacecraft can point to the planet, and estimate it’s position.
This Basilisk Simulation, which inherits
SimulationBaseClass, provides the backbone for all the OpNav simulations
These simulations spawn the Basilisk Vizard visualization in order to provide images for processing.
These images are
handled by the vizInterface module found in
src/simulation/vizInterface. A figure illustrating the architecture
is found here:
More details on the software interaction can be found in Chapter 2 of Thibaud Teil’s PhD thesis. Sequentially, Basilisk modules then receive the images in order to process and navigate using them. This is illustrated in more detail:
Running OpNav Simulations¶
Make sure Basilisk is built to include the OpNav modules by using
--opNav True when running
This is not turned on by default as it will install the large OpenCL library.
In order to call Vizard from python simulations, the path to the downloaded Vizard app must be properly set. If needed, adjust the following line illustrated below to reflect the path to the Vizard binary:
# TODO : Modify the path to the viz here appPath = '/Applications/Vizard.app/Contents/MacOS/Basilisk Vizard' #If on Mac
The Vizard app must therefore me downloaded, and this path must reflect it’s position in the file structure, and its name. If the path is not properly set, the OpNav simulations will hang (printing that it is waiting for the Vizard connection). Another option is to manually open the Vizard application after having started the python scenario, check OpNav or Direct Comm, and provide the tcp/ip address printed by the scenario.
The scripts are tested if all modules are installed, but can be run at full length by calling:
OpNav Dynamics, Flight Software, and Plotting¶
The simulations use three other main python scripts.
BSK_OpNavFsw contains the FSW algorithms used in the scenarios. Examples are the Orbit Determination
filters, the pointing guidance module, the CNN module, and more. This file also contains the
definitions which enable all the tasks necessary to perform a specific action.
OpNav_Plotting contains the plotting routines. None of the files are saved, but are shown when the scenario is run with python. Saving is left to the user’s discretion.
- class BSK_OpNav.BSKSim(fswRate=0.1, dynRate=0.1)¶
BSK Simulation base class for opNav scenarios