scenarioFlybyPoint#

Overview#

This script shows how to set up the flybyPoint to compute a guidance reference frame that allows to track the direction of the celestial object being flown by. In this scenario, an Earth flyby is simulated. Effectively, flybyPoint computes a Hill reference frame, which is however referred to a body that is not the spacecraft’s primary gravity body. To align a specific body-frame direction with the direction of the body, for example the direction of a camera that needs to take pictures of an asteroid, the user needs to specify the sigma_R0R parameter in the attTrackingError: this allows to introduce an offset rotation that aligns the desired axis with the celestial body, rather than the body’s \(x\) axis. The script is run with the following input arguments:

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

python3 scenarioFlybyPoint.py

Illustration of Simulation Results#

The scenario is run assuming to not neglect Earth’s gravity. The relative position and velocity of the spacecraft w.r.t. Earth are updated every 10 minutes. The following figures show the reference attitude, angular rates and angular accelerations required to track Earth during the flyby, according to the rectilinear flyby model outlined in flybyPoint.

_images/Scenarios/scenarioFlybyPoint3.svg _images/Scenarios/scenarioFlybyPoint4.svg _images/Scenarios/scenarioFlybyPoint5.svg

Lastly, the following plot shows the error angles between the camera location, along the body axis \([0,1,0]\), and the desired out-of-plane body axis \([1,0,0]\). It can be observed that both angle errors drop to zero soon after the initial transient. Additionally, errors are observed around 175 minutes, when the spacecraft reaches its closes approach to Earth. The errors grow due to the inaccuracy of the model of flybyPoint, which does not account for the effects of Earth’s gravity on the motion of the spacecraft.

_images/Scenarios/scenarioFlybyPoint6.svg