2022-06-16 08:26:40 +02:00
|
|
|
#include "StarTrackerDummy.h"
|
2022-06-17 08:31:36 +02:00
|
|
|
|
2023-03-26 16:05:01 +02:00
|
|
|
#include <mission/acs/str/strHelpers.h>
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
StarTrackerDummy::StarTrackerDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
|
|
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
|
|
|
|
|
|
|
StarTrackerDummy::~StarTrackerDummy() {}
|
|
|
|
|
2023-04-06 19:11:26 +02:00
|
|
|
void StarTrackerDummy::doStartUp() { setMode(MODE_ON); }
|
2022-06-16 08:26:40 +02:00
|
|
|
|
2023-04-06 19:11:26 +02:00
|
|
|
void StarTrackerDummy::doShutDown() { setMode(_MODE_POWER_DOWN); }
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
ReturnValue_t StarTrackerDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
|
|
|
return NOTHING_TO_SEND;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t StarTrackerDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
|
|
|
return NOTHING_TO_SEND;
|
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t StarTrackerDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
2022-06-17 08:31:36 +02:00
|
|
|
const uint8_t *commandData,
|
|
|
|
size_t commandDataLen) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t StarTrackerDummy::scanForReply(const uint8_t *start, size_t len,
|
2022-06-17 08:31:36 +02:00
|
|
|
DeviceCommandId_t *foundId, size_t *foundLen) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ReturnValue_t StarTrackerDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
void StarTrackerDummy::fillCommandAndReplyMap() {}
|
2022-06-16 08:26:40 +02:00
|
|
|
|
|
|
|
uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
|
|
|
|
2022-06-17 08:31:36 +02:00
|
|
|
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
|
|
|
LocalDataPoolManager &poolManager) {
|
2023-03-15 14:56:26 +01:00
|
|
|
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({10.0}, true));
|
2022-10-12 10:26:33 +02:00
|
|
|
|
|
|
|
localDataPoolMap.emplace(startracker::TICKS_SOLUTION_SET, new PoolEntry<uint32_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TIME_SOLUTION_SET, new PoolEntry<uint64_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::CALI_QW, new PoolEntry<float>({1.0}, true));
|
|
|
|
localDataPoolMap.emplace(startracker::CALI_QX, new PoolEntry<float>({0.0}, true));
|
|
|
|
localDataPoolMap.emplace(startracker::CALI_QY, new PoolEntry<float>({0.0}, true));
|
|
|
|
localDataPoolMap.emplace(startracker::CALI_QZ, new PoolEntry<float>({0.0}, true));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_CONFIDENCE, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_QW, new PoolEntry<float>({1.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_QX, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_QY, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_QZ, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRACK_REMOVED, new PoolEntry<uint8_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::STARS_CENTROIDED, new PoolEntry<uint8_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::STARS_MATCHED_DATABASE, new PoolEntry<uint8_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_QW, new PoolEntry<float>({1.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_QX, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_QY, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_QZ, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_PERC_CLOSE, new PoolEntry<float>({0.0}));
|
|
|
|
localDataPoolMap.emplace(startracker::LISA_NR_CLOSE, new PoolEntry<uint8_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::TRUST_WORTHY, new PoolEntry<uint8_t>({0}));
|
|
|
|
localDataPoolMap.emplace(startracker::STABLE_COUNT, new PoolEntry<uint32_t>({0}));
|
2023-04-14 21:02:39 +02:00
|
|
|
localDataPoolMap.emplace(startracker::STR_MODE, new PoolEntry<uint8_t>({0}));
|
2022-10-12 10:26:33 +02:00
|
|
|
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));
|
2022-08-24 17:27:47 +02:00
|
|
|
return returnvalue::OK;
|
2022-06-16 08:26:40 +02:00
|
|
|
}
|