Merge remote-tracking branch 'origin/main' into cfdp-source-handler
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Robin Müller 2023-09-07 16:13:46 +02:00
commit 35f287ff23
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F
25 changed files with 84 additions and 57 deletions

View File

@ -24,6 +24,22 @@ will consitute of a breaking change warranting a new major release:
- Host build fixes
## Changed
- The primary and the secondary temperature sensors for the PLOC mission boards are exchanged.
- ACS parameters for the SUSMGM (FLP) safe mode have been adjusted. This safe mode is now the
default one.
# [v6.4.1] 2023-08-21
## Fixed
- `PDEC_CONFIG_CORRUPTED` event now actually contains the readback instead of the expected
config
- Magnetic field vector was not calculated if only MGM4 was available, but still written to
the dataset. This would result in a NaN vector. Allowance for usage of MGM4 is now checked
before entering calculation.
# [v6.4.0] 2023-08-16
- `eive-tmtc`: v5.4.3
@ -32,6 +48,8 @@ will consitute of a breaking change warranting a new major release:
- The handling function of the GPS data is only called once per GPS read. This should remove
the fake fix-has-changed events.
- Fix for PLOC SUPV HK set parsing.
- The timestamp for the `POSSIBLE_FILE_CORRUPTION` event will be generated properly now.
## Changed

View File

@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 6)
set(OBSW_VERSION_MINOR 4)
set(OBSW_VERSION_REVISION 0)
set(OBSW_VERSION_REVISION 1)
# set(CMAKE_VERBOSE TRUE)

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 305 translations.
* @details
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 171 translations.
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateObjects.h"

View File

@ -258,9 +258,9 @@ void scheduling::initTasks() {
dummyTask->startTask();
// If those are added at a later stage..
//logTmTask->startTask();
//cfdpTmTask->startTask();
//hkTmTask->startTask();
// logTmTask->startTask();
// cfdpTmTask->startTask();
// hkTmTask->startTask();
#if OBSW_ADD_PLOC_SUPERVISOR == 1
supvHelperTask->startTask();

View File

@ -339,6 +339,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x3704;CFDP_DestNameEmpty;No description;4;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3705;CFDP_WrongRemoteCfgEntityId;No description;5;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3706;CFDP_TargetMsgQueueFull;No description;6;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3707;CFDP_TmStoreFull;No description;7;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3801;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
0x39a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
0x39a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
339 0x3704 CFDP_DestNameEmpty No description 4 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
340 0x3705 CFDP_WrongRemoteCfgEntityId No description 5 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
341 0x3706 CFDP_TargetMsgQueueFull No description 6 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
342 0x3707 CFDP_TmStoreFull No description 7 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
343 0x3801 TSI_BadTimestamp No description 1 TIME_STAMPER_IF fsfw/src/fsfw/timemanager/TimeStampIF.h
344 0x39a1 SGP4_InvalidEccentricity No description 161 SGP4PROPAGATOR_CLASS fsfw/src/fsfw/coordinates/Sgp4Propagator.h
345 0x39a2 SGP4_InvalidMeanMotion No description 162 SGP4PROPAGATOR_CLASS fsfw/src/fsfw/coordinates/Sgp4Propagator.h

View File

@ -339,6 +339,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
0x3704;CFDP_DestNameEmpty;No description;4;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3705;CFDP_WrongRemoteCfgEntityId;No description;5;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3706;CFDP_TargetMsgQueueFull;No description;6;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3707;CFDP_TmStoreFull;No description;7;CFDP_HANDLER;fsfw/src/fsfw/cfdp/handler/defs.h
0x3801;TSI_BadTimestamp;No description;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
0x39a1;SGP4_InvalidEccentricity;No description;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
0x39a2;SGP4_InvalidMeanMotion;No description;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h

1 Full ID (hex) Name Description Unique ID Subsytem Name File Path
339 0x3704 CFDP_DestNameEmpty No description 4 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
340 0x3705 CFDP_WrongRemoteCfgEntityId No description 5 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
341 0x3706 CFDP_TargetMsgQueueFull No description 6 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
342 0x3707 CFDP_TmStoreFull No description 7 CFDP_HANDLER fsfw/src/fsfw/cfdp/handler/defs.h
343 0x3801 TSI_BadTimestamp No description 1 TIME_STAMPER_IF fsfw/src/fsfw/timemanager/TimeStampIF.h
344 0x39a1 SGP4_InvalidEccentricity No description 161 SGP4PROPAGATOR_CLASS fsfw/src/fsfw/coordinates/Sgp4Propagator.h
345 0x39a2 SGP4_InvalidMeanMotion No description 162 SGP4PROPAGATOR_CLASS fsfw/src/fsfw/coordinates/Sgp4Propagator.h

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 305 translations.
* @details
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateObjects.h"

View File

@ -11,7 +11,7 @@
#include <array>
//#include "lwgps/lwgps.h"
// #include "lwgps/lwgps.h"
#include "test/TestTask.h"
class ScexUartReader;

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 305 translations.
* @details
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateEvents.h"

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 175 translations.
* Generated on: 2023-09-04 11:19:49
* Generated on: 2023-09-07 16:12:51
*/
#include "translateObjects.h"

View File

@ -595,9 +595,10 @@ void PdecHandler::checkConfig() {
sif::warning << "PdecHandler::checkConfig: Failed to create second word" << std::endl;
return;
}
if (firstWord != pdecConfig.readbackFirstWord() or
secondWord != pdecConfig.readbackSecondWord()) {
triggerEvent(PDEC_CONFIG_CORRUPTED, firstWord, secondWord);
uint32_t readbackFirstWord = pdecConfig.readbackFirstWord();
uint32_t readbackSecondWord = pdecConfig.readbackSecondWord();
if (firstWord != readbackFirstWord or secondWord != readbackSecondWord) {
triggerEvent(PDEC_CONFIG_CORRUPTED, readbackFirstWord, readbackSecondWord);
}
}

View File

@ -2105,9 +2105,9 @@ uint32_t PlocSupervisorHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t mod
// if (result != returnvalue::OK) {
// return result;
// }
//#if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
// #if OBSW_VERBOSE_LEVEL >= 1 && OBSW_DEBUG_PLOC_SUPERVISOR == 1
// loggingReport.printSet();
//#endif
// #endif
// nextReplyId = supv::EXE_REPORT;
// return result;
// }

View File

@ -274,12 +274,12 @@ ReturnValue_t PlocSupvUartManager::initiateUpdateContinuation() {
}
// ReturnValue_t PlocSupvHelper::startEventBufferRequest(std::string path) {
//#ifdef XIPHOS_Q7S
// #ifdef XIPHOS_Q7S
// ReturnValue_t result = FilesystemHelper::checkPath(path);
// if (result != returnvalue::OK) {
// return result;
// }
//#endif
// #endif
// if (not std::filesystem::exists(path)) {
// return PATH_NOT_EXISTS;
// }
@ -836,11 +836,11 @@ uint32_t PlocSupvUartManager::getFileSize(std::string filename) {
ReturnValue_t PlocSupvUartManager::handleEventBufferReception(ploc::SpTmReader& reader) {
ReturnValue_t result = returnvalue::OK;
// TODO: Fix
//#ifdef XIPHOS_Q7S
// #ifdef XIPHOS_Q7S
// if (not sdcMan->getActiveSdCard()) {
// return HasFileSystemIF::FILESYSTEM_INACTIVE;
// }
//#endif
// #endif
// std::string filename = Filenaming::generateAbsoluteFilename(
// eventBufferReq.path, eventBufferReq.filename, timestamping);
// std::ofstream file(filename, std::ios_base::app | std::ios_base::out);

View File

@ -76,9 +76,9 @@ ReturnValue_t CfdpHandler::initialize() {
break;
}
srcHandler.stateMachine();
if(srcResult.result == cfdp::TM_STORE_FULL) {
if (srcResult.result == cfdp::TM_STORE_FULL) {
sif::warning << "CFDP Source Handler: TM store is full" << std::endl;
} else if(srcResult.result == cfdp::TARGET_MSG_QUEUE_FULL) {
} else if (srcResult.result == cfdp::TARGET_MSG_QUEUE_FULL) {
sif::warning << "CFDP Source Handler: TM queue is full" << std::endl;
}
fsmCount++;

View File

@ -1372,12 +1372,13 @@ void ThermalController::ctrlPlPcduBoard() {
tooHotHandler(objects::PLPCDU_HANDLER, tooHotFlags.eBandTooHotFlag);
}
// ToDo: remove one of the following 2
void ThermalController::ctrlPlocMissionBoard() {
ctrlCtx.thermalComponent = tcsCtrl::PLOCMISSION_BOARD;
sensors[0].first = sensorTemperatures.plocHeatspreader.isValid();
sensors[0].second = sensorTemperatures.plocHeatspreader.value;
sensors[1].first = sensorTemperatures.plocMissionboard.isValid();
sensors[1].second = sensorTemperatures.plocMissionboard.value;
sensors[0].first = sensorTemperatures.plocMissionboard.isValid();
sensors[0].second = sensorTemperatures.plocMissionboard.value;
sensors[1].first = sensorTemperatures.plocHeatspreader.isValid();
sensors[1].second = sensorTemperatures.plocHeatspreader.value;
sensors[2].first = sensorTemperatures.dacHeatspreader.isValid();
sensors[2].second = sensorTemperatures.dacHeatspreader.value;
numSensors = 3;

View File

@ -79,7 +79,7 @@ class AcsParameters : public HasParametersIF {
float mgm13variance[3] = {pow(1.5e-8, 2), pow(1.5e-8, 2), pow(1.5e-8, 2)};
float mgm4variance[3] = {pow(1.7e-6, 2), pow(1.7e-6, 2), pow(1.7e-6, 2)};
float mgmVectorFilterWeight = 0.85;
float mgmDerivativeFilterWeight = 0.85;
float mgmDerivativeFilterWeight = 0.99;
uint8_t useMgm4 = false;
} mgmHandlingParameters;
@ -771,7 +771,7 @@ class AcsParameters : public HasParametersIF {
-0.000889232196185857, -0.00168429567131815}};
float susBrightnessThreshold = 0.7;
float susVectorFilterWeight = .85;
float susRateFilterWeight = .85;
float susRateFilterWeight = .99;
} susHandlingParameters;
struct GyrHandlingParameters {
@ -834,15 +834,15 @@ class AcsParameters : public HasParametersIF {
double k_alignGyr = 4.0e-5;
double k_parallelGyr = 3.75e-4;
double k_orthoSusMgm = 1.1e-2;
double k_alignSusMgm = 2.0e-5;
double k_parallelSusMgm = 4.4e-4;
double k_orthoSusMgm = 4.4e-3;
double k_alignSusMgm = 4.0e-5;
double k_parallelSusMgm = 3.75e-4;
double sunTargetDirLeop[3] = {0, sqrt(.5), sqrt(.5)};
double sunTargetDir[3] = {0, 0, 1};
uint8_t useMekf = false;
uint8_t useGyr = true;
uint8_t useGyr = false;
uint8_t dampingDuringEclipse = true;
float sineLimitSunRotRate = 0.24;

View File

@ -25,7 +25,8 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
gpsDataProcessed->altitude.value, timeOfMgmMeasurement, magIgrfModel);
gpsValid = true;
}
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
if (not mgm0valid and not mgm1valid and not mgm2valid and not mgm3valid and
(not mgm4valid or not mgmParameters->useMgm4)) {
{
PoolReadGuard pg(mgmDataProcessed);
if (pg.getReadResult() == returnvalue::OK) {

View File

@ -134,16 +134,16 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
#if OBSW_ADD_TCPIP_SERVERS == 1
#if OBSW_ADD_TMTC_UDP_SERVER == 1
auto udpBridge =
new UdpTmTcBridge(objects::UDP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, config::UDP_MSG_QUEUE_DEPTH);
auto udpBridge = new UdpTmTcBridge(objects::UDP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR,
config::UDP_MSG_QUEUE_DEPTH);
new UdpTcPollingTask(objects::UDP_TMTC_POLLING_TASK, objects::UDP_TMTC_SERVER);
sif::info << "Created UDP server for TMTC commanding with listener port "
<< udpBridge->getUdpPort() << std::endl;
udpBridge->setMaxNumberOfPacketsStored(config::UDP_MAX_STORED_CMDS);
#endif
#if OBSW_ADD_TMTC_TCP_SERVER == 1
auto tcpBridge =
new TcpTmTcBridge(objects::TCP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR, config::TCP_MSG_QUEUE_DEPTH);
auto tcpBridge = new TcpTmTcBridge(objects::TCP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR,
config::TCP_MSG_QUEUE_DEPTH);
TcpTmTcServer::TcpConfig cfg(true, true);
auto tcpServer = new TcpTmTcServer(objects::TCP_TMTC_POLLING_TASK, objects::TCP_TMTC_SERVER, cfg);
// TCP is stream based. Use packet ID as start marker when parsing for space packets
@ -226,12 +226,12 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun
**ipcStore, config::MAX_CFDP_FUNNEL_QUEUE_DEPTH, sdcMan,
config::CFDP_SEQUENCE_COUNT_FILE,
core::SAVE_CFDP_SEQUENCE_COUNT);
std::optional<MessageQueueId_t> fileStoreDest {};
if(routeToPersistentStores) {
std::optional<MessageQueueId_t> fileStoreDest{};
if (routeToPersistentStores) {
fileStoreDest = stores.cfdpStore->getReportReceptionQueue(0);
}
*cfdpFunnel = new CfdpTmFunnel(cfdpFunnelCfg, fileStoreDest,
*ramToFileStore, config::EIVE_CFDP_APID);
*cfdpFunnel =
new CfdpTmFunnel(cfdpFunnelCfg, fileStoreDest, *ramToFileStore, config::EIVE_CFDP_APID);
#if OBSW_ADD_TCPIP_SERVERS == 1
#if OBSW_ADD_TMTC_UDP_SERVER == 1

View File

@ -8,12 +8,12 @@
// I really don't want to pull in all of those GomSpace headers just for 6 constants..
// Those are the headers which contain the defines which were just hardcoded below.
//#include "p60acu_hk.h"
//#include "p60acu_param.h"
//#include "p60dock_hk.h"
//#include "p60dock_param.h"
//#include "p60pdu_hk.h"
//#include "p60pdu_param.h"
// #include "p60acu_hk.h"
// #include "p60acu_param.h"
// #include "p60dock_hk.h"
// #include "p60dock_param.h"
// #include "p60pdu_hk.h"
// #include "p60pdu_param.h"
#endif

View File

@ -4,7 +4,8 @@
#include "fsfw/tmtcpacket/ccsds/SpacePacketCreator.h"
#include "fsfw/tmtcservices/TmTcMessage.h"
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg, std::optional<MessageQueueId_t> fileStoreDest,
CfdpTmFunnel::CfdpTmFunnel(TmFunnelBase::FunnelCfg cfg,
std::optional<MessageQueueId_t> fileStoreDest,
StorageManagerIF& ramToFileStore, uint16_t cfdpInCcsdsApid)
: TmFunnelBase(cfg),
fileStoreDest(fileStoreDest),
@ -42,7 +43,8 @@ ReturnValue_t CfdpTmFunnel::performOperation(uint8_t) {
}
if (handledPackets > 0) {
// Very useful for profiling and debugging
//sif::debug << "CfdpFunnel: Handled " << handledPackets << " packets in one cycle" << std::endl;
// sif::debug << "CfdpFunnel: Handled " << handledPackets << " packets in one cycle" <<
// std::endl;
}
if (status == MessageQueueIF::EMPTY) {
@ -94,16 +96,16 @@ ReturnValue_t CfdpTmFunnel::handlePacket(TmTcMessage& msg) {
msg.setStorageId(newStoreId);
store_address_t origStoreId = newStoreId;
if(fileStoreDest.has_value()) {
if (fileStoreDest.has_value()) {
store_address_t storageId;
result = ramToFileStore.addData(&storageId, newPacketData, packetLen);
TmTcMessage fileMsg(storageId);
if (result == returnvalue::OK) {
tmQueue->sendMessage(fileStoreDest.value(), &fileMsg);
} else if(result == StorageManagerIF::DATA_STORAGE_FULL) {
sif::error << "CfdpTmFunnel::handlePacket: RAM to File Store too full to create data copy" << std::endl;
} else if (result == StorageManagerIF::DATA_STORAGE_FULL) {
sif::error << "CfdpTmFunnel::handlePacket: RAM to File Store too full to create data copy"
<< std::endl;
}
}
return demultiplexLivePackets(origStoreId, newPacketData, packetLen);
}

View File

@ -320,6 +320,7 @@ ReturnValue_t PersistentTmStore::loadNextDumpFile() {
}
// File will change, reset this field for correct state-keeping.
dumpParams.currentSameFileIdx = std::nullopt;
dumpParams.currentFileUnixStamp = dumpParams.dumpIter->epoch;
// Increment iterator for next cycle.
dumpParams.dumpIter++;
};

View File

@ -9,7 +9,8 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
store_address_t origStoreId, const uint8_t* tmData,
size_t tmSize) {
ReturnValue_t result = returnvalue::OK;
// sif::debug << "tm size: " << tmSize << " for " << destinations.size() << " destinations" << std::endl;
// sif::debug << "tm size: " << tmSize << " for " << destinations.size() << " destinations" <<
// std::endl;
for (unsigned int idx = 0; idx < destinations.size(); idx++) {
const auto& dest = destinations[idx];
if ((destinations.size() > 1) and (idx < (destinations.size() - 1))) {
@ -26,9 +27,9 @@ ReturnValue_t PusLiveDemux::demultiplexPackets(StorageManagerIF& tmStore,
uint8_t written = 0;
tmStore.getFillCount(fillCounts, &written);
sif::error << "Fill counts: ";
for(uint8_t fillIdx = 0; fillIdx < written; fillIdx++) {
for (uint8_t fillIdx = 0; fillIdx < written; fillIdx++) {
sif::error << fillCounts[fillIdx];
if(fillIdx < written - 1) {
if (fillIdx < written - 1) {
sif::error << ", ";
}
}

2
tmtc

@ -1 +1 @@
Subproject commit 649deac81bbc59d70f0cd1f2e442f434d089bbef
Subproject commit 5fc3d8de996e5640adb7205cd3897d499eb3da60