v7.5.0 #828
15
CHANGELOG.md
15
CHANGELOG.md
@ -14,7 +14,20 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
- The TMTC interface changes in any shape of form.
|
- The TMTC interface changes in any shape of form.
|
||||||
- The behaviour of the OBSW changes in a major shape or form relevant for operations
|
- The behaviour of the OBSW changes in a major shape or form relevant for operations
|
||||||
|
|
||||||
# [unreleased]
|
# [v7.5.0] 2023-12-XX
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- ACS-Board default side changed to B-Side
|
||||||
|
- The TLE uploaded now gets stored in a file on the filesystem. It will always be stored on
|
||||||
|
the current active SD Card. After a reboot, the TLE will be read from the filesystem.
|
||||||
|
A filesystem change via `prefSD` on bootup, can lead to the TLE not being read, even
|
||||||
|
though it is there.
|
||||||
|
- Added action cmd to read the currently stored TLE.
|
||||||
|
|
||||||
|
# [v7.4.0] 2023-11-30
|
||||||
|
|
||||||
|
- `eive-tmtc` v5.11.0
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 7)
|
set(OBSW_VERSION_MAJOR 7)
|
||||||
set(OBSW_VERSION_MINOR 3)
|
set(OBSW_VERSION_MINOR 4)
|
||||||
set(OBSW_VERSION_REVISION 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
@ -175,7 +175,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||||
power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
power::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||||
#endif
|
#endif
|
||||||
createAcsController(true, enableHkSets);
|
createAcsController(true, enableHkSets, *SdCardManager::instance());
|
||||||
HeaterHandler* heaterHandler;
|
HeaterHandler* heaterHandler;
|
||||||
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
createHeaterComponents(gpioComIF, pwrSwitcher, healthTable, heaterHandler);
|
||||||
createThermalController(*heaterHandler, true);
|
createThermalController(*heaterHandler, true);
|
||||||
|
@ -130,6 +130,6 @@ void ObjectFactory::produce(void* args) {
|
|||||||
|
|
||||||
createMiscComponents();
|
createMiscComponents();
|
||||||
createThermalController(*heaterHandler, false);
|
createThermalController(*heaterHandler, false);
|
||||||
createAcsController(true, enableHkSets);
|
createAcsController(true, enableHkSets, *SdCardManager::instance());
|
||||||
satsystem::init(false);
|
satsystem::init(false);
|
||||||
}
|
}
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit b28174db249cb33b541f665270fd6af14c382351
|
Subproject commit 7187f2b5cdfe163bf7ed1a8fab48900d69f4c8bf
|
@ -335,8 +335,9 @@ void ObjectFactory::createScexComponents(std::string uartDev, PowerSwitchIF* pwr
|
|||||||
scexHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
scexHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
AcsController* ObjectFactory::createAcsController(bool connectSubsystem, bool enableHkSets) {
|
AcsController* ObjectFactory::createAcsController(bool connectSubsystem, bool enableHkSets,
|
||||||
auto acsCtrl = new AcsController(objects::ACS_CONTROLLER, enableHkSets);
|
SdCardMountedIF& mountedIF) {
|
||||||
|
auto acsCtrl = new AcsController(objects::ACS_CONTROLLER, enableHkSets, mountedIF);
|
||||||
if (connectSubsystem) {
|
if (connectSubsystem) {
|
||||||
acsCtrl->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
acsCtrl->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,8 @@ void createScexComponents(std::string uartDev, PowerSwitchIF* pwrSwitcher,
|
|||||||
|
|
||||||
void gpioChecker(ReturnValue_t result, std::string output);
|
void gpioChecker(ReturnValue_t result, std::string output);
|
||||||
|
|
||||||
AcsController* createAcsController(bool connectSubsystem, bool enableHkSets);
|
AcsController* createAcsController(bool connectSubsystem, bool enableHkSets,
|
||||||
|
SdCardMountedIF& mountedIF);
|
||||||
PowerController* createPowerController(bool connectSubsystem, bool enableHkSets);
|
PowerController* createPowerController(bool connectSubsystem, bool enableHkSets);
|
||||||
|
|
||||||
} // namespace ObjectFactory
|
} // namespace ObjectFactory
|
||||||
|
@ -73,6 +73,8 @@ static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(6, severity::HIG
|
|||||||
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(7, severity::HIGH);
|
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(7, severity::HIGH);
|
||||||
//! [EXPORT] : [COMMENT] The TLE for the SGP4 Propagator has become too old.
|
//! [EXPORT] : [COMMENT] The TLE for the SGP4 Propagator has become too old.
|
||||||
static constexpr Event TLE_TOO_OLD = MAKE_EVENT(8, severity::INFO);
|
static constexpr Event TLE_TOO_OLD = MAKE_EVENT(8, severity::INFO);
|
||||||
|
//! [EXPORT] : [COMMENT] The TLE could not be read from the filesystem.
|
||||||
|
static constexpr Event TLE_FILE_READ_FAILED = MAKE_EVENT(9, severity::LOW);
|
||||||
|
|
||||||
extern const char* getModeStr(AcsMode mode);
|
extern const char* getModeStr(AcsMode mode);
|
||||||
|
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
#include "AcsController.h"
|
#include "AcsController.h"
|
||||||
|
|
||||||
#include <fsfw/datapool/PoolReadGuard.h>
|
AcsController::AcsController(object_id_t objectId, bool enableHkSets, SdCardMountedIF &sdcMan)
|
||||||
#include <mission/acs/defs.h>
|
|
||||||
#include <mission/config/torquer.h>
|
|
||||||
|
|
||||||
AcsController::AcsController(object_id_t objectId, bool enableHkSets)
|
|
||||||
: ExtendedControllerBase(objectId),
|
: ExtendedControllerBase(objectId),
|
||||||
enableHkSets(enableHkSets),
|
enableHkSets(enableHkSets),
|
||||||
|
sdcMan(sdcMan),
|
||||||
fusedRotationEstimation(&acsParameters),
|
fusedRotationEstimation(&acsParameters),
|
||||||
guidance(&acsParameters),
|
guidance(&acsParameters),
|
||||||
safeCtrl(&acsParameters),
|
safeCtrl(&acsParameters),
|
||||||
@ -22,8 +19,7 @@ AcsController::AcsController(object_id_t objectId, bool enableHkSets)
|
|||||||
mekfData(this),
|
mekfData(this),
|
||||||
ctrlValData(this),
|
ctrlValData(this),
|
||||||
actuatorCmdData(this),
|
actuatorCmdData(this),
|
||||||
fusedRotRateData(this),
|
fusedRotRateData(this) {}
|
||||||
tleData(this) {}
|
|
||||||
|
|
||||||
ReturnValue_t AcsController::initialize() {
|
ReturnValue_t AcsController::initialize() {
|
||||||
ReturnValue_t result = parameterHelper.initialize();
|
ReturnValue_t result = parameterHelper.initialize();
|
||||||
@ -67,22 +63,27 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t
|
|||||||
if (size != 69 * 2) {
|
if (size != 69 * 2) {
|
||||||
return INVALID_PARAMETERS;
|
return INVALID_PARAMETERS;
|
||||||
}
|
}
|
||||||
ReturnValue_t result = navigation.updateTle(data, data + 69);
|
ReturnValue_t result = updateTle(data, data + 69, false);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
PoolReadGuard pg(&tleData);
|
|
||||||
navigation.updateTle(tleData.line1.value, tleData.line2.value);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
{
|
result = writeTleToFs(data);
|
||||||
PoolReadGuard pg(&tleData);
|
if (result != returnvalue::OK) {
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
return result;
|
||||||
std::memcpy(tleData.line1.value, data, 69);
|
|
||||||
std::memcpy(tleData.line2.value, data + 69, 69);
|
|
||||||
tleData.setValidity(true, true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
|
case (READ_TLE): {
|
||||||
|
uint8_t tle[69 * 2] = {};
|
||||||
|
uint8_t line2[69] = {};
|
||||||
|
ReturnValue_t result = readTleFromFs(tle, line2);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
std::memcpy(tle + 69, line2, 69);
|
||||||
|
actionHelper.reportData(commandedBy, actionId, tle, 69 * 2);
|
||||||
|
return EXECUTION_FINISHED;
|
||||||
|
}
|
||||||
default: {
|
default: {
|
||||||
return HasActionsIF::INVALID_ACTION_ID;
|
return HasActionsIF::INVALID_ACTION_ID;
|
||||||
}
|
}
|
||||||
@ -130,6 +131,10 @@ void AcsController::performControlOperation() {
|
|||||||
}
|
}
|
||||||
case InternalState::INITIAL_DELAY: {
|
case InternalState::INITIAL_DELAY: {
|
||||||
if (initialCountdown.hasTimedOut()) {
|
if (initialCountdown.hasTimedOut()) {
|
||||||
|
uint8_t line1[69] = {};
|
||||||
|
uint8_t line2[69] = {};
|
||||||
|
readTleFromFs(line1, line2);
|
||||||
|
updateTle(line1, line2, true);
|
||||||
internalState = InternalState::READY;
|
internalState = InternalState::READY;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -767,9 +772,6 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL, &rotRateParallel);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL, &rotRateParallel);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL, &rotRateTotal);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL, &rotRateTotal);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 10.0});
|
||||||
// TLE Data
|
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::TLE_LINE_1, &line1);
|
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::TLE_LINE_2, &line2);
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -997,6 +999,67 @@ void AcsController::copySusData() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReturnValue_t AcsController::updateTle(const uint8_t *line1, const uint8_t *line2, bool fromFile) {
|
||||||
|
ReturnValue_t result = navigation.updateTle(line1, line2);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
if (not fromFile) {
|
||||||
|
uint8_t fileLine1[69] = {};
|
||||||
|
uint8_t fileLine2[69] = {};
|
||||||
|
readTleFromFs(fileLine1, fileLine2);
|
||||||
|
navigation.updateTle(fileLine1, fileLine2);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t AcsController::writeTleToFs(const uint8_t *tle) {
|
||||||
|
auto mntPrefix = sdcMan.getCurrentMountPrefix();
|
||||||
|
if (mntPrefix == nullptr or !sdcMan.isSdCardUsable(std::nullopt)) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
std::string path = mntPrefix + TLE_FILE;
|
||||||
|
// Clear existing TLE from file
|
||||||
|
std::ofstream tleFile(path.c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||||
|
if (tleFile.is_open()) {
|
||||||
|
tleFile.write(reinterpret_cast<const char *>(tle), 69);
|
||||||
|
tleFile << "\n";
|
||||||
|
tleFile.write(reinterpret_cast<const char *>(tle + 69), 69);
|
||||||
|
} else {
|
||||||
|
return WRITE_FILE_FAILED;
|
||||||
|
}
|
||||||
|
tleFile.close();
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t AcsController::readTleFromFs(uint8_t *line1, uint8_t *line2) {
|
||||||
|
auto mntPrefix = sdcMan.getCurrentMountPrefix();
|
||||||
|
if (mntPrefix == nullptr or !sdcMan.isSdCardUsable(std::nullopt)) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
}
|
||||||
|
std::string path = mntPrefix + TLE_FILE;
|
||||||
|
std::error_code e;
|
||||||
|
if (std::filesystem::exists(path, e)) {
|
||||||
|
// Read existing TLE from file
|
||||||
|
std::fstream tleFile = std::fstream(path.c_str(), std::fstream::in);
|
||||||
|
if (tleFile.is_open()) {
|
||||||
|
std::string tleLine1, tleLine2;
|
||||||
|
getline(tleFile, tleLine1);
|
||||||
|
std::memcpy(line1, tleLine1.c_str(), 69);
|
||||||
|
getline(tleFile, tleLine2);
|
||||||
|
std::memcpy(line2, tleLine2.c_str(), 69);
|
||||||
|
} else {
|
||||||
|
triggerEvent(acs::TLE_FILE_READ_FAILED);
|
||||||
|
return READ_FILE_FAILED;
|
||||||
|
}
|
||||||
|
tleFile.close();
|
||||||
|
} else {
|
||||||
|
triggerEvent(acs::TLE_FILE_READ_FAILED);
|
||||||
|
return READ_FILE_FAILED;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
void AcsController::copyGyrData() {
|
void AcsController::copyGyrData() {
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&sensorValues.gyr0AdisSet);
|
PoolReadGuard pg(&sensorValues.gyr0AdisSet);
|
||||||
|
@ -4,15 +4,18 @@
|
|||||||
#include <eive/objects.h>
|
#include <eive/objects.h>
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
#include <fsfw/coordinates/Sgp4Propagator.h>
|
#include <fsfw/coordinates/Sgp4Propagator.h>
|
||||||
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
#include <fsfw/health/HealthTable.h>
|
#include <fsfw/health/HealthTable.h>
|
||||||
#include <fsfw/parameters/ParameterHelper.h>
|
#include <fsfw/parameters/ParameterHelper.h>
|
||||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||||
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
|
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
|
||||||
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.h>
|
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.h>
|
||||||
|
#include <mission/acs/defs.h>
|
||||||
#include <mission/acs/imtqHelpers.h>
|
#include <mission/acs/imtqHelpers.h>
|
||||||
#include <mission/acs/rwHelpers.h>
|
#include <mission/acs/rwHelpers.h>
|
||||||
#include <mission/acs/susMax1227Helpers.h>
|
#include <mission/acs/susMax1227Helpers.h>
|
||||||
|
#include <mission/config/torquer.h>
|
||||||
#include <mission/controller/acs/ActuatorCmd.h>
|
#include <mission/controller/acs/ActuatorCmd.h>
|
||||||
#include <mission/controller/acs/FusedRotationEstimation.h>
|
#include <mission/controller/acs/FusedRotationEstimation.h>
|
||||||
#include <mission/controller/acs/Guidance.h>
|
#include <mission/controller/acs/Guidance.h>
|
||||||
@ -23,13 +26,18 @@
|
|||||||
#include <mission/controller/acs/control/PtgCtrl.h>
|
#include <mission/controller/acs/control/PtgCtrl.h>
|
||||||
#include <mission/controller/acs/control/SafeCtrl.h>
|
#include <mission/controller/acs/control/SafeCtrl.h>
|
||||||
#include <mission/controller/controllerdefinitions/AcsCtrlDefinitions.h>
|
#include <mission/controller/controllerdefinitions/AcsCtrlDefinitions.h>
|
||||||
|
#include <mission/memory/SdCardMountedIF.h>
|
||||||
#include <mission/utility/trace.h>
|
#include <mission/utility/trace.h>
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
class AcsController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
class AcsController : public ExtendedControllerBase, public ReceivesParameterMessagesIF {
|
||||||
public:
|
public:
|
||||||
static constexpr dur_millis_t INIT_DELAY = 500;
|
static constexpr dur_millis_t INIT_DELAY = 500;
|
||||||
|
|
||||||
AcsController(object_id_t objectId, bool enableHkSets);
|
AcsController(object_id_t objectId, bool enableHkSets, SdCardMountedIF& sdcMan);
|
||||||
|
|
||||||
MessageQueueId_t getCommandQueue() const;
|
MessageQueueId_t getCommandQueue() const;
|
||||||
ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId,
|
ReturnValue_t getParameter(uint8_t domainId, uint8_t parameterId,
|
||||||
@ -50,6 +58,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
|||||||
|
|
||||||
bool enableHkSets = false;
|
bool enableHkSets = false;
|
||||||
|
|
||||||
|
SdCardMountedIF& sdcMan;
|
||||||
|
|
||||||
timeval timeAbsolute;
|
timeval timeAbsolute;
|
||||||
timeval timeRelative;
|
timeval timeRelative;
|
||||||
double timeDelta = 0.0;
|
double timeDelta = 0.0;
|
||||||
@ -93,10 +103,15 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
|||||||
static const DeviceCommandId_t RESET_MEKF = 0x1;
|
static const DeviceCommandId_t RESET_MEKF = 0x1;
|
||||||
static const DeviceCommandId_t RESTORE_MEKF_NONFINITE_RECOVERY = 0x2;
|
static const DeviceCommandId_t RESTORE_MEKF_NONFINITE_RECOVERY = 0x2;
|
||||||
static const DeviceCommandId_t UPDATE_TLE = 0x3;
|
static const DeviceCommandId_t UPDATE_TLE = 0x3;
|
||||||
|
static const DeviceCommandId_t READ_TLE = 0x4;
|
||||||
|
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL;
|
static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL;
|
||||||
//! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent.
|
//! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent.
|
||||||
static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0);
|
static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0);
|
||||||
|
//! [EXPORT] : [COMMENT] Writing the TLE to the file has failed.
|
||||||
|
static constexpr ReturnValue_t WRITE_FILE_FAILED = MAKE_RETURN_CODE(1);
|
||||||
|
//! [EXPORT] : [COMMENT] Reading the TLE to the file has failed.
|
||||||
|
static constexpr ReturnValue_t READ_FILE_FAILED = MAKE_RETURN_CODE(2);
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
@ -131,6 +146,12 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
|||||||
void updateCtrlValData(const double* tgtQuat, const double* errQuat, double errAng,
|
void updateCtrlValData(const double* tgtQuat, const double* errQuat, double errAng,
|
||||||
const double* tgtRotRate);
|
const double* tgtRotRate);
|
||||||
|
|
||||||
|
ReturnValue_t updateTle(const uint8_t* line1, const uint8_t* line2, bool fromFile);
|
||||||
|
ReturnValue_t writeTleToFs(const uint8_t* tle);
|
||||||
|
ReturnValue_t readTleFromFs(uint8_t* line1, uint8_t* line2);
|
||||||
|
|
||||||
|
const std::string TLE_FILE = "/conf/tle.txt";
|
||||||
|
|
||||||
/* ACS Sensor Values */
|
/* ACS Sensor Values */
|
||||||
ACS::SensorValues sensorValues;
|
ACS::SensorValues sensorValues;
|
||||||
|
|
||||||
@ -244,11 +265,6 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
|||||||
PoolEntry<double> rotRateParallel = PoolEntry<double>(3);
|
PoolEntry<double> rotRateParallel = PoolEntry<double>(3);
|
||||||
PoolEntry<double> rotRateTotal = PoolEntry<double>(3);
|
PoolEntry<double> rotRateTotal = PoolEntry<double>(3);
|
||||||
|
|
||||||
// TLE Dataset
|
|
||||||
acsctrl::TleData tleData;
|
|
||||||
PoolEntry<uint8_t> line1 = PoolEntry<uint8_t>(69);
|
|
||||||
PoolEntry<uint8_t> line2 = PoolEntry<uint8_t>(69);
|
|
||||||
|
|
||||||
// Initial delay to make sure all pool variables have been initialized their owners
|
// Initial delay to make sure all pool variables have been initialized their owners
|
||||||
Countdown initialCountdown = Countdown(INIT_DELAY);
|
Countdown initialCountdown = Countdown(INIT_DELAY);
|
||||||
};
|
};
|
||||||
|
@ -110,9 +110,6 @@ enum PoolIds : lp_id_t {
|
|||||||
ROT_RATE_ORTHOGONAL,
|
ROT_RATE_ORTHOGONAL,
|
||||||
ROT_RATE_PARALLEL,
|
ROT_RATE_PARALLEL,
|
||||||
ROT_RATE_TOTAL,
|
ROT_RATE_TOTAL,
|
||||||
// TLE
|
|
||||||
TLE_LINE_1,
|
|
||||||
TLE_LINE_2,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr uint8_t MGM_SET_RAW_ENTRIES = 6;
|
static constexpr uint8_t MGM_SET_RAW_ENTRIES = 6;
|
||||||
@ -126,7 +123,6 @@ static constexpr uint8_t MEKF_SET_ENTRIES = 3;
|
|||||||
static constexpr uint8_t CTRL_VAL_SET_ENTRIES = 5;
|
static constexpr uint8_t CTRL_VAL_SET_ENTRIES = 5;
|
||||||
static constexpr uint8_t ACT_CMD_SET_ENTRIES = 3;
|
static constexpr uint8_t ACT_CMD_SET_ENTRIES = 3;
|
||||||
static constexpr uint8_t FUSED_ROT_RATE_SET_ENTRIES = 3;
|
static constexpr uint8_t FUSED_ROT_RATE_SET_ENTRIES = 3;
|
||||||
static constexpr uint8_t TLE_SET_ENTRIES = 2;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Raw MGM sensor data. Includes the IMTQ sensor data and actuator status.
|
* @brief Raw MGM sensor data. Includes the IMTQ sensor data and actuator status.
|
||||||
@ -299,16 +295,6 @@ class FusedRotRateData : public StaticLocalDataSet<FUSED_ROT_RATE_SET_ENTRIES> {
|
|||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
class TleData : public StaticLocalDataSet<TLE_SET_ENTRIES> {
|
|
||||||
public:
|
|
||||||
TleData(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, TLE_SET) {}
|
|
||||||
|
|
||||||
lp_vec_t<uint8_t, 69> line1 = lp_vec_t<uint8_t, 69>(sid.objectId, TLE_LINE_1, this);
|
|
||||||
lp_vec_t<uint8_t, 69> line2 = lp_vec_t<uint8_t, 69>(sid.objectId, TLE_LINE_1, this);
|
|
||||||
|
|
||||||
private:
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace acsctrl
|
} // namespace acsctrl
|
||||||
|
|
||||||
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCTRLDEFINITIONS_H_ */
|
#endif /* MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCTRLDEFINITIONS_H_ */
|
||||||
|
@ -106,7 +106,7 @@ Subsystem& satsystem::acs::init() {
|
|||||||
// Build TARGET PT transition 0
|
// Build TARGET PT transition 0
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TRANS_0.second, true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TRANS_0.second);
|
||||||
check(ACS_SUBSYSTEM.addTable(
|
check(ACS_SUBSYSTEM.addTable(
|
||||||
@ -161,6 +161,7 @@ void buildOffSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
iht(objects::IMTQ_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
iht(objects::IMTQ_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||||
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||||
iht(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
iht(objects::ACS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||||
|
iht(objects::SUS_BOARD_ASS, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||||
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_OFF_TRANS_1.second);
|
||||||
check(ss.addTable(TableEntry(ACS_TABLE_OFF_TRANS_1.first, &ACS_TABLE_OFF_TRANS_1.second)), ctxc);
|
check(ss.addTable(TableEntry(ACS_TABLE_OFF_TRANS_1.first, &ACS_TABLE_OFF_TRANS_1.second)), ctxc);
|
||||||
|
|
||||||
@ -199,13 +200,13 @@ void buildSafeSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT,
|
iht(objects::ACS_CONTROLLER, acs::AcsMode::SAFE, acs::SafeSubmode::DEFAULT,
|
||||||
ACS_TABLE_SAFE_TGT.second, true);
|
ACS_TABLE_SAFE_TGT.second, true);
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_SAFE_TGT.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TGT.second, true);
|
||||||
check(ss.addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc);
|
check(ss.addTable(&ACS_TABLE_SAFE_TGT.second, ACS_TABLE_SAFE_TGT.first, false, true), ctxc);
|
||||||
|
|
||||||
// Build SAFE transition 0
|
// Build SAFE transition 0
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_SAFE_TRANS_0.second, true);
|
||||||
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
iht(objects::STR_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
iht(objects::RW_ASSY, OFF, 0, ACS_TABLE_SAFE_TRANS_0.second);
|
||||||
@ -256,13 +257,13 @@ void buildIdleSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_IDLE_TGT.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TGT.second, true);
|
||||||
ss.addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
|
ss.addTable(&ACS_TABLE_IDLE_TGT.second, ACS_TABLE_IDLE_TGT.first, false, true);
|
||||||
|
|
||||||
// Build IDLE transition 0
|
// Build IDLE transition 0
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_IDLE_TRANS_0.second, true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_IDLE_TRANS_0.second);
|
||||||
@ -306,8 +307,8 @@ void buildTargetPtSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
// Build TARGET PT table
|
// Build TARGET PT table
|
||||||
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_TGT.second);
|
||||||
check(ss.addTable(&ACS_TABLE_PTG_TARGET_TGT.second, ACS_TABLE_PTG_TARGET_TGT.first, false, true),
|
check(ss.addTable(&ACS_TABLE_PTG_TARGET_TGT.second, ACS_TABLE_PTG_TARGET_TGT.first, false, true),
|
||||||
@ -355,8 +356,8 @@ void buildTargetPtNadirSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
// Build TARGET PT table
|
// Build TARGET PT table
|
||||||
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_NADIR, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_NADIR_TGT.second);
|
||||||
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_NADIR_TGT.first,
|
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_NADIR_TGT.first,
|
||||||
@ -408,8 +409,8 @@ void buildTargetPtGsSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
// Build TARGET PT table
|
// Build TARGET PT table
|
||||||
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_TARGET_GS, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_GS_TGT.second);
|
||||||
check(ss.addTable(
|
check(ss.addTable(
|
||||||
@ -461,8 +462,10 @@ void buildTargetPtInertialSequence(Subsystem& ss, ModeListEntry& eh) {
|
|||||||
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0,
|
iht(objects::ACS_CONTROLLER, acs::AcsMode::PTG_INERTIAL, 0,
|
||||||
ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||||
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
iht(objects::IMTQ_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||||
iht(objects::SUS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
|
||||||
iht(objects::ACS_BOARD_ASS, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second, true);
|
true);
|
||||||
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
|
||||||
|
true);
|
||||||
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
iht(objects::RW_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||||
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
iht(objects::STR_ASSY, NML, 0, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second);
|
||||||
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_INERTIAL_TGT.first,
|
check(ss.addTable(TableEntry(ACS_TABLE_PTG_TARGET_INERTIAL_TGT.first,
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 098843a74f93a7ec94500bc0fc9faa1abb165508
|
Subproject commit 74e55b16dcca73023254493d911be3debc36adb2
|
Loading…
Reference in New Issue
Block a user