Compare commits
45 Commits
v8.1.0
...
detumble-m
Author | SHA1 | Date | |
---|---|---|---|
3ba05d46f3 | |||
6820fb729a | |||
ea6dbb6454 | |||
bfa9a3c1fe | |||
0166ebb185 | |||
2ba1d0f629 | |||
ca14429a62 | |||
00ce2fe611 | |||
64ec2ffd84 | |||
30bb5d1ac7 | |||
640e316e5e | |||
fe4ef398ed | |||
09f282cfd5 | |||
709be2cd24 | |||
54e4d27fe1 | |||
ce7d1441de | |||
6727950eac | |||
5c951f3e49 | |||
c65ad4ab4f | |||
8da305b247 | |||
1731b21953 | |||
4b99be7316 | |||
bfcd149574 | |||
90701a0723 | |||
1a9a054567 | |||
511f7275f2 | |||
80ce299d37 | |||
6782b4394b | |||
a35b28fc57 | |||
8034982067 | |||
e44f1974cd | |||
b47e8b1ddd | |||
e305d77b32 | |||
abbbb0cabb | |||
f19b129609 | |||
f2d7f32952 | |||
e267b69045 | |||
60922ccc0d | |||
3ec0509bd4
|
|||
a73c36c237 | |||
5dd0c2a5cb
|
|||
1f8dc67922
|
|||
e43a86432b | |||
585c49780f | |||
1429aa56a4 |
40
CHANGELOG.md
40
CHANGELOG.md
@ -16,6 +16,46 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Readded rotation rate from the `MEKF` to the detumble state machine.
|
||||||
|
|
||||||
|
# [v8.2.0] 2024-06-26
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- STR quaternions are now used by the `MEKF` by default
|
||||||
|
- Changed nominal `SUS Assembly` side to `B Side`.
|
||||||
|
- Changed source for state machine of detumbling to SUS and MGM only.
|
||||||
|
- Changed `FusedRotRateData` dataset to always display rotation rate from SUS and MGM.
|
||||||
|
- Solution from `QUEST` will be set to invalid if sun vector and magnetic field vector are too close
|
||||||
|
to each other.
|
||||||
|
- Changed collection intervals of dataset collection
|
||||||
|
- `GPS Controller`: `GPS Set` to 60s
|
||||||
|
- `MTQ Handler`: `HK with Torque`, `HK without Torque` to 60s
|
||||||
|
- `RW Handler`: `Status Set` to 30s
|
||||||
|
- `STR Handler`: `Solution Set` to 30s
|
||||||
|
- `ACS Controller`: `MGM Sensor`, `MGM Processed`, `SUS Sensor`, `SUS Processed`, `GYR Sensor`,
|
||||||
|
`GPS Processed` to 60s
|
||||||
|
- `ACS Controller` at or below `IDLE`: `CTRL Values`, `ACT Commands`, `Attitude Estimation`,
|
||||||
|
`Fused Rotation Rate` to 30s
|
||||||
|
- `ACS Controller` above `IDLE`: `CTRL Values`, `ACT Commands`, `Attitude Estimation`,
|
||||||
|
`Fused Rotation Rate` to 10s
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Added null termination for PLOC MPSoC image taking command which could possibly lead to
|
||||||
|
default target filenames.
|
||||||
|
|
||||||
|
# [v8.1.1] 2024-06-05
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- PLOC SUPV MPSoC update re-try logic for the `WRITE_MEMORY` command. These packets form > 98%
|
||||||
|
of all packets required for a software update, but the update mechanism is not tolerant against
|
||||||
|
occasional glitches on the RS485 communication to the PLOC SUPV. A simple re-try mechanism which
|
||||||
|
tries to re-attempt packet handling up to three times for those packets is introduced.
|
||||||
|
|
||||||
# [v8.1.0] 2024-05-29
|
# [v8.1.0] 2024-05-29
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 8)
|
set(OBSW_VERSION_MAJOR 8)
|
||||||
set(OBSW_VERSION_MINOR 1)
|
set(OBSW_VERSION_MINOR 2)
|
||||||
set(OBSW_VERSION_REVISION 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
@ -100,7 +100,7 @@ ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
|
|||||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
||||||
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 30.0});
|
poolManager.subscribeForRegularPeriodicPacket({gpsSet.getSid(), enableHkSets, 60.0});
|
||||||
localDataPoolMap.emplace(GpsHyperion::SKYVIEW_UNIX_SECONDS, new PoolEntry<double>());
|
localDataPoolMap.emplace(GpsHyperion::SKYVIEW_UNIX_SECONDS, new PoolEntry<double>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::PRN_ID, new PoolEntry<int16_t>());
|
localDataPoolMap.emplace(GpsHyperion::PRN_ID, new PoolEntry<int16_t>());
|
||||||
localDataPoolMap.emplace(GpsHyperion::AZIMUTH, new PoolEntry<int16_t>());
|
localDataPoolMap.emplace(GpsHyperion::AZIMUTH, new PoolEntry<int16_t>());
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
#include "linux/payload/plocSupvDefs.h"
|
||||||
#include "tas/hdlc.h"
|
#include "tas/hdlc.h"
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/fs/FilesystemHelper.h"
|
#include "bsp_q7s/fs/FilesystemHelper.h"
|
||||||
@ -21,9 +23,13 @@
|
|||||||
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
|
|
||||||
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
#include "mission/utility/Filenaming.h"
|
#include "mission/utility/Filenaming.h"
|
||||||
#include "mission/utility/ProgressPrinter.h"
|
#include "mission/utility/ProgressPrinter.h"
|
||||||
#include "mission/utility/Timestamp.h"
|
#include "mission/utility/Timestamp.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tas/crc.h"
|
#include "tas/crc.h"
|
||||||
|
|
||||||
using namespace returnvalue;
|
using namespace returnvalue;
|
||||||
@ -277,23 +283,6 @@ ReturnValue_t PlocSupvUartManager::initiateUpdateContinuation() {
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReturnValue_t PlocSupvHelper::startEventBufferRequest(std::string path) {
|
|
||||||
// #ifdef XIPHOS_Q7S
|
|
||||||
// ReturnValue_t result = FilesystemHelper::checkPath(path);
|
|
||||||
// if (result != returnvalue::OK) {
|
|
||||||
// return result;
|
|
||||||
// }
|
|
||||||
// #endif
|
|
||||||
// if (not std::filesystem::exists(path)) {
|
|
||||||
// return PATH_NOT_EXISTS;
|
|
||||||
// }
|
|
||||||
// eventBufferReq.path = path;
|
|
||||||
// request = Request::REQUEST_EVENT_BUFFER;
|
|
||||||
// //uartComIF->flushUartTxAndRxBuf(comCookie);
|
|
||||||
// semaphore->release();
|
|
||||||
// return returnvalue::OK;
|
|
||||||
// }
|
|
||||||
|
|
||||||
void PlocSupvUartManager::stop() {
|
void PlocSupvUartManager::stop() {
|
||||||
MutexGuard mg(lock);
|
MutexGuard mg(lock);
|
||||||
if (state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) {
|
if (state == InternalState::SLEEPING or state == InternalState::GO_TO_SLEEP) {
|
||||||
@ -449,10 +438,8 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
|
|||||||
update.bytesWritten);
|
update.bytesWritten);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
result = handlePacketTransmissionNoReply(packet, 5000);
|
result = writeMemoryHandlingWithRetryLogic(packet, progPercent);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
|
||||||
update.bytesWritten);
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -463,7 +450,25 @@ ReturnValue_t PlocSupvUartManager::writeUpdatePackets() {
|
|||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
||||||
progressPrinter.print(update.bytesWritten);
|
progressPrinter.print(update.bytesWritten);
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
||||||
// TaskFactory::delayTask(1);
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t PlocSupvUartManager::writeMemoryHandlingWithRetryLogic(supv::WriteMemory& packet,
|
||||||
|
unsigned progPercent) {
|
||||||
|
ReturnValue_t result = returnvalue::OK;
|
||||||
|
// Simple re-try logic in place to deal with communication unreliability in orbit.
|
||||||
|
for (uint8_t retryCount = 0; retryCount < MAX_RETRY_COUNT; retryCount++) {
|
||||||
|
result = handlePacketTransmissionNoReply(packet, COM_TIMEOUT_MS);
|
||||||
|
if (result == returnvalue::OK) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
||||||
|
update.bytesWritten);
|
||||||
|
// Clear data structures related to reply handling.
|
||||||
|
serial::flushTxRxBuf(serialPort);
|
||||||
|
recRingBuf.clear();
|
||||||
|
decodedRingBuf.clear();
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -572,7 +577,16 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
|
|||||||
bool ackReceived = false;
|
bool ackReceived = false;
|
||||||
bool packetWasHandled = false;
|
bool packetWasHandled = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
handleUartReception();
|
ReturnValue_t status = handleUartReception();
|
||||||
|
if (status != returnvalue::OK) {
|
||||||
|
result = status;
|
||||||
|
if (result == HDLC_ERROR) {
|
||||||
|
// We could bail here immediately.. but I prefer to wait for the timeout, because we should
|
||||||
|
// ensure that all packets which might be related to the transfer are still received and
|
||||||
|
// cleared from all data structures related to reply handling.
|
||||||
|
// return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (not decodedQueue.empty()) {
|
if (not decodedQueue.empty()) {
|
||||||
size_t packetLen = 0;
|
size_t packetLen = 0;
|
||||||
decodedQueue.retrieve(&packetLen);
|
decodedQueue.retrieve(&packetLen);
|
||||||
@ -615,7 +629,7 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply(
|
|||||||
return result::NO_REPLY_TIMEOUT;
|
return result::NO_REPLY_TIMEOUT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return returnvalue::OK;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PlocSupvUartManager::handleAckReception(supv::TcBase& tc, size_t packetLen) {
|
int PlocSupvUartManager::handleAckReception(supv::TcBase& tc, size_t packetLen) {
|
||||||
|
@ -118,6 +118,7 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
|
|||||||
static constexpr Event HDLC_FRAME_REMOVAL_ERROR = MAKE_EVENT(31, severity::INFO);
|
static constexpr Event HDLC_FRAME_REMOVAL_ERROR = MAKE_EVENT(31, severity::INFO);
|
||||||
static constexpr Event HDLC_CRC_ERROR = MAKE_EVENT(32, severity::INFO);
|
static constexpr Event HDLC_CRC_ERROR = MAKE_EVENT(32, severity::INFO);
|
||||||
|
|
||||||
|
static constexpr unsigned MAX_RETRY_COUNT = 3;
|
||||||
PlocSupvUartManager(object_id_t objectId);
|
PlocSupvUartManager(object_id_t objectId);
|
||||||
virtual ~PlocSupvUartManager();
|
virtual ~PlocSupvUartManager();
|
||||||
/**
|
/**
|
||||||
@ -199,6 +200,8 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
|
|||||||
static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_END = returnvalue::makeCode(1, 4);
|
static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_END = returnvalue::makeCode(1, 4);
|
||||||
static constexpr ReturnValue_t HDLC_ERROR = returnvalue::makeCode(1, 5);
|
static constexpr ReturnValue_t HDLC_ERROR = returnvalue::makeCode(1, 5);
|
||||||
|
|
||||||
|
static constexpr uint32_t COM_TIMEOUT_MS = 3000;
|
||||||
|
|
||||||
static const uint16_t CRC16_INIT = 0xFFFF;
|
static const uint16_t CRC16_INIT = 0xFFFF;
|
||||||
// Event buffer reply will carry 24 space packets with 1016 bytes and one space packet with
|
// Event buffer reply will carry 24 space packets with 1016 bytes and one space packet with
|
||||||
// 192 bytes
|
// 192 bytes
|
||||||
@ -369,6 +372,8 @@ class PlocSupvUartManager : public DeviceCommunicationIF,
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
|
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
|
||||||
|
|
||||||
|
ReturnValue_t writeMemoryHandlingWithRetryLogic(supv::WriteMemory& packet, unsigned progPercent);
|
||||||
|
|
||||||
void performUartShutdown();
|
void performUartShutdown();
|
||||||
void updateVtime(uint8_t vtime);
|
void updateVtime(uint8_t vtime);
|
||||||
};
|
};
|
||||||
|
@ -920,13 +920,14 @@ class TcCamTakePic : public TcBase {
|
|||||||
}
|
}
|
||||||
size_t deserLen = commandDataLen;
|
size_t deserLen = commandDataLen;
|
||||||
size_t serLen = 0;
|
size_t serLen = 0;
|
||||||
fileName = reinterpret_cast<const char*>(commandData);
|
fileName = std::string(reinterpret_cast<const char*>(commandData));
|
||||||
if (fileName.size() > MAX_FILENAME_SIZE) {
|
if (fileName.size() > MAX_FILENAME_SIZE) {
|
||||||
return FILENAME_TOO_LONG;
|
return FILENAME_TOO_LONG;
|
||||||
}
|
}
|
||||||
deserLen -= fileName.length() + 1;
|
deserLen -= fileName.length() + 1;
|
||||||
*dataPtr += fileName.length() + 1;
|
*dataPtr += fileName.length() + 1;
|
||||||
uint8_t** payloadPtr = &payloadStart;
|
uint8_t** payloadPtr = &payloadStart;
|
||||||
|
memset(payloadStart, 0, FILENAME_FIELD_SIZE);
|
||||||
memcpy(payloadStart, fileName.data(), fileName.size());
|
memcpy(payloadStart, fileName.data(), fileName.size());
|
||||||
*payloadPtr += FILENAME_FIELD_SIZE;
|
*payloadPtr += FILENAME_FIELD_SIZE;
|
||||||
serLen += FILENAME_FIELD_SIZE;
|
serLen += FILENAME_FIELD_SIZE;
|
||||||
|
@ -1146,14 +1146,14 @@ class WriteMemory : public TcBase {
|
|||||||
: TcBase(params, Apid::MEM_MAN, static_cast<uint8_t>(tc::MemManId::WRITE), 1) {}
|
: TcBase(params, Apid::MEM_MAN, static_cast<uint8_t>(tc::MemManId::WRITE), 1) {}
|
||||||
|
|
||||||
ReturnValue_t buildPacket(ccsds::SequenceFlags seqFlags, uint16_t sequenceCount, uint8_t memoryId,
|
ReturnValue_t buildPacket(ccsds::SequenceFlags seqFlags, uint16_t sequenceCount, uint8_t memoryId,
|
||||||
uint32_t startAddress, uint16_t length, uint8_t* updateData) {
|
uint32_t currentAddr, uint16_t length, uint8_t* updateData) {
|
||||||
if (length > CHUNK_MAX) {
|
if (length > CHUNK_MAX) {
|
||||||
sif::error << "WriteMemory::WriteMemory: Invalid length" << std::endl;
|
sif::error << "WriteMemory::WriteMemory: Invalid length" << std::endl;
|
||||||
return SerializeIF::BUFFER_TOO_SHORT;
|
return SerializeIF::BUFFER_TOO_SHORT;
|
||||||
}
|
}
|
||||||
spParams.creator.setSeqFlags(seqFlags);
|
spParams.creator.setSeqFlags(seqFlags);
|
||||||
spParams.creator.setSeqCount(sequenceCount);
|
spParams.creator.setSeqCount(sequenceCount);
|
||||||
auto res = initPacket(memoryId, startAddress, length, updateData);
|
auto res = initPacket(memoryId, currentAddr, length, updateData);
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -1171,7 +1171,7 @@ class WriteMemory : public TcBase {
|
|||||||
static const uint16_t META_DATA_LENGTH = 8;
|
static const uint16_t META_DATA_LENGTH = 8;
|
||||||
uint8_t n = 1;
|
uint8_t n = 1;
|
||||||
|
|
||||||
ReturnValue_t initPacket(uint8_t memoryId, uint32_t startAddr, uint16_t updateDataLen,
|
ReturnValue_t initPacket(uint8_t memoryId, uint32_t currentAddr, uint16_t updateDataLen,
|
||||||
uint8_t* updateData) {
|
uint8_t* updateData) {
|
||||||
uint8_t* data = payloadStart;
|
uint8_t* data = payloadStart;
|
||||||
if (updateDataLen % 2 != 0) {
|
if (updateDataLen % 2 != 0) {
|
||||||
@ -1189,7 +1189,7 @@ class WriteMemory : public TcBase {
|
|||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize,
|
SerializeAdapter::serialize(&n, &data, &serializedSize, spParams.maxSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
SerializeAdapter::serialize(&startAddr, &data, &serializedSize, spParams.maxSize,
|
SerializeAdapter::serialize(¤tAddr, &data, &serializedSize, spParams.maxSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
SerializeAdapter::serialize(&updateDataLen, &data, &serializedSize, spParams.maxSize,
|
SerializeAdapter::serialize(&updateDataLen, &data, &serializedSize, spParams.maxSize,
|
||||||
SerializeIF::Endianness::BIG);
|
SerializeIF::Endianness::BIG);
|
||||||
|
@ -795,9 +795,9 @@ ReturnValue_t ImtqHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
|||||||
localDataPoolMap.emplace(imtq::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
localDataPoolMap.emplace(imtq::FINA_NEG_Z_COIL_Z_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||||
|
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 30.0));
|
subdp::DiagnosticsHkPeriodicParams(hkDatasetNoTorque.getSid(), enableHkSets, 60.0));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 30.0));
|
subdp::DiagnosticsHkPeriodicParams(hkDatasetWithTorque.getSid(), enableHkSets, 60.0));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
|
subdp::DiagnosticsHkPeriodicParams(rawMtmNoTorque.getSid(), false, 10.0));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
|
@ -340,7 +340,7 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP
|
|||||||
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(rws::SPI_REG_OVERRUN_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
localDataPoolMap.emplace(rws::SPI_TOTAL_ERRORS, new PoolEntry<uint32_t>({0}));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 12.0));
|
subdp::DiagnosticsHkPeriodicParams(statusSet.getSid(), false, 30.0));
|
||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
@ -1662,7 +1662,7 @@ ReturnValue_t StarTrackerHandler::initializeLocalDataPool(localpool::DataPool& l
|
|||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
subdp::RegularHkPeriodicParams(interfaceSet.getSid(), false, 10.0));
|
subdp::RegularHkPeriodicParams(interfaceSet.getSid(), false, 10.0));
|
||||||
poolManager.subscribeForDiagPeriodicPacket(
|
poolManager.subscribeForDiagPeriodicPacket(
|
||||||
subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 12.0));
|
subdp::DiagnosticsHkPeriodicParams(solutionSet.getSid(), false, 30.0));
|
||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
subdp::RegularHkPeriodicParams(cameraSet.getSid(), false, 10.0));
|
subdp::RegularHkPeriodicParams(cameraSet.getSid(), false, 10.0));
|
||||||
poolManager.subscribeForRegularPeriodicPacket(
|
poolManager.subscribeForRegularPeriodicPacket(
|
||||||
|
@ -232,7 +232,8 @@ void AcsController::performSafe() {
|
|||||||
acs::ControlModeStrategy safeCtrlStrat = safeCtrl.safeCtrlStrategy(
|
acs::ControlModeStrategy safeCtrlStrat = safeCtrl.safeCtrlStrategy(
|
||||||
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag,
|
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag,
|
||||||
gyrDataProcessed.gyrVecTot.isValid(), susDataProcessed.susVecTot.isValid(),
|
gyrDataProcessed.gyrVecTot.isValid(), susDataProcessed.susVecTot.isValid(),
|
||||||
fusedRotRateData.rotRateTotal.isValid(), acsParameters.safeModeControllerParameters.useMekf,
|
fusedRotRateSourcesData.rotRateTotalSusMgm.isValid(),
|
||||||
|
acsParameters.safeModeControllerParameters.useMekf,
|
||||||
acsParameters.safeModeControllerParameters.useGyr,
|
acsParameters.safeModeControllerParameters.useGyr,
|
||||||
acsParameters.safeModeControllerParameters.dampingDuringEclipse);
|
acsParameters.safeModeControllerParameters.dampingDuringEclipse);
|
||||||
switch (safeCtrlStrat) {
|
switch (safeCtrlStrat) {
|
||||||
@ -251,9 +252,10 @@ void AcsController::performSafe() {
|
|||||||
safeCtrlFailureCounter = 0;
|
safeCtrlFailureCounter = 0;
|
||||||
break;
|
break;
|
||||||
case (acs::ControlModeStrategy::SAFECTRL_SUSMGM):
|
case (acs::ControlModeStrategy::SAFECTRL_SUSMGM):
|
||||||
safeCtrl.safeSusMgm(mgmDataProcessed.mgmVecTot.value, fusedRotRateData.rotRateTotal.value,
|
safeCtrl.safeSusMgm(mgmDataProcessed.mgmVecTot.value,
|
||||||
fusedRotRateData.rotRateParallel.value,
|
fusedRotRateSourcesData.rotRateTotalSusMgm.value,
|
||||||
fusedRotRateData.rotRateOrthogonal.value,
|
fusedRotRateSourcesData.rotRateParallelSusMgm.value,
|
||||||
|
fusedRotRateSourcesData.rotRateOrthogonalSusMgm.value,
|
||||||
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
|
susDataProcessed.susVecTot.value, sunTargetDir, magMomMtq, errAng);
|
||||||
safeCtrlFailureFlag = false;
|
safeCtrlFailureFlag = false;
|
||||||
safeCtrlFailureCounter = 0;
|
safeCtrlFailureCounter = 0;
|
||||||
@ -267,8 +269,8 @@ void AcsController::performSafe() {
|
|||||||
break;
|
break;
|
||||||
case (acs::ControlModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM):
|
case (acs::ControlModeStrategy::SAFECTRL_ECLIPSE_DAMPING_SUSMGM):
|
||||||
safeCtrl.safeRateDampingSusMgm(mgmDataProcessed.mgmVecTot.value,
|
safeCtrl.safeRateDampingSusMgm(mgmDataProcessed.mgmVecTot.value,
|
||||||
fusedRotRateData.rotRateTotal.value, sunTargetDir, magMomMtq,
|
fusedRotRateSourcesData.rotRateTotalSusMgm.value, sunTargetDir,
|
||||||
errAng);
|
magMomMtq, errAng);
|
||||||
safeCtrlFailureFlag = false;
|
safeCtrlFailureFlag = false;
|
||||||
safeCtrlFailureCounter = 0;
|
safeCtrlFailureCounter = 0;
|
||||||
break;
|
break;
|
||||||
@ -355,7 +357,7 @@ void AcsController::performPointingCtrl() {
|
|||||||
}
|
}
|
||||||
acs::ControlModeStrategy ptgCtrlStrat = ptgCtrl.pointingCtrlStrategy(
|
acs::ControlModeStrategy ptgCtrlStrat = ptgCtrl.pointingCtrlStrategy(
|
||||||
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, strValid,
|
mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, strValid,
|
||||||
attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotal.isValid(),
|
attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotalSource.isValid(),
|
||||||
fusedRotRateData.rotRateSource.value, useMekf);
|
fusedRotRateData.rotRateSource.value, useMekf);
|
||||||
|
|
||||||
if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_MAG_FIELD_FOR_CONTROL or
|
if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_MAG_FIELD_FOR_CONTROL or
|
||||||
@ -387,11 +389,11 @@ void AcsController::performPointingCtrl() {
|
|||||||
quatBI[1] = sensorValues.strSet.caliQy.value;
|
quatBI[1] = sensorValues.strSet.caliQy.value;
|
||||||
quatBI[2] = sensorValues.strSet.caliQz.value;
|
quatBI[2] = sensorValues.strSet.caliQz.value;
|
||||||
quatBI[3] = sensorValues.strSet.caliQw.value;
|
quatBI[3] = sensorValues.strSet.caliQw.value;
|
||||||
std::memcpy(rotRateB, fusedRotRateData.rotRateTotal.value, sizeof(rotRateB));
|
std::memcpy(rotRateB, fusedRotRateData.rotRateTotalSource.value, sizeof(rotRateB));
|
||||||
break;
|
break;
|
||||||
case acs::ControlModeStrategy::PTGCTRL_QUEST:
|
case acs::ControlModeStrategy::PTGCTRL_QUEST:
|
||||||
std::memcpy(quatBI, attitudeEstimationData.quatQuest.value, sizeof(quatBI));
|
std::memcpy(quatBI, attitudeEstimationData.quatQuest.value, sizeof(quatBI));
|
||||||
std::memcpy(rotRateB, fusedRotRateData.rotRateTotal.value, sizeof(rotRateB));
|
std::memcpy(rotRateB, fusedRotRateData.rotRateTotalSource.value, sizeof(rotRateB));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
sif::error << "AcsController: Invalid pointing mode strategy for performPointingCtrl"
|
sif::error << "AcsController: Invalid pointing mode strategy for performPointingCtrl"
|
||||||
@ -555,9 +557,12 @@ void AcsController::performPointingCtrl() {
|
|||||||
void AcsController::handleDetumbling() {
|
void AcsController::handleDetumbling() {
|
||||||
switch (detumbleState) {
|
switch (detumbleState) {
|
||||||
case DetumbleState::NO_DETUMBLE:
|
case DetumbleState::NO_DETUMBLE:
|
||||||
if (fusedRotRateData.rotRateTotal.isValid() and
|
if ((fusedRotRateData.rotRateTotalSusMgm.isValid() and
|
||||||
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) >
|
VectorOperations<double>::norm(fusedRotRateData.rotRateTotalSusMgm.value, 3) >
|
||||||
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
acsParameters.detumbleParameter.omegaDetumbleStart) and
|
||||||
|
(attitudeEstimationData.satRotRateMekf.isValid() and
|
||||||
|
VectorOperations<double>::norm(attitudeEstimationData.satRotRateMekf.value, 3) >
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleStart)) {
|
||||||
detumbleCounter++;
|
detumbleCounter++;
|
||||||
} else if (detumbleCounter > 0) {
|
} else if (detumbleCounter > 0) {
|
||||||
detumbleCounter -= 1;
|
detumbleCounter -= 1;
|
||||||
@ -599,9 +604,12 @@ void AcsController::handleDetumbling() {
|
|||||||
detumbleState = DetumbleState::NO_DETUMBLE;
|
detumbleState = DetumbleState::NO_DETUMBLE;
|
||||||
break;
|
break;
|
||||||
case DetumbleState::IN_DETUMBLE:
|
case DetumbleState::IN_DETUMBLE:
|
||||||
if (fusedRotRateData.rotRateTotal.isValid() and
|
if ((fusedRotRateData.rotRateTotalSusMgm.isValid() and
|
||||||
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) <
|
VectorOperations<double>::norm(fusedRotRateData.rotRateTotalSusMgm.value, 3) <
|
||||||
acsParameters.detumbleParameter.omegaDetumbleEnd) {
|
acsParameters.detumbleParameter.omegaDetumbleEnd) and
|
||||||
|
(attitudeEstimationData.satRotRateMekf.isValid() and
|
||||||
|
VectorOperations<double>::norm(attitudeEstimationData.satRotRateMekf.value, 3) <
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleEnd)) {
|
||||||
detumbleCounter++;
|
detumbleCounter++;
|
||||||
} else if (detumbleCounter > 0) {
|
} else if (detumbleCounter > 0) {
|
||||||
detumbleCounter -= 1;
|
detumbleCounter -= 1;
|
||||||
@ -747,7 +755,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3VecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmVecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmVecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({mgmDataRaw.getSid(), false, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({mgmDataRaw.getSid(), false, 60.0});
|
||||||
// MGM Processed
|
// MGM Processed
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_VEC, &mgm0VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_VEC, &mgm0VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_VEC, &mgm1VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_VEC, &mgm1VecProc);
|
||||||
@ -757,7 +765,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), enableHkSets, 60.0});
|
||||||
// SUS Raw
|
// SUS Raw
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, &sus0ValRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_N_LOC_XFYFZM_PT_XF, &sus0ValRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_N_LOC_XBYFZM_PT_XB, &sus1ValRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_N_LOC_XBYFZM_PT_XB, &sus1ValRaw);
|
||||||
@ -771,7 +779,7 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_9_R_LOC_XBYBZB_PT_YF, &sus9ValRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_9_R_LOC_XBYBZB_PT_YF, &sus9ValRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_10_N_LOC_XMYBZF_PT_ZF, &sus10ValRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_10_N_LOC_XMYBZF_PT_ZF, &sus10ValRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_11_R_LOC_XBYMZB_PT_ZB, &sus11ValRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_11_R_LOC_XBYMZB_PT_ZB, &sus11ValRaw);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({susDataRaw.getSid(), false, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({susDataRaw.getSid(), false, 60.0});
|
||||||
// SUS Processed
|
// SUS Processed
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_VEC, &sus0VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_VEC, &sus0VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_VEC, &sus1VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_VEC, &sus1VecProc);
|
||||||
@ -788,20 +796,20 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), enableHkSets, 60.0});
|
||||||
// GYR Raw
|
// GYR Raw
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_ADIS, &gyr2VecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_ADIS, &gyr2VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_L3, &gyr3VecRaw);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_L3, &gyr3VecRaw);
|
||||||
poolManager.subscribeForDiagPeriodicPacket({gyrDataRaw.getSid(), false, 10.0});
|
poolManager.subscribeForDiagPeriodicPacket({gyrDataRaw.getSid(), false, 60.0});
|
||||||
// GYR Processed
|
// GYR Processed
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_VEC, &gyr0VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_VEC, &gyr0VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_VEC, &gyr1VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_VEC, &gyr1VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot);
|
||||||
poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForDiagPeriodicPacket({gyrDataProcessed.getSid(), enableHkSets, 60.0});
|
||||||
// GPS Processed
|
// GPS Processed
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude);
|
||||||
@ -809,38 +817,37 @@ ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localD
|
|||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_POSITION, &gpsPosition);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity);
|
localDataPoolMap.emplace(acsctrl::PoolIds::GPS_VELOCITY, &gpsVelocity);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SOURCE, &gpsSource);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SOURCE, &gpsSource);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 30.0});
|
poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), enableHkSets, 60.0});
|
||||||
// Attitude Estimation
|
// Attitude Estimation
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf);
|
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MEKF_STATUS, &mekfStatus);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MEKF_STATUS, &mekfStatus);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_QUEST, &quatQuest);
|
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_QUEST, &quatQuest);
|
||||||
poolManager.subscribeForDiagPeriodicPacket({attitudeEstimationData.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForDiagPeriodicPacket({attitudeEstimationData.getSid(), enableHkSets, 30.0});
|
||||||
// Ctrl Values
|
// Ctrl Values
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::SAFE_STRAT, &safeStrat);
|
localDataPoolMap.emplace(acsctrl::PoolIds::SAFE_STRAT, &safeStrat);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat);
|
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_ROT_RATE, &tgtRotRate);
|
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_ROT_RATE, &tgtRotRate);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), enableHkSets, 30.0});
|
||||||
// Actuator CMD
|
// Actuator CMD
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque);
|
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed);
|
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), enableHkSets, 30.0});
|
||||||
// Fused Rot Rate
|
// Fused Rot Rate
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL, &rotRateOrthogonal);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOT_SUSMGM, &rotRateTotSusMgm);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL, &rotRateParallel);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOT_SOURCE, &rotRateTotSource);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL, &rotRateTotal);
|
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_SOURCE, &rotRateSource);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_SOURCE, &rotRateSource);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateData.getSid(), enableHkSets, 30.0});
|
||||||
// Fused Rot Rate Sources
|
// Fused Rot Rate Sources
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL_SUSMGM, &rotRateOrthogonalSusMgm);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_ORTHOGONAL_SUSMGM, &rotRateOrthogonalSusMgm);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL_SUSMGM, &rotRateParallelSusMgm);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_PARALLEL_SUSMGM, &rotRateParallelSusMgm);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_SUSMGM, &rotRateTotalSusMgm);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_SUSMGM, &rotRateTotalSusMgm);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_QUEST, &rotRateTotalQuest);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_QUEST, &rotRateTotalQuest);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_STR, &rotRateTotalStr);
|
localDataPoolMap.emplace(acsctrl::PoolIds::ROT_RATE_TOTAL_STR, &rotRateTotalStr);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateSourcesData.getSid(), false, 10.0});
|
poolManager.subscribeForRegularPeriodicPacket({fusedRotRateSourcesData.getSid(), false, 60.0});
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,6 +933,17 @@ void AcsController::modeChanged(Mode_t mode, Submode_t submode) {
|
|||||||
if (detumbleState == DetumbleState::IN_DETUMBLE and submode != acs::SafeSubmode::DETUMBLE) {
|
if (detumbleState == DetumbleState::IN_DETUMBLE and submode != acs::SafeSubmode::DETUMBLE) {
|
||||||
detumbleState = DetumbleState::NO_DETUMBLE;
|
detumbleState = DetumbleState::NO_DETUMBLE;
|
||||||
}
|
}
|
||||||
|
if (mode > acs::AcsMode::PTG_IDLE) {
|
||||||
|
poolManager.changeCollectionInterval(ctrlValData.getSid(), 10);
|
||||||
|
poolManager.changeCollectionInterval(actuatorCmdData.getSid(), 10);
|
||||||
|
poolManager.changeCollectionInterval(fusedRotRateData.getSid(), 10);
|
||||||
|
poolManager.changeCollectionInterval(attitudeEstimationData.getSid(), 10);
|
||||||
|
} else {
|
||||||
|
poolManager.changeCollectionInterval(ctrlValData.getSid(), 30);
|
||||||
|
poolManager.changeCollectionInterval(actuatorCmdData.getSid(), 30);
|
||||||
|
poolManager.changeCollectionInterval(fusedRotRateData.getSid(), 30);
|
||||||
|
poolManager.changeCollectionInterval(attitudeEstimationData.getSid(), 30);
|
||||||
|
}
|
||||||
return ExtendedControllerBase::modeChanged(mode, submode);
|
return ExtendedControllerBase::modeChanged(mode, submode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,9 +271,8 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
|
|||||||
|
|
||||||
// Fused Rot Rate
|
// Fused Rot Rate
|
||||||
acsctrl::FusedRotRateData fusedRotRateData;
|
acsctrl::FusedRotRateData fusedRotRateData;
|
||||||
PoolEntry<double> rotRateOrthogonal = PoolEntry<double>(3);
|
PoolEntry<double> rotRateTotSusMgm = PoolEntry<double>(3);
|
||||||
PoolEntry<double> rotRateParallel = PoolEntry<double>(3);
|
PoolEntry<double> rotRateTotSource = PoolEntry<double>(3);
|
||||||
PoolEntry<double> rotRateTotal = PoolEntry<double>(3);
|
|
||||||
PoolEntry<uint8_t> rotRateSource = PoolEntry<uint8_t>();
|
PoolEntry<uint8_t> rotRateSource = PoolEntry<uint8_t>();
|
||||||
|
|
||||||
// Fused Rot Rate Sources
|
// Fused Rot Rate Sources
|
||||||
|
@ -38,6 +38,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
|
|||||||
case 0x5:
|
case 0x5:
|
||||||
parameterWrapper->set(onBoardParams.questFilterWeight);
|
parameterWrapper->set(onBoardParams.questFilterWeight);
|
||||||
break;
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(onBoardParams.questAngleLimit);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return INVALID_IDENTIFIER_ID;
|
return INVALID_IDENTIFIER_ID;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,7 @@ class AcsParameters : public HasParametersIF {
|
|||||||
uint8_t fusedRateFromStr = true;
|
uint8_t fusedRateFromStr = true;
|
||||||
uint8_t fusedRateFromQuest = true;
|
uint8_t fusedRateFromQuest = true;
|
||||||
double questFilterWeight = 0.9;
|
double questFilterWeight = 0.9;
|
||||||
|
double questAngleLimit = 5 * DEG2RAD;
|
||||||
} onBoardParams;
|
} onBoardParams;
|
||||||
|
|
||||||
struct InertiaEIVE {
|
struct InertiaEIVE {
|
||||||
@ -949,7 +950,7 @@ class AcsParameters : public HasParametersIF {
|
|||||||
double sensorNoiseGyrArw = 3. * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk
|
double sensorNoiseGyrArw = 3. * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk
|
||||||
double sensorNoiseGyrBs = 3. / 3600. * DEG2RAD; // Bias Stability
|
double sensorNoiseGyrBs = 3. / 3600. * DEG2RAD; // Bias Stability
|
||||||
|
|
||||||
uint8_t allowStr = false;
|
uint8_t allowStr = true;
|
||||||
} kalmanFilterParameters;
|
} kalmanFilterParameters;
|
||||||
|
|
||||||
struct MagnetorquerParameter {
|
struct MagnetorquerParameter {
|
||||||
|
@ -29,6 +29,20 @@ void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData,
|
|||||||
VectorOperations<double>::normalize(mgmData->mgmVecTot.value, normMgmB, 3);
|
VectorOperations<double>::normalize(mgmData->mgmVecTot.value, normMgmB, 3);
|
||||||
VectorOperations<double>::normalize(mgmData->magIgrfModel.value, normMgmI, 3);
|
VectorOperations<double>::normalize(mgmData->magIgrfModel.value, normMgmI, 3);
|
||||||
|
|
||||||
|
if ((std::acos(VectorOperations<double>::dot(normSusB, normMgmB)) <
|
||||||
|
acsParameters->onBoardParams.questAngleLimit) or
|
||||||
|
(std::acos(VectorOperations<double>::dot(normSusI, normMgmI)) <
|
||||||
|
acsParameters->onBoardParams.questAngleLimit)) {
|
||||||
|
{
|
||||||
|
PoolReadGuard pg{attitudeEstimationData};
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(attitudeEstimationData->quatQuest.value, ZERO_VEC4, 4 * sizeof(double));
|
||||||
|
attitudeEstimationData->quatQuest.setValid(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Create Helper Vectors
|
// Create Helper Vectors
|
||||||
double normHelperB[3] = {0, 0, 0}, normHelperI[3] = {0, 0, 0}, helperCross[3] = {0, 0, 0},
|
double normHelperB[3] = {0, 0, 0}, normHelperI[3] = {0, 0, 0}, helperCross[3] = {0, 0, 0},
|
||||||
helperSum[3] = {0, 0, 0};
|
helperSum[3] = {0, 0, 0};
|
||||||
|
@ -19,13 +19,9 @@ void FusedRotationEstimation::estimateFusedRotationRate(
|
|||||||
acsParameters->onBoardParams.fusedRateFromStr)) {
|
acsParameters->onBoardParams.fusedRateFromStr)) {
|
||||||
PoolReadGuard pg(fusedRotRateData);
|
PoolReadGuard pg(fusedRotRateData);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double));
|
std::memcpy(fusedRotRateData->rotRateTotalSource.value,
|
||||||
fusedRotRateData->rotRateOrthogonal.setValid(false);
|
|
||||||
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double));
|
|
||||||
fusedRotRateData->rotRateParallel.setValid(false);
|
|
||||||
std::memcpy(fusedRotRateData->rotRateTotal.value,
|
|
||||||
fusedRotRateSourcesData->rotRateTotalStr.value, 3 * sizeof(double));
|
fusedRotRateSourcesData->rotRateTotalStr.value, 3 * sizeof(double));
|
||||||
fusedRotRateData->rotRateTotal.setValid(true);
|
fusedRotRateData->rotRateTotalSource.setValid(true);
|
||||||
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::STR;
|
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::STR;
|
||||||
fusedRotRateData->rotRateSource.setValid(true);
|
fusedRotRateData->rotRateSource.setValid(true);
|
||||||
}
|
}
|
||||||
@ -34,41 +30,38 @@ void FusedRotationEstimation::estimateFusedRotationRate(
|
|||||||
acsParameters->onBoardParams.fusedRateFromQuest)) {
|
acsParameters->onBoardParams.fusedRateFromQuest)) {
|
||||||
PoolReadGuard pg(fusedRotRateData);
|
PoolReadGuard pg(fusedRotRateData);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double));
|
std::memcpy(fusedRotRateData->rotRateTotalSource.value,
|
||||||
fusedRotRateData->rotRateOrthogonal.setValid(false);
|
|
||||||
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double));
|
|
||||||
fusedRotRateData->rotRateParallel.setValid(false);
|
|
||||||
std::memcpy(fusedRotRateData->rotRateTotal.value,
|
|
||||||
fusedRotRateSourcesData->rotRateTotalQuest.value, 3 * sizeof(double));
|
fusedRotRateSourcesData->rotRateTotalQuest.value, 3 * sizeof(double));
|
||||||
fusedRotRateData->rotRateTotal.setValid(true);
|
fusedRotRateData->rotRateTotalSource.setValid(true);
|
||||||
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::QUEST;
|
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::QUEST;
|
||||||
fusedRotRateData->rotRateSource.setValid(true);
|
fusedRotRateData->rotRateSource.setValid(true);
|
||||||
}
|
}
|
||||||
} else if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) {
|
} else if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) {
|
||||||
std::memcpy(fusedRotRateData->rotRateOrthogonal.value,
|
std::memcpy(fusedRotRateData->rotRateTotalSource.value,
|
||||||
fusedRotRateSourcesData->rotRateOrthogonalSusMgm.value, 3 * sizeof(double));
|
|
||||||
fusedRotRateData->rotRateOrthogonal.setValid(
|
|
||||||
fusedRotRateSourcesData->rotRateOrthogonalSusMgm.isValid());
|
|
||||||
std::memcpy(fusedRotRateData->rotRateParallel.value,
|
|
||||||
fusedRotRateSourcesData->rotRateParallelSusMgm.value, 3 * sizeof(double));
|
|
||||||
fusedRotRateData->rotRateParallel.setValid(
|
|
||||||
fusedRotRateSourcesData->rotRateParallelSusMgm.isValid());
|
|
||||||
std::memcpy(fusedRotRateData->rotRateTotal.value,
|
|
||||||
fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double));
|
fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double));
|
||||||
fusedRotRateData->rotRateTotal.setValid(true);
|
fusedRotRateData->rotRateTotalSource.setValid(true);
|
||||||
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::SUSMGM;
|
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::SUSMGM;
|
||||||
fusedRotRateData->rotRateSource.setValid(true);
|
fusedRotRateData->rotRateSource.setValid(true);
|
||||||
} else {
|
} else {
|
||||||
PoolReadGuard pg(fusedRotRateData);
|
PoolReadGuard pg(fusedRotRateData);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(fusedRotRateData->rotRateOrthogonal.value, ZERO_VEC3, 3 * sizeof(double));
|
std::memcpy(fusedRotRateData->rotRateTotalSource.value, ZERO_VEC3, 3 * sizeof(double));
|
||||||
std::memcpy(fusedRotRateData->rotRateParallel.value, ZERO_VEC3, 3 * sizeof(double));
|
fusedRotRateData->rotRateTotalSource.setValid(false);
|
||||||
std::memcpy(fusedRotRateData->rotRateTotal.value, ZERO_VEC3, 3 * sizeof(double));
|
|
||||||
fusedRotRateData->setValidity(false, true);
|
|
||||||
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::NONE;
|
fusedRotRateData->rotRateSource.value = acs::rotrate::Source::NONE;
|
||||||
fusedRotRateData->rotRateSource.setValid(true);
|
fusedRotRateData->rotRateSource.setValid(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (fusedRotRateSourcesData->rotRateTotalSusMgm.isValid()) {
|
||||||
|
std::memcpy(fusedRotRateData->rotRateTotalSusMgm.value,
|
||||||
|
fusedRotRateSourcesData->rotRateTotalSusMgm.value, 3 * sizeof(double));
|
||||||
|
fusedRotRateData->rotRateTotalSusMgm.setValid(true);
|
||||||
|
} else {
|
||||||
|
PoolReadGuard pg(fusedRotRateData);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(fusedRotRateData->rotRateTotalSusMgm.value, ZERO_VEC3, 3 * sizeof(double));
|
||||||
|
fusedRotRateData->rotRateTotalSusMgm.setValid(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FusedRotationEstimation::estimateFusedRotationRateStr(
|
void FusedRotationEstimation::estimateFusedRotationRateStr(
|
||||||
|
@ -129,9 +129,8 @@ enum PoolIds : lp_id_t {
|
|||||||
RW_TARGET_SPEED,
|
RW_TARGET_SPEED,
|
||||||
MTQ_TARGET_DIPOLE,
|
MTQ_TARGET_DIPOLE,
|
||||||
// Fused Rotation Rate
|
// Fused Rotation Rate
|
||||||
ROT_RATE_ORTHOGONAL,
|
ROT_RATE_TOT_SUSMGM,
|
||||||
ROT_RATE_PARALLEL,
|
ROT_RATE_TOT_SOURCE,
|
||||||
ROT_RATE_TOTAL,
|
|
||||||
ROT_RATE_SOURCE,
|
ROT_RATE_SOURCE,
|
||||||
// Fused Rotation Rate Sources
|
// Fused Rotation Rate Sources
|
||||||
ROT_RATE_ORTHOGONAL_SUSMGM,
|
ROT_RATE_ORTHOGONAL_SUSMGM,
|
||||||
@ -151,7 +150,7 @@ static constexpr uint8_t GPS_SET_PROCESSED_ENTRIES = 6;
|
|||||||
static constexpr uint8_t ATTITUDE_ESTIMATION_SET_ENTRIES = 4;
|
static constexpr uint8_t ATTITUDE_ESTIMATION_SET_ENTRIES = 4;
|
||||||
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 = 4;
|
static constexpr uint8_t FUSED_ROT_RATE_SET_ENTRIES = 3;
|
||||||
static constexpr uint8_t FUSED_ROT_RATE_SOURCES_SET_ENTRIES = 5;
|
static constexpr uint8_t FUSED_ROT_RATE_SOURCES_SET_ENTRIES = 5;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -318,10 +317,10 @@ class FusedRotRateData : public StaticLocalDataSet<FUSED_ROT_RATE_SET_ENTRIES> {
|
|||||||
FusedRotRateData(HasLocalDataPoolIF* hkOwner)
|
FusedRotRateData(HasLocalDataPoolIF* hkOwner)
|
||||||
: StaticLocalDataSet(hkOwner, FUSED_ROTATION_RATE_DATA) {}
|
: StaticLocalDataSet(hkOwner, FUSED_ROTATION_RATE_DATA) {}
|
||||||
|
|
||||||
lp_vec_t<double, 3> rotRateOrthogonal =
|
lp_vec_t<double, 3> rotRateTotalSusMgm =
|
||||||
lp_vec_t<double, 3>(sid.objectId, ROT_RATE_ORTHOGONAL, this);
|
lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOT_SUSMGM, this);
|
||||||
lp_vec_t<double, 3> rotRateParallel = lp_vec_t<double, 3>(sid.objectId, ROT_RATE_PARALLEL, this);
|
lp_vec_t<double, 3> rotRateTotalSource =
|
||||||
lp_vec_t<double, 3> rotRateTotal = lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOTAL, this);
|
lp_vec_t<double, 3>(sid.objectId, ROT_RATE_TOT_SOURCE, this);
|
||||||
lp_var_t<uint8_t> rotRateSource = lp_var_t<uint8_t>(sid.objectId, ROT_RATE_SOURCE, this);
|
lp_var_t<uint8_t> rotRateSource = lp_var_t<uint8_t>(sid.objectId, ROT_RATE_SOURCE, this);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -105,7 +105,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::B_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::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);
|
||||||
@ -114,7 +114,7 @@ Subsystem& satsystem::acs::init() {
|
|||||||
ctxc);
|
ctxc);
|
||||||
|
|
||||||
// Build SUS board transition
|
// Build SUS board transition
|
||||||
iht(objects::SUS_BOARD_ASS, NML, duallane::A_SIDE, SUS_BOARD_NML_TRANS.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, SUS_BOARD_NML_TRANS.second, true);
|
||||||
check(ACS_SUBSYSTEM.addTable(TableEntry(SUS_BOARD_NML_TRANS.first, &SUS_BOARD_NML_TRANS.second)),
|
check(ACS_SUBSYSTEM.addTable(TableEntry(SUS_BOARD_NML_TRANS.first, &SUS_BOARD_NML_TRANS.second)),
|
||||||
ctxc);
|
ctxc);
|
||||||
|
|
||||||
@ -200,14 +200,14 @@ 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, duallane::A_SIDE, ACS_TABLE_SAFE_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_SAFE_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, 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::B_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::B_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);
|
||||||
check(ss.addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true),
|
check(ss.addTable(&ACS_TABLE_SAFE_TRANS_0.second, ACS_TABLE_SAFE_TRANS_0.first, false, true),
|
||||||
@ -257,14 +257,14 @@ 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, duallane::A_SIDE, ACS_TABLE_IDLE_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_IDLE_TGT.second, true);
|
||||||
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, 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::B_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::B_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);
|
||||||
ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
|
ss.addTable(&ACS_TABLE_IDLE_TRANS_0.second, ACS_TABLE_IDLE_TRANS_0.first, false, true);
|
||||||
@ -307,7 +307,7 @@ 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, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, 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::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);
|
||||||
@ -356,7 +356,7 @@ 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, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_NADIR_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, 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::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);
|
||||||
@ -409,7 +409,7 @@ 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, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_GS_TGT.second, true);
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, 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::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);
|
||||||
@ -462,7 +462,7 @@ 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, duallane::A_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
|
iht(objects::SUS_BOARD_ASS, NML, duallane::B_SIDE, 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,
|
iht(objects::ACS_BOARD_ASS, NML, duallane::B_SIDE, ACS_TABLE_PTG_TARGET_INERTIAL_TGT.second,
|
||||||
true);
|
true);
|
||||||
|
Reference in New Issue
Block a user