diff --git a/CHANGELOG.md b/CHANGELOG.md index 5da3c93e..fb5ea9d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,8 @@ COM PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/364 * Solves [#386](https://egit.irs.uni-stuttgart.de/eive/eive-obsw/issues/386) - All `targetQuat` functions in `Guidance` now return the target quaternion (target in ECI frame), which is passed on to `CtrlValData`. +- Moved polling sequence table definitions and source code to `mission/core` folder. + PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/395 ## Added diff --git a/bsp_q7s/core/scheduling.cpp b/bsp_q7s/core/scheduling.cpp index 3c3695dd..6dc7fceb 100644 --- a/bsp_q7s/core/scheduling.cpp +++ b/bsp_q7s/core/scheduling.cpp @@ -17,10 +17,10 @@ #include "fsfw/tasks/FixedTimeslotTaskIF.h" #include "fsfw/tasks/PeriodicTaskIF.h" #include "fsfw/tasks/TaskFactory.h" +#include "mission/core/pollingSeqTables.h" #include "mission/core/scheduling.h" #include "mission/devices/devicedefinitions/Max31865Definitions.h" #include "mission/utility/InitMission.h" -#include "pollingsequence/pollingSequenceFactory.h" /* This is configured for linux without CR */ #ifdef PLATFORM_UNIX @@ -404,7 +404,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction #ifdef RELEASE_BUILD static constexpr float acsPstPeriod = 0.4; #else - static constexpr float acsPstPeriod = 0.8; + static constexpr float acsPstPeriod = 0.4; #endif FixedTimeslotTaskIF* acsTcsPst = factory.createFixedTimeslotTask( "ACS_TCS_PST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc); diff --git a/bsp_q7s/core/scheduling.h b/bsp_q7s/core/scheduling.h index 2241e683..e49ce036 100644 --- a/bsp_q7s/core/scheduling.h +++ b/bsp_q7s/core/scheduling.h @@ -1,11 +1,10 @@ #ifndef BSP_Q7S_INITMISSION_H_ #define BSP_Q7S_INITMISSION_H_ -#include - #include #include "fsfw/tasks/definitions.h" +#include "mission/core/pollingSeqTables.h" using pst::AcsPstCfg; diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index c87c89ff..edeb3765 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -62,7 +62,8 @@ static constexpr uint32_t SCHED_BLOCK_2_SENSOR_READ_MS = 30; static constexpr uint32_t SCHED_BLOCK_3_READ_IMTQ_MGM_MS = 42; static constexpr uint32_t SCHED_BLOCK_4_ACS_CTRL_MS = 45; static constexpr uint32_t SCHED_BLOCK_5_ACTUATOR_MS = 50; -static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 75; +static constexpr uint32_t SCHED_BLOCK_6_IMTQ_BLOCK_2_MS = 90; +static constexpr uint32_t SCHED_BLOCK_RTD = 150; static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300; // 15 ms for FM @@ -76,6 +77,7 @@ static constexpr float SCHED_BLOCK_5_PERIOD = static_cast(SCHED_BLOCK_5_A static constexpr float SCHED_BLOCK_6_PERIOD = static_cast(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0; static constexpr float SCHED_BLOCK_7_PERIOD = static_cast(SCHED_BLOCK_7_RW_READ_MS) / 400.0; +static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast(SCHED_BLOCK_RTD) / 400.0; } // namespace acs diff --git a/linux/fsfwconfig/CMakeLists.txt b/linux/fsfwconfig/CMakeLists.txt index bfede452..d5b5e7e5 100644 --- a/linux/fsfwconfig/CMakeLists.txt +++ b/linux/fsfwconfig/CMakeLists.txt @@ -1,5 +1,4 @@ -target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp - pollingsequence/pollingSequenceFactory.cpp) +target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp) target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 2346d18f..031cd384 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -111,8 +111,7 @@ void Guidance::targetQuatPtgSingleAxis(timeval now, double posSatE[3], double ve if (sightAngleSun < critSightAngle) { strBlindAvoidFlag = true; } - } - else { + } else { if (sightAngleSun < blindEnd * exclAngle) { double normBlindRefRate = acsParameters.targetModeControllerParameters.blindRotRate; double blindRefRate[3] = {0, 0, 0}; diff --git a/mission/controller/acs/MultiplicativeKalmanFilter.cpp b/mission/controller/acs/MultiplicativeKalmanFilter.cpp index d90f3f51..5bae4624 100644 --- a/mission/controller/acs/MultiplicativeKalmanFilter.cpp +++ b/mission/controller/acs/MultiplicativeKalmanFilter.cpp @@ -1098,7 +1098,7 @@ void MultiplicativeKalmanFilter::reset(acsctrl::MekfData *mekfData) { } void MultiplicativeKalmanFilter::updateDataSetWithoutData(acsctrl::MekfData *mekfData, - MekfStatus mekfStatus) { + MekfStatus mekfStatus) { { PoolReadGuard pg(mekfData); if (pg.getReadResult() == returnvalue::OK) { @@ -1114,9 +1114,8 @@ void MultiplicativeKalmanFilter::updateDataSetWithoutData(acsctrl::MekfData *mek } } -void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData, - MekfStatus mekfStatus, double quat[4], - double satRotRate[3]) { +void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData, MekfStatus mekfStatus, + double quat[4], double satRotRate[3]) { { PoolReadGuard pg(mekfData); if (pg.getReadResult() == returnvalue::OK) { diff --git a/mission/core/CMakeLists.txt b/mission/core/CMakeLists.txt index fc6e1cff..ce731219 100644 --- a/mission/core/CMakeLists.txt +++ b/mission/core/CMakeLists.txt @@ -1 +1,2 @@ -target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp) +target_sources(${LIB_EIVE_MISSION} PRIVATE GenericFactory.cpp scheduling.cpp + pollingSeqTables.cpp) diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp b/mission/core/pollingSeqTables.cpp similarity index 99% rename from linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp rename to mission/core/pollingSeqTables.cpp index 1f3e65de..0b134d87 100644 --- a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.cpp +++ b/mission/core/pollingSeqTables.cpp @@ -1,4 +1,4 @@ -#include "pollingSequenceFactory.h" +#include "pollingSeqTables.h" #include #include @@ -659,7 +659,7 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg DeviceHandlerIF::GET_READ); } - thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * 0.5, 0); + thisSequence->addSlot(objects::SPI_RTD_COM_IF, length * config::acs::SCHED_BLOCK_RTD_PERIOD, 0); return returnvalue::OK; } diff --git a/linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h b/mission/core/pollingSeqTables.h similarity index 100% rename from linux/fsfwconfig/pollingsequence/pollingSequenceFactory.h rename to mission/core/pollingSeqTables.h