Module: dvAccumulation

Executive Summary

This module reads in a message with an array of accelerometer measurements and integrates them to determine an accumulated \(\Delta\mathbf{v}\) value.

On reset the net \(\Delta\mathbf{v}\) is set to zero. The output navigation message contains the latest measurements time tag and the total \(\Delta\mathbf{v}\). More information on can be found in the PDF Description.

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.

../../../../_images/moduleImgDvAccumulation.svg

Figure 1: dvAccumulation() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

dvAcumOutMsg

NavTransMsgPayload

accumulated DV output message

accPktInMsg

AccDataMsgPayload

input accelerometer message


Functions

void SelfInit_dvAccumulation(DVAccumulationData *configData, int64_t moduleID)

This method initializes the configData for the nav aggregation algorithm. It initializes the output message in the messaging system.

Parameters:
  • configData – The configuration data associated with the Nav aggregation interface

  • moduleID – The Basilisk module identifier

Returns:

void

void Update_dvAccumulation(DVAccumulationData *configData, uint64_t callTime, int64_t moduleID)

This method takes the navigation message snippets created by the various navigation components in the FSW and aggregates them into a single complete navigation message.

Parameters:
  • configData – The configuration data associated with the aggregate nav module

  • callTime – The clock time at which the function was called (nanoseconds)

  • moduleID – The Basilisk module identifier

Returns:

void

void Reset_dvAccumulation(DVAccumulationData *configData, uint64_t callTime, int64_t moduleID)
void dvAccumulation_swap(AccPktDataMsgPayload *p, AccPktDataMsgPayload *q)
int dvAccumulation_partition(AccPktDataMsgPayload *A, int start, int end)
void dvAccumulation_QuickSort(AccPktDataMsgPayload *A, int start, int end)

Sort the AccPktDataMsgPaylaod by the measTime with an iterative quickSort.

Parameters:
  • A – –> Array to be sorted,

  • start – –> Starting index,

  • end – –> Ending index

Returns:

void

struct DVAccumulationData
#include <dvAccumulation.h>

Top level structure for the CSS sensor interface system. Contains all parameters for the CSS interface.

Public Members

NavTransMsg_C dvAcumOutMsg

accumulated DV output message

AccDataMsg_C accPktInMsg

[-] input accelerometer message

uint32_t msgCount

[-] The total number of messages read from inputs

uint32_t dvInitialized

[-] Flag indicating whether DV has been started completely

uint64_t previousTime

[ns] The clock time associated with the previous run of algorithm

double vehAccumDV_B[3]

[m/s] The accumulated Delta_V in body frame components

BSKLogger *bskLogger

BSK Logging.