Skip to content

Commit 5ce6f8a

Browse files
committed
debugging hub effector
1 parent 8daa37c commit 5ce6f8a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/simulation/dynamics/_GeneralModuleFiles/hubEffector.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
#include "hubEffector.h"
2121
#include "architecture/utilities/avsEigenSupport.h"
22+
#include <iostream>
2223

2324
/*! This is the constructor, setting variables to default values */
2425
HubEffector::HubEffector()
@@ -95,6 +96,8 @@ void HubEffector::registerStates(DynParamManager& states)
9596
this->omegaState->setState(this->omega_BN_BInit);
9697
this->gravVelocityState->setState(this->v_CN_NInit);
9798
this->gravVelocityBcState->setState(this->v_CN_NInit);
99+
// std::cout << "r_CN_NInit = " << this->r_CN_NInit << std::endl;
100+
// std::cout << "posState = " << this->posState->getState() << std::endl;
98101

99102
return;
100103
}
@@ -106,6 +109,8 @@ void HubEffector::updateEffectorMassProps(double integTime)
106109
this->effProps.mEff = this->mHub;
107110

108111
// - Provide information about multi-spacecraft origin if needed
112+
// std::cout << "r_BP_P = " << this->r_BP_P << std::endl;
113+
// std::cout << "r_BcB_B = " << this->r_BcB_B << std::endl;
109114
this->r_BcP_P = this->r_BP_P + this->dcm_BP.transpose()*(this->r_BcB_B);
110115
this->IHubPntBc_P = this->dcm_BP.transpose()*this->IHubPntBc_B*this->dcm_BP;
111116

@@ -115,6 +120,7 @@ void HubEffector::updateEffectorMassProps(double integTime)
115120

116121
// - Give position of center of mass of hub with respect to point B to mass props
117122
this->effProps.rEff_CB_B = this->r_BcP_P;
123+
// std::cout << "r_BcP_P = " << this->r_BcP_P << std::endl;
118124

119125
// - Zero body derivatives for position and inertia;
120126
this->effProps.rEffPrime_CB_B.setZero();
@@ -185,7 +191,7 @@ void HubEffector::updateEnergyMomContributions(double integTime, Eigen::Vector3d
185191

186192
// - Find rotational energy contribution from the hub
187193
rotEnergyContr = 1.0/2.0*omegaLocal_BN_B.dot(IHubPntBc_P*omegaLocal_BN_B) + 1.0/2.0*mHub*rDot_BcB_B.dot(rDot_BcB_B);
188-
194+
189195
return;
190196
}
191197

@@ -208,4 +214,4 @@ void HubEffector::matchGravitytoVelocityState(Eigen::Vector3d v_CN_N)
208214
{
209215
this->gravVelocityState->setState(this->velocityState->getState());
210216
this->gravVelocityBcState->setState(v_CN_N);
211-
}
217+
}

0 commit comments

Comments
 (0)