.. _scenarioFormationMeanOEFeedback: scenarioFormationMeanOEFeedback =============================== Overview -------- This script sets up a formation flying scenario with two spacecraft. The deputy spacecraft keeps a given mean orbital element difference based on Lyapunov control theory. This script is found in the folder ``xmera/examples`` and executed by using:: python3 scenarioFormationMeanOEFeedback.py The simulation layout is shown in the following illustration. Two spacecraft are orbiting the earth at close distance. Only :math:`J_2` gravity perturbation is included. Each spacecraft sends a :ref:`simpleNav` output message of type :ref:`NavAttMsgPayload` message at a certain period to :ref:`meanOEFeedback`, where mean orbital element difference is calculated and necessary control force is output to extForceTorque module. .. image:: /_images/static/test_scenarioFormationMeanOEFeedback.svg :align: center Illustration of Simulation Results ---------------------------------- :: show_plots = True, useClassicElem = True In this case, target orbital element difference is set based on classical orbital element. This resulting feedback control error is shown below. .. image:: /_images/Scenarios/scenarioFormationMeanOEFeedback11.svg :align: center :: show_plots = True, useClassicElem = False In this case, target orbital element difference is set based on equinoctial orbital element. This resulting feedback control error is shown below. .. image:: /_images/Scenarios/scenarioFormationMeanOEFeedback20.svg :align: center