hillPointCpp#

Executive Summary#

This attitude guidance module computes the orbital Hill reference frame states.

The orbit can be any type of Keplerian motion, including circular, elliptical or hyperbolic. The module

Module Input and Output#

Table 1 shows the input message from the navigation system.

Input Navigation Message#

Name

Type

Length

Description

\(\boldsymbol{R}_S\)

double []

3

Position vector of the spacecraft body-point with respect to the inertial frame in inertial frame components (\({}^{\mathcal{N}} {\boldsymbol{r}_{B/N}}\))

\(\boldsymbol{v}_S\)

double []

3

Velocity vector of the spacecraft point with respect to the inertial frame in inertial frame components (\({}^{\mathcal{N}} {\boldsymbol{v}}_{B/N}\)).

Table 2 shows the input message from Spice about the main celestial body.

Input Spice Planet Message#

Name

Type

Length

Description

\(\boldsymbol{R}_P\)

double []

3

Position vector of the main celestial object with respect to the inertial frame in inertial frame components .

\(\boldsymbol{v}_P\)

double []

3

Velocity vector of the main celestial object with respect to the inertial frame in inertial frame components .

Table 3 shows the Attitude Reference output message of the module Hill Point.

Output Attitude Reference Message#

Name

Type

Length

Description

\(\sigma_{R/N}\)

double []

3

MRP attitude set of the reference frame with respect to the reference.

\(\omega_{R/N}\)

double []

3

Angular rate vector of the reference frame with respect to the inertial expressed in inertial frame components.

\(\dot{\omega}_{R/N}\)

double []

3

Angular acceleration vector of the reference frame with respect to the inertial expressed in inertial frame components.

Hill Frame Definition#

The Hill reference frame takes the spacecraft’s orbital plane as the principal one and has origin in the centre of the spacecraft. It is defined by the right-handed set of axes \(\mathcal{H}:\{ \hat{\boldsymbol\imath}_{r}, \hat{\boldsymbol\imath}_{\theta}, \hat{\boldsymbol\imath}_{h} \}\), where

\(\hat {\boldsymbol\imath}_{r}\) points radially outward in the direction that connects the center of the planet with the spacecraft.

\(\hat {\boldsymbol\imath}_{h}\) is defined normal to the orbital plane in the direction of the angular momentum.

\(\hat {\boldsymbol\imath}_{\theta}\) completes the right-handed triode.

Illustration of the Hill orbit frame \(\mathcal{H}:\{ \hat{\boldsymbol\imath}_{r}, \hat{\boldsymbol\imath}_{\theta}, \hat{\boldsymbol\imath}_{h} \}\), and the inertial frame \(\mathcal{N}:\{ \hat{\boldsymbol n}_{1}, \hat{\boldsymbol n}_{2}, \hat{\boldsymbol n}_{3} \}\).

Introduction#

In this module, the output reference frame \(\mathcal{R}\) is to be aligned with the Hill reference frame \(\mathcal{H}\). Note that the presented technique does not require the planet-fixed frame to coincide with the inertial frame \(\mathcal{N}:\{ \hat{\boldsymbol n}_{1}, \hat{\boldsymbol n}_{2}, \hat{\boldsymbol n}_{3} \}\). Figure 1 illustrates the general situation in which \(\boldsymbol{R}_{s}\) is the position vector of the spacecraft with respect to the inertial frame and \(\boldsymbol{R_{p}}\) is the position vector of the celestial body with respect to the inertial frame as well. The relative position of the spacecraft with respect to the planet is obtained by simple subtraction:

\[\label{eq:r} \boldsymbol r = \boldsymbol R_{s} - \boldsymbol R_{p}\]

The same methodology is applied to compute the relative velocity vector:

\[\label{eq:v} \boldsymbol v = \boldsymbol v_{s} - \boldsymbol v_{p}\]

Note that the position and velocity vectors of the spacecraft and the celestial body, \(\boldsymbol{R}_S\), \(\boldsymbol{R}_P\), \(\boldsymbol{v}_S\) and \(\boldsymbol{v}_P\) are the only inputs that this module requires. Having \(\boldsymbol r\) and \(\boldsymbol v\), the Hill frame orientation is completely defined:

\[\begin{equation} \hat{\boldsymbol\imath}_{r} = \frac{\boldsymbol r}{r} \end{equation}\]
\[\begin{equation} \hat{\boldsymbol\imath}_{h} = \frac{\boldsymbol{r}\times{\boldsymbol{v}}}{r v} \end{equation}\]
\[\begin{equation} \hat{\boldsymbol\imath}_{\theta} = \hat{\boldsymbol\imath}_{h} \times \hat{\boldsymbol\imath}_{r} \end{equation}\]

And the Direction Cosine Matrix to map from the reference frame to the inertial is obtained:

\[\begin{split}= \begin{bmatrix} \hat{\boldsymbol\imath}_{r} \\ \hat{\boldsymbol\imath}_{\theta} \\ \hat{\boldsymbol\imath}_{h} \end{bmatrix}\end{split}\]

The corresponding MRP attitude set is computed using the following function from the Rigid Body Kinematics library of Reference :

\[[RN] = \textrm{C2MRP}(\boldsymbol\sigma_{R/N})\]

Angular Velocity Descriptions#

Let \(\mathcal{R}_{0}\) reference the Hill orbit frame. The orbit frame angular rate and acceleration vectors are given by

\[\label{eq:omega_R0} \boldsymbol\omega_{R_{0}/N} = \dot f \hat{\boldsymbol\imath}_{h}\]
\[\label{eq:domega_R0} \dot{\boldsymbol\omega}_{R_{0}/N} = \ddot f \hat{\boldsymbol\imath}_{h}\]

where \(f\) is the true anomaly, whose variation is determined through the general standard astrodynamics relations:

\[\begin{split}\begin{aligned} \dot f &= \frac{h}{r^{2}} \\ \ddot f &= - 2 \frac{\boldsymbol v \cdot \hat{\boldsymbol\imath}_{r}}{r} \dot f \end{aligned}\end{split}\]

The angular rate \(\boldsymbol\omega_{R/N}\) and acceleration \(\dot{\boldsymbol\omega}_{R/N}\) of the output reference frame \(\mathcal{R}\) still need to be computed. Since the desired attitude is a fixed-pointing one, \(\mathcal{R}\) does not move relative to \(\mathcal{R}_{0}\). Thus, the angular velocity of the reference frame happens to be

\[\label{eq:omega_R} \boldsymbol\omega_{R/N} = \boldsymbol\omega_{R/R_{0}} + \boldsymbol\omega_{R_{0}/N} = \dot{f} \hat{\boldsymbol\imath}_{h}\]

Again, given that \(\hat{\boldsymbol\imath}_{h}\) is fixed as seen by the reference frame \(R\), the acceleration vector of the reference frame expressed in the reference frame simply becomes:

\[\label{eq:domega_R} \dot\omega_{R/N} = \ddot{f} \hat{\boldsymbol\imath}_{h}\]

Both \(\boldsymbol\omega_{R/N}\) and \(\dot\omega_{R/N}\) need to be expressed in the inertial frame \(N\). Given

\[\begin{split}\begin{equation} {}^{\mathcal{R}}{\boldsymbol \omega_{R/N} } = \begin{bmatrix} 0\\ 0 \\ \dot{f} \end{bmatrix} \end{equation}\end{split}\]
\[\begin{split}\begin{equation} {}^{\mathcal{R}}{\dot{\boldsymbol {\omega}}_{R/N}} = \begin{bmatrix} 0\\ 0 \\ \ddot{f} \end{bmatrix} \end{equation}\end{split}\]

Then,

\[\begin{equation} {}^{\mathcal{N}}{\boldsymbol{\omega}_{R/N}} = [NR] \textrm{ } {}^{\mathcal{R}}{\boldsymbol\omega_{R/N} } \end{equation}\]
\[\begin{equation} {}^{\mathcal{N}}{\dot{\boldsymbol \omega}_{R/N}}=[NR] \textrm{ } {}^{\mathcal{R}}{\dot{\boldsymbol \omega}_{R/N}} \end{equation}\]

Where \([NR] = [RN]^T\).

Message Connection Descriptions#

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages#

Msg Variable Name

Msg Type

Description

attRefOutMsg

AttRefMsgPayload

attitude reference output message

transNavInMsg

NavTransMsgPayload

incoming spacecraft translational state message

celBodyInMsg

EphemerisMsgPayload

(optional) primary celestial body information input message

Class HillPointCpp#

class HillPointCpp : public SysModel#

Hill Point attitude guidance class.

Public Functions

HillPointCpp() = default#

Constructor.

~HillPointCpp() override = default#

Destructor.

void reset(uint64_t currentSimNanos) override#

Reset function.

This method performs the module reset capability.

void updateState(uint64_t currentSimNanos) override#

Update function.

This method creates a orbit hill frame reference message. The desired orientation is defined within the module.

Public Members

ReadFunctor<NavTransMsgPayload> transNavInMsg#

The name of the incoming attitude command.

ReadFunctor<EphemerisMsgPayload> celBodyInMsg#

The name of the celestial body message.

Message<AttRefMsgPayload> attRefOutMsg#

The name of the output message.

BSKLogger *bskLogger#

BSK Logging.