tweaks for ACS scheduling #395
@ -20,6 +20,8 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
- All `targetQuat` functions in `Guidance` now return the target quaternion (target
|
- All `targetQuat` functions in `Guidance` now return the target quaternion (target
|
||||||
in ECI frame), which is passed on to `CtrlValData`.
|
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
|
## Added
|
||||||
|
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
#include "fsfw/tasks/FixedTimeslotTaskIF.h"
|
||||||
#include "fsfw/tasks/PeriodicTaskIF.h"
|
#include "fsfw/tasks/PeriodicTaskIF.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
|
#include "mission/core/pollingSeqTables.h"
|
||||||
#include "mission/core/scheduling.h"
|
#include "mission/core/scheduling.h"
|
||||||
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
#include "mission/devices/devicedefinitions/Max31865Definitions.h"
|
||||||
#include "mission/utility/InitMission.h"
|
#include "mission/utility/InitMission.h"
|
||||||
#include "pollingsequence/pollingSequenceFactory.h"
|
|
||||||
|
|
||||||
/* This is configured for linux without CR */
|
/* This is configured for linux without CR */
|
||||||
#ifdef PLATFORM_UNIX
|
#ifdef PLATFORM_UNIX
|
||||||
@ -404,7 +404,7 @@ void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction
|
|||||||
#ifdef RELEASE_BUILD
|
#ifdef RELEASE_BUILD
|
||||||
static constexpr float acsPstPeriod = 0.4;
|
static constexpr float acsPstPeriod = 0.4;
|
||||||
#else
|
#else
|
||||||
static constexpr float acsPstPeriod = 0.8;
|
static constexpr float acsPstPeriod = 0.4;
|
||||||
#endif
|
#endif
|
||||||
FixedTimeslotTaskIF* acsTcsPst = factory.createFixedTimeslotTask(
|
FixedTimeslotTaskIF* acsTcsPst = factory.createFixedTimeslotTask(
|
||||||
"ACS_TCS_PST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc);
|
"ACS_TCS_PST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, acsPstPeriod, missedDeadlineFunc);
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
#ifndef BSP_Q7S_INITMISSION_H_
|
#ifndef BSP_Q7S_INITMISSION_H_
|
||||||
#define BSP_Q7S_INITMISSION_H_
|
#define BSP_Q7S_INITMISSION_H_
|
||||||
|
|
||||||
#include <pollingsequence/pollingSequenceFactory.h>
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "fsfw/tasks/definitions.h"
|
#include "fsfw/tasks/definitions.h"
|
||||||
|
#include "mission/core/pollingSeqTables.h"
|
||||||
|
|
||||||
using pst::AcsPstCfg;
|
using pst::AcsPstCfg;
|
||||||
|
|
||||||
|
@ -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_3_READ_IMTQ_MGM_MS = 42;
|
||||||
static constexpr uint32_t SCHED_BLOCK_4_ACS_CTRL_MS = 45;
|
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_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;
|
static constexpr uint32_t SCHED_BLOCK_7_RW_READ_MS = 300;
|
||||||
|
|
||||||
// 15 ms for FM
|
// 15 ms for FM
|
||||||
@ -76,6 +77,7 @@ static constexpr float SCHED_BLOCK_5_PERIOD = static_cast<float>(SCHED_BLOCK_5_A
|
|||||||
static constexpr float SCHED_BLOCK_6_PERIOD =
|
static constexpr float SCHED_BLOCK_6_PERIOD =
|
||||||
static_cast<float>(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0;
|
static_cast<float>(SCHED_BLOCK_6_IMTQ_BLOCK_2_MS) / 400.0;
|
||||||
static constexpr float SCHED_BLOCK_7_PERIOD = static_cast<float>(SCHED_BLOCK_7_RW_READ_MS) / 400.0;
|
static constexpr float SCHED_BLOCK_7_PERIOD = static_cast<float>(SCHED_BLOCK_7_RW_READ_MS) / 400.0;
|
||||||
|
static constexpr float SCHED_BLOCK_RTD_PERIOD = static_cast<float>(SCHED_BLOCK_RTD) / 400.0;
|
||||||
|
|||||||
|
|
||||||
} // namespace acs
|
} // namespace acs
|
||||||
|
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit 2efff4d2c5ef82b5b62567ab1bb0ee53aeed6a5a
|
Subproject commit bd208038dd85a94dce8c763397ad5ac7eae76402
|
@ -3,7 +3,8 @@ if(EIVE_BUILD_GPSD_GPS_HANDLER)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(
|
target_sources(
|
||||||
${OBSW_NAME} PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp
|
${OBSW_NAME}
|
||||||
|
PRIVATE Max31865RtdPolling.cpp ScexUartReader.cpp ImtqPollingTask.cpp
|
||||||
ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp)
|
ScexDleParser.cpp ScexHelper.cpp RwPollingTask.cpp)
|
||||||
|
|
||||||
add_subdirectory(ploc)
|
add_subdirectory(ploc)
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp
|
target_sources(${OBSW_NAME} PRIVATE ipc/MissionMessageTypes.cpp)
|
||||||
pollingsequence/pollingSequenceFactory.cpp)
|
|
||||||
|
|
||||||
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(${OBSW_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
@ -111,8 +111,7 @@ void Guidance::targetQuatPtgSingleAxis(timeval now, double posSatE[3], double ve
|
|||||||
if (sightAngleSun < critSightAngle) {
|
if (sightAngleSun < critSightAngle) {
|
||||||
strBlindAvoidFlag = true;
|
strBlindAvoidFlag = true;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (sightAngleSun < blindEnd * exclAngle) {
|
if (sightAngleSun < blindEnd * exclAngle) {
|
||||||
double normBlindRefRate = acsParameters.targetModeControllerParameters.blindRotRate;
|
double normBlindRefRate = acsParameters.targetModeControllerParameters.blindRotRate;
|
||||||
double blindRefRate[3] = {0, 0, 0};
|
double blindRefRate[3] = {0, 0, 0};
|
||||||
|
@ -1114,9 +1114,8 @@ void MultiplicativeKalmanFilter::updateDataSetWithoutData(acsctrl::MekfData *mek
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData,
|
void MultiplicativeKalmanFilter::updateDataSet(acsctrl::MekfData *mekfData, MekfStatus mekfStatus,
|
||||||
MekfStatus mekfStatus, double quat[4],
|
double quat[4], double satRotRate[3]) {
|
||||||
double satRotRate[3]) {
|
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(mekfData);
|
PoolReadGuard pg(mekfData);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
@ -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)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "pollingSequenceFactory.h"
|
#include "pollingSeqTables.h"
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
@ -659,7 +659,7 @@ ReturnValue_t pst::pstTcsAndAcs(FixedTimeslotTaskIF *thisSequence, AcsPstCfg cfg
|
|||||||
DeviceHandlerIF::GET_READ);
|
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;
|
return returnvalue::OK;
|
||||||
}
|
}
|
@ -256,7 +256,7 @@ ReturnValue_t ImtqHandler::scanForReply(const uint8_t* start, size_t remainingSi
|
|||||||
ReturnValue_t ImtqHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
ReturnValue_t ImtqHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||||
ReturnValue_t result;
|
ReturnValue_t result;
|
||||||
ReturnValue_t status = returnvalue::OK;
|
ReturnValue_t status = returnvalue::OK;
|
||||||
if(getMode() != MODE_NORMAL) {
|
if (getMode() != MODE_NORMAL) {
|
||||||
// Ignore replies during transitions.
|
// Ignore replies during transitions.
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
if(count == 500) {
|
if (count == 500) {
|
||||||
sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl;
|
sif::error << "CfdpTmFunnel: Possible message storm detected" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ ReturnValue_t PusTmFunnel::performOperation(uint8_t) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
count++;
|
count++;
|
||||||
if(count == 500) {
|
if (count == 500) {
|
||||||
sif::error << "PusTmFunnel: Possible message storm detected" << std::endl;
|
sif::error << "PusTmFunnel: Possible message storm detected" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ ReturnValue_t VirtualChannel::performOperation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
count++;
|
count++;
|
||||||
if(count == 500) {
|
if (count == 500) {
|
||||||
sif::error << "VirtualChannel: Possible message storm detected" << std::endl;
|
sif::error << "VirtualChannel: Possible message storm detected" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user
only implemented here, but doesn't get used
good point