|
22 | 22 |
|
23 | 23 | #include <Eigen/Dense> |
24 | 24 | #include <vector> |
25 | | -#include "simulation/dynamics/_GeneralModuleFiles/dynamicEffector.h" |
| 25 | + |
26 | 26 | #include "architecture/_GeneralModuleFiles/sys_model.h" |
27 | | -#include "architecture/utilities/bskLogging.h" |
28 | 27 | #include "architecture/messaging/messaging.h" |
29 | | -#include "architecture/msgPayloadDefC/SpicePlanetStateMsgPayload.h" |
30 | 28 | #include "architecture/msgPayloadDefC/HingedRigidBodyMsgPayload.h" |
31 | | -#include "simulation/dynamics/_GeneralModuleFiles/stateData.h" |
32 | | -#include "architecture/utilities/avsEigenSupport.h" |
| 29 | +#include "architecture/msgPayloadDefC/SpicePlanetStateMsgPayload.h" |
33 | 30 | #include "architecture/utilities/avsEigenMRP.h" |
| 31 | +#include "architecture/utilities/avsEigenSupport.h" |
| 32 | +#include "architecture/utilities/bskLogging.h" |
| 33 | +#include "simulation/dynamics/_GeneralModuleFiles/dynamicEffector.h" |
| 34 | +#include "simulation/dynamics/_GeneralModuleFiles/stateData.h" |
34 | 35 |
|
35 | 36 | /*! @brief Spacecraft Geometry Data */ |
36 | 37 | typedef struct { |
37 | | - std::vector<double> facetAreas; //!< [m^2] Vector of facet areas |
38 | | - std::vector<double> facetSpecCoeffs; //!< Vector of facet spectral reflection optical coefficients |
39 | | - std::vector<double> facetDiffCoeffs; //!< Vector of facet diffuse reflection optical coefficients |
40 | | - std::vector<Eigen::Vector3d> facetNormals_B; //!< Vector of facet normals expressed in B frame components |
41 | | - std::vector<Eigen::Vector3d> facetLocationsPntB_B; //!< [m] Vector of facet COP locations wrt point B expressed in B frame components |
42 | | - std::vector<Eigen::Vector3d> facetRotAxes_B; //!< [m] Vector of facet rotation axes expressed in B frame components |
43 | | -}FacetedSRPSpacecraftGeometryData; |
| 38 | + std::vector<double> facetAreas; //!< [m^2] Vector of facet areas |
| 39 | + std::vector<double> facetSpecCoeffs; //!< Vector of facet spectral reflection optical coefficients |
| 40 | + std::vector<double> facetDiffCoeffs; //!< Vector of facet diffuse reflection optical coefficients |
| 41 | + std::vector<Eigen::Vector3d> facetNormals_B; //!< Vector of facet normals expressed in B frame components |
| 42 | + std::vector<Eigen::Vector3d> |
| 43 | + facetLocationsPntB_B; //!< [m] Vector of facet COP locations wrt point B expressed in B frame components |
| 44 | + std::vector<Eigen::Vector3d> facetRotAxes_B; //!< [m] Vector of facet rotation axes expressed in B frame components |
| 45 | +} FacetedSRPSpacecraftGeometryData; |
44 | 46 |
|
45 | 47 | /*! @brief Faceted Solar Radiation Pressure Dynamic Effector */ |
46 | | -class FacetSRPDynamicEffector: public SysModel, public DynamicEffector { |
47 | | -public: |
48 | | - FacetSRPDynamicEffector(); //!< The module constructor |
49 | | - ~FacetSRPDynamicEffector(); //!< The module destructor |
50 | | - void linkInStates(DynParamManager& states) override; //!< Method for giving the effector access to the hub states |
51 | | - void computeForceTorque(double callTime, double timeStep) override; //!< Method for computing the SRP force and torque about point B |
52 | | - void reset(uint64_t currentSimNanos) override; //!< Reset method |
| 48 | +class FacetSRPDynamicEffector : public SysModel, public DynamicEffector { |
| 49 | + public: |
| 50 | + FacetSRPDynamicEffector(); //!< The module constructor |
| 51 | + ~FacetSRPDynamicEffector(); //!< The module destructor |
| 52 | + void linkInStates(DynParamManager &states) override; //!< Method for giving the effector access to the hub states |
| 53 | + void computeForceTorque(double callTime, |
| 54 | + double timeStep) override; //!< Method for computing the SRP force and torque about point B |
| 55 | + void reset(uint64_t currentSimNanos) override; //!< Reset method |
53 | 56 | void addFacet(double area, |
54 | 57 | double specCoeff, |
55 | 58 | double diffCoeff, |
56 | 59 | Eigen::Vector3d normal_B, |
57 | 60 | Eigen::Vector3d locationPntB_B, |
58 | | - Eigen::Vector3d rotAxis_B); //!< Method for adding facets to the spacecraft geometry structure |
| 61 | + Eigen::Vector3d rotAxis_B); //!< Method for adding facets to the spacecraft geometry structure |
59 | 62 | void addArticulatedFacet(Message<HingedRigidBodyMsgPayload> *tmpMsg); |
60 | 63 | void ReadMessages(); |
61 | 64 |
|
62 | | - uint64_t numFacets; //!< Total number of spacecraft facets |
63 | | - uint64_t numArticulatedFacets; //!< Number of articulated facets |
64 | | - ReadFunctor<SpicePlanetStateMsgPayload> sunInMsg; //!< Sun spice ephemeris input message |
| 65 | + uint64_t numFacets; //!< Total number of spacecraft facets |
| 66 | + uint64_t numArticulatedFacets; //!< Number of articulated facets |
| 67 | + ReadFunctor<SpicePlanetStateMsgPayload> sunInMsg; //!< Sun spice ephemeris input message |
65 | 68 |
|
66 | | -private: |
67 | | - std::vector<ReadFunctor<HingedRigidBodyMsgPayload>> articulatedFacetDataInMsgs; //!< Articulated facet angle data input message |
68 | | - std::vector<double> facetArticulationAngleList; //!< [rad] Vector of facet rotation angles |
69 | | - FacetedSRPSpacecraftGeometryData scGeometry; //!< Spacecraft facet data structure |
70 | | - Eigen::Vector3d r_SN_N; //!< [m] Sun inertial position vector |
71 | | - StateData *hubPosition; //!< [m] Hub inertial position vector |
72 | | - StateData *hubSigma; //!< Hub MRP inertial attitude |
73 | | - bool facetAngleMsgRead; //!< Boolean variable signaling that the facet articulation messages are read |
| 69 | + private: |
| 70 | + std::vector<ReadFunctor<HingedRigidBodyMsgPayload>> |
| 71 | + articulatedFacetDataInMsgs; //!< Articulated facet angle data input message |
| 72 | + std::vector<double> facetArticulationAngleList; //!< [rad] Vector of facet rotation angles |
| 73 | + FacetedSRPSpacecraftGeometryData scGeometry; //!< Spacecraft facet data structure |
| 74 | + Eigen::Vector3d r_SN_N; //!< [m] Sun inertial position vector |
| 75 | + StateData *hubPosition; //!< [m] Hub inertial position vector |
| 76 | + StateData *hubSigma; //!< Hub MRP inertial attitude |
| 77 | + bool facetAngleMsgRead; //!< Boolean variable signaling that the facet articulation messages are read |
74 | 78 | }; |
75 | 79 |
|
76 | 80 | #endif |
0 commit comments