From e2f98778f8ee2bc81daf335a01ea27b42676a3c7 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Fri, 27 Jan 2023 11:02:04 +0100 Subject: [PATCH] move config constants --- common/config/eive/definitions.h | 5 +++++ mission/controller/acs/AcsParameters.h | 14 ++++++++------ mission/core/GenericFactory.cpp | 7 ++++--- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/common/config/eive/definitions.h b/common/config/eive/definitions.h index 2ed925d9..02896e1c 100644 --- a/common/config/eive/definitions.h +++ b/common/config/eive/definitions.h @@ -50,6 +50,11 @@ static constexpr uint8_t VC1_QUEUE_SIZE = 80; static constexpr uint8_t VC2_QUEUE_SIZE = 50; static constexpr uint8_t VC3_QUEUE_SIZE = 50; +static constexpr uint32_t MAX_PUS_FUNNEL_QUEUE_DEPTH = 100; + +static constexpr uint32_t MAX_STORED_CMDS_UDP = 120; +static constexpr uint32_t MAX_STORED_CMDS_TCP = 120; + } // namespace config #endif /* COMMON_CONFIG_DEFINITIONS_H_ */ diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index 17953f52..816e4c71 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -43,16 +43,18 @@ class AcsParameters /*: public HasParametersIF*/ { float mgm3hardIronOffset[3] = {0.0, 0.0, 0.0}; float mgm4hardIronOffset[3] = {0.0, 0.0, 0.0}; - float mgm0softIronInverse[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; /*{{1420.727e-3, 9.352825e-3, - -127.1979e-3}, {9.352825e-3, 1031.965e-3, -80.02734e-3}, - {-127.1979e-3, -80.02734e-3, 934.8899e-3}};*/ + float mgm0softIronInverse[3][3] = { + {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; /*{{1420.727e-3, 9.352825e-3, + -127.1979e-3}, {9.352825e-3, 1031.965e-3, -80.02734e-3}, + {-127.1979e-3, -80.02734e-3, 934.8899e-3}};*/ float mgm1softIronInverse[3][3] = { {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; /*{{126.7325e-2, -4.146410e-2, -18.37963e-2}, {-4.146410e-2, 109.3310e-2, -5.246314e-2}, {-18.37963e-2, -5.246314e-2, 105.7300e-2}};*/ - float mgm2softIronInverse[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; /*{{143.0438e-2, 7.095763e-2, - 15.67482e-2}, {7.095763e-2, 99.65167e-2, -6.958760e-2}, - {15.67482e-2, -6.958760e-2, 94.50124e-2}};*/ + float mgm2softIronInverse[3][3] = { + {1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; /*{{143.0438e-2, 7.095763e-2, + 15.67482e-2}, {7.095763e-2, 99.65167e-2, -6.958760e-2}, + {15.67482e-2, -6.958760e-2, 94.50124e-2}};*/ float mgm3softIronInverse[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; float mgm4softIronInverse[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}; float mgm02variance[3] = {1, 1, 1}; diff --git a/mission/core/GenericFactory.cpp b/mission/core/GenericFactory.cpp index b0537a7b..816555a1 100644 --- a/mission/core/GenericFactory.cpp +++ b/mission/core/GenericFactory.cpp @@ -104,7 +104,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun 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(150); + udpBridge->setMaxNumberOfPacketsStored(config::MAX_STORED_CMDS_UDP); #endif #if OBSW_ADD_TMTC_TCP_SERVER == 1 auto tcpBridge = new TcpTmTcBridge(objects::TCP_TMTC_SERVER, objects::CCSDS_PACKET_DISTRIBUTOR); @@ -113,7 +113,7 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun tcpServer->setSpacePacketParsingOptions({common::PUS_PACKET_ID, common::CFDP_PACKET_ID}); sif::info << "Created TCP server for TMTC commanding with listener port " << tcpServer->getTcpPort() << std::endl; - tcpBridge->setMaxNumberOfPacketsStored(150); + tcpBridge->setMaxNumberOfPacketsStored(config::MAX_STORED_CMDS_TCP); #endif /* OBSW_USE_TMTC_TCP_BRIDGE == 0 */ #endif /* OBSW_ADD_TCPIP_BRIDGE == 1 */ @@ -122,7 +122,8 @@ void ObjectFactory::produceGenericObjects(HealthTableIF** healthTable_, PusTmFun new PusDistributor(config::EIVE_PUS_APID, objects::PUS_PACKET_DISTRIBUTOR, ccsdsDistrib); *cfdpFunnel = new CfdpTmFunnel(objects::CFDP_TM_FUNNEL, config::EIVE_CFDP_APID, *tmStore, 50); - *pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, 100); + *pusFunnel = new PusTmFunnel(objects::PUS_TM_FUNNEL, *timeStamper, *tmStore, + config::MAX_PUS_FUNNEL_QUEUE_DEPTH); #if OBSW_ADD_TCPIP_SERVERS == 1 #if OBSW_ADD_TMTC_UDP_SERVER == 1 (*cfdpFunnel)->addDestination(*udpBridge, 0);