Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/358 fix dcm facet srp dynamic effector #359

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
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
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_facetSRPTestFunction(show_plots, facetRotAngle1, facetRotAngle2):
facetRotAngle1 (double): [rad] Articulation angle for facets 7 and 8 (solar panel 1)
facetRotAngle2 (double): [rad] Articulation angle for facets 9 and 10 (solar panel 2)
"""

[testResults, testMessage] = facetSRPTestFunction(show_plots, facetRotAngle1, facetRotAngle2)

assert testResults < 1, testMessage
Expand Down Expand Up @@ -121,7 +121,7 @@ def facetSRPTestFunction(show_plots, facetRotAngle1, facetRotAngle2):
facetRotAngle1MessageData.theta = facetRotAngle1
facetRotAngle1MessageData.thetaDot = 0.0
facetRotAngle1Message = messaging.HingedRigidBodyMsg().write(facetRotAngle1MessageData)

facetRotAngle2MessageData = messaging.HingedRigidBodyMsgPayload()
facetRotAngle2MessageData.theta = facetRotAngle2
facetRotAngle2MessageData.thetaDot = 0.0
Expand Down Expand Up @@ -291,11 +291,11 @@ def checkFacetSRPForce(index, facetRotAngle1, facetRotAngle2, area, specCoeff, d

# Rotate the articulated facet normal vectors
if (index == 6 or index == 7):
prv_BB0 = facetRotAngle1 * facetRotAxis
prv_BB0 = -facetRotAngle1 * facetRotAxis
dcm_BB0 = rbk.PRV2C(prv_BB0)
facetNormal = np.matmul(dcm_BB0, facetNormal)
if (index == 8 or index == 9):
prv_BB0 = facetRotAngle2 * facetRotAxis
prv_BB0 = -facetRotAngle2 * facetRotAxis
dcm_BB0 = rbk.PRV2C(prv_BB0)
facetNormal = np.matmul(dcm_BB0, facetNormal)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ void FacetSRPDynamicEffector::computeForceTorque(double callTime, double timeSte
double articulationAngle = facetArticulationAngleList.at(articulatedIndex);

// Determine the required DCM that rotates the facet normal vector through the articulation angle
double prv_BB0[3] = {articulationAngle * scGeometry.facetRotAxes_B[i][0],
articulationAngle * scGeometry.facetRotAxes_B[i][1],
articulationAngle * scGeometry.facetRotAxes_B[i][2]};
double prv_BB0[3] = {-articulationAngle * scGeometry.facetRotAxes_B[i][0],
-articulationAngle * scGeometry.facetRotAxes_B[i][1],
-articulationAngle * scGeometry.facetRotAxes_B[i][2]};
PRV2C(prv_BB0, dcmBB0);
dcm_BB0 = c2DArray2EigenMatrix3d(dcmBB0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ articulating facets. The unit test for this module shows how to set up this part

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
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.

.. list-table:: Module I/O Messages
Expand Down Expand Up @@ -48,7 +48,7 @@ required to rotate the given facet normal vector through the current facet artic
principal rotation vector (PRV) transformation where:

.. math::
[\mathcal{B}_0\mathcal{B}] = \text{PRV2C}(\phi, \boldsymbol{\hat{a}})
[\mathcal{B}\mathcal{B}_0] = \text{PRV2C}(-\phi, \boldsymbol{\hat{a}})

and

Expand Down
Loading