19
19
20
20
#include " hubEffector.h"
21
21
#include " architecture/utilities/avsEigenSupport.h"
22
+ #include < iostream>
22
23
23
24
/* ! This is the constructor, setting variables to default values */
24
25
HubEffector::HubEffector ()
@@ -95,6 +96,8 @@ void HubEffector::registerStates(DynParamManager& states)
95
96
this ->omegaState ->setState (this ->omega_BN_BInit );
96
97
this ->gravVelocityState ->setState (this ->v_CN_NInit );
97
98
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;
98
101
99
102
return ;
100
103
}
@@ -106,6 +109,8 @@ void HubEffector::updateEffectorMassProps(double integTime)
106
109
this ->effProps .mEff = this ->mHub ;
107
110
108
111
// - 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;
109
114
this ->r_BcP_P = this ->r_BP_P + this ->dcm_BP .transpose ()*(this ->r_BcB_B );
110
115
this ->IHubPntBc_P = this ->dcm_BP .transpose ()*this ->IHubPntBc_B *this ->dcm_BP ;
111
116
@@ -115,6 +120,7 @@ void HubEffector::updateEffectorMassProps(double integTime)
115
120
116
121
// - Give position of center of mass of hub with respect to point B to mass props
117
122
this ->effProps .rEff_CB_B = this ->r_BcP_P ;
123
+ // std::cout << "r_BcP_P = " << this->r_BcP_P << std::endl;
118
124
119
125
// - Zero body derivatives for position and inertia;
120
126
this ->effProps .rEffPrime_CB_B .setZero ();
@@ -185,7 +191,7 @@ void HubEffector::updateEnergyMomContributions(double integTime, Eigen::Vector3d
185
191
186
192
// - Find rotational energy contribution from the hub
187
193
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
+
189
195
return ;
190
196
}
191
197
@@ -208,4 +214,4 @@ void HubEffector::matchGravitytoVelocityState(Eigen::Vector3d v_CN_N)
208
214
{
209
215
this ->gravVelocityState ->setState (this ->velocityState ->getState ());
210
216
this ->gravVelocityBcState ->setState (v_CN_N);
211
- }
217
+ }
0 commit comments