Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
.idea
xml/*

# clangd language-server index (regenerable, per-developer)
.cache/

#CMake
CMakeFiles/
**/_VizFiles/
Expand Down
4 changes: 1 addition & 3 deletions src/architecture/utilities/ukfUtilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int32_t ukfUInv(double* sourceMat, int32_t nRow, int32_t nCol, double* destMat)

int32_t ukfLUD(double* sourceMat, int32_t nRow, int32_t nCol, double* destMat, int32_t* indx) {
double vv[UKF_MAX_DIM];
int32_t rowIndicator, i, j, k, imax;
int32_t i, j, k, imax;
double big, dum, sum, temp;
double TINY = 1.0E-14;

Expand All @@ -108,7 +108,6 @@ int32_t ukfLUD(double* sourceMat, int32_t nRow, int32_t nCol, double* destMat, i
}
mCopy(sourceMat, (size_t)nRow, (size_t)nCol, destMat);
vSetZero(vv, (size_t)nRow);
rowIndicator = 1;
for (i = 0; i < nRow; i++) {
big = 0.0;
for (j = 0; j < nRow; j++) {
Expand Down Expand Up @@ -148,7 +147,6 @@ int32_t ukfLUD(double* sourceMat, int32_t nRow, int32_t nCol, double* destMat, i
destMat[imax * nRow + k] = destMat[j * nRow + k];
destMat[j * nRow + k] = dum;
}
rowIndicator += 1;
vv[imax] = vv[j];
}
indx[j] = imax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void LowPassFilterTorqueCommand::updateState(uint64_t callTime) {
store the output message
*/
v3Copy(this->LrF[0], controlOut.torqueRequestBody);
this->cmdTorqueOutMsg.write(&controlOut, this->moduleID, callTime);
this->cmdTorqueOutMsg.write(controlOut, this->moduleID, callTime);

return;
}
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attControl/mrpFeedback/mrpFeedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ void MrpFeedback::updateState(uint64_t callTime) {

MrpFeedbackOutput mrpFeedbackOutput = algorithm.update(callTime, guidCmd, wheelSpeeds, wheelsAvailability);

this->cmdTorqueOutMsg.write(&mrpFeedbackOutput.controlOut, moduleID, callTime);
this->intFeedbackTorqueOutMsg.write(&mrpFeedbackOutput.intFeedbackOut, this->moduleID, callTime);
this->cmdTorqueOutMsg.write(mrpFeedbackOutput.controlOut, moduleID, callTime);
this->intFeedbackTorqueOutMsg.write(mrpFeedbackOutput.intFeedbackOut, this->moduleID, callTime);
}

/*! Setter method for the gain K.
Expand Down
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attControl/mrpFeedback_C/mrpFeedback_C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ void MrpFeedback_C::updateState(uint64_t callTime) {

/*! - set the output message and write it out */
v3Copy(Lr, controlOut.torqueRequestBody);
this->cmdTorqueOutMsg.write(&controlOut, moduleID, callTime);
this->cmdTorqueOutMsg.write(controlOut, moduleID, callTime);

/*! - write the output integral feedback torque */
v3Scale(-1.0, v3_5, intFeedbackOut.torqueRequestBody);
this->intFeedbackTorqueOutMsg.write(&intFeedbackOut, this->moduleID, callTime);
this->intFeedbackTorqueOutMsg.write(intFeedbackOut, this->moduleID, callTime);

return;
}
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/mrpPD/mrpPD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void MrpPD::updateState(uint64_t callTime) {
// Call the algorithm update method
CmdTorqueBodyMsgPayload torqueCmdMsgPayload = this->algorithm.update(callTime, localGuidInMsg);

this->cmdTorqueOutMsg.write(&torqueCmdMsgPayload, moduleID, callTime);
this->cmdTorqueOutMsg.write(torqueCmdMsgPayload, moduleID, callTime);
}

/*! Setter method for the derivative gain P.
Expand Down
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/mrpPD_C/mrpPD_C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ void MrpPD_C::updateState(uint64_t callTime) {

/*! - Store and write the output message */
v3Copy(Lr, controlOutMsg.torqueRequestBody);
this->cmdTorqueOutMsg.write(&controlOutMsg, moduleID, callTime);
this->cmdTorqueOutMsg.write(controlOutMsg, moduleID, callTime);

return;
}
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/mrpSteering/mrpSteering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void MrpSteering::updateState(uint64_t callTime) {

RateCmdMsgPayload outMsg = this->algorithm.update(guidCmd);

this->rateCmdOutMsg.write(&outMsg, moduleID, callTime);
this->rateCmdOutMsg.write(outMsg, moduleID, callTime);
}

/*! Set the linear feedback gain K1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void MrpSteering_C::updateState(uint64_t callTime) {
MRPSteeringLaw(this, guidCmd.sigma_BR, outMsg.omega_BastR_B, outMsg.omegap_BastR_B);

/*! - Store the output message and pass it to the message bus */
this->rateCmdOutMsg.write(&outMsg, moduleID, callTime);
this->rateCmdOutMsg.write(outMsg, moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ void MtbFeedforward::updateState(uint64_t callTime) {
v3Subtract(vehControlOutMsgBuffer.torqueRequestBody, tauMtbFF_B, vehControlOutMsgBuffer.torqueRequestBody);

/*! - Write output message. This used as a feedforward term to the attiude controller.*/
this->vehControlOutMsg.write(&vehControlOutMsgBuffer, moduleID, callTime);
this->vehControlOutMsg.write(vehControlOutMsgBuffer, moduleID, callTime);
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ void MtbMomentumManagement::updateState(uint64_t callTime) {
/*
* Write output messages.
*/
this->mtbCmdOutMsg.write(&mtbCmdOutputMsgBuffer, moduleID, callTime);
this->mtbCmdOutMsg.write(mtbCmdOutputMsgBuffer, moduleID, callTime);
vAdd(this->tauDesiredRW_W, numRW, rwMotorTorqueOutMsgBuffer.motorTorque, rwMotorTorqueOutMsgBuffer.motorTorque);
this->rwMotorTorqueOutMsg.write(&rwMotorTorqueOutMsgBuffer, moduleID, callTime);
this->rwMotorTorqueOutMsg.write(rwMotorTorqueOutMsgBuffer, moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ void MtbMomentumManagementSimple::updateState(uint64_t callTime) {
/*! - Write the output message. This is the torque we are requesting the torque bars to produce in the Body frame.
Note that depending on the torque rod/magentic field geometry, torque rod saturation limts, unknown alignments,
and imperfect sensor readings, this torque may not be perfectly produced.*/
this->tauMtbRequestOutMsg.write(&tauMtbRequestOutMsgBuffer, moduleID, callTime);
this->tauMtbRequestOutMsg.write(tauMtbRequestOutMsgBuffer, moduleID, callTime);
}
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/prvSteering/prvSteering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void PrvSteering::updateState(uint64_t callTime) {
PRVSteeringLaw(this, guidCmd.sigma_BR, outMsgBuffer.omega_BastR_B, outMsgBuffer.omegap_BastR_B);

/* Store the output message and pass it to the message bus */
this->rateCmdOutMsg.write(&outMsgBuffer, moduleID, callTime);
this->rateCmdOutMsg.write(outMsgBuffer, moduleID, callTime);

return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/rateControl/rateControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void RateControl::updateState(uint64_t callTime) {
torqueCmdOut = this->algorithm.update(this->guidInMsg());
}

this->cmdTorqueOutMsg.write(&torqueCmdOut, moduleID, callTime);
this->cmdTorqueOutMsg.write(torqueCmdOut, moduleID, callTime);
}

/*! Setter method for the derivative gain P.
Expand Down
2 changes: 1 addition & 1 deletion src/fswAlgorithms/attControl/rateDamp/rateDamp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void RateDamp::updateState(uint64_t currentSimNanos) {
// Call the algorithm update method
CmdTorqueBodyMsgPayload cmdTorqueOutBuffer = this->algorithm.update(currentSimNanos, attNavInBuffer);

this->cmdTorqueOutMsg.write(&cmdTorqueOutBuffer, this->moduleID, currentSimNanos);
this->cmdTorqueOutMsg.write(cmdTorqueOutBuffer, this->moduleID, currentSimNanos);
}

/*! Set the module rate feedback gain
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void RateServoFullNonlinear::updateState(uint64_t callTime) {

CmdTorqueBodyMsgPayload controlOut = algorithm.update(callTime, guidCmd, rateGuid, wheelSpeeds, wheelsAvailability);

this->cmdTorqueOutMsg.write(&controlOut, moduleID, callTime);
this->cmdTorqueOutMsg.write(controlOut, moduleID, callTime);
}

/*! Setter method for the gain P.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void RateServoFullNonlinear_C::updateState(uint64_t callTime) {

/*! - Set output message and pass it to the message bus */
v3Copy(Lr, controlOut.torqueRequestBody);
this->cmdTorqueOutMsg.write(&controlOut, moduleID, callTime);
this->cmdTorqueOutMsg.write(controlOut, moduleID, callTime);

return;
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void ThrMomentumManagement::updateState(uint64_t callTime) {
/*! - write out the output message */
v3Copy(Delta_H_B, controlOutMsg.torqueRequestBody);

this->deltaHOutMsg.write(&controlOutMsg, moduleID, callTime);
this->deltaHOutMsg.write(controlOutMsg, moduleID, callTime);
}

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ void ThrMomentumManagementCpp::updateState(uint64_t currentSimNanos) {

CmdTorqueBodyMsgPayload controlOutMsg{};
eigenVectorToCArray(Delta_H_B, controlOutMsg.torqueRequestBody);
this->deltaHOutMsg.write(&controlOutMsg, this->moduleID, currentSimNanos);
this->deltaHOutMsg.write(controlOutMsg, this->moduleID, currentSimNanos);
}
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attDetermination/CSSEst/cssWlsEst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void CssWlsEst::updateState(uint64_t callTime) {
this->filtStatus.numObs = (int)this->numActiveCss;
this->filtStatus.timeTag = (double)(callTime * NANO2SEC);
v3Copy(sunlineOutBuffer.vehSunPntBdy, this->filtStatus.state);
this->cssWLSFiltResOutMsg.write(&this->filtStatus, this->moduleID, callTime);
this->cssWLSFiltResOutMsg.write(this->filtStatus, this->moduleID, callTime);
}
/*! Writing Outputs */
if (status > 0) /*! - If the status from the WLS computation is erroneous, populate the output messages with zeros*/
Expand All @@ -158,7 +158,7 @@ void CssWlsEst::updateState(uint64_t callTime) {
this->priorSignalAvailable = 0; /* reset the prior heading estimate flag */
}
/*! - If the status from the WLS computation good, populate the output messages with the computed data*/
this->navStateOutMsg.write(&sunlineOutBuffer, this->moduleID, callTime);
this->navStateOutMsg.write(sunlineOutBuffer, this->moduleID, callTime);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,13 @@ void InertialUKF::updateState(uint64_t callTime) {
v3Copy(this->omega_BN_BOut, outputInertial.omega_BN_B);
outputInertial.timeTag = this->timeTagOut;

this->navStateOutMsg.write(&outputInertial, this->moduleID, callTime);
this->navStateOutMsg.write(outputInertial, this->moduleID, callTime);

/*! - Populate the filter states output buffer and write the output message*/
inertialDataOutBuffer.timeTag = this->timeTag;
memmove(inertialDataOutBuffer.covar, this->covar, AKF_N_STATES * AKF_N_STATES * sizeof(double));
memmove(inertialDataOutBuffer.state, this->state, AKF_N_STATES * sizeof(double));
this->filtDataOutMsg.write(&inertialDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(inertialDataOutBuffer, this->moduleID, callTime);
this->rwSpeedPrev = this->rwSpeeds;
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ void HeadingSuKF::updateState(uint64_t callTime) {
mCopy(this->covar, HEAD_N_STATES_SWITCH, HEAD_N_STATES_SWITCH, headingDataOutBuffer.covar);
vCopy(states_BN, HEAD_N_STATES_SWITCH, headingDataOutBuffer.state);
v3Copy(this->postFits, headingDataOutBuffer.postFitRes);
this->filtDataOutMsg.write(&headingDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(headingDataOutBuffer, this->moduleID, callTime);

/*! - Write the heading estimate into the copy of the OpNav message structure*/
opnavOutputBuffer.timeTag = this->timeTag;
Expand All @@ -174,7 +174,7 @@ void HeadingSuKF::updateState(uint64_t callTime) {
}
opnavOutputBuffer.valid = this->opnavInBuffer.valid;
opnavOutputBuffer.timeTag = this->opnavInBuffer.timeTag;
this->opnavDataOutMsg.write(&opnavOutputBuffer, this->moduleID, callTime);
this->opnavDataOutMsg.write(opnavOutputBuffer, this->moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ void InertialAttitudeUkf::writeOutputMessages(uint64_t currentSimNanos) {
this->measurements[index].reset();
}
}
this->attitudeResidualMsg.write(&attitudePayload, this->moduleID, currentSimNanos);
this->rateResidualMsg.write(&ratePayload, this->moduleID, currentSimNanos);
this->attitudeResidualMsg.write(attitudePayload, this->moduleID, currentSimNanos);
this->rateResidualMsg.write(ratePayload, this->moduleID, currentSimNanos);

this->navAttitudeOutputMsg.write(&navAttPayload, this->moduleID, currentSimNanos);
this->inertialFilterOutputMsg.write(&filterPayload, this->moduleID, currentSimNanos);
this->navAttitudeOutputMsg.write(navAttPayload, this->moduleID, currentSimNanos);
this->inertialFilterOutputMsg.write(filterPayload, this->moduleID, currentSimNanos);
}

/*! Read current RW speends and populate the accelerations in order to propagate
Expand Down
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attDetermination/okeefeEKF/okeefeEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void OkeefeEKF::updateState(uint64_t callTime) {
v3Copy(this->state, this->outputSunline.vehSunPntBdy);
v3Normalize(this->outputSunline.vehSunPntBdy, this->outputSunline.vehSunPntBdy);
this->outputSunline.timeTag = this->timeTag;
this->navStateOutMsg.write(&this->outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(this->outputSunline, this->moduleID, callTime);

/*! - Populate the filter states output buffer and write the output message*/
sunlineDataOutBuffer.timeTag = this->timeTag;
Expand All @@ -121,7 +121,7 @@ void OkeefeEKF::updateState(uint64_t callTime) {
memmove(sunlineDataOutBuffer.state, this->state, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.stateError, this->x, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.postFitRes, this->postFits, MAX_N_CSS_MEAS * sizeof(double));
this->filtDataOutMsg.write(&sunlineDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(sunlineDataOutBuffer, this->moduleID, callTime);

return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attDetermination/sunlineEKF/sunlineEKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void SunlineEKF::updateState(uint64_t callTime) {
v3Copy(this->state, this->outputSunline.vehSunPntBdy);
v3Normalize(this->outputSunline.vehSunPntBdy, this->outputSunline.vehSunPntBdy);
this->outputSunline.timeTag = this->timeTag;
this->navStateOutMsg.write(&this->outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(this->outputSunline, this->moduleID, callTime);

/*! - Populate the filter states output buffer and write the output message*/
sunlineDataOutBuffer.timeTag = this->timeTag;
Expand All @@ -120,7 +120,7 @@ void SunlineEKF::updateState(uint64_t callTime) {
memmove(sunlineDataOutBuffer.state, this->state, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.stateError, this->x, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.postFitRes, this->postFits, MAX_N_CSS_MEAS * sizeof(double));
this->filtDataOutMsg.write(&sunlineDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(sunlineDataOutBuffer, this->moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ void SunlineEphem::updateState(uint64_t callTime) {
NavTransMsgPayload scPos = this->scPositionInMsg();
NavAttMsgPayload scAtt = this->scAttitudeInMsg();
auto outputSunline = this->algorithm.updateState(sunPos, scPos, scAtt);
this->navStateOutMsg.write(&outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(outputSunline, this->moduleID, callTime);
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void SunlineSEKF::updateState(uint64_t callTime) {
v3Copy(this->state, this->outputSunline.vehSunPntBdy);
v3Normalize(this->outputSunline.vehSunPntBdy, this->outputSunline.vehSunPntBdy);
this->outputSunline.timeTag = this->timeTag;
this->navStateOutMsg.write(&this->outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(this->outputSunline, this->moduleID, callTime);

/*! - Populate the filter states output buffer and write the output message*/
sunlineDataOutBuffer.timeTag = this->timeTag;
Expand All @@ -138,7 +138,7 @@ void SunlineSEKF::updateState(uint64_t callTime) {
memmove(sunlineDataOutBuffer.state, states_BN, EKF_N_STATES_SWITCH * sizeof(double));
memmove(sunlineDataOutBuffer.stateError, this->x, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.postFitRes, this->postFits, MAX_N_CSS_MEAS * sizeof(double));
this->filtDataOutMsg.write(&sunlineDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(sunlineDataOutBuffer, this->moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ void SunlineSRuKF::writeOutputMessages(uint64_t currentSimNanos) {
i += 1;
}

this->navAttOutMsg.write(&navAttOutMsgBuffer, this->moduleID, currentSimNanos);
this->filterOutMsg.write(&filterMsgBuffer, this->moduleID, currentSimNanos);
this->filterCssResOutMsg.write(&filterCssResMsgBuffer, this->moduleID, currentSimNanos);
this->filterGyroResOutMsg.write(&filterGyroResMsgBuffer, this->moduleID, currentSimNanos);
this->navAttOutMsg.write(navAttOutMsgBuffer, this->moduleID, currentSimNanos);
this->filterOutMsg.write(filterMsgBuffer, this->moduleID, currentSimNanos);
this->filterCssResOutMsg.write(filterCssResMsgBuffer, this->moduleID, currentSimNanos);
this->filterGyroResOutMsg.write(filterGyroResMsgBuffer, this->moduleID, currentSimNanos);
}

/*! Read the rate gyro input message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ void SunlineSRuKFTemplated::writeOutputMessages(uint64_t currentSimNanos) {
// i += 1;
// }
//
// this->navAttOutMsg.write(&navAttOutMsgBuffer, this->moduleID, currentSimNanos);
// this->filterOutMsg.write(&filterMsgBuffer, this->moduleID, currentSimNanos);
// this->filterCssResOutMsg.write(&filterCssResMsgBuffer, this->moduleID, currentSimNanos);
// this->filterGyroResOutMsg.write(&filterGyroResMsgBuffer, this->moduleID, currentSimNanos);
// this->navAttOutMsg.write(navAttOutMsgBuffer, this->moduleID, currentSimNanos);
// this->filterOutMsg.write(filterMsgBuffer, this->moduleID, currentSimNanos);
// this->filterCssResOutMsg.write(filterCssResMsgBuffer, this->moduleID, currentSimNanos);
// this->filterGyroResOutMsg.write(filterGyroResMsgBuffer, this->moduleID, currentSimNanos);
}

/*! Read the rate gyro input message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void SunlineSuKF::updateState(uint64_t callTime) {
v3Copy(this->state, this->outputSunline.vehSunPntBdy);
v3Normalize(this->outputSunline.vehSunPntBdy, this->outputSunline.vehSunPntBdy);
this->outputSunline.timeTag = this->timeTag;
this->navStateOutMsg.write(&this->outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(this->outputSunline, this->moduleID, callTime);

/*! - Switch the rates back to omega_BN instead of omega_SB */
vCopy(this->state, SKF_N_STATES_SWITCH, states_BN);
Expand All @@ -208,7 +208,7 @@ void SunlineSuKF::updateState(uint64_t callTime) {
memmove(sunlineDataOutBuffer.covar, this->covar, SKF_N_STATES_SWITCH * SKF_N_STATES_SWITCH * sizeof(double));
memmove(sunlineDataOutBuffer.state, states_BN, SKF_N_STATES_SWITCH * sizeof(double));
memmove(sunlineDataOutBuffer.postFitRes, this->postFits, MAX_N_CSS_MEAS * sizeof(double));
this->filtDataOutMsg.write(&sunlineDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(sunlineDataOutBuffer, this->moduleID, callTime);

return;
}
Expand Down
4 changes: 2 additions & 2 deletions src/fswAlgorithms/attDetermination/sunlineUKF/sunlineUKF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ void SunlineUKF::updateState(uint64_t callTime) {
v3Copy(this->state, this->outputSunline.vehSunPntBdy);
v3Normalize(this->outputSunline.vehSunPntBdy, this->outputSunline.vehSunPntBdy);
this->outputSunline.timeTag = this->timeTag;
this->navStateOutMsg.write(&this->outputSunline, this->moduleID, callTime);
this->navStateOutMsg.write(this->outputSunline, this->moduleID, callTime);

/*! - Populate the filter states output buffer and write the output message*/
sunlineDataOutBuffer.timeTag = this->timeTag;
sunlineDataOutBuffer.numObs = this->numObs;
memmove(sunlineDataOutBuffer.covar, this->covar, SKF_N_STATES * SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.state, this->state, SKF_N_STATES * sizeof(double));
memmove(sunlineDataOutBuffer.postFitRes, this->postFits, MAX_N_CSS_MEAS * sizeof(double));
this->filtDataOutMsg.write(&sunlineDataOutBuffer, this->moduleID, callTime);
this->filtDataOutMsg.write(sunlineDataOutBuffer, this->moduleID, callTime);

return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void AttRefCorrection::updateState(uint64_t const callTime) {

// write to the output messages
eigenVectorToCArray(sigma_RN_local, attRefMsgBuffer.sigma_RN);
this->attRefOutMsg.write(&attRefMsgBuffer, this->moduleID, callTime);
this->attRefOutMsg.write(attRefMsgBuffer, this->moduleID, callTime);
}

/*! Setter method for the current MRP attitude coordinate set with respect to the input reference
Expand Down
Loading
Loading