Merge remote-tracking branch 'origin/develop' into mueller/tcs_subsystem
This commit is contained in:
commit
b1f861b59c
27
CHANGELOG.md
27
CHANGELOG.md
@ -10,6 +10,33 @@ list yields a list of all related PRs for each release.
|
|||||||
|
|
||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- First version of ACS controller
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/329
|
||||||
|
|
||||||
|
# [v1.18.0] 01.12.2022
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- PLOC Supervisor: Changes baudrate to 921600
|
||||||
|
- Renamed `/dev/ul-plsv` to `/dev/ploc_supv`, is not a UART lite anymore
|
||||||
|
- Renamed `/dev/i2c_eive` to `/dev/i2c_pl` and `/dev/i2c-2` to `/dev/i2c_ps`.
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/328
|
||||||
|
|
||||||
|
# [v1.17.0] 28.11.2022
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- PLOC Supervisor Update: Update SW to use newest PLOC SUPV version by TAS
|
||||||
|
PR 1: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/316
|
||||||
|
PR 2: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/324
|
||||||
|
PR 3: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/326
|
||||||
|
|
||||||
|
# [v1.16.0] 18.11.2022
|
||||||
|
|
||||||
|
- It is now possible to compile Linux components for the hosted build conditionally
|
||||||
|
PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/322
|
||||||
- ACS Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
- ACS Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
||||||
- Payload Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
- Payload Subsystem. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/231
|
||||||
- Add IRQ mode for PDEC handler. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/310
|
- Add IRQ mode for PDEC handler. PR: https://egit.irs.uni-stuttgart.de/eive/eive-obsw/pulls/310
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 1)
|
set(OBSW_VERSION_MAJOR_IF_GIT_FAILS 1)
|
||||||
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 15)
|
set(OBSW_VERSION_MINOR_IF_GIT_FAILS 18)
|
||||||
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
set(OBSW_VERSION_REVISION_IF_GIT_FAILS 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
@ -141,7 +141,7 @@ set(OBSW_ADD_TMP_DEVICES
|
|||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
CACHE STRING "Add TMP devices")
|
CACHE STRING "Add TMP devices")
|
||||||
set(OBSW_ADD_GOMSPACE_PCDU
|
set(OBSW_ADD_GOMSPACE_PCDU
|
||||||
${INIT_VAL}
|
1
|
||||||
CACHE STRING "Add GomSpace PCDU modules")
|
CACHE STRING "Add GomSpace PCDU modules")
|
||||||
set(OBSW_ADD_RW
|
set(OBSW_ADD_RW
|
||||||
${INIT_VAL}
|
${INIT_VAL}
|
||||||
@ -233,7 +233,7 @@ set(LIB_ARCSEC_PATH ${THIRD_PARTY_FOLDER}/arcsec_star_tracker)
|
|||||||
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
|
set(LIB_JSON_PATH ${THIRD_PARTY_FOLDER}/json)
|
||||||
|
|
||||||
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
set(FSFW_WARNING_SHADOW_LOCAL_GCC OFF)
|
||||||
set(EIVE_ADD_LINUX_FILES False)
|
set(EIVE_ADD_LINUX_FILES OFF)
|
||||||
|
|
||||||
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
# Analyse different OS and architecture/target options, determine BSP_PATH,
|
||||||
# display information about compiler etc.
|
# display information about compiler etc.
|
||||||
@ -253,12 +253,15 @@ if(TGT_BSP)
|
|||||||
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
|
||||||
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
if(NOT BUILD_Q7S_SIMPLE_MODE)
|
||||||
set(EIVE_ADD_LINUX_FILES TRUE)
|
set(EIVE_ADD_LINUX_FILES TRUE)
|
||||||
|
set(EIVE_ADD_LINUX_FSFWCONFIG TRUE)
|
||||||
set(ADD_GOMSPACE_CSP TRUE)
|
set(ADD_GOMSPACE_CSP TRUE)
|
||||||
set(ADD_GOMSPACE_CLIENTS TRUE)
|
set(ADD_GOMSPACE_CLIENTS TRUE)
|
||||||
set(FSFW_HAL_ADD_LINUX ON)
|
set(FSFW_HAL_ADD_LINUX ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
set(FSFW_HAL_LINUX_ADD_LIBGPIOD ON)
|
||||||
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
set(FSFW_HAL_LINUX_ADD_PERIPHERAL_DRIVERS ON)
|
||||||
endif()
|
endif()
|
||||||
|
elseif(UNIX)
|
||||||
|
set(EIVE_ADD_LINUX_FILES ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(TGT_BSP MATCHES "arm/raspberrypi")
|
if(TGT_BSP MATCHES "arm/raspberrypi")
|
||||||
@ -293,6 +296,9 @@ if(TGT_BSP)
|
|||||||
else()
|
else()
|
||||||
# Required by FSFW library
|
# Required by FSFW library
|
||||||
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
set(FSFW_CONFIG_PATH "${BSP_PATH}/fsfwconfig")
|
||||||
|
if(UNIX)
|
||||||
|
set(EIVE_ADD_LINUX_FILES ON)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Configuration files
|
# Configuration files
|
||||||
@ -393,7 +399,7 @@ if(EIVE_ADD_JSON_LIB)
|
|||||||
add_subdirectory(${LIB_JSON_PATH})
|
add_subdirectory(${LIB_JSON_PATH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(thirdparty/rapidcsv)
|
add_subdirectory(thirdparty)
|
||||||
|
|
||||||
if(EIVE_ADD_LINUX_FILES)
|
if(EIVE_ADD_LINUX_FILES)
|
||||||
add_subdirectory(${LIB_ARCSEC_PATH})
|
add_subdirectory(${LIB_ARCSEC_PATH})
|
||||||
|
23
README.md
23
README.md
@ -1055,6 +1055,29 @@ Get fill count:
|
|||||||
xsc_scratch read | wc -c
|
xsc_scratch read | wc -c
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Custom device names in Linux with the `udev` module
|
||||||
|
|
||||||
|
You can assign custom device names using the Linux `udev` system.
|
||||||
|
This works by specifying a rules file inside the `/etc/udev/rules.d` folder
|
||||||
|
which creates a SYMLINK if certain device properties are true.
|
||||||
|
|
||||||
|
Each rule is a new line inside a rules file.
|
||||||
|
For example, the rule
|
||||||
|
|
||||||
|
```txt
|
||||||
|
SUBSYSTEM=="tty", ATTRS{interface}=="Dual RS232-HS", ATTRS{bInterfaceNumber}=="01", SYMLINK+="ploc_supv
|
||||||
|
```
|
||||||
|
|
||||||
|
Will create a symlink `/dev/ploc_supv` if a connected USB device has the
|
||||||
|
same `interface` and `bInterfaceNumber` properties as shown above.
|
||||||
|
|
||||||
|
You can list the properties for a given connected device using `udevadm`.
|
||||||
|
For example, you can do this for a connected example device `/dev/ttyUSB0`
|
||||||
|
by using
|
||||||
|
|
||||||
|
```txt
|
||||||
|
udevadm info -a /dev/ttyUSB0
|
||||||
|
```
|
||||||
|
|
||||||
## Using `system` when debugging
|
## Using `system` when debugging
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp ObjectFactory.cpp)
|
target_sources(${OBSW_NAME} PUBLIC scheduling.cpp main.cpp ObjectFactory.cpp)
|
||||||
|
|
||||||
add_subdirectory(fsfwconfig)
|
add_subdirectory(fsfwconfig)
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#ifndef BSP_LINUX_INITMISSION_H_
|
|
||||||
#define BSP_LINUX_INITMISSION_H_
|
|
||||||
|
|
||||||
namespace initmission {
|
|
||||||
void initMission();
|
|
||||||
void initTasks();
|
|
||||||
}; // namespace initmission
|
|
||||||
|
|
||||||
#endif /* BSP_LINUX_INITMISSION_H_ */
|
|
@ -24,6 +24,7 @@
|
|||||||
#define OBSW_ADD_GPS_0 0
|
#define OBSW_ADD_GPS_0 0
|
||||||
#define OBSW_ADD_GPS_1 0
|
#define OBSW_ADD_GPS_1 0
|
||||||
#define OBSW_ADD_RW 0
|
#define OBSW_ADD_RW 0
|
||||||
|
#define OBSW_DEBUG_TMP1075 0
|
||||||
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
#define OBSW_ADD_BPX_BATTERY_HANDLER 0
|
||||||
#define OBSW_ADD_RTD_DEVICES 0
|
#define OBSW_ADD_RTD_DEVICES 0
|
||||||
#define OBSW_ADD_PL_PCDU 0
|
#define OBSW_ADD_PL_PCDU 0
|
||||||
@ -100,6 +101,13 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** CMake Defines */
|
/** CMake Defines */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
|
||||||
|
// because UDP packets are not allowed in the VPN
|
||||||
|
// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the
|
||||||
|
// CCSDS IP Cores.
|
||||||
|
#define OBSW_USE_TMTC_TCP_BRIDGE 0
|
||||||
|
|
||||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
|
|
||||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
|
||||||
|
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||||
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
#include <fsfw/tmtcservices/CommandingServiceBase.h>
|
||||||
#include <fsfw/tmtcservices/PusServiceBase.h>
|
#include <fsfw/tmtcservices/PusServiceBase.h>
|
||||||
#include <mission/controller/ThermalController.h>
|
#include <mission/controller/ThermalController.h>
|
||||||
#include <mission/core/GenericFactory.h>
|
#include <mission/core/GenericFactory.h>
|
||||||
#include <mission/tmtc/TmFunnelHandler.h>
|
#include <mission/tmtc/TmFunnelHandler.h>
|
||||||
#include <objects/systemObjectList.h>
|
#include <objects/systemObjectList.h>
|
||||||
#include <tmtc/pusIds.h>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "devConf.h"
|
||||||
#include "eive/definitions.h"
|
#include "eive/definitions.h"
|
||||||
|
#include "fsfw/platform.h"
|
||||||
#include "fsfw_tests/integration/task/TestTask.h"
|
#include "fsfw_tests/integration/task/TestTask.h"
|
||||||
|
#include "tmtc/pusIds.h"
|
||||||
|
|
||||||
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
|
||||||
#include "fsfw/osal/common/UdpTcPollingTask.h"
|
#include "fsfw/osal/common/UdpTcPollingTask.h"
|
||||||
@ -47,12 +50,25 @@
|
|||||||
#include "dummies/helpers.h"
|
#include "dummies/helpers.h"
|
||||||
#include "mission/utility/GlobalConfigHandler.h"
|
#include "mission/utility/GlobalConfigHandler.h"
|
||||||
|
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
#include <fsfw_hal/linux/serial/SerialComIF.h>
|
||||||
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
|
#include "devices/gpioIds.h"
|
||||||
|
#include "fsfw_hal/linux/gpio/Gpio.h"
|
||||||
|
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||||
|
#include "linux/devices/ploc/PlocMPSoCHelper.h"
|
||||||
|
#include "linux/devices/ploc/PlocSupervisorHandler.h"
|
||||||
|
#include "linux/devices/ploc/PlocSupvUartMan.h"
|
||||||
|
#include "test/gpio/DummyGpioIF.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
void Factory::setStaticFrameworkObjectIds() {
|
void Factory::setStaticFrameworkObjectIds() {
|
||||||
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
PusServiceBase::PACKET_DESTINATION = objects::TM_FUNNEL;
|
PusServiceBase::PACKET_DESTINATION = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
|
||||||
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
|
CommandingServiceBase::defaultPacketDestination = objects::PUS_TM_FUNNEL;
|
||||||
|
|
||||||
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
VerificationReporter::DEFAULT_RECEIVER = objects::PUS_SERVICE_1_VERIFICATION;
|
||||||
}
|
}
|
||||||
@ -63,10 +79,36 @@ void ObjectFactory::produce(void* args) {
|
|||||||
CfdpTmFunnel* cfdpFunnel;
|
CfdpTmFunnel* cfdpFunnel;
|
||||||
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel);
|
ObjectFactory::produceGenericObjects(nullptr, &pusFunnel, &cfdpFunnel);
|
||||||
|
|
||||||
|
DummyGpioIF* dummyGpioIF = new DummyGpioIF();
|
||||||
|
auto* dummySwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
|
static_cast<void>(dummyGpioIF);
|
||||||
|
#ifdef PLATFORM_UNIX
|
||||||
|
new SerialComIF(objects::UART_COM_IF);
|
||||||
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
std::string mpscoDev = "";
|
||||||
|
auto mpsocCookie = new UartCookie(objects::PLOC_MPSOC_HANDLER, mpscoDev, uart::PLOC_MPSOC_BAUD,
|
||||||
|
mpsoc::MAX_REPLY_SIZE, UartModes::NON_CANONICAL);
|
||||||
|
mpsocCookie->setNoFixedSizeReply();
|
||||||
|
auto plocMpsocHelper = new PlocMPSoCHelper(objects::PLOC_MPSOC_HELPER);
|
||||||
|
new PlocMPSoCHandler(objects::PLOC_MPSOC_HANDLER, objects::UART_COM_IF, mpsocCookie,
|
||||||
|
plocMpsocHelper, Gpio(gpioIds::ENABLE_MPSOC_UART, dummyGpioIF),
|
||||||
|
objects::PLOC_SUPERVISOR_HANDLER);
|
||||||
|
#endif /* OBSW_ADD_PLOC_MPSOC == 1 */
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
std::string plocSupvString = "/dev/ploc_supv";
|
||||||
|
auto supervisorCookie =
|
||||||
|
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, plocSupvString, uart::PLOC_SUPV_BAUD,
|
||||||
|
supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||||
|
supervisorCookie->setNoFixedSizeReply();
|
||||||
|
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||||
|
Gpio(gpioIds::ENABLE_SUPV_UART, dummyGpioIF), pcdu::PDU1_CH6_PLOC_12V,
|
||||||
|
*supvHelper);
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
#endif
|
||||||
|
|
||||||
dummy::DummyCfg cfg;
|
dummy::DummyCfg cfg;
|
||||||
dummy::createDummies(cfg);
|
dummy::createDummies(cfg, *dummySwitcher);
|
||||||
new TemperatureSensorsDummy();
|
|
||||||
new SusDummy();
|
|
||||||
new ThermalController(objects::THERMAL_CONTROLLER);
|
new ThermalController(objects::THERMAL_CONTROLLER);
|
||||||
new TestTask(objects::TEST_TASK);
|
new TestTask(objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 83 translations.
|
* @brief Auto-generated event translation file. Contains 239 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2021-05-17 19:49:55
|
* Generated on: 2022-11-16 15:25:08
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -34,6 +34,7 @@ const char *DEVICE_UNREQUESTED_REPLY_STRING = "DEVICE_UNREQUESTED_REPLY";
|
|||||||
const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND";
|
const char *INVALID_DEVICE_COMMAND_STRING = "INVALID_DEVICE_COMMAND";
|
||||||
const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED";
|
const char *MONITORING_LIMIT_EXCEEDED_STRING = "MONITORING_LIMIT_EXCEEDED";
|
||||||
const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS";
|
const char *MONITORING_AMBIGUOUS_STRING = "MONITORING_AMBIGUOUS";
|
||||||
|
const char *DEVICE_WANTS_HARD_REBOOT_STRING = "DEVICE_WANTS_HARD_REBOOT";
|
||||||
const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH";
|
const char *FUSE_CURRENT_HIGH_STRING = "FUSE_CURRENT_HIGH";
|
||||||
const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF";
|
const char *FUSE_WENT_OFF_STRING = "FUSE_WENT_OFF";
|
||||||
const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT";
|
const char *POWER_ABOVE_HIGH_LIMIT_STRING = "POWER_ABOVE_HIGH_LIMIT";
|
||||||
@ -59,7 +60,6 @@ const char *MONITOR_CHANGED_STATE_STRING = "MONITOR_CHANGED_STATE";
|
|||||||
const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT";
|
const char *VALUE_BELOW_LOW_LIMIT_STRING = "VALUE_BELOW_LOW_LIMIT";
|
||||||
const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT";
|
const char *VALUE_ABOVE_HIGH_LIMIT_STRING = "VALUE_ABOVE_HIGH_LIMIT";
|
||||||
const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE";
|
const char *VALUE_OUT_OF_RANGE_STRING = "VALUE_OUT_OF_RANGE";
|
||||||
const char *SWITCHING_TM_FAILED_STRING = "SWITCHING_TM_FAILED";
|
|
||||||
const char *CHANGING_MODE_STRING = "CHANGING_MODE";
|
const char *CHANGING_MODE_STRING = "CHANGING_MODE";
|
||||||
const char *MODE_INFO_STRING = "MODE_INFO";
|
const char *MODE_INFO_STRING = "MODE_INFO";
|
||||||
const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED";
|
const char *FALLBACK_FAILED_STRING = "FALLBACK_FAILED";
|
||||||
@ -75,6 +75,7 @@ const char *OVERWRITING_HEALTH_STRING = "OVERWRITING_HEALTH";
|
|||||||
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
const char *TRYING_RECOVERY_STRING = "TRYING_RECOVERY";
|
||||||
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
const char *RECOVERY_STEP_STRING = "RECOVERY_STEP";
|
||||||
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
const char *RECOVERY_DONE_STRING = "RECOVERY_DONE";
|
||||||
|
const char *HANDLE_PACKET_FAILED_STRING = "HANDLE_PACKET_FAILED";
|
||||||
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
const char *RF_AVAILABLE_STRING = "RF_AVAILABLE";
|
||||||
const char *RF_LOST_STRING = "RF_LOST";
|
const char *RF_LOST_STRING = "RF_LOST";
|
||||||
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
const char *BIT_LOCK_STRING = "BIT_LOCK";
|
||||||
@ -82,15 +83,166 @@ const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
|||||||
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
||||||
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
||||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||||
|
const char *TC_DELETION_FAILED_STRING = "TC_DELETION_FAILED";
|
||||||
const char *TEST_STRING = "TEST";
|
const char *TEST_STRING = "TEST";
|
||||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||||
|
const char *STORE_ERROR_STRING = "STORE_ERROR";
|
||||||
|
const char *MSG_QUEUE_ERROR_STRING = "MSG_QUEUE_ERROR";
|
||||||
|
const char *SERIALIZATION_ERROR_STRING = "SERIALIZATION_ERROR";
|
||||||
|
const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT";
|
||||||
|
const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED";
|
||||||
|
const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED";
|
||||||
|
const char *FDIR_REACTION_IGNORED_STRING = "FDIR_REACTION_IGNORED";
|
||||||
|
const char *GPIO_PULL_HIGH_FAILED_STRING = "GPIO_PULL_HIGH_FAILED";
|
||||||
|
const char *GPIO_PULL_LOW_FAILED_STRING = "GPIO_PULL_LOW_FAILED";
|
||||||
|
const char *HEATER_WENT_ON_STRING = "HEATER_WENT_ON";
|
||||||
|
const char *HEATER_WENT_OFF_STRING = "HEATER_WENT_OFF";
|
||||||
|
const char *SWITCH_ALREADY_ON_STRING = "SWITCH_ALREADY_ON";
|
||||||
|
const char *SWITCH_ALREADY_OFF_STRING = "SWITCH_ALREADY_OFF";
|
||||||
|
const char *MAIN_SWITCH_TIMEOUT_STRING = "MAIN_SWITCH_TIMEOUT";
|
||||||
|
const char *FAULTY_HEATER_WAS_ON_STRING = "FAULTY_HEATER_WAS_ON";
|
||||||
|
const char *BURN_PHASE_START_STRING = "BURN_PHASE_START";
|
||||||
|
const char *BURN_PHASE_DONE_STRING = "BURN_PHASE_DONE";
|
||||||
|
const char *MAIN_SWITCH_ON_TIMEOUT_STRING = "MAIN_SWITCH_ON_TIMEOUT";
|
||||||
|
const char *MAIN_SWITCH_OFF_TIMEOUT_STRING = "MAIN_SWITCH_OFF_TIMEOUT";
|
||||||
|
const char *DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_ON_FAILED";
|
||||||
|
const char *DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_ON_FAILED";
|
||||||
|
const char *DEPL_SA1_GPIO_SWTICH_OFF_FAILED_STRING = "DEPL_SA1_GPIO_SWTICH_OFF_FAILED";
|
||||||
|
const char *DEPL_SA2_GPIO_SWTICH_OFF_FAILED_STRING = "DEPL_SA2_GPIO_SWTICH_OFF_FAILED";
|
||||||
|
const char *AUTONOMOUS_DEPLOYMENT_COMPLETED_STRING = "AUTONOMOUS_DEPLOYMENT_COMPLETED";
|
||||||
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
|
const char *MEMORY_READ_RPT_CRC_FAILURE_STRING = "MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
const char *ACK_FAILURE_STRING = "ACK_FAILURE";
|
const char *ACK_FAILURE_STRING = "ACK_FAILURE";
|
||||||
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
|
const char *EXE_FAILURE_STRING = "EXE_FAILURE";
|
||||||
const char *CRC_FAILURE_EVENT_STRING = "CRC_FAILURE_EVENT";
|
const char *MPSOC_HANDLER_CRC_FAILURE_STRING = "MPSOC_HANDLER_CRC_FAILURE";
|
||||||
|
const char *MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING = "MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH";
|
||||||
|
const char *MPSOC_SHUTDOWN_FAILED_STRING = "MPSOC_SHUTDOWN_FAILED";
|
||||||
|
const char *SELF_TEST_I2C_FAILURE_STRING = "SELF_TEST_I2C_FAILURE";
|
||||||
|
const char *SELF_TEST_SPI_FAILURE_STRING = "SELF_TEST_SPI_FAILURE";
|
||||||
|
const char *SELF_TEST_ADC_FAILURE_STRING = "SELF_TEST_ADC_FAILURE";
|
||||||
|
const char *SELF_TEST_PWM_FAILURE_STRING = "SELF_TEST_PWM_FAILURE";
|
||||||
|
const char *SELF_TEST_TC_FAILURE_STRING = "SELF_TEST_TC_FAILURE";
|
||||||
|
const char *SELF_TEST_MTM_RANGE_FAILURE_STRING = "SELF_TEST_MTM_RANGE_FAILURE";
|
||||||
|
const char *SELF_TEST_COIL_CURRENT_FAILURE_STRING = "SELF_TEST_COIL_CURRENT_FAILURE";
|
||||||
|
const char *INVALID_ERROR_BYTE_STRING = "INVALID_ERROR_BYTE";
|
||||||
|
const char *ERROR_STATE_STRING = "ERROR_STATE";
|
||||||
|
const char *RESET_OCCURED_STRING = "RESET_OCCURED";
|
||||||
|
const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
|
||||||
|
const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
|
||||||
|
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
|
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
|
||||||
|
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
|
||||||
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
|
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||||
|
const char *SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUWDOWN_BUILD_FAILED";
|
||||||
|
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||||
|
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||||
|
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||||
|
const char *MRAM_DUMP_FAILED_STRING = "MRAM_DUMP_FAILED";
|
||||||
|
const char *MRAM_DUMP_FINISHED_STRING = "MRAM_DUMP_FINISHED";
|
||||||
|
const char *INVALID_TC_FRAME_STRING = "INVALID_TC_FRAME";
|
||||||
|
const char *INVALID_FAR_STRING = "INVALID_FAR";
|
||||||
|
const char *CARRIER_LOCK_STRING = "CARRIER_LOCK";
|
||||||
|
const char *BIT_LOCK_PDEC_STRING = "BIT_LOCK_PDEC";
|
||||||
|
const char *LOST_CARRIER_LOCK_PDEC_STRING = "LOST_CARRIER_LOCK_PDEC";
|
||||||
|
const char *LOST_BIT_LOCK_PDEC_STRING = "LOST_BIT_LOCK_PDEC";
|
||||||
|
const char *POLL_ERROR_PDEC_STRING = "POLL_ERROR_PDEC";
|
||||||
|
const char *IMAGE_UPLOAD_FAILED_STRING = "IMAGE_UPLOAD_FAILED";
|
||||||
|
const char *IMAGE_DOWNLOAD_FAILED_STRING = "IMAGE_DOWNLOAD_FAILED";
|
||||||
|
const char *IMAGE_UPLOAD_SUCCESSFUL_STRING = "IMAGE_UPLOAD_SUCCESSFUL";
|
||||||
|
const char *IMAGE_DOWNLOAD_SUCCESSFUL_STRING = "IMAGE_DOWNLOAD_SUCCESSFUL";
|
||||||
|
const char *FLASH_WRITE_SUCCESSFUL_STRING = "FLASH_WRITE_SUCCESSFUL";
|
||||||
|
const char *FLASH_READ_SUCCESSFUL_STRING = "FLASH_READ_SUCCESSFUL";
|
||||||
|
const char *FLASH_READ_FAILED_STRING = "FLASH_READ_FAILED";
|
||||||
|
const char *FIRMWARE_UPDATE_SUCCESSFUL_STRING = "FIRMWARE_UPDATE_SUCCESSFUL";
|
||||||
|
const char *FIRMWARE_UPDATE_FAILED_STRING = "FIRMWARE_UPDATE_FAILED";
|
||||||
|
const char *STR_HELPER_READING_REPLY_FAILED_STRING = "STR_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *STR_HELPER_COM_ERROR_STRING = "STR_HELPER_COM_ERROR";
|
||||||
|
const char *STR_HELPER_NO_REPLY_STRING = "STR_HELPER_NO_REPLY";
|
||||||
|
const char *STR_HELPER_DEC_ERROR_STRING = "STR_HELPER_DEC_ERROR";
|
||||||
|
const char *POSITION_MISMATCH_STRING = "POSITION_MISMATCH";
|
||||||
|
const char *STR_HELPER_FILE_NOT_EXISTS_STRING = "STR_HELPER_FILE_NOT_EXISTS";
|
||||||
|
const char *STR_HELPER_SENDING_PACKET_FAILED_STRING = "STR_HELPER_SENDING_PACKET_FAILED";
|
||||||
|
const char *STR_HELPER_REQUESTING_MSG_FAILED_STRING = "STR_HELPER_REQUESTING_MSG_FAILED";
|
||||||
|
const char *MPSOC_FLASH_WRITE_FAILED_STRING = "MPSOC_FLASH_WRITE_FAILED";
|
||||||
|
const char *MPSOC_FLASH_WRITE_SUCCESSFUL_STRING = "MPSOC_FLASH_WRITE_SUCCESSFUL";
|
||||||
|
const char *MPSOC_SENDING_COMMAND_FAILED_STRING = "MPSOC_SENDING_COMMAND_FAILED";
|
||||||
|
const char *MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING = "MPSOC_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
|
const char *MPSOC_HELPER_READING_REPLY_FAILED_STRING = "MPSOC_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *MPSOC_MISSING_ACK_STRING = "MPSOC_MISSING_ACK";
|
||||||
|
const char *MPSOC_MISSING_EXE_STRING = "MPSOC_MISSING_EXE";
|
||||||
|
const char *MPSOC_ACK_FAILURE_REPORT_STRING = "MPSOC_ACK_FAILURE_REPORT";
|
||||||
|
const char *MPSOC_EXE_FAILURE_REPORT_STRING = "MPSOC_EXE_FAILURE_REPORT";
|
||||||
|
const char *MPSOC_ACK_INVALID_APID_STRING = "MPSOC_ACK_INVALID_APID";
|
||||||
|
const char *MPSOC_EXE_INVALID_APID_STRING = "MPSOC_EXE_INVALID_APID";
|
||||||
|
const char *MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING = "MPSOC_HELPER_SEQ_CNT_MISMATCH";
|
||||||
|
const char *MPSOC_TM_SIZE_ERROR_STRING = "MPSOC_TM_SIZE_ERROR";
|
||||||
|
const char *MPSOC_TM_CRC_MISSMATCH_STRING = "MPSOC_TM_CRC_MISSMATCH";
|
||||||
|
const char *TRANSITION_BACK_TO_OFF_STRING = "TRANSITION_BACK_TO_OFF";
|
||||||
|
const char *NEG_V_OUT_OF_BOUNDS_STRING = "NEG_V_OUT_OF_BOUNDS";
|
||||||
|
const char *U_DRO_OUT_OF_BOUNDS_STRING = "U_DRO_OUT_OF_BOUNDS";
|
||||||
|
const char *I_DRO_OUT_OF_BOUNDS_STRING = "I_DRO_OUT_OF_BOUNDS";
|
||||||
|
const char *U_X8_OUT_OF_BOUNDS_STRING = "U_X8_OUT_OF_BOUNDS";
|
||||||
|
const char *I_X8_OUT_OF_BOUNDS_STRING = "I_X8_OUT_OF_BOUNDS";
|
||||||
|
const char *U_TX_OUT_OF_BOUNDS_STRING = "U_TX_OUT_OF_BOUNDS";
|
||||||
|
const char *I_TX_OUT_OF_BOUNDS_STRING = "I_TX_OUT_OF_BOUNDS";
|
||||||
|
const char *U_MPA_OUT_OF_BOUNDS_STRING = "U_MPA_OUT_OF_BOUNDS";
|
||||||
|
const char *I_MPA_OUT_OF_BOUNDS_STRING = "I_MPA_OUT_OF_BOUNDS";
|
||||||
|
const char *U_HPA_OUT_OF_BOUNDS_STRING = "U_HPA_OUT_OF_BOUNDS";
|
||||||
|
const char *I_HPA_OUT_OF_BOUNDS_STRING = "I_HPA_OUT_OF_BOUNDS";
|
||||||
|
const char *TRANSITION_OTHER_SIDE_FAILED_STRING = "TRANSITION_OTHER_SIDE_FAILED";
|
||||||
|
const char *NOT_ENOUGH_DEVICES_DUAL_MODE_STRING = "NOT_ENOUGH_DEVICES_DUAL_MODE";
|
||||||
|
const char *POWER_STATE_MACHINE_TIMEOUT_STRING = "POWER_STATE_MACHINE_TIMEOUT";
|
||||||
|
const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING = "SIDE_SWITCH_TRANSITION_NOT_ALLOWED";
|
||||||
|
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
|
||||||
|
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||||
|
const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT";
|
||||||
|
const char *BATT_MODE_STRING = "BATT_MODE";
|
||||||
|
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
|
||||||
|
const char *SUPV_UPDATE_FAILED_STRING = "SUPV_UPDATE_FAILED";
|
||||||
|
const char *SUPV_UPDATE_SUCCESSFUL_STRING = "SUPV_UPDATE_SUCCESSFUL";
|
||||||
|
const char *SUPV_CONTINUE_UPDATE_FAILED_STRING = "SUPV_CONTINUE_UPDATE_FAILED";
|
||||||
|
const char *SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING = "SUPV_CONTINUE_UPDATE_SUCCESSFUL";
|
||||||
|
const char *TERMINATED_UPDATE_PROCEDURE_STRING = "TERMINATED_UPDATE_PROCEDURE";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING = "SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING = "SUPV_EVENT_BUFFER_REQUEST_FAILED";
|
||||||
|
const char *SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING = "SUPV_EVENT_BUFFER_REQUEST_TERMINATED";
|
||||||
|
const char *SUPV_MEM_CHECK_OK_STRING = "SUPV_MEM_CHECK_OK";
|
||||||
|
const char *SUPV_MEM_CHECK_FAIL_STRING = "SUPV_MEM_CHECK_FAIL";
|
||||||
|
const char *SUPV_SENDING_COMMAND_FAILED_STRING = "SUPV_SENDING_COMMAND_FAILED";
|
||||||
|
const char *SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING = "SUPV_HELPER_REQUESTING_REPLY_FAILED";
|
||||||
|
const char *SUPV_HELPER_READING_REPLY_FAILED_STRING = "SUPV_HELPER_READING_REPLY_FAILED";
|
||||||
|
const char *SUPV_MISSING_ACK_STRING = "SUPV_MISSING_ACK";
|
||||||
|
const char *SUPV_MISSING_EXE_STRING = "SUPV_MISSING_EXE";
|
||||||
|
const char *SUPV_ACK_FAILURE_REPORT_STRING = "SUPV_ACK_FAILURE_REPORT";
|
||||||
|
const char *SUPV_EXE_FAILURE_REPORT_STRING = "SUPV_EXE_FAILURE_REPORT";
|
||||||
|
const char *SUPV_ACK_INVALID_APID_STRING = "SUPV_ACK_INVALID_APID";
|
||||||
|
const char *SUPV_EXE_INVALID_APID_STRING = "SUPV_EXE_INVALID_APID";
|
||||||
|
const char *ACK_RECEPTION_FAILURE_STRING = "ACK_RECEPTION_FAILURE";
|
||||||
|
const char *EXE_RECEPTION_FAILURE_STRING = "EXE_RECEPTION_FAILURE";
|
||||||
|
const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
||||||
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
|
const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR";
|
||||||
|
const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR";
|
||||||
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
|
const char *REBOOT_HW_STRING = "REBOOT_HW";
|
||||||
|
const char *NO_SD_CARD_ACTIVE_STRING = "NO_SD_CARD_ACTIVE";
|
||||||
|
const char *MISSING_PACKET_STRING = "MISSING_PACKET";
|
||||||
|
const char *EXPERIMENT_TIMEDOUT_STRING = "EXPERIMENT_TIMEDOUT";
|
||||||
|
const char *MULTI_PACKET_COMMAND_DONE_STRING = "MULTI_PACKET_COMMAND_DONE";
|
||||||
|
const char *SET_CONFIGFILEVALUE_FAILED_STRING = "SET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *GET_CONFIGFILEVALUE_FAILED_STRING = "GET_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *INSERT_CONFIGFILEVALUE_FAILED_STRING = "INSERT_CONFIGFILEVALUE_FAILED";
|
||||||
|
const char *WRITE_CONFIGFILE_FAILED_STRING = "WRITE_CONFIGFILE_FAILED";
|
||||||
|
const char *READ_CONFIGFILE_FAILED_STRING = "READ_CONFIGFILE_FAILED";
|
||||||
|
|
||||||
const char *translateEvents(Event event) {
|
const char *translateEvents(Event event) {
|
||||||
switch ((event & 0xffff)) {
|
switch ((event & 0xFFFF)) {
|
||||||
case (2200):
|
case (2200):
|
||||||
return STORE_SEND_WRITE_FAILED_STRING;
|
return STORE_SEND_WRITE_FAILED_STRING;
|
||||||
case (2201):
|
case (2201):
|
||||||
@ -149,6 +301,8 @@ const char *translateEvents(Event event) {
|
|||||||
return MONITORING_LIMIT_EXCEEDED_STRING;
|
return MONITORING_LIMIT_EXCEEDED_STRING;
|
||||||
case (2810):
|
case (2810):
|
||||||
return MONITORING_AMBIGUOUS_STRING;
|
return MONITORING_AMBIGUOUS_STRING;
|
||||||
|
case (2811):
|
||||||
|
return DEVICE_WANTS_HARD_REBOOT_STRING;
|
||||||
case (4201):
|
case (4201):
|
||||||
return FUSE_CURRENT_HIGH_STRING;
|
return FUSE_CURRENT_HIGH_STRING;
|
||||||
case (4202):
|
case (4202):
|
||||||
@ -199,8 +353,6 @@ const char *translateEvents(Event event) {
|
|||||||
return VALUE_ABOVE_HIGH_LIMIT_STRING;
|
return VALUE_ABOVE_HIGH_LIMIT_STRING;
|
||||||
case (7204):
|
case (7204):
|
||||||
return VALUE_OUT_OF_RANGE_STRING;
|
return VALUE_OUT_OF_RANGE_STRING;
|
||||||
case (7301):
|
|
||||||
return SWITCHING_TM_FAILED_STRING;
|
|
||||||
case (7400):
|
case (7400):
|
||||||
return CHANGING_MODE_STRING;
|
return CHANGING_MODE_STRING;
|
||||||
case (7401):
|
case (7401):
|
||||||
@ -231,6 +383,8 @@ const char *translateEvents(Event event) {
|
|||||||
return RECOVERY_STEP_STRING;
|
return RECOVERY_STEP_STRING;
|
||||||
case (7512):
|
case (7512):
|
||||||
return RECOVERY_DONE_STRING;
|
return RECOVERY_DONE_STRING;
|
||||||
|
case (7600):
|
||||||
|
return HANDLE_PACKET_FAILED_STRING;
|
||||||
case (7900):
|
case (7900):
|
||||||
return RF_AVAILABLE_STRING;
|
return RF_AVAILABLE_STRING;
|
||||||
case (7901):
|
case (7901):
|
||||||
@ -245,18 +399,320 @@ const char *translateEvents(Event event) {
|
|||||||
return CLOCK_SET_STRING;
|
return CLOCK_SET_STRING;
|
||||||
case (8901):
|
case (8901):
|
||||||
return CLOCK_SET_FAILURE_STRING;
|
return CLOCK_SET_FAILURE_STRING;
|
||||||
|
case (9100):
|
||||||
|
return TC_DELETION_FAILED_STRING;
|
||||||
case (9700):
|
case (9700):
|
||||||
return TEST_STRING;
|
return TEST_STRING;
|
||||||
case (10600):
|
case (10600):
|
||||||
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
return CHANGE_OF_SETUP_PARAMETER_STRING;
|
||||||
case (11101):
|
case (10800):
|
||||||
|
return STORE_ERROR_STRING;
|
||||||
|
case (10801):
|
||||||
|
return MSG_QUEUE_ERROR_STRING;
|
||||||
|
case (10802):
|
||||||
|
return SERIALIZATION_ERROR_STRING;
|
||||||
|
case (11300):
|
||||||
|
return SWITCH_CMD_SENT_STRING;
|
||||||
|
case (11301):
|
||||||
|
return SWITCH_HAS_CHANGED_STRING;
|
||||||
|
case (11302):
|
||||||
|
return SWITCHING_Q7S_DENIED_STRING;
|
||||||
|
case (11303):
|
||||||
|
return FDIR_REACTION_IGNORED_STRING;
|
||||||
|
case (11400):
|
||||||
|
return GPIO_PULL_HIGH_FAILED_STRING;
|
||||||
|
case (11401):
|
||||||
|
return GPIO_PULL_LOW_FAILED_STRING;
|
||||||
|
case (11402):
|
||||||
|
return HEATER_WENT_ON_STRING;
|
||||||
|
case (11403):
|
||||||
|
return HEATER_WENT_OFF_STRING;
|
||||||
|
case (11404):
|
||||||
|
return SWITCH_ALREADY_ON_STRING;
|
||||||
|
case (11405):
|
||||||
|
return SWITCH_ALREADY_OFF_STRING;
|
||||||
|
case (11406):
|
||||||
|
return MAIN_SWITCH_TIMEOUT_STRING;
|
||||||
|
case (11407):
|
||||||
|
return FAULTY_HEATER_WAS_ON_STRING;
|
||||||
|
case (11500):
|
||||||
|
return BURN_PHASE_START_STRING;
|
||||||
|
case (11501):
|
||||||
|
return BURN_PHASE_DONE_STRING;
|
||||||
|
case (11502):
|
||||||
|
return MAIN_SWITCH_ON_TIMEOUT_STRING;
|
||||||
|
case (11503):
|
||||||
|
return MAIN_SWITCH_OFF_TIMEOUT_STRING;
|
||||||
|
case (11504):
|
||||||
|
return DEPL_SA1_GPIO_SWTICH_ON_FAILED_STRING;
|
||||||
|
case (11505):
|
||||||
|
return DEPL_SA2_GPIO_SWTICH_ON_FAILED_STRING;
|
||||||
|
case (11506):
|
||||||
|
return DEPL_SA1_GPIO_SWTICH_OFF_FAILED_STRING;
|
||||||
|
case (11507):
|
||||||
|
return DEPL_SA2_GPIO_SWTICH_OFF_FAILED_STRING;
|
||||||
|
case (11508):
|
||||||
|
return AUTONOMOUS_DEPLOYMENT_COMPLETED_STRING;
|
||||||
|
case (11601):
|
||||||
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
return MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
case (11102):
|
case (11602):
|
||||||
return ACK_FAILURE_STRING;
|
return ACK_FAILURE_STRING;
|
||||||
case (11103):
|
case (11603):
|
||||||
return EXE_FAILURE_STRING;
|
return EXE_FAILURE_STRING;
|
||||||
case (11104):
|
case (11604):
|
||||||
return CRC_FAILURE_EVENT_STRING;
|
return MPSOC_HANDLER_CRC_FAILURE_STRING;
|
||||||
|
case (11605):
|
||||||
|
return MPSOC_HANDLER_SEQUENCE_COUNT_MISMATCH_STRING;
|
||||||
|
case (11606):
|
||||||
|
return MPSOC_SHUTDOWN_FAILED_STRING;
|
||||||
|
case (11701):
|
||||||
|
return SELF_TEST_I2C_FAILURE_STRING;
|
||||||
|
case (11702):
|
||||||
|
return SELF_TEST_SPI_FAILURE_STRING;
|
||||||
|
case (11703):
|
||||||
|
return SELF_TEST_ADC_FAILURE_STRING;
|
||||||
|
case (11704):
|
||||||
|
return SELF_TEST_PWM_FAILURE_STRING;
|
||||||
|
case (11705):
|
||||||
|
return SELF_TEST_TC_FAILURE_STRING;
|
||||||
|
case (11706):
|
||||||
|
return SELF_TEST_MTM_RANGE_FAILURE_STRING;
|
||||||
|
case (11707):
|
||||||
|
return SELF_TEST_COIL_CURRENT_FAILURE_STRING;
|
||||||
|
case (11708):
|
||||||
|
return INVALID_ERROR_BYTE_STRING;
|
||||||
|
case (11801):
|
||||||
|
return ERROR_STATE_STRING;
|
||||||
|
case (11802):
|
||||||
|
return RESET_OCCURED_STRING;
|
||||||
|
case (11901):
|
||||||
|
return BOOTING_FIRMWARE_FAILED_STRING;
|
||||||
|
case (11902):
|
||||||
|
return BOOTING_BOOTLOADER_FAILED_STRING;
|
||||||
|
case (12001):
|
||||||
|
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
|
case (12002):
|
||||||
|
return SUPV_UNKNOWN_TM_STRING;
|
||||||
|
case (12003):
|
||||||
|
return SUPV_UNINIMPLEMENTED_TM_STRING;
|
||||||
|
case (12004):
|
||||||
|
return SUPV_ACK_FAILURE_STRING;
|
||||||
|
case (12005):
|
||||||
|
return SUPV_EXE_FAILURE_STRING;
|
||||||
|
case (12006):
|
||||||
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
|
case (12007):
|
||||||
|
return SUPV_HELPER_EXECUTING_STRING;
|
||||||
|
case (12008):
|
||||||
|
return SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING;
|
||||||
|
case (12100):
|
||||||
|
return SANITIZATION_FAILED_STRING;
|
||||||
|
case (12101):
|
||||||
|
return MOUNTED_SD_CARD_STRING;
|
||||||
|
case (12300):
|
||||||
|
return SEND_MRAM_DUMP_FAILED_STRING;
|
||||||
|
case (12301):
|
||||||
|
return MRAM_DUMP_FAILED_STRING;
|
||||||
|
case (12302):
|
||||||
|
return MRAM_DUMP_FINISHED_STRING;
|
||||||
|
case (12401):
|
||||||
|
return INVALID_TC_FRAME_STRING;
|
||||||
|
case (12402):
|
||||||
|
return INVALID_FAR_STRING;
|
||||||
|
case (12403):
|
||||||
|
return CARRIER_LOCK_STRING;
|
||||||
|
case (12404):
|
||||||
|
return BIT_LOCK_PDEC_STRING;
|
||||||
|
case (12405):
|
||||||
|
return LOST_CARRIER_LOCK_PDEC_STRING;
|
||||||
|
case (12406):
|
||||||
|
return LOST_BIT_LOCK_PDEC_STRING;
|
||||||
|
case (12407):
|
||||||
|
return POLL_ERROR_PDEC_STRING;
|
||||||
|
case (12500):
|
||||||
|
return IMAGE_UPLOAD_FAILED_STRING;
|
||||||
|
case (12501):
|
||||||
|
return IMAGE_DOWNLOAD_FAILED_STRING;
|
||||||
|
case (12502):
|
||||||
|
return IMAGE_UPLOAD_SUCCESSFUL_STRING;
|
||||||
|
case (12503):
|
||||||
|
return IMAGE_DOWNLOAD_SUCCESSFUL_STRING;
|
||||||
|
case (12504):
|
||||||
|
return FLASH_WRITE_SUCCESSFUL_STRING;
|
||||||
|
case (12505):
|
||||||
|
return FLASH_READ_SUCCESSFUL_STRING;
|
||||||
|
case (12506):
|
||||||
|
return FLASH_READ_FAILED_STRING;
|
||||||
|
case (12507):
|
||||||
|
return FIRMWARE_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (12508):
|
||||||
|
return FIRMWARE_UPDATE_FAILED_STRING;
|
||||||
|
case (12509):
|
||||||
|
return STR_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (12510):
|
||||||
|
return STR_HELPER_COM_ERROR_STRING;
|
||||||
|
case (12511):
|
||||||
|
return STR_HELPER_NO_REPLY_STRING;
|
||||||
|
case (12512):
|
||||||
|
return STR_HELPER_DEC_ERROR_STRING;
|
||||||
|
case (12513):
|
||||||
|
return POSITION_MISMATCH_STRING;
|
||||||
|
case (12514):
|
||||||
|
return STR_HELPER_FILE_NOT_EXISTS_STRING;
|
||||||
|
case (12515):
|
||||||
|
return STR_HELPER_SENDING_PACKET_FAILED_STRING;
|
||||||
|
case (12516):
|
||||||
|
return STR_HELPER_REQUESTING_MSG_FAILED_STRING;
|
||||||
|
case (12600):
|
||||||
|
return MPSOC_FLASH_WRITE_FAILED_STRING;
|
||||||
|
case (12601):
|
||||||
|
return MPSOC_FLASH_WRITE_SUCCESSFUL_STRING;
|
||||||
|
case (12602):
|
||||||
|
return MPSOC_SENDING_COMMAND_FAILED_STRING;
|
||||||
|
case (12603):
|
||||||
|
return MPSOC_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
|
case (12604):
|
||||||
|
return MPSOC_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (12605):
|
||||||
|
return MPSOC_MISSING_ACK_STRING;
|
||||||
|
case (12606):
|
||||||
|
return MPSOC_MISSING_EXE_STRING;
|
||||||
|
case (12607):
|
||||||
|
return MPSOC_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (12608):
|
||||||
|
return MPSOC_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (12609):
|
||||||
|
return MPSOC_ACK_INVALID_APID_STRING;
|
||||||
|
case (12610):
|
||||||
|
return MPSOC_EXE_INVALID_APID_STRING;
|
||||||
|
case (12611):
|
||||||
|
return MPSOC_HELPER_SEQ_CNT_MISMATCH_STRING;
|
||||||
|
case (12612):
|
||||||
|
return MPSOC_TM_SIZE_ERROR_STRING;
|
||||||
|
case (12613):
|
||||||
|
return MPSOC_TM_CRC_MISSMATCH_STRING;
|
||||||
|
case (12700):
|
||||||
|
return TRANSITION_BACK_TO_OFF_STRING;
|
||||||
|
case (12701):
|
||||||
|
return NEG_V_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12702):
|
||||||
|
return U_DRO_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12703):
|
||||||
|
return I_DRO_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12704):
|
||||||
|
return U_X8_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12705):
|
||||||
|
return I_X8_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12706):
|
||||||
|
return U_TX_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12707):
|
||||||
|
return I_TX_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12708):
|
||||||
|
return U_MPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12709):
|
||||||
|
return I_MPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12710):
|
||||||
|
return U_HPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12711):
|
||||||
|
return I_HPA_OUT_OF_BOUNDS_STRING;
|
||||||
|
case (12800):
|
||||||
|
return TRANSITION_OTHER_SIDE_FAILED_STRING;
|
||||||
|
case (12801):
|
||||||
|
return NOT_ENOUGH_DEVICES_DUAL_MODE_STRING;
|
||||||
|
case (12802):
|
||||||
|
return POWER_STATE_MACHINE_TIMEOUT_STRING;
|
||||||
|
case (12803):
|
||||||
|
return SIDE_SWITCH_TRANSITION_NOT_ALLOWED_STRING;
|
||||||
|
case (13000):
|
||||||
|
return CHILDREN_LOST_MODE_STRING;
|
||||||
|
case (13100):
|
||||||
|
return GPS_FIX_CHANGE_STRING;
|
||||||
|
case (13200):
|
||||||
|
return P60_BOOT_COUNT_STRING;
|
||||||
|
case (13201):
|
||||||
|
return BATT_MODE_STRING;
|
||||||
|
case (13202):
|
||||||
|
return BATT_MODE_CHANGED_STRING;
|
||||||
|
case (13600):
|
||||||
|
return SUPV_UPDATE_FAILED_STRING;
|
||||||
|
case (13601):
|
||||||
|
return SUPV_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (13602):
|
||||||
|
return SUPV_CONTINUE_UPDATE_FAILED_STRING;
|
||||||
|
case (13603):
|
||||||
|
return SUPV_CONTINUE_UPDATE_SUCCESSFUL_STRING;
|
||||||
|
case (13604):
|
||||||
|
return TERMINATED_UPDATE_PROCEDURE_STRING;
|
||||||
|
case (13605):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL_STRING;
|
||||||
|
case (13606):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_FAILED_STRING;
|
||||||
|
case (13607):
|
||||||
|
return SUPV_EVENT_BUFFER_REQUEST_TERMINATED_STRING;
|
||||||
|
case (13608):
|
||||||
|
return SUPV_MEM_CHECK_OK_STRING;
|
||||||
|
case (13609):
|
||||||
|
return SUPV_MEM_CHECK_FAIL_STRING;
|
||||||
|
case (13616):
|
||||||
|
return SUPV_SENDING_COMMAND_FAILED_STRING;
|
||||||
|
case (13617):
|
||||||
|
return SUPV_HELPER_REQUESTING_REPLY_FAILED_STRING;
|
||||||
|
case (13618):
|
||||||
|
return SUPV_HELPER_READING_REPLY_FAILED_STRING;
|
||||||
|
case (13619):
|
||||||
|
return SUPV_MISSING_ACK_STRING;
|
||||||
|
case (13620):
|
||||||
|
return SUPV_MISSING_EXE_STRING;
|
||||||
|
case (13621):
|
||||||
|
return SUPV_ACK_FAILURE_REPORT_STRING;
|
||||||
|
case (13622):
|
||||||
|
return SUPV_EXE_FAILURE_REPORT_STRING;
|
||||||
|
case (13623):
|
||||||
|
return SUPV_ACK_INVALID_APID_STRING;
|
||||||
|
case (13624):
|
||||||
|
return SUPV_EXE_INVALID_APID_STRING;
|
||||||
|
case (13625):
|
||||||
|
return ACK_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13626):
|
||||||
|
return EXE_RECEPTION_FAILURE_STRING;
|
||||||
|
case (13627):
|
||||||
|
return WRITE_MEMORY_FAILED_STRING;
|
||||||
|
case (13628):
|
||||||
|
return SUPV_REPLY_SIZE_MISSMATCH_STRING;
|
||||||
|
case (13629):
|
||||||
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
|
case (13630):
|
||||||
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
|
case (13631):
|
||||||
|
return HDLC_FRAME_REMOVAL_ERROR_STRING;
|
||||||
|
case (13632):
|
||||||
|
return HDLC_CRC_ERROR_STRING;
|
||||||
|
case (13700):
|
||||||
|
return ALLOC_FAILURE_STRING;
|
||||||
|
case (13701):
|
||||||
|
return REBOOT_SW_STRING;
|
||||||
|
case (13702):
|
||||||
|
return REBOOT_MECHANISM_TRIGGERED_STRING;
|
||||||
|
case (13703):
|
||||||
|
return REBOOT_HW_STRING;
|
||||||
|
case (13704):
|
||||||
|
return NO_SD_CARD_ACTIVE_STRING;
|
||||||
|
case (13800):
|
||||||
|
return MISSING_PACKET_STRING;
|
||||||
|
case (13801):
|
||||||
|
return EXPERIMENT_TIMEDOUT_STRING;
|
||||||
|
case (13802):
|
||||||
|
return MULTI_PACKET_COMMAND_DONE_STRING;
|
||||||
|
case (13901):
|
||||||
|
return SET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13902):
|
||||||
|
return GET_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13903):
|
||||||
|
return INSERT_CONFIGFILEVALUE_FAILED_STRING;
|
||||||
|
case (13904):
|
||||||
|
return WRITE_CONFIGFILE_FAILED_STRING;
|
||||||
|
case (13905):
|
||||||
|
return READ_CONFIGFILE_FAILED_STRING;
|
||||||
default:
|
default:
|
||||||
return "UNKNOWN_EVENT";
|
return "UNKNOWN_EVENT";
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#ifndef FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
#ifndef FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
||||||
#define FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
#define FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_
|
||||||
|
|
||||||
#include <fsfw/events/Event.h>
|
#include "fsfw/events/Event.h"
|
||||||
|
|
||||||
const char* translateEvents(Event event);
|
const char *translateEvents(Event event);
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */
|
#endif /* FSFWCONFIG_EVENTS_TRANSLATEEVENTS_H_ */
|
||||||
|
@ -1,23 +1,105 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 31 translations.
|
* Contains 148 translations.
|
||||||
* Generated on: 2021-05-17 19:12:49
|
* Generated on: 2022-11-15 17:44:20
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
#include "systemObjectList.h"
|
const char *P60DOCK_TEST_TASK_STRING = "P60DOCK_TEST_TASK";
|
||||||
|
const char *ACS_CONTROLLER_STRING = "ACS_CONTROLLER";
|
||||||
const char *TEST_TASK_STRING = "TEST_TASK";
|
const char *CORE_CONTROLLER_STRING = "CORE_CONTROLLER";
|
||||||
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
const char *GLOBAL_JSON_CFG_STRING = "GLOBAL_JSON_CFG";
|
||||||
|
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
||||||
|
const char *MGM_0_LIS3_HANDLER_STRING = "MGM_0_LIS3_HANDLER";
|
||||||
|
const char *GYRO_0_ADIS_HANDLER_STRING = "GYRO_0_ADIS_HANDLER";
|
||||||
|
const char *SUS_0_N_LOC_XFYFZM_PT_XF_STRING = "SUS_0_N_LOC_XFYFZM_PT_XF";
|
||||||
|
const char *SUS_1_N_LOC_XBYFZM_PT_XB_STRING = "SUS_1_N_LOC_XBYFZM_PT_XB";
|
||||||
|
const char *SUS_2_N_LOC_XFYBZB_PT_YB_STRING = "SUS_2_N_LOC_XFYBZB_PT_YB";
|
||||||
|
const char *SUS_3_N_LOC_XFYBZF_PT_YF_STRING = "SUS_3_N_LOC_XFYBZF_PT_YF";
|
||||||
|
const char *SUS_4_N_LOC_XMYFZF_PT_ZF_STRING = "SUS_4_N_LOC_XMYFZF_PT_ZF";
|
||||||
|
const char *SUS_5_N_LOC_XFYMZB_PT_ZB_STRING = "SUS_5_N_LOC_XFYMZB_PT_ZB";
|
||||||
|
const char *SUS_6_R_LOC_XFYBZM_PT_XF_STRING = "SUS_6_R_LOC_XFYBZM_PT_XF";
|
||||||
|
const char *SUS_7_R_LOC_XBYBZM_PT_XB_STRING = "SUS_7_R_LOC_XBYBZM_PT_XB";
|
||||||
|
const char *SUS_8_R_LOC_XBYBZB_PT_YB_STRING = "SUS_8_R_LOC_XBYBZB_PT_YB";
|
||||||
|
const char *SUS_9_R_LOC_XBYBZB_PT_YF_STRING = "SUS_9_R_LOC_XBYBZB_PT_YF";
|
||||||
|
const char *SUS_10_N_LOC_XMYBZF_PT_ZF_STRING = "SUS_10_N_LOC_XMYBZF_PT_ZF";
|
||||||
|
const char *SUS_11_R_LOC_XBYMZB_PT_ZB_STRING = "SUS_11_R_LOC_XBYMZB_PT_ZB";
|
||||||
|
const char *RW1_STRING = "RW1";
|
||||||
|
const char *MGM_1_RM3100_HANDLER_STRING = "MGM_1_RM3100_HANDLER";
|
||||||
|
const char *GYRO_1_L3G_HANDLER_STRING = "GYRO_1_L3G_HANDLER";
|
||||||
|
const char *RW2_STRING = "RW2";
|
||||||
|
const char *MGM_2_LIS3_HANDLER_STRING = "MGM_2_LIS3_HANDLER";
|
||||||
|
const char *GYRO_2_ADIS_HANDLER_STRING = "GYRO_2_ADIS_HANDLER";
|
||||||
|
const char *RW3_STRING = "RW3";
|
||||||
|
const char *MGM_3_RM3100_HANDLER_STRING = "MGM_3_RM3100_HANDLER";
|
||||||
|
const char *GYRO_3_L3G_HANDLER_STRING = "GYRO_3_L3G_HANDLER";
|
||||||
|
const char *RW4_STRING = "RW4";
|
||||||
|
const char *STAR_TRACKER_STRING = "STAR_TRACKER";
|
||||||
|
const char *GPS_CONTROLLER_STRING = "GPS_CONTROLLER";
|
||||||
|
const char *IMTQ_HANDLER_STRING = "IMTQ_HANDLER";
|
||||||
|
const char *PCDU_HANDLER_STRING = "PCDU_HANDLER";
|
||||||
|
const char *P60DOCK_HANDLER_STRING = "P60DOCK_HANDLER";
|
||||||
|
const char *PDU1_HANDLER_STRING = "PDU1_HANDLER";
|
||||||
|
const char *PDU2_HANDLER_STRING = "PDU2_HANDLER";
|
||||||
|
const char *ACU_HANDLER_STRING = "ACU_HANDLER";
|
||||||
|
const char *BPX_BATT_HANDLER_STRING = "BPX_BATT_HANDLER";
|
||||||
|
const char *PLPCDU_HANDLER_STRING = "PLPCDU_HANDLER";
|
||||||
|
const char *RAD_SENSOR_STRING = "RAD_SENSOR";
|
||||||
|
const char *PLOC_UPDATER_STRING = "PLOC_UPDATER";
|
||||||
|
const char *PLOC_MEMORY_DUMPER_STRING = "PLOC_MEMORY_DUMPER";
|
||||||
|
const char *STR_HELPER_STRING = "STR_HELPER";
|
||||||
|
const char *PLOC_MPSOC_HELPER_STRING = "PLOC_MPSOC_HELPER";
|
||||||
|
const char *AXI_PTME_CONFIG_STRING = "AXI_PTME_CONFIG";
|
||||||
|
const char *PTME_CONFIG_STRING = "PTME_CONFIG";
|
||||||
|
const char *PLOC_MPSOC_HANDLER_STRING = "PLOC_MPSOC_HANDLER";
|
||||||
|
const char *PLOC_SUPERVISOR_HANDLER_STRING = "PLOC_SUPERVISOR_HANDLER";
|
||||||
|
const char *PLOC_SUPERVISOR_HELPER_STRING = "PLOC_SUPERVISOR_HELPER";
|
||||||
|
const char *SCEX_STRING = "SCEX";
|
||||||
|
const char *SOLAR_ARRAY_DEPL_HANDLER_STRING = "SOLAR_ARRAY_DEPL_HANDLER";
|
||||||
|
const char *HEATER_HANDLER_STRING = "HEATER_HANDLER";
|
||||||
|
const char *TMP1075_HANDLER_TCS_0_STRING = "TMP1075_HANDLER_TCS_0";
|
||||||
|
const char *TMP1075_HANDLER_TCS_1_STRING = "TMP1075_HANDLER_TCS_1";
|
||||||
|
const char *TMP1075_HANDLER_PLPCDU_0_STRING = "TMP1075_HANDLER_PLPCDU_0";
|
||||||
|
const char *TMP1075_HANDLER_PLPCDU_1_STRING = "TMP1075_HANDLER_PLPCDU_1";
|
||||||
|
const char *TMP1075_HANDLER_IF_BOARD_STRING = "TMP1075_HANDLER_IF_BOARD";
|
||||||
|
const char *TMP1075_HANDLER_OBC_IF_BOARD_STRING = "TMP1075_HANDLER_OBC_IF_BOARD";
|
||||||
|
const char *RTD_0_IC3_PLOC_HEATSPREADER_STRING = "RTD_0_IC3_PLOC_HEATSPREADER";
|
||||||
|
const char *RTD_1_IC4_PLOC_MISSIONBOARD_STRING = "RTD_1_IC4_PLOC_MISSIONBOARD";
|
||||||
|
const char *RTD_2_IC5_4K_CAMERA_STRING = "RTD_2_IC5_4K_CAMERA";
|
||||||
|
const char *RTD_3_IC6_DAC_HEATSPREADER_STRING = "RTD_3_IC6_DAC_HEATSPREADER";
|
||||||
|
const char *RTD_4_IC7_STARTRACKER_STRING = "RTD_4_IC7_STARTRACKER";
|
||||||
|
const char *RTD_5_IC8_RW1_MX_MY_STRING = "RTD_5_IC8_RW1_MX_MY";
|
||||||
|
const char *RTD_6_IC9_DRO_STRING = "RTD_6_IC9_DRO";
|
||||||
|
const char *RTD_7_IC10_SCEX_STRING = "RTD_7_IC10_SCEX";
|
||||||
|
const char *RTD_8_IC11_X8_STRING = "RTD_8_IC11_X8";
|
||||||
|
const char *RTD_9_IC12_HPA_STRING = "RTD_9_IC12_HPA";
|
||||||
|
const char *RTD_10_IC13_PL_TX_STRING = "RTD_10_IC13_PL_TX";
|
||||||
|
const char *RTD_11_IC14_MPA_STRING = "RTD_11_IC14_MPA";
|
||||||
|
const char *RTD_12_IC15_ACU_STRING = "RTD_12_IC15_ACU";
|
||||||
|
const char *RTD_13_IC16_PLPCDU_HEATSPREADER_STRING = "RTD_13_IC16_PLPCDU_HEATSPREADER";
|
||||||
|
const char *RTD_14_IC17_TCS_BOARD_STRING = "RTD_14_IC17_TCS_BOARD";
|
||||||
|
const char *RTD_15_IC18_IMTQ_STRING = "RTD_15_IC18_IMTQ";
|
||||||
|
const char *SYRLINKS_HK_HANDLER_STRING = "SYRLINKS_HK_HANDLER";
|
||||||
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
const char *ARDUINO_COM_IF_STRING = "ARDUINO_COM_IF";
|
||||||
const char *PUS_SERVICE_3_STRING = "PUS_SERVICE_3";
|
const char *GPIO_IF_STRING = "GPIO_IF";
|
||||||
const char *PUS_SERVICE_5_STRING = "PUS_SERVICE_5";
|
const char *SCEX_UART_READER_STRING = "SCEX_UART_READER";
|
||||||
|
const char *SPI_MAIN_COM_IF_STRING = "SPI_MAIN_COM_IF";
|
||||||
|
const char *SPI_RW_COM_IF_STRING = "SPI_RW_COM_IF";
|
||||||
|
const char *SPI_RTD_COM_IF_STRING = "SPI_RTD_COM_IF";
|
||||||
|
const char *UART_COM_IF_STRING = "UART_COM_IF";
|
||||||
|
const char *I2C_COM_IF_STRING = "I2C_COM_IF";
|
||||||
|
const char *CSP_COM_IF_STRING = "CSP_COM_IF";
|
||||||
|
const char *CCSDS_PACKET_DISTRIBUTOR_STRING = "CCSDS_PACKET_DISTRIBUTOR";
|
||||||
|
const char *PUS_PACKET_DISTRIBUTOR_STRING = "PUS_PACKET_DISTRIBUTOR";
|
||||||
|
const char *TMTC_BRIDGE_STRING = "TMTC_BRIDGE";
|
||||||
|
const char *TMTC_POLLING_TASK_STRING = "TMTC_POLLING_TASK";
|
||||||
|
const char *FILE_SYSTEM_HANDLER_STRING = "FILE_SYSTEM_HANDLER";
|
||||||
|
const char *SDC_MANAGER_STRING = "SDC_MANAGER";
|
||||||
|
const char *PTME_STRING = "PTME";
|
||||||
|
const char *PDEC_HANDLER_STRING = "PDEC_HANDLER";
|
||||||
|
const char *CCSDS_HANDLER_STRING = "CCSDS_HANDLER";
|
||||||
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
|
const char *PUS_SERVICE_6_STRING = "PUS_SERVICE_6";
|
||||||
const char *PUS_SERVICE_8_STRING = "PUS_SERVICE_8";
|
|
||||||
const char *PUS_SERVICE_23_STRING = "PUS_SERVICE_23";
|
|
||||||
const char *PUS_SERVICE_201_STRING = "PUS_SERVICE_201";
|
|
||||||
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
|
||||||
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
|
const char *FSFW_OBJECTS_START_STRING = "FSFW_OBJECTS_START";
|
||||||
const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION";
|
const char *PUS_SERVICE_1_VERIFICATION_STRING = "PUS_SERVICE_1_VERIFICATION";
|
||||||
const char *PUS_SERVICE_2_DEVICE_ACCESS_STRING = "PUS_SERVICE_2_DEVICE_ACCESS";
|
const char *PUS_SERVICE_2_DEVICE_ACCESS_STRING = "PUS_SERVICE_2_DEVICE_ACCESS";
|
||||||
@ -25,9 +107,12 @@ const char *PUS_SERVICE_3_HOUSEKEEPING_STRING = "PUS_SERVICE_3_HOUSEKEEPING";
|
|||||||
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
|
const char *PUS_SERVICE_5_EVENT_REPORTING_STRING = "PUS_SERVICE_5_EVENT_REPORTING";
|
||||||
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
|
const char *PUS_SERVICE_8_FUNCTION_MGMT_STRING = "PUS_SERVICE_8_FUNCTION_MGMT";
|
||||||
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
|
const char *PUS_SERVICE_9_TIME_MGMT_STRING = "PUS_SERVICE_9_TIME_MGMT";
|
||||||
|
const char *PUS_SERVICE_11_TC_SCHEDULER_STRING = "PUS_SERVICE_11_TC_SCHEDULER";
|
||||||
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
|
const char *PUS_SERVICE_17_TEST_STRING = "PUS_SERVICE_17_TEST";
|
||||||
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
|
const char *PUS_SERVICE_20_PARAMETERS_STRING = "PUS_SERVICE_20_PARAMETERS";
|
||||||
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
|
const char *PUS_SERVICE_200_MODE_MGMT_STRING = "PUS_SERVICE_200_MODE_MGMT";
|
||||||
|
const char *PUS_SERVICE_201_HEALTH_STRING = "PUS_SERVICE_201_HEALTH";
|
||||||
|
const char *CFDP_PACKET_DISTRIBUTOR_STRING = "CFDP_PACKET_DISTRIBUTOR";
|
||||||
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
|
const char *HEALTH_TABLE_STRING = "HEALTH_TABLE";
|
||||||
const char *MODE_STORE_STRING = "MODE_STORE";
|
const char *MODE_STORE_STRING = "MODE_STORE";
|
||||||
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
|
const char *EVENT_MANAGER_STRING = "EVENT_MANAGER";
|
||||||
@ -36,33 +121,230 @@ const char *TC_STORE_STRING = "TC_STORE";
|
|||||||
const char *TM_STORE_STRING = "TM_STORE";
|
const char *TM_STORE_STRING = "TM_STORE";
|
||||||
const char *IPC_STORE_STRING = "IPC_STORE";
|
const char *IPC_STORE_STRING = "IPC_STORE";
|
||||||
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
const char *TIME_STAMPER_STRING = "TIME_STAMPER";
|
||||||
|
const char *VERIFICATION_REPORTER_STRING = "VERIFICATION_REPORTER";
|
||||||
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
const char *FSFW_OBJECTS_END_STRING = "FSFW_OBJECTS_END";
|
||||||
|
const char *SPI_TEST_STRING = "SPI_TEST";
|
||||||
|
const char *UART_TEST_STRING = "UART_TEST";
|
||||||
|
const char *I2C_TEST_STRING = "I2C_TEST";
|
||||||
|
const char *DUMMY_COM_IF_STRING = "DUMMY_COM_IF";
|
||||||
|
const char *DUMMY_HANDLER_STRING = "DUMMY_HANDLER";
|
||||||
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
const char *DUMMY_INTERFACE_STRING = "DUMMY_INTERFACE";
|
||||||
const char *THERMAL_CONTROLLER_STRING = "THERMAL_CONTROLLER";
|
const char *LIBGPIOD_TEST_STRING = "LIBGPIOD_TEST";
|
||||||
|
const char *TEST_TASK_STRING = "TEST_TASK";
|
||||||
|
const char *HEATER_0_PLOC_PROC_BRD_STRING = "HEATER_0_PLOC_PROC_BRD";
|
||||||
|
const char *HEATER_1_PCDU_BRD_STRING = "HEATER_1_PCDU_BRD";
|
||||||
|
const char *HEATER_2_ACS_BRD_STRING = "HEATER_2_ACS_BRD";
|
||||||
|
const char *HEATER_3_OBC_BRD_STRING = "HEATER_3_OBC_BRD";
|
||||||
|
const char *HEATER_4_CAMERA_STRING = "HEATER_4_CAMERA";
|
||||||
|
const char *HEATER_5_STR_STRING = "HEATER_5_STR";
|
||||||
|
const char *HEATER_6_DRO_STRING = "HEATER_6_DRO";
|
||||||
|
const char *HEATER_7_HPA_STRING = "HEATER_7_HPA";
|
||||||
|
const char *ACS_BOARD_ASS_STRING = "ACS_BOARD_ASS";
|
||||||
|
const char *SUS_BOARD_ASS_STRING = "SUS_BOARD_ASS";
|
||||||
|
const char *TCS_BOARD_ASS_STRING = "TCS_BOARD_ASS";
|
||||||
|
const char *RW_ASS_STRING = "RW_ASS";
|
||||||
|
const char *CAM_SWITCHER_STRING = "CAM_SWITCHER";
|
||||||
|
const char *TM_FUNNEL_STRING = "TM_FUNNEL";
|
||||||
|
const char *PUS_TM_FUNNEL_STRING = "PUS_TM_FUNNEL";
|
||||||
|
const char *CFDP_TM_FUNNEL_STRING = "CFDP_TM_FUNNEL";
|
||||||
|
const char *CFDP_HANDLER_STRING = "CFDP_HANDLER";
|
||||||
|
const char *CFDP_DISTRIBUTOR_STRING = "CFDP_DISTRIBUTOR";
|
||||||
|
const char *EIVE_SYSTEM_STRING = "EIVE_SYSTEM";
|
||||||
|
const char *ACS_SUBSYSTEM_STRING = "ACS_SUBSYSTEM";
|
||||||
|
const char *PL_SUBSYSTEM_STRING = "PL_SUBSYSTEM";
|
||||||
|
const char *CCSDS_IP_CORE_BRIDGE_STRING = "CCSDS_IP_CORE_BRIDGE";
|
||||||
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
const char *NO_OBJECT_STRING = "NO_OBJECT";
|
||||||
|
|
||||||
const char *translateObject(object_id_t object) {
|
const char *translateObject(object_id_t object) {
|
||||||
switch ((object & 0xFFFFFFFF)) {
|
switch ((object & 0xFFFFFFFF)) {
|
||||||
case 0x42694269:
|
case 0x00005060:
|
||||||
return TEST_TASK_STRING;
|
return P60DOCK_TEST_TASK_STRING;
|
||||||
case 0x4400AFFE:
|
case 0x43000002:
|
||||||
return DUMMY_HANDLER_STRING;
|
return ACS_CONTROLLER_STRING;
|
||||||
case 0x49000001:
|
case 0x43000003:
|
||||||
|
return CORE_CONTROLLER_STRING;
|
||||||
|
case 0x43000006:
|
||||||
|
return GLOBAL_JSON_CFG_STRING;
|
||||||
|
case 0x43400001:
|
||||||
|
return THERMAL_CONTROLLER_STRING;
|
||||||
|
case 0x44120006:
|
||||||
|
return MGM_0_LIS3_HANDLER_STRING;
|
||||||
|
case 0x44120010:
|
||||||
|
return GYRO_0_ADIS_HANDLER_STRING;
|
||||||
|
case 0x44120032:
|
||||||
|
return SUS_0_N_LOC_XFYFZM_PT_XF_STRING;
|
||||||
|
case 0x44120033:
|
||||||
|
return SUS_1_N_LOC_XBYFZM_PT_XB_STRING;
|
||||||
|
case 0x44120034:
|
||||||
|
return SUS_2_N_LOC_XFYBZB_PT_YB_STRING;
|
||||||
|
case 0x44120035:
|
||||||
|
return SUS_3_N_LOC_XFYBZF_PT_YF_STRING;
|
||||||
|
case 0x44120036:
|
||||||
|
return SUS_4_N_LOC_XMYFZF_PT_ZF_STRING;
|
||||||
|
case 0x44120037:
|
||||||
|
return SUS_5_N_LOC_XFYMZB_PT_ZB_STRING;
|
||||||
|
case 0x44120038:
|
||||||
|
return SUS_6_R_LOC_XFYBZM_PT_XF_STRING;
|
||||||
|
case 0x44120039:
|
||||||
|
return SUS_7_R_LOC_XBYBZM_PT_XB_STRING;
|
||||||
|
case 0x44120040:
|
||||||
|
return SUS_8_R_LOC_XBYBZB_PT_YB_STRING;
|
||||||
|
case 0x44120041:
|
||||||
|
return SUS_9_R_LOC_XBYBZB_PT_YF_STRING;
|
||||||
|
case 0x44120042:
|
||||||
|
return SUS_10_N_LOC_XMYBZF_PT_ZF_STRING;
|
||||||
|
case 0x44120043:
|
||||||
|
return SUS_11_R_LOC_XBYMZB_PT_ZB_STRING;
|
||||||
|
case 0x44120047:
|
||||||
|
return RW1_STRING;
|
||||||
|
case 0x44120107:
|
||||||
|
return MGM_1_RM3100_HANDLER_STRING;
|
||||||
|
case 0x44120111:
|
||||||
|
return GYRO_1_L3G_HANDLER_STRING;
|
||||||
|
case 0x44120148:
|
||||||
|
return RW2_STRING;
|
||||||
|
case 0x44120208:
|
||||||
|
return MGM_2_LIS3_HANDLER_STRING;
|
||||||
|
case 0x44120212:
|
||||||
|
return GYRO_2_ADIS_HANDLER_STRING;
|
||||||
|
case 0x44120249:
|
||||||
|
return RW3_STRING;
|
||||||
|
case 0x44120309:
|
||||||
|
return MGM_3_RM3100_HANDLER_STRING;
|
||||||
|
case 0x44120313:
|
||||||
|
return GYRO_3_L3G_HANDLER_STRING;
|
||||||
|
case 0x44120350:
|
||||||
|
return RW4_STRING;
|
||||||
|
case 0x44130001:
|
||||||
|
return STAR_TRACKER_STRING;
|
||||||
|
case 0x44130045:
|
||||||
|
return GPS_CONTROLLER_STRING;
|
||||||
|
case 0x44140014:
|
||||||
|
return IMTQ_HANDLER_STRING;
|
||||||
|
case 0x442000A1:
|
||||||
|
return PCDU_HANDLER_STRING;
|
||||||
|
case 0x44250000:
|
||||||
|
return P60DOCK_HANDLER_STRING;
|
||||||
|
case 0x44250001:
|
||||||
|
return PDU1_HANDLER_STRING;
|
||||||
|
case 0x44250002:
|
||||||
|
return PDU2_HANDLER_STRING;
|
||||||
|
case 0x44250003:
|
||||||
|
return ACU_HANDLER_STRING;
|
||||||
|
case 0x44260000:
|
||||||
|
return BPX_BATT_HANDLER_STRING;
|
||||||
|
case 0x44300000:
|
||||||
|
return PLPCDU_HANDLER_STRING;
|
||||||
|
case 0x443200A5:
|
||||||
|
return RAD_SENSOR_STRING;
|
||||||
|
case 0x44330000:
|
||||||
|
return PLOC_UPDATER_STRING;
|
||||||
|
case 0x44330001:
|
||||||
|
return PLOC_MEMORY_DUMPER_STRING;
|
||||||
|
case 0x44330002:
|
||||||
|
return STR_HELPER_STRING;
|
||||||
|
case 0x44330003:
|
||||||
|
return PLOC_MPSOC_HELPER_STRING;
|
||||||
|
case 0x44330004:
|
||||||
|
return AXI_PTME_CONFIG_STRING;
|
||||||
|
case 0x44330005:
|
||||||
|
return PTME_CONFIG_STRING;
|
||||||
|
case 0x44330015:
|
||||||
|
return PLOC_MPSOC_HANDLER_STRING;
|
||||||
|
case 0x44330016:
|
||||||
|
return PLOC_SUPERVISOR_HANDLER_STRING;
|
||||||
|
case 0x44330017:
|
||||||
|
return PLOC_SUPERVISOR_HELPER_STRING;
|
||||||
|
case 0x44330032:
|
||||||
|
return SCEX_STRING;
|
||||||
|
case 0x444100A2:
|
||||||
|
return SOLAR_ARRAY_DEPL_HANDLER_STRING;
|
||||||
|
case 0x444100A4:
|
||||||
|
return HEATER_HANDLER_STRING;
|
||||||
|
case 0x44420004:
|
||||||
|
return TMP1075_HANDLER_TCS_0_STRING;
|
||||||
|
case 0x44420005:
|
||||||
|
return TMP1075_HANDLER_TCS_1_STRING;
|
||||||
|
case 0x44420006:
|
||||||
|
return TMP1075_HANDLER_PLPCDU_0_STRING;
|
||||||
|
case 0x44420007:
|
||||||
|
return TMP1075_HANDLER_PLPCDU_1_STRING;
|
||||||
|
case 0x44420008:
|
||||||
|
return TMP1075_HANDLER_IF_BOARD_STRING;
|
||||||
|
case 0x44420009:
|
||||||
|
return TMP1075_HANDLER_OBC_IF_BOARD_STRING;
|
||||||
|
case 0x44420016:
|
||||||
|
return RTD_0_IC3_PLOC_HEATSPREADER_STRING;
|
||||||
|
case 0x44420017:
|
||||||
|
return RTD_1_IC4_PLOC_MISSIONBOARD_STRING;
|
||||||
|
case 0x44420018:
|
||||||
|
return RTD_2_IC5_4K_CAMERA_STRING;
|
||||||
|
case 0x44420019:
|
||||||
|
return RTD_3_IC6_DAC_HEATSPREADER_STRING;
|
||||||
|
case 0x44420020:
|
||||||
|
return RTD_4_IC7_STARTRACKER_STRING;
|
||||||
|
case 0x44420021:
|
||||||
|
return RTD_5_IC8_RW1_MX_MY_STRING;
|
||||||
|
case 0x44420022:
|
||||||
|
return RTD_6_IC9_DRO_STRING;
|
||||||
|
case 0x44420023:
|
||||||
|
return RTD_7_IC10_SCEX_STRING;
|
||||||
|
case 0x44420024:
|
||||||
|
return RTD_8_IC11_X8_STRING;
|
||||||
|
case 0x44420025:
|
||||||
|
return RTD_9_IC12_HPA_STRING;
|
||||||
|
case 0x44420026:
|
||||||
|
return RTD_10_IC13_PL_TX_STRING;
|
||||||
|
case 0x44420027:
|
||||||
|
return RTD_11_IC14_MPA_STRING;
|
||||||
|
case 0x44420028:
|
||||||
|
return RTD_12_IC15_ACU_STRING;
|
||||||
|
case 0x44420029:
|
||||||
|
return RTD_13_IC16_PLPCDU_HEATSPREADER_STRING;
|
||||||
|
case 0x44420030:
|
||||||
|
return RTD_14_IC17_TCS_BOARD_STRING;
|
||||||
|
case 0x44420031:
|
||||||
|
return RTD_15_IC18_IMTQ_STRING;
|
||||||
|
case 0x445300A3:
|
||||||
|
return SYRLINKS_HK_HANDLER_STRING;
|
||||||
|
case 0x49000000:
|
||||||
return ARDUINO_COM_IF_STRING;
|
return ARDUINO_COM_IF_STRING;
|
||||||
case 0x51000300:
|
case 0x49010005:
|
||||||
return PUS_SERVICE_3_STRING;
|
return GPIO_IF_STRING;
|
||||||
case 0x51000400:
|
case 0x49010006:
|
||||||
return PUS_SERVICE_5_STRING;
|
return SCEX_UART_READER_STRING;
|
||||||
|
case 0x49020004:
|
||||||
|
return SPI_MAIN_COM_IF_STRING;
|
||||||
|
case 0x49020005:
|
||||||
|
return SPI_RW_COM_IF_STRING;
|
||||||
|
case 0x49020006:
|
||||||
|
return SPI_RTD_COM_IF_STRING;
|
||||||
|
case 0x49030003:
|
||||||
|
return UART_COM_IF_STRING;
|
||||||
|
case 0x49040002:
|
||||||
|
return I2C_COM_IF_STRING;
|
||||||
|
case 0x49050001:
|
||||||
|
return CSP_COM_IF_STRING;
|
||||||
|
case 0x50000100:
|
||||||
|
return CCSDS_PACKET_DISTRIBUTOR_STRING;
|
||||||
|
case 0x50000200:
|
||||||
|
return PUS_PACKET_DISTRIBUTOR_STRING;
|
||||||
|
case 0x50000300:
|
||||||
|
return TMTC_BRIDGE_STRING;
|
||||||
|
case 0x50000400:
|
||||||
|
return TMTC_POLLING_TASK_STRING;
|
||||||
|
case 0x50000500:
|
||||||
|
return FILE_SYSTEM_HANDLER_STRING;
|
||||||
|
case 0x50000550:
|
||||||
|
return SDC_MANAGER_STRING;
|
||||||
|
case 0x50000600:
|
||||||
|
return PTME_STRING;
|
||||||
|
case 0x50000700:
|
||||||
|
return PDEC_HANDLER_STRING;
|
||||||
|
case 0x50000800:
|
||||||
|
return CCSDS_HANDLER_STRING;
|
||||||
case 0x51000500:
|
case 0x51000500:
|
||||||
return PUS_SERVICE_6_STRING;
|
return PUS_SERVICE_6_STRING;
|
||||||
case 0x51000800:
|
|
||||||
return PUS_SERVICE_8_STRING;
|
|
||||||
case 0x51002300:
|
|
||||||
return PUS_SERVICE_23_STRING;
|
|
||||||
case 0x51020100:
|
|
||||||
return PUS_SERVICE_201_STRING;
|
|
||||||
case 0x52000002:
|
|
||||||
return TM_FUNNEL_STRING;
|
|
||||||
case 0x53000000:
|
case 0x53000000:
|
||||||
return FSFW_OBJECTS_START_STRING;
|
return FSFW_OBJECTS_START_STRING;
|
||||||
case 0x53000001:
|
case 0x53000001:
|
||||||
@ -77,12 +359,18 @@ const char *translateObject(object_id_t object) {
|
|||||||
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
|
return PUS_SERVICE_8_FUNCTION_MGMT_STRING;
|
||||||
case 0x53000009:
|
case 0x53000009:
|
||||||
return PUS_SERVICE_9_TIME_MGMT_STRING;
|
return PUS_SERVICE_9_TIME_MGMT_STRING;
|
||||||
|
case 0x53000011:
|
||||||
|
return PUS_SERVICE_11_TC_SCHEDULER_STRING;
|
||||||
case 0x53000017:
|
case 0x53000017:
|
||||||
return PUS_SERVICE_17_TEST_STRING;
|
return PUS_SERVICE_17_TEST_STRING;
|
||||||
case 0x53000020:
|
case 0x53000020:
|
||||||
return PUS_SERVICE_20_PARAMETERS_STRING;
|
return PUS_SERVICE_20_PARAMETERS_STRING;
|
||||||
case 0x53000200:
|
case 0x53000200:
|
||||||
return PUS_SERVICE_200_MODE_MGMT_STRING;
|
return PUS_SERVICE_200_MODE_MGMT_STRING;
|
||||||
|
case 0x53000201:
|
||||||
|
return PUS_SERVICE_201_HEALTH_STRING;
|
||||||
|
case 0x53001000:
|
||||||
|
return CFDP_PACKET_DISTRIBUTOR_STRING;
|
||||||
case 0x53010000:
|
case 0x53010000:
|
||||||
return HEALTH_TABLE_STRING;
|
return HEALTH_TABLE_STRING;
|
||||||
case 0x53010100:
|
case 0x53010100:
|
||||||
@ -99,12 +387,70 @@ const char *translateObject(object_id_t object) {
|
|||||||
return IPC_STORE_STRING;
|
return IPC_STORE_STRING;
|
||||||
case 0x53500010:
|
case 0x53500010:
|
||||||
return TIME_STAMPER_STRING;
|
return TIME_STAMPER_STRING;
|
||||||
|
case 0x53500020:
|
||||||
|
return VERIFICATION_REPORTER_STRING;
|
||||||
case 0x53ffffff:
|
case 0x53ffffff:
|
||||||
return FSFW_OBJECTS_END_STRING;
|
return FSFW_OBJECTS_END_STRING;
|
||||||
case 0xCAFECAFE:
|
case 0x54000010:
|
||||||
|
return SPI_TEST_STRING;
|
||||||
|
case 0x54000020:
|
||||||
|
return UART_TEST_STRING;
|
||||||
|
case 0x54000030:
|
||||||
|
return I2C_TEST_STRING;
|
||||||
|
case 0x54000040:
|
||||||
|
return DUMMY_COM_IF_STRING;
|
||||||
|
case 0x5400AFFE:
|
||||||
|
return DUMMY_HANDLER_STRING;
|
||||||
|
case 0x5400CAFE:
|
||||||
return DUMMY_INTERFACE_STRING;
|
return DUMMY_INTERFACE_STRING;
|
||||||
case objects::THERMAL_CONTROLLER:
|
case 0x54123456:
|
||||||
return THERMAL_CONTROLLER_STRING;
|
return LIBGPIOD_TEST_STRING;
|
||||||
|
case 0x54694269:
|
||||||
|
return TEST_TASK_STRING;
|
||||||
|
case 0x60000000:
|
||||||
|
return HEATER_0_PLOC_PROC_BRD_STRING;
|
||||||
|
case 0x60000001:
|
||||||
|
return HEATER_1_PCDU_BRD_STRING;
|
||||||
|
case 0x60000002:
|
||||||
|
return HEATER_2_ACS_BRD_STRING;
|
||||||
|
case 0x60000003:
|
||||||
|
return HEATER_3_OBC_BRD_STRING;
|
||||||
|
case 0x60000004:
|
||||||
|
return HEATER_4_CAMERA_STRING;
|
||||||
|
case 0x60000005:
|
||||||
|
return HEATER_5_STR_STRING;
|
||||||
|
case 0x60000006:
|
||||||
|
return HEATER_6_DRO_STRING;
|
||||||
|
case 0x60000007:
|
||||||
|
return HEATER_7_HPA_STRING;
|
||||||
|
case 0x73000001:
|
||||||
|
return ACS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000002:
|
||||||
|
return SUS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000003:
|
||||||
|
return TCS_BOARD_ASS_STRING;
|
||||||
|
case 0x73000004:
|
||||||
|
return RW_ASS_STRING;
|
||||||
|
case 0x73000006:
|
||||||
|
return CAM_SWITCHER_STRING;
|
||||||
|
case 0x73000100:
|
||||||
|
return TM_FUNNEL_STRING;
|
||||||
|
case 0x73000101:
|
||||||
|
return PUS_TM_FUNNEL_STRING;
|
||||||
|
case 0x73000102:
|
||||||
|
return CFDP_TM_FUNNEL_STRING;
|
||||||
|
case 0x73000205:
|
||||||
|
return CFDP_HANDLER_STRING;
|
||||||
|
case 0x73000206:
|
||||||
|
return CFDP_DISTRIBUTOR_STRING;
|
||||||
|
case 0x73010000:
|
||||||
|
return EIVE_SYSTEM_STRING;
|
||||||
|
case 0x73010001:
|
||||||
|
return ACS_SUBSYSTEM_STRING;
|
||||||
|
case 0x73010002:
|
||||||
|
return PL_SUBSYSTEM_STRING;
|
||||||
|
case 0x73500000:
|
||||||
|
return CCSDS_IP_CORE_BRIDGE_STRING;
|
||||||
case 0xFFFFFFFF:
|
case 0xFFFFFFFF:
|
||||||
return NO_OBJECT_STRING;
|
return NO_OBJECT_STRING;
|
||||||
default:
|
default:
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
|
|
||||||
#include <fsfw/objectmanager/SystemObjectIF.h>
|
#include <fsfw/objectmanager/SystemObjectIF.h>
|
||||||
|
|
||||||
const char* translateObject(object_id_t object);
|
const char *translateObject(object_id_t object);
|
||||||
|
|
||||||
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */
|
#endif /* FSFWCONFIG_OBJECTS_TRANSLATEOBJECTS_H_ */
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include "InitMission.h"
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "fsfw/FSFWVersion.h"
|
#include "fsfw/FSFWVersion.h"
|
||||||
#include "fsfw/controller/ControllerBase.h"
|
#include "fsfw/controller/ControllerBase.h"
|
||||||
@ -11,6 +10,7 @@
|
|||||||
#include "fsfw/modes/ModeMessage.h"
|
#include "fsfw/modes/ModeMessage.h"
|
||||||
#include "fsfw/objectmanager/ObjectManager.h"
|
#include "fsfw/objectmanager/ObjectManager.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
|
#include "scheduling.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
static const char* COMPILE_PRINTOUT = "Windows";
|
static const char* COMPILE_PRINTOUT = "Windows";
|
||||||
@ -35,7 +35,7 @@ int main(void) {
|
|||||||
<< " BSP HOSTED"
|
<< " BSP HOSTED"
|
||||||
<< " --" << std::endl;
|
<< " --" << std::endl;
|
||||||
|
|
||||||
initmission::initMission();
|
scheduling::initMission();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
// suspend main thread by sleeping it.
|
// suspend main thread by sleeping it.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include "InitMission.h"
|
#include "linux/scheduling.h"
|
||||||
|
|
||||||
#include <OBSWConfig.h>
|
|
||||||
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
#include <bsp_hosted/fsfwconfig/pollingsequence/DummyPst.h>
|
||||||
#include <fsfw/objectmanager/ObjectManager.h>
|
#include <fsfw/objectmanager/ObjectManager.h>
|
||||||
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
#include <fsfw/objectmanager/ObjectManagerIF.h>
|
||||||
@ -13,7 +12,9 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "OBSWConfig.h"
|
||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
#include "scheduling.h"
|
||||||
|
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
ServiceInterfaceStream sif::debug("DEBUG");
|
ServiceInterfaceStream sif::debug("DEBUG");
|
||||||
@ -29,7 +30,7 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
|||||||
|
|
||||||
ObjectManagerIF* objectManager = nullptr;
|
ObjectManagerIF* objectManager = nullptr;
|
||||||
|
|
||||||
void initmission::initMission() {
|
void scheduling::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
/* Instantiate global object manager and also create all objects */
|
/* Instantiate global object manager and also create all objects */
|
||||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||||
@ -40,7 +41,7 @@ void initmission::initMission() {
|
|||||||
initTasks();
|
initTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmission::initTasks() {
|
void scheduling::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
/* Should never happen ! */
|
/* Should never happen ! */
|
||||||
@ -53,28 +54,25 @@ void initmission::initTasks() {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* TMTC Distribution */
|
/* TMTC Distribution */
|
||||||
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcDistributor = factory->createPeriodicTask(
|
||||||
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"DIST", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
ReturnValue_t result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
ReturnValue_t result = tmtcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmtcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmtcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Object add component failed" << std::endl;
|
sif::error << "Object add component failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
result = tmtcDistributor->addComponent(objects::TMTC_BRIDGE);
|
||||||
/* UDP bridge */
|
|
||||||
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
|
|
||||||
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
|
||||||
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
|
||||||
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
@ -94,69 +92,69 @@ void initmission::initTasks() {
|
|||||||
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
result = eventHandling->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
scheduling::printAddObjectError("EVENT_MNGR", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = eventHandling->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
scheduling::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
|
||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
scheduling::printAddObjectError("PUS2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
scheduling::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
scheduling::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
|
||||||
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
scheduling::printAddObjectError("PUS8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
scheduling::printAddObjectError("PUS200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
scheduling::printAddObjectError("PUS20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
|
||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
scheduling::printAddObjectError("PUS17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
PeriodicTaskIF* thermalTask = factory->createPeriodicTask(
|
||||||
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"THERMAL_CTL_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
result = thermalTask->addComponent(objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
scheduling::printAddObjectError("RTD_0_dummy", objects::RTD_0_IC3_PLOC_HEATSPREADER);
|
||||||
}
|
}
|
||||||
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
result = thermalTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
scheduling::printAddObjectError("SUS_0_dummy", objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
result = thermalTask->addComponent(objects::CORE_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
scheduling::printAddObjectError("Core controller dummy", objects::CORE_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
result = thermalTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
FixedTimeslotTaskIF* pstTask = factory->createFixedTimeslotTask(
|
||||||
@ -166,16 +164,27 @@ void initmission::initTasks() {
|
|||||||
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
sif::error << "Failed to add dummy pst to fixed timeslot task" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
PeriodicTaskIF* supvHelperTask = factory->createPeriodicTask(
|
||||||
|
"PLOC_SUPV_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
scheduling::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
|
}
|
||||||
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
|
|
||||||
|
PeriodicTaskIF* plTask = factory->createPeriodicTask(
|
||||||
|
"PL_TASK", 25, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
|
scheduling::addMpsocSupvHandlers(plTask);
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
scheduling::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
|
|
||||||
sif::info << "Starting tasks.." << std::endl;
|
sif::info << "Starting tasks.." << std::endl;
|
||||||
tmTcDistributor->startTask();
|
tmtcDistributor->startTask();
|
||||||
tmtcBridgeTask->startTask();
|
|
||||||
tmtcPollingTask->startTask();
|
tmtcPollingTask->startTask();
|
||||||
|
|
||||||
pusVerification->startTask();
|
pusVerification->startTask();
|
||||||
@ -186,6 +195,12 @@ void initmission::initTasks() {
|
|||||||
|
|
||||||
pstTask->startTask();
|
pstTask->startTask();
|
||||||
thermalTask->startTask();
|
thermalTask->startTask();
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
|
supvHelperTask->startTask();
|
||||||
|
#endif
|
||||||
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1 || OBSW_ADD_PLOC_MPSOC == 1
|
||||||
|
plTask->startTask();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
testTask->startTask();
|
testTask->startTask();
|
6
bsp_hosted/scheduling.h
Normal file
6
bsp_hosted/scheduling.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace scheduling {
|
||||||
|
void initMission();
|
||||||
|
void initTasks();
|
||||||
|
}; // namespace scheduling
|
@ -3,3 +3,4 @@ target_sources(${OBSW_NAME} PUBLIC InitMission.cpp main.cpp gpioInit.cpp
|
|||||||
|
|
||||||
add_subdirectory(boardconfig)
|
add_subdirectory(boardconfig)
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
|
add_subdirectory(fsfwconfig)
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
|
#define OBSW_ADD_SUN_SENSORS @OBSW_ADD_SUN_SENSORS@
|
||||||
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
|
#define OBSW_ADD_SUS_BOARD_ASS @OBSW_ADD_SUS_BOARD_ASS@
|
||||||
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
|
#define OBSW_ADD_ACS_BOARD @OBSW_ADD_ACS_BOARD@
|
||||||
#define OBSW_ADD_ACS_CTRL @OBSW_ADD_ACS_CTRL@
|
#define OBSW_ADD_ACS_CTRL 1
|
||||||
#define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@
|
#define OBSW_ADD_GPS_CTRL @OBSW_ADD_GPS_CTRL@
|
||||||
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
|
#define OBSW_ADD_TCS_CTRL @OBSW_ADD_TCS_CTRL@
|
||||||
#define OBSW_ADD_RW @OBSW_ADD_RW@
|
#define OBSW_ADD_RW @OBSW_ADD_RW@
|
||||||
@ -119,6 +119,13 @@
|
|||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
/** CMake Defines */
|
/** CMake Defines */
|
||||||
/*******************************************************************/
|
/*******************************************************************/
|
||||||
|
|
||||||
|
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
|
||||||
|
// because UDP packets are not allowed in the VPN
|
||||||
|
// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the
|
||||||
|
// CCSDS IP Cores.
|
||||||
|
#define OBSW_USE_TMTC_TCP_BRIDGE 1
|
||||||
|
|
||||||
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
#cmakedefine EIVE_BUILD_GPSD_GPS_HANDLER
|
||||||
|
|
||||||
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
#cmakedefine LIBGPS_VERSION_MAJOR @LIBGPS_VERSION_MAJOR@
|
||||||
|
@ -8,12 +8,14 @@ static constexpr uint32_t SPI_MAIN_BUS_LOCK_TIMEOUT = 50;
|
|||||||
|
|
||||||
static constexpr char SPI_RW_DEV[] = "/dev/spi_rw";
|
static constexpr char SPI_RW_DEV[] = "/dev/spi_rw";
|
||||||
|
|
||||||
static constexpr char I2C_PL_EIVE[] = "/dev/i2c_eive";
|
//! I2C bus using an I2C IP core in the programmable logic (PL)
|
||||||
static constexpr char I2C_PS_EIVE[] = "/dev/i2c-2";
|
static constexpr char I2C_PL_EIVE[] = "/dev/i2c_pl";
|
||||||
|
//! I2C bus using the I2C peripheral of the ARM processing system (PS)
|
||||||
|
static constexpr char I2C_PS_EIVE[] = "/dev/i2c_ps";
|
||||||
|
|
||||||
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
|
static constexpr char UART_GNSS_DEV[] = "/dev/gps0";
|
||||||
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul_plmpsoc";
|
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ul_plmpsoc";
|
||||||
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ul_plsv";
|
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ploc_supv";
|
||||||
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul_syrlinks";
|
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ul_syrlinks";
|
||||||
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul_str";
|
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ul_str";
|
||||||
static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp InitMission.cpp
|
target_sources(${OBSW_NAME} PRIVATE CoreController.cpp scheduling.cpp
|
||||||
ObjectFactory.cpp)
|
ObjectFactory.cpp)
|
||||||
|
|
||||||
target_sources(${SIMPLE_OBSW_NAME} PRIVATE InitMission.cpp)
|
target_sources(${SIMPLE_OBSW_NAME} PRIVATE scheduling.cpp)
|
||||||
|
@ -600,7 +600,6 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
|||||||
auto* camSwitcher =
|
auto* camSwitcher =
|
||||||
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, pcdu::PDU2_CH8_PAYLOAD_CAMERA);
|
||||||
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
camSwitcher->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
// camSwitcher->
|
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
consumer << "0x" << std::hex << objects::PLOC_MPSOC_HANDLER;
|
||||||
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
|
auto gpioConfigMPSoC = new GpiodRegularByLineName(q7s::gpioNames::ENABLE_MPSOC_UART,
|
||||||
@ -629,10 +628,10 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
|
|||||||
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV,
|
new SerialCookie(objects::PLOC_SUPERVISOR_HANDLER, q7s::UART_PLOC_SUPERVSIOR_DEV,
|
||||||
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
uart::PLOC_SUPV_BAUD, supv::MAX_PACKET_SIZE * 20, UartModes::NON_CANONICAL);
|
||||||
supervisorCookie->setNoFixedSizeReply();
|
supervisorCookie->setNoFixedSizeReply();
|
||||||
auto supvHelper = new PlocSupvHelper(objects::PLOC_SUPERVISOR_HELPER);
|
auto supvHelper = new PlocSupvUartManager(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
auto* supvHandler = new PlocSupervisorHandler(
|
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
|
||||||
objects::PLOC_SUPERVISOR_HANDLER, objects::UART_COM_IF, supervisorCookie,
|
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
|
||||||
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF), pcdu::PDU1_CH6_PLOC_12V, supvHelper);
|
pcdu::PDU1_CH6_PLOC_12V, *supvHelper);
|
||||||
supvHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
supvHandler->connectModeTreeParent(satsystem::pl::SUBSYSTEM);
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
static_cast<void>(consumer);
|
static_cast<void>(consumer);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "bsp_q7s/core/InitMission.h"
|
#include "scheduling.h"
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
#include <fsfw/devicehandlers/DeviceCommunicationIF.h>
|
||||||
#include <linux/InitMission.h>
|
#include <linux/scheduling.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@ -35,13 +35,13 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
|||||||
|
|
||||||
ObjectManagerIF* objectManager = nullptr;
|
ObjectManagerIF* objectManager = nullptr;
|
||||||
|
|
||||||
void initmission::initMission() {
|
void scheduling::initMission() {
|
||||||
sif::info << "Building global objects.." << std::endl;
|
sif::info << "Building global objects.." << std::endl;
|
||||||
try {
|
try {
|
||||||
/* Instantiate global object manager and also create all objects */
|
/* Instantiate global object manager and also create all objects */
|
||||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||||
} catch (const std::invalid_argument& e) {
|
} catch (const std::invalid_argument& e) {
|
||||||
sif::error << "initmission::initMission: Object Construction failed with an "
|
sif::error << "scheduling::initMission: Object Construction failed with an "
|
||||||
"invalid argument: "
|
"invalid argument: "
|
||||||
<< e.what();
|
<< e.what();
|
||||||
std::exit(1);
|
std::exit(1);
|
||||||
@ -54,7 +54,7 @@ void initmission::initMission() {
|
|||||||
initTasks();
|
initTasks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmission::initTasks() {
|
void scheduling::initTasks() {
|
||||||
TaskFactory* factory = TaskFactory::instance();
|
TaskFactory* factory = TaskFactory::instance();
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
if (factory == nullptr) {
|
if (factory == nullptr) {
|
||||||
@ -74,7 +74,7 @@ void initmission::initTasks() {
|
|||||||
"SOLAR_ARRAY_DEPL", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"SOLAR_ARRAY_DEPL", 65, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = solarArrayDeplTask->addComponent(objects::SOLAR_ARRAY_DEPL_HANDLER);
|
result = solarArrayDeplTask->addComponent(objects::SOLAR_ARRAY_DEPL_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER);
|
scheduling::printAddObjectError("SOLAR_ARRAY_DEPL", objects::SOLAR_ARRAY_DEPL_HANDLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -82,11 +82,11 @@ void initmission::initTasks() {
|
|||||||
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = sysTask->addComponent(objects::CORE_CONTROLLER);
|
result = sysTask->addComponent(objects::CORE_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
scheduling::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
|
||||||
}
|
}
|
||||||
result = sysTask->addComponent(objects::PL_SUBSYSTEM);
|
result = sysTask->addComponent(objects::PL_SUBSYSTEM);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
|
scheduling::printAddObjectError("PL_SUBSYSTEM", objects::PL_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TMTC Distribution */
|
/* TMTC Distribution */
|
||||||
@ -95,24 +95,24 @@ void initmission::initTasks() {
|
|||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||||
result = tmTcDistributor->addComponent(objects::TMTC_BRIDGE);
|
result = tmTcDistributor->addComponent(objects::TMTC_BRIDGE);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
|
scheduling::printAddObjectError("TMTC_BRIDGE", objects::TMTC_BRIDGE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
scheduling::printAddObjectError("CCSDS_DISTRIB", objects::CCSDS_PACKET_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
scheduling::printAddObjectError("PUS_PACKET_DISTRIB", objects::PUS_PACKET_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
result = tmTcDistributor->addComponent(objects::CFDP_DISTRIBUTOR);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CFDP_DISTRIBUTOR", objects::CFDP_DISTRIBUTOR);
|
scheduling::printAddObjectError("CFDP_DISTRIBUTOR", objects::CFDP_DISTRIBUTOR);
|
||||||
}
|
}
|
||||||
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
result = tmTcDistributor->addComponent(objects::TM_FUNNEL);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
scheduling::printAddObjectError("TM_FUNNEL", objects::TM_FUNNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
#if OBSW_ADD_TCPIP_BRIDGE == 1
|
||||||
@ -120,7 +120,7 @@ void initmission::initTasks() {
|
|||||||
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"TMTC_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
scheduling::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ void initmission::initTasks() {
|
|||||||
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"CCSDS_HANDLER", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
result = ccsdsHandlerTask->addComponent(objects::CCSDS_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
scheduling::printAddObjectError("CCSDS Handler", objects::CCSDS_HANDLER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Runs in IRQ mode, frequency does not really matter
|
// Runs in IRQ mode, frequency does not really matter
|
||||||
@ -137,7 +137,7 @@ void initmission::initTasks() {
|
|||||||
"PDEC_HANDLER", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PDEC_HANDLER", 75, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
result = pdecHandlerTask->addComponent(objects::PDEC_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
scheduling::printAddObjectError("PDEC Handler", objects::PDEC_HANDLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_CCSDS_IP_CORE == 1 */
|
#endif /* OBSW_ADD_CCSDS_IP_CORE == 1 */
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ void initmission::initTasks() {
|
|||||||
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
"CFDP Handler", 45, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
|
||||||
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
result = cfdpTask->addComponent(objects::CFDP_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
scheduling::printAddObjectError("CFDP Handler", objects::CFDP_HANDLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -155,16 +155,45 @@ void initmission::initTasks() {
|
|||||||
#if OBSW_ADD_GPS_CTRL == 1
|
#if OBSW_ADD_GPS_CTRL == 1
|
||||||
result = acsCtrlTask->addComponent(objects::GPS_CONTROLLER);
|
result = acsCtrlTask->addComponent(objects::GPS_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
scheduling::printAddObjectError("GPS_CTRL", objects::GPS_CONTROLLER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_GPS_CTRL */
|
#endif /* OBSW_ADD_GPS_CTRL */
|
||||||
|
|
||||||
#if OBSW_ADD_ACS_CTRL == 1
|
#if OBSW_ADD_ACS_CTRL == 1
|
||||||
acsCtrlTask->addComponent(objects::ACS_CONTROLLER);
|
acsCtrlTask->addComponent(objects::ACS_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
|
scheduling::printAddObjectError("ACS_CTRL", objects::ACS_CONTROLLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#if OBSW_Q7S_EM == 1
|
||||||
|
acsCtrlTask->addComponent(objects::MGM_0_LIS3_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::MGM_1_RM3100_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::MGM_2_LIS3_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::MGM_3_RM3100_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::IMTQ_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_0_N_LOC_XFYFZM_PT_XF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_6_R_LOC_XFYBZM_PT_XF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_1_N_LOC_XBYFZM_PT_XB);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_7_R_LOC_XBYBZM_PT_XB);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_2_N_LOC_XFYBZB_PT_YB);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_8_R_LOC_XBYBZB_PT_YB);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_3_N_LOC_XFYBZF_PT_YF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_9_R_LOC_XBYBZB_PT_YF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_4_N_LOC_XMYFZF_PT_ZF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_10_N_LOC_XMYBZF_PT_ZF);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_5_N_LOC_XFYMZB_PT_ZB);
|
||||||
|
acsCtrlTask->addComponent(objects::SUS_11_R_LOC_XBYMZB_PT_ZB);
|
||||||
|
acsCtrlTask->addComponent(objects::GYRO_0_ADIS_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::GYRO_1_L3G_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::GYRO_2_ADIS_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::GYRO_3_L3G_HANDLER);
|
||||||
|
acsCtrlTask->addComponent(objects::GPS_CONTROLLER);
|
||||||
|
acsCtrlTask->addComponent(objects::STAR_TRACKER);
|
||||||
|
acsCtrlTask->addComponent(objects::RW1);
|
||||||
|
acsCtrlTask->addComponent(objects::RW2);
|
||||||
|
acsCtrlTask->addComponent(objects::RW3);
|
||||||
|
acsCtrlTask->addComponent(objects::RW4);
|
||||||
|
#endif
|
||||||
|
|
||||||
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
PeriodicTaskIF* acsSysTask = factory->createPeriodicTask(
|
||||||
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
"SYS_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.4, missedDeadlineFunc);
|
||||||
@ -172,24 +201,24 @@ void initmission::initTasks() {
|
|||||||
#if OBSW_ADD_ACS_BOARD == 1
|
#if OBSW_ADD_ACS_BOARD == 1
|
||||||
result = acsSysTask->addComponent(objects::ACS_BOARD_ASS);
|
result = acsSysTask->addComponent(objects::ACS_BOARD_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
scheduling::printAddObjectError("ACS_BOARD_ASS", objects::ACS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_ACS_HANDLERS */
|
#endif /* OBSW_ADD_ACS_HANDLERS */
|
||||||
#if OBSW_ADD_RW == 1
|
#if OBSW_ADD_RW == 1
|
||||||
result = acsSysTask->addComponent(objects::RW_ASS);
|
result = acsSysTask->addComponent(objects::RW_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("RW_ASS", objects::RW_ASS);
|
scheduling::printAddObjectError("RW_ASS", objects::RW_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
#if OBSW_ADD_SUS_BOARD_ASS == 1
|
||||||
result = acsSysTask->addComponent(objects::SUS_BOARD_ASS);
|
result = acsSysTask->addComponent(objects::SUS_BOARD_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
scheduling::printAddObjectError("SUS_BOARD_ASS", objects::SUS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
|
result = acsSysTask->addComponent(objects::ACS_SUBSYSTEM);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
scheduling::printAddObjectError("ACS_SUBSYSTEM", objects::ACS_SUBSYSTEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_RTD_DEVICES == 1
|
#if OBSW_ADD_RTD_DEVICES == 1
|
||||||
@ -197,7 +226,7 @@ void initmission::initTasks() {
|
|||||||
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
"TCS_POLLING_TASK", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 0.5, missedDeadlineFunc);
|
||||||
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
|
result = tcsPollingTask->addComponent(objects::SPI_RTD_COM_IF);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
scheduling::printAddObjectError("SPI_RTD_POLLING", objects::SPI_RTD_COM_IF);
|
||||||
}
|
}
|
||||||
|
|
||||||
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
PeriodicTaskIF* tcsTask = factory->createPeriodicTask(
|
||||||
@ -235,19 +264,19 @@ void initmission::initTasks() {
|
|||||||
#if OBSW_ADD_RTD_DEVICES == 1
|
#if OBSW_ADD_RTD_DEVICES == 1
|
||||||
result = tcsSystemTask->addComponent(objects::TCS_BOARD_ASS);
|
result = tcsSystemTask->addComponent(objects::TCS_BOARD_ASS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
|
scheduling::printAddObjectError("TCS_BOARD_ASS", objects::TCS_BOARD_ASS);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_RTD_DEVICES */
|
#endif /* OBSW_ADD_RTD_DEVICES */
|
||||||
#if OBSW_ADD_TCS_CTRL == 1
|
#if OBSW_ADD_TCS_CTRL == 1
|
||||||
result = tcsSystemTask->addComponent(objects::THERMAL_CONTROLLER);
|
result = tcsSystemTask->addComponent(objects::THERMAL_CONTROLLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
scheduling::printAddObjectError("THERMAL_CONTROLLER", objects::THERMAL_CONTROLLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_HEATERS == 1
|
#if OBSW_ADD_HEATERS == 1
|
||||||
result = tcsSystemTask->addComponent(objects::HEATER_HANDLER);
|
result = tcsSystemTask->addComponent(objects::HEATER_HANDLER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
|
scheduling::printAddObjectError("HEATER_HANDLER", objects::HEATER_HANDLER);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -256,7 +285,7 @@ void initmission::initTasks() {
|
|||||||
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"STR_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = strHelperTask->addComponent(objects::STR_HELPER);
|
result = strHelperTask->addComponent(objects::STR_HELPER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
scheduling::printAddObjectError("STR_HELPER", objects::STR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
#endif /* OBSW_ADD_STAR_TRACKER == 1 */
|
||||||
|
|
||||||
@ -265,7 +294,7 @@ void initmission::initTasks() {
|
|||||||
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PLOC_MPSOC_HELPER", 20, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
result = mpsocHelperTask->addComponent(objects::PLOC_MPSOC_HELPER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
scheduling::printAddObjectError("PLOC_MPSOC_HELPER", objects::PLOC_MPSOC_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_MPSOC */
|
#endif /* OBSW_ADD_PLOC_MPSOC */
|
||||||
|
|
||||||
@ -274,7 +303,7 @@ void initmission::initTasks() {
|
|||||||
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
"PLOC_SUPV_HELPER", 10, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.0, missedDeadlineFunc);
|
||||||
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
result = supvHelperTask->addComponent(objects::PLOC_SUPERVISOR_HELPER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
scheduling::printAddObjectError("PLOC_SUPV_HELPER", objects::PLOC_SUPERVISOR_HELPER);
|
||||||
}
|
}
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR */
|
||||||
|
|
||||||
@ -300,7 +329,7 @@ void initmission::initTasks() {
|
|||||||
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
|
||||||
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
scheduling::printAddObjectError("PTME_TEST", objects::CCSDS_IP_CORE_BRIDGE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
std::vector<PeriodicTaskIF*> testTasks;
|
std::vector<PeriodicTaskIF*> testTasks;
|
||||||
@ -365,6 +394,7 @@ void initmission::initTasks() {
|
|||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
supvHelperTask->startTask();
|
supvHelperTask->startTask();
|
||||||
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
|
||||||
|
plTask->startTask();
|
||||||
|
|
||||||
#if OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_CODE == 1
|
||||||
taskStarter(testTasks, "Test task vector");
|
taskStarter(testTasks, "Test task vector");
|
||||||
@ -373,9 +403,8 @@ void initmission::initTasks() {
|
|||||||
sif::info << "Tasks started.." << std::endl;
|
sif::info << "Tasks started.." << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmission::createPstTasks(TaskFactory& factory,
|
void scheduling::createPstTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
/* Polling Sequence Table Default */
|
/* Polling Sequence Table Default */
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 0
|
#if OBSW_ADD_SPI_TEST_CODE == 0
|
||||||
@ -384,9 +413,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
result = pst::pstSpi(spiPst);
|
result = pst::pstSpi(spiPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
taskVec.push_back(spiPst);
|
taskVec.push_back(spiPst);
|
||||||
@ -399,9 +428,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
result = pst::pstSpiRw(rwPstTask);
|
result = pst::pstSpiRw(rwPstTask);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: SPI PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: SPI PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "InitMission::initTasks: Creating SPI PST failed!" << std::endl;
|
sif::error << "scheduling::initTasks: Creating SPI PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
taskVec.push_back(rwPstTask);
|
taskVec.push_back(rwPstTask);
|
||||||
@ -413,9 +442,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
result = pst::pstUart(uartPst);
|
result = pst::pstUart(uartPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: UART PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: UART PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "InitMission::initTasks: Creating UART PST failed!" << std::endl;
|
sif::error << "scheduling::initTasks: Creating UART PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
taskVec.push_back(uartPst);
|
taskVec.push_back(uartPst);
|
||||||
@ -427,9 +456,9 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
result = pst::pstI2c(i2cPst);
|
result = pst::pstI2c(i2cPst);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result == FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::warning << "InitMission::initTasks: I2C PST is empty" << std::endl;
|
sif::warning << "scheduling::initTasks: I2C PST is empty" << std::endl;
|
||||||
} else {
|
} else {
|
||||||
sif::error << "InitMission::initTasks: Creating I2C PST failed!" << std::endl;
|
sif::error << "scheduling::initTasks: Creating I2C PST failed!" << std::endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
taskVec.push_back(i2cPst);
|
taskVec.push_back(i2cPst);
|
||||||
@ -442,23 +471,22 @@ void initmission::createPstTasks(TaskFactory& factory,
|
|||||||
result = pst::pstGompaceCan(gomSpacePstTask);
|
result = pst::pstGompaceCan(gomSpacePstTask);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
if (result != FixedTimeslotTaskIF::SLOT_LIST_EMPTY) {
|
||||||
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
|
sif::error << "scheduling::initTasks: GomSpace PST initialization failed!" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
taskVec.push_back(gomSpacePstTask);
|
taskVec.push_back(gomSpacePstTask);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmission::createPusTasks(TaskFactory& factory,
|
void scheduling::createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
/* PUS Services */
|
/* PUS Services */
|
||||||
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
|
||||||
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
scheduling::printAddObjectError("PUS_VERIF", objects::PUS_SERVICE_1_VERIFICATION);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusVerification);
|
taskVec.push_back(pusVerification);
|
||||||
|
|
||||||
@ -466,11 +494,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
|
||||||
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
scheduling::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
|
||||||
}
|
}
|
||||||
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
result = pusEvents->addComponent(objects::EVENT_MANAGER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
scheduling::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusEvents);
|
taskVec.push_back(pusEvents);
|
||||||
|
|
||||||
@ -478,11 +506,11 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
scheduling::printAddObjectError("PUS_2", objects::PUS_SERVICE_2_DEVICE_ACCESS);
|
||||||
}
|
}
|
||||||
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
result = pusHighPrio->addComponent(objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
scheduling::printAddObjectError("PUS_9", objects::PUS_SERVICE_9_TIME_MGMT);
|
||||||
}
|
}
|
||||||
|
|
||||||
taskVec.push_back(pusHighPrio);
|
taskVec.push_back(pusHighPrio);
|
||||||
@ -492,32 +520,32 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
|
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
scheduling::printAddObjectError("PUS_3", objects::PUS_SERVICE_3_HOUSEKEEPING);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
scheduling::printAddObjectError("PUS_8", objects::PUS_SERVICE_8_FUNCTION_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
scheduling::printAddObjectError("PUS_11", objects::PUS_SERVICE_11_TC_SCHEDULER);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
scheduling::printAddObjectError("PUS_20", objects::PUS_SERVICE_20_PARAMETERS);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
scheduling::printAddObjectError("PUS_200", objects::PUS_SERVICE_200_MODE_MGMT);
|
||||||
}
|
}
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_201_HEALTH);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
scheduling::printAddObjectError("PUS_201", objects::PUS_SERVICE_201_HEALTH);
|
||||||
}
|
}
|
||||||
// Used for connection tests, therefore use higher priority
|
// Used for connection tests, therefore use higher priority
|
||||||
result = pusMedPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
result = pusMedPrio->addComponent(objects::PUS_SERVICE_17_TEST);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
scheduling::printAddObjectError("PUS_17", objects::PUS_SERVICE_17_TEST);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusMedPrio);
|
taskVec.push_back(pusMedPrio);
|
||||||
|
|
||||||
@ -525,14 +553,14 @@ void initmission::createPusTasks(TaskFactory& factory,
|
|||||||
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
|
||||||
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
result = pusLowPrio->addComponent(objects::INTERNAL_ERROR_REPORTER);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
scheduling::printAddObjectError("ERROR_REPORTER", objects::INTERNAL_ERROR_REPORTER);
|
||||||
}
|
}
|
||||||
taskVec.push_back(pusLowPrio);
|
taskVec.push_back(pusLowPrio);
|
||||||
}
|
}
|
||||||
|
|
||||||
void initmission::createTestTasks(TaskFactory& factory,
|
void scheduling::createTestTasks(TaskFactory& factory,
|
||||||
TaskDeadlineMissedFunction missedDeadlineFunc,
|
TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec) {
|
std::vector<PeriodicTaskIF*>& taskVec) {
|
||||||
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
#if OBSW_ADD_TEST_TASK == 1 && OBSW_ADD_TEST_CODE == 1
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
static_cast<void>(result); // supress warning in case it is not used
|
static_cast<void>(result); // supress warning in case it is not used
|
||||||
@ -542,25 +570,25 @@ void initmission::createTestTasks(TaskFactory& factory,
|
|||||||
|
|
||||||
result = testTask->addComponent(objects::TEST_TASK);
|
result = testTask->addComponent(objects::TEST_TASK);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
scheduling::printAddObjectError("TEST_TASK", objects::TEST_TASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if OBSW_ADD_SPI_TEST_CODE == 1
|
#if OBSW_ADD_SPI_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::SPI_TEST);
|
result = testTask->addComponent(objects::SPI_TEST);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
scheduling::printAddObjectError("SPI_TEST", objects::SPI_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_I2C_TEST_CODE == 1
|
#if OBSW_ADD_I2C_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::I2C_TEST);
|
result = testTask->addComponent(objects::I2C_TEST);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
scheduling::printAddObjectError("I2C_TEST", objects::I2C_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if OBSW_ADD_UART_TEST_CODE == 1
|
#if OBSW_ADD_UART_TEST_CODE == 1
|
||||||
result = testTask->addComponent(objects::UART_TEST);
|
result = testTask->addComponent(objects::UART_TEST);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
initmission::printAddObjectError("UART_TEST", objects::UART_TEST);
|
scheduling::printAddObjectError("UART_TEST", objects::UART_TEST);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
class PeriodicTaskIF;
|
class PeriodicTaskIF;
|
||||||
class TaskFactory;
|
class TaskFactory;
|
||||||
|
|
||||||
namespace initmission {
|
namespace scheduling {
|
||||||
void initMission();
|
void initMission();
|
||||||
void initTasks();
|
void initTasks();
|
||||||
|
|
||||||
@ -18,6 +18,6 @@ void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadl
|
|||||||
std::vector<PeriodicTaskIF*>& taskVec);
|
std::vector<PeriodicTaskIF*>& taskVec);
|
||||||
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
void createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
|
||||||
std::vector<PeriodicTaskIF*>& taskVec);
|
std::vector<PeriodicTaskIF*>& taskVec);
|
||||||
}; // namespace initmission
|
}; // namespace scheduling
|
||||||
|
|
||||||
#endif /* BSP_Q7S_INITMISSION_H_ */
|
#endif /* BSP_Q7S_INITMISSION_H_ */
|
@ -1,6 +1,7 @@
|
|||||||
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
#include <bsp_q7s/callbacks/q7sGpioCallbacks.h>
|
||||||
#include <fsfw/health/HealthTableIF.h>
|
#include <fsfw/health/HealthTableIF.h>
|
||||||
#include <fsfw/power/DummyPowerSwitcher.h>
|
#include <fsfw/power/DummyPowerSwitcher.h>
|
||||||
|
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "bsp_q7s/core/CoreController.h"
|
#include "bsp_q7s/core/CoreController.h"
|
||||||
@ -38,13 +39,21 @@ void ObjectFactory::produce(void* args) {
|
|||||||
#if OBSW_ADD_SYRLINKS == 1
|
#if OBSW_ADD_SYRLINKS == 1
|
||||||
dummyCfg.addSyrlinksDummies = false;
|
dummyCfg.addSyrlinksDummies = false;
|
||||||
#endif
|
#endif
|
||||||
dummy::createDummies(dummyCfg);
|
#if OBSW_ADD_GOMSPACE_PCDU == 1
|
||||||
|
dummyCfg.addPowerDummies = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
PowerSwitchIF* pwrSwitcher = nullptr;
|
||||||
|
#if OBSW_ADD_GOMSPACE_PCDU == 0
|
||||||
|
pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
||||||
|
#else
|
||||||
|
createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
dummy::createDummies(dummyCfg, *pwrSwitcher);
|
||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER);
|
new CoreController(objects::CORE_CONTROLLER);
|
||||||
|
|
||||||
PowerSwitchIF* pwrSwitcher = new DummyPowerSwitcher(objects::PCDU_HANDLER, 18, 0);
|
|
||||||
static_cast<void>(pwrSwitcher);
|
|
||||||
|
|
||||||
// Regular FM code, does not work for EM if the hardware is not connected
|
// Regular FM code, does not work for EM if the hardware is not connected
|
||||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||||
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
// createPlPcduComponents(gpioComIF, spiMainComIF, pwrSwitcher);
|
||||||
@ -95,8 +104,8 @@ void ObjectFactory::produce(void* args) {
|
|||||||
createTestComponents(gpioComIF);
|
createTestComponents(gpioComIF);
|
||||||
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
#endif /* OBSW_ADD_TEST_CODE == 1 */
|
||||||
#if OBSW_ADD_SCEX_DEVICE == 1
|
#if OBSW_ADD_SCEX_DEVICE == 1
|
||||||
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), true,
|
createScexComponents(q7s::UART_SCEX_DEV, pwrSwitcher, *SdCardManager::instance(), false,
|
||||||
std::nullopt);
|
pcdu::Switches::PDU1_CH5_SOLAR_CELL_EXP_5V);
|
||||||
#endif
|
#endif
|
||||||
createAcsController(true);
|
createAcsController(true);
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "core/InitMission.h"
|
#include "core/scheduling.h"
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
#include "fsfw/tasks/TaskFactory.h"
|
||||||
#include "fsfw/version.h"
|
#include "fsfw/version.h"
|
||||||
#include "q7sConfig.h"
|
#include "q7sConfig.h"
|
||||||
@ -36,7 +36,7 @@ int obsw::obsw() {
|
|||||||
return OBSW_ALREADY_RUNNING;
|
return OBSW_ALREADY_RUNNING;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
initmission::initMission();
|
scheduling::initMission();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* Suspend main thread by sleeping it. */
|
/* Suspend main thread by sleeping it. */
|
||||||
|
@ -22,24 +22,38 @@ def main():
|
|||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Processing arguments for CMake build configuration."
|
description="Processing arguments for CMake build configuration."
|
||||||
)
|
)
|
||||||
parser.add_argument("-o", "--osal", type=str, choices=["freertos", "linux", "rtems", "host"],
|
|
||||||
help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos")
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-b", "--buildtype", type=str, choices=["debug", "release", "size", "reldeb"],
|
"-o",
|
||||||
|
"--osal",
|
||||||
|
type=str,
|
||||||
|
choices=["freertos", "linux", "rtems", "host"],
|
||||||
|
help="FSFW OSAL. Valid arguments: host, linux, rtems, freertos",
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"-b",
|
||||||
|
"--buildtype",
|
||||||
|
type=str,
|
||||||
|
choices=["debug", "release", "size", "reldeb"],
|
||||||
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
help="CMake build type. Valid arguments: debug, release, size, reldeb (Release with Debug "
|
||||||
"Information)", default="debug"
|
"Information)",
|
||||||
|
default="debug",
|
||||||
)
|
)
|
||||||
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
parser.add_argument("-l", "--builddir", type=str, help="Specify build directory.")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-g", "--generator", type=str, help="CMake Generator", choices=['make', 'ninja']
|
"-g", "--generator", type=str, help="CMake Generator", choices=["make", "ninja"]
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-d", "--defines",
|
"-d",
|
||||||
|
"--defines",
|
||||||
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
help="Additional custom defines passed to CMake (supply without -D prefix!)",
|
||||||
nargs="*", type=str
|
nargs="*",
|
||||||
|
type=str,
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-t", "--target-bsp", type=str, help="Target BSP, combination of architecture and machine"
|
"-t",
|
||||||
|
"--target-bsp",
|
||||||
|
type=str,
|
||||||
|
help="Target BSP, combination of architecture and machine",
|
||||||
)
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@ -59,13 +73,13 @@ def main():
|
|||||||
if args.generator is None:
|
if args.generator is None:
|
||||||
generator_cmake_arg = ""
|
generator_cmake_arg = ""
|
||||||
else:
|
else:
|
||||||
if args.generator == 'make':
|
if args.generator == "make":
|
||||||
if os.name == 'nt':
|
if os.name == "nt":
|
||||||
generator_cmake_arg = '-G "MinGW Makefiles"'
|
generator_cmake_arg = '-G "MinGW Makefiles"'
|
||||||
else:
|
else:
|
||||||
generator_cmake_arg = '-G "Unix Makefiles"'
|
generator_cmake_arg = '-G "Unix Makefiles"'
|
||||||
elif args.generator == 'ninja':
|
elif args.generator == "ninja":
|
||||||
generator_cmake_arg = '-G Ninja'
|
generator_cmake_arg = "-G Ninja"
|
||||||
else:
|
else:
|
||||||
generator_cmake_arg = args.generator
|
generator_cmake_arg = args.generator
|
||||||
|
|
||||||
@ -79,7 +93,7 @@ def main():
|
|||||||
cmake_build_type = "RelWithDebInfo"
|
cmake_build_type = "RelWithDebInfo"
|
||||||
|
|
||||||
if args.target_bsp is not None:
|
if args.target_bsp is not None:
|
||||||
cmake_target_cfg_cmd = f"-DTGT_BSP=\"{args.target_bsp}\""
|
cmake_target_cfg_cmd = f'-DTGT_BSP="{args.target_bsp}"'
|
||||||
else:
|
else:
|
||||||
cmake_target_cfg_cmd = ""
|
cmake_target_cfg_cmd = ""
|
||||||
|
|
||||||
@ -95,7 +109,9 @@ def main():
|
|||||||
|
|
||||||
build_path = source_location + os.path.sep + build_folder
|
build_path = source_location + os.path.sep + build_folder
|
||||||
if os.path.isdir(build_path):
|
if os.path.isdir(build_path):
|
||||||
remove_old_dir = input(f"{build_folder} folder already exists. Remove old directory? [y/n]: ")
|
remove_old_dir = input(
|
||||||
|
f"{build_folder} folder already exists. Remove old directory? [y/n]: "
|
||||||
|
)
|
||||||
if str(remove_old_dir).lower() in ["yes", "y", 1]:
|
if str(remove_old_dir).lower() in ["yes", "y", 1]:
|
||||||
remove_old_dir = True
|
remove_old_dir = True
|
||||||
else:
|
else:
|
||||||
@ -109,13 +125,15 @@ def main():
|
|||||||
print(f"Navigating into build directory: {build_path}")
|
print(f"Navigating into build directory: {build_path}")
|
||||||
os.chdir(build_folder)
|
os.chdir(build_folder)
|
||||||
|
|
||||||
cmake_command = f"cmake {generator_cmake_arg} -DFSFW_OSAL=\"{osal}\" " \
|
cmake_command = (
|
||||||
f"-DCMAKE_BUILD_TYPE=\"{cmake_build_type}\" {cmake_target_cfg_cmd} " \
|
f'cmake {generator_cmake_arg} -DFSFW_OSAL="{osal}" '
|
||||||
f"{define_string} {source_location}"
|
f'-DCMAKE_BUILD_TYPE="{cmake_build_type}" {cmake_target_cfg_cmd} '
|
||||||
|
f"{define_string} {source_location}"
|
||||||
|
)
|
||||||
# Remove redundant spaces
|
# Remove redundant spaces
|
||||||
cmake_command = ' '.join(cmake_command.split())
|
cmake_command = " ".join(cmake_command.split())
|
||||||
print("Running CMake command: ")
|
print("Running CMake command: ")
|
||||||
print(f"\" {cmake_command} \"")
|
print(f'" {cmake_command} "')
|
||||||
os.system(cmake_command)
|
os.system(cmake_command)
|
||||||
print("-- CMake configuration done. --")
|
print("-- CMake configuration done. --")
|
||||||
|
|
||||||
@ -134,7 +152,9 @@ def determine_source_location() -> str:
|
|||||||
index += 1
|
index += 1
|
||||||
os.chdir("..")
|
os.chdir("..")
|
||||||
if index >= 5:
|
if index >= 5:
|
||||||
print("Error: Could not find source directory (determined by looking for fsfw folder!)")
|
print(
|
||||||
|
"Error: Could not find source directory (determined by looking for fsfw folder!)"
|
||||||
|
)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
return os.getcwd()
|
return os.getcwd()
|
||||||
|
|
||||||
|
@ -19,12 +19,6 @@ debugging. */
|
|||||||
// Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port
|
// Disable this for mission code. It allows exchanging TMTC packets via the Ethernet port
|
||||||
#define OBSW_ADD_TCPIP_BRIDGE 1
|
#define OBSW_ADD_TCPIP_BRIDGE 1
|
||||||
|
|
||||||
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
|
|
||||||
// because UDP packets are not allowed in the VPN
|
|
||||||
// This will cause the OBSW to initialize the TMTC bridge responsible for exchanging data with the
|
|
||||||
// CCSDS IP Cores.
|
|
||||||
#define OBSW_USE_TMTC_TCP_BRIDGE 1
|
|
||||||
|
|
||||||
#define OBSW_ADD_CFDP_COMPONENTS 1
|
#define OBSW_ADD_CFDP_COMPONENTS 1
|
||||||
|
|
||||||
namespace common {
|
namespace common {
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef COMMON_CONFIG_DEVCONF_H_
|
#ifndef COMMON_CONFIG_DEVCONF_H_
|
||||||
#define COMMON_CONFIG_DEVCONF_H_
|
#define COMMON_CONFIG_DEVCONF_H_
|
||||||
|
|
||||||
|
#include <fsfw_hal/linux/serial/SerialCookie.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "fsfw/timemanager/clockDefinitions.h"
|
#include "fsfw/timemanager/clockDefinitions.h"
|
||||||
@ -55,10 +57,10 @@ namespace uart {
|
|||||||
|
|
||||||
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
|
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
|
||||||
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
|
static constexpr UartBaudRate SYRLINKS_BAUD = UartBaudRate::RATE_38400;
|
||||||
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_38400;
|
static constexpr UartBaudRate SCEX_BAUD = UartBaudRate::RATE_115200;
|
||||||
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
|
static constexpr UartBaudRate GNSS_BAUD = UartBaudRate::RATE_9600;
|
||||||
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
|
static constexpr UartBaudRate PLOC_MPSOC_BAUD = UartBaudRate::RATE_115200;
|
||||||
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_115200;
|
static constexpr UartBaudRate PLOC_SUPV_BAUD = UartBaudRate::RATE_921600;
|
||||||
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
static constexpr UartBaudRate STAR_TRACKER_BAUD = UartBaudRate::RATE_921600;
|
||||||
|
|
||||||
} // namespace uart
|
} // namespace uart
|
||||||
|
@ -16,6 +16,10 @@ enum commonObjects : uint32_t {
|
|||||||
PDEC_HANDLER = 0x50000700,
|
PDEC_HANDLER = 0x50000700,
|
||||||
CCSDS_HANDLER = 0x50000800,
|
CCSDS_HANDLER = 0x50000800,
|
||||||
|
|
||||||
|
/* 0x49 ('I') for Communication Interfaces **/
|
||||||
|
UART_COM_IF = 0x49030003,
|
||||||
|
SCEX_UART_READER = 0x49010006,
|
||||||
|
|
||||||
/* 0x43 ('C') for Controllers */
|
/* 0x43 ('C') for Controllers */
|
||||||
THERMAL_CONTROLLER = 0x43400001,
|
THERMAL_CONTROLLER = 0x43400001,
|
||||||
ACS_CONTROLLER = 0x43000002,
|
ACS_CONTROLLER = 0x43000002,
|
||||||
|
@ -13,6 +13,7 @@ target_sources(
|
|||||||
PduDummy.cpp
|
PduDummy.cpp
|
||||||
P60DockDummy.cpp
|
P60DockDummy.cpp
|
||||||
SaDeploymentDummy.cpp
|
SaDeploymentDummy.cpp
|
||||||
|
GpsDummy.cpp
|
||||||
GyroAdisDummy.cpp
|
GyroAdisDummy.cpp
|
||||||
GyroL3GD20Dummy.cpp
|
GyroL3GD20Dummy.cpp
|
||||||
MgmLIS3MDLDummy.cpp
|
MgmLIS3MDLDummy.cpp
|
||||||
|
56
dummies/GpsDummy.cpp
Normal file
56
dummies/GpsDummy.cpp
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
#include "GpsDummy.h"
|
||||||
|
|
||||||
|
#include <mission/devices/devicedefinitions/GPSDefinitions.h>
|
||||||
|
|
||||||
|
GpsDummy::GpsDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||||
|
|
||||||
|
GpsDummy::~GpsDummy() {}
|
||||||
|
|
||||||
|
void GpsDummy::doStartUp() {}
|
||||||
|
|
||||||
|
void GpsDummy::doShutDown() {}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
|
return NOTHING_TO_SEND;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
|
size_t *foundLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GpsDummy::fillCommandAndReplyMap() {}
|
||||||
|
|
||||||
|
uint32_t GpsDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
||||||
|
|
||||||
|
ReturnValue_t GpsDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) {
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}, 1));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}, 1));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SPEED, new PoolEntry<double>({7684.2}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SATS_IN_VIEW, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::YEAR, new PoolEntry<uint16_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MONTH, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::DAY, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::HOURS, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::MINUTES, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::SECONDS, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(GpsHyperion::UNIX_SECONDS, new PoolEntry<uint32_t>({0}));
|
||||||
|
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
33
dummies/GpsDummy.h
Normal file
33
dummies/GpsDummy.h
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#ifndef DUMMIES_GPSDUMMY_H_
|
||||||
|
#define DUMMIES_GPSDUMMY_H_
|
||||||
|
|
||||||
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
|
|
||||||
|
class GpsDummy : public DeviceHandlerBase {
|
||||||
|
public:
|
||||||
|
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||||
|
static const DeviceCommandId_t PERIODIC_REPLY = 2;
|
||||||
|
|
||||||
|
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||||
|
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||||
|
|
||||||
|
GpsDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||||
|
virtual ~GpsDummy();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void doStartUp() override;
|
||||||
|
void doShutDown() override;
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
|
size_t *foundLen) override;
|
||||||
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||||
|
void fillCommandAndReplyMap() override;
|
||||||
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) override;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* DUMMIES_GPSDUMMY_H_ */
|
@ -40,6 +40,13 @@ uint32_t GyroAdisDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { r
|
|||||||
|
|
||||||
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t GyroAdisDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ANG_VELOC_X, new PoolEntry<double>({-0.5}, true));
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ANG_VELOC_Y, new PoolEntry<double>({0.2}, true));
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ANG_VELOC_Z, new PoolEntry<double>({-1.2}, true));
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ACCELERATION_X, new PoolEntry<double>({0.0}));
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ACCELERATION_Y, new PoolEntry<double>({0.0}));
|
||||||
|
localDataPoolMap.emplace(ADIS1650X::ACCELERATION_Z, new PoolEntry<double>({0.0}));
|
||||||
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(ADIS1650X::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||||
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -40,9 +40,9 @@ uint32_t GyroL3GD20Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
|
|
||||||
ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t GyroL3GD20Dummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_X, new PoolEntry<float>({1.2}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Y, new PoolEntry<float>({-0.1}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::ANG_VELOC_Z, new PoolEntry<float>({0.7}, true));
|
||||||
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(L3GD20H::TEMPERATURE, new PoolEntry<float>({0.0}));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -39,5 +39,9 @@ uint32_t ImtqDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { retur
|
|||||||
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t ImtqDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
localDataPoolMap.emplace(IMTQ::MCU_TEMPERATURE, new PoolEntry<int16_t>({0}));
|
||||||
|
localDataPoolMap.emplace(IMTQ::MGM_CAL_NT, new PoolEntry<float>({0.0, 0.0, 0.0}));
|
||||||
|
localDataPoolMap.emplace(IMTQ::ACTUATION_CAL_STATUS, new PoolEntry<uint8_t>({0}));
|
||||||
|
localDataPoolMap.emplace(IMTQ::MTM_RAW, new PoolEntry<float>({0.12, 0.76, -0.45}, true));
|
||||||
|
localDataPoolMap.emplace(IMTQ::ACTUATION_RAW_STATUS, new PoolEntry<uint8_t>({0}));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -41,5 +41,7 @@ uint32_t MgmLIS3MDLDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t MgmLIS3MDLDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
localDataPoolMap.emplace(MGMLIS3MDL::TEMPERATURE_CELCIUS, new PoolEntry<float>({0.0}));
|
||||||
|
localDataPoolMap.emplace(MGMLIS3MDL::FIELD_STRENGTHS,
|
||||||
|
new PoolEntry<float>({1.02, 0.56, -0.78}, true));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -36,5 +36,7 @@ uint32_t MgmRm3100Dummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) {
|
|||||||
|
|
||||||
ReturnValue_t MgmRm3100Dummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t MgmRm3100Dummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) {
|
LocalDataPoolManager& poolManager) {
|
||||||
return OK;
|
localDataPoolMap.emplace(RM3100::FIELD_STRENGTHS,
|
||||||
|
new PoolEntry<float>({0.87, -0.95, 0.11}, true));
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -41,5 +41,29 @@ uint32_t StarTrackerDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo)
|
|||||||
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t StarTrackerDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
|
localDataPoolMap.emplace(startracker::MCU_TEMPERATURE, new PoolEntry<float>({0}));
|
||||||
|
|
||||||
|
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}));
|
||||||
|
localDataPoolMap.emplace(startracker::SOLUTION_STRATEGY, new PoolEntry<uint8_t>({0}));
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
@ -1,79 +1,43 @@
|
|||||||
#include "SusDummy.h"
|
#include "SusDummy.h"
|
||||||
|
|
||||||
#include <objects/systemObjectList.h>
|
SusDummy::SusDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
|
||||||
|
: DeviceHandlerBase(objectId, comif, comCookie), susSet(this) {}
|
||||||
|
|
||||||
#include <cmath>
|
SusDummy::~SusDummy() {}
|
||||||
#include <cstdlib>
|
|
||||||
|
|
||||||
SusDummy::SusDummy() : ExtendedControllerBase(objects::SUS_0_N_LOC_XFYFZM_PT_XF), susSet(this) {
|
void SusDummy::doStartUp() {}
|
||||||
ObjectManager::instance()->insert(objects::SUS_6_R_LOC_XFYBZM_PT_XF, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_1_N_LOC_XBYFZM_PT_XB, this);
|
void SusDummy::doShutDown() {}
|
||||||
ObjectManager::instance()->insert(objects::SUS_7_R_LOC_XBYBZM_PT_XB, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_2_N_LOC_XFYBZB_PT_YB, this);
|
ReturnValue_t SusDummy::buildNormalDeviceCommand(DeviceCommandId_t *id) { return NOTHING_TO_SEND; }
|
||||||
ObjectManager::instance()->insert(objects::SUS_8_R_LOC_XBYBZB_PT_YB, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_3_N_LOC_XFYBZF_PT_YF, this);
|
ReturnValue_t SusDummy::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||||
ObjectManager::instance()->insert(objects::SUS_9_R_LOC_XBYBZB_PT_YF, this);
|
return NOTHING_TO_SEND;
|
||||||
ObjectManager::instance()->insert(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, this);
|
|
||||||
ObjectManager::instance()->insert(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusDummy::initialize() {
|
ReturnValue_t SusDummy::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||||
static bool done = false;
|
const uint8_t *commandData, size_t commandDataLen) {
|
||||||
if (not done) {
|
|
||||||
done = true;
|
|
||||||
ReturnValue_t result = ExtendedControllerBase::initialize();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusDummy::handleCommandMessage(CommandMessage* message) {
|
ReturnValue_t SusDummy::scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
return returnvalue::FAILED;
|
size_t *foundLen) {
|
||||||
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SusDummy::performControlOperation() {
|
ReturnValue_t SusDummy::interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) {
|
||||||
iteration++;
|
return returnvalue::OK;
|
||||||
value = sin(iteration / 80. * M_PI + 10) * 10 - 10;
|
|
||||||
|
|
||||||
susSet.read();
|
|
||||||
susSet.temperatureCelcius = value;
|
|
||||||
if ((iteration % 100) < 20) {
|
|
||||||
susSet.setValidity(false, true);
|
|
||||||
} else {
|
|
||||||
susSet.setValidity(true, true);
|
|
||||||
}
|
|
||||||
susSet.commit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
void SusDummy::fillCommandAndReplyMap() {}
|
||||||
LocalDataPoolManager& poolManager) {
|
|
||||||
|
uint32_t SusDummy::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 500; }
|
||||||
|
|
||||||
|
ReturnValue_t SusDummy::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
|
localDataPoolMap.emplace(SUS::SusPoolIds::TEMPERATURE_C, new PoolEntry<float>({0}, 1, true));
|
||||||
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC, new PoolEntry<uint16_t>({0}));
|
localDataPoolMap.emplace(SUS::SusPoolIds::CHANNEL_VEC,
|
||||||
|
new PoolEntry<uint16_t>({0, 0, 0, 0, 0, 0}, true));
|
||||||
|
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase* SusDummy::getDataSetHandle(sid_t sid) {
|
|
||||||
switch (sid.ownerSetId) {
|
|
||||||
case SUS::SUS_DATA_SET_ID:
|
|
||||||
return &susSet;
|
|
||||||
default:
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t SusDummy::checkModeCommand(Mode_t mode, Submode_t submode,
|
|
||||||
uint32_t* msToReachTheMode) {
|
|
||||||
if (submode != SUBMODE_NONE) {
|
|
||||||
return INVALID_SUBMODE;
|
|
||||||
}
|
|
||||||
if ((mode != MODE_OFF) && (mode != MODE_ON) && (mode != MODE_NORMAL)) {
|
|
||||||
return INVALID_MODE;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
@ -1,27 +1,36 @@
|
|||||||
#pragma once
|
#ifndef DUMMIES_SUSDUMMY_H_
|
||||||
|
#define DUMMIES_SUSDUMMY_H_
|
||||||
|
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
|
||||||
#include <mission/devices/devicedefinitions/SusDefinitions.h>
|
|
||||||
|
|
||||||
class SusDummy : public ExtendedControllerBase {
|
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
||||||
|
|
||||||
|
class SusDummy : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
SusDummy();
|
static const DeviceCommandId_t SIMPLE_COMMAND = 1;
|
||||||
|
static const DeviceCommandId_t PERIODIC_REPLY = 2;
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
static const uint8_t SIMPLE_COMMAND_DATA = 1;
|
||||||
|
static const uint8_t PERIODIC_REPLY_DATA = 2;
|
||||||
|
|
||||||
|
SusDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie);
|
||||||
|
virtual ~SusDummy();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
|
||||||
virtual void performControlOperation() override;
|
|
||||||
virtual ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
|
||||||
LocalDataPoolManager& poolManager) override;
|
|
||||||
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
|
||||||
|
|
||||||
// Mode abstract functions
|
|
||||||
virtual ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
|
||||||
uint32_t* msToReachTheMode) override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
int iteration = 0;
|
|
||||||
float value = 0;
|
|
||||||
SUS::SusDataset susSet;
|
SUS::SusDataset susSet;
|
||||||
|
void doStartUp() override;
|
||||||
|
void doShutDown() override;
|
||||||
|
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t *id) override;
|
||||||
|
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||||
|
size_t commandDataLen) override;
|
||||||
|
ReturnValue_t scanForReply(const uint8_t *start, size_t len, DeviceCommandId_t *foundId,
|
||||||
|
size_t *foundLen) override;
|
||||||
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t *packet) override;
|
||||||
|
void fillCommandAndReplyMap() override;
|
||||||
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
LocalDataPoolManager &poolManager) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif /* DUMMIES_SUSDUMMY_H_ */
|
||||||
|
@ -25,6 +25,10 @@ TemperatureSensorsDummy::TemperatureSensorsDummy()
|
|||||||
ObjectManager::instance()->insert(objects::RTD_15_IC18_IMTQ, this);
|
ObjectManager::instance()->insert(objects::RTD_15_IC18_IMTQ, this);
|
||||||
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_TCS_0, this);
|
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_TCS_0, this);
|
||||||
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_TCS_1, this);
|
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_TCS_1, this);
|
||||||
|
|
||||||
|
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_PLPCDU_0, this);
|
||||||
|
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_PLPCDU_1, this);
|
||||||
|
ObjectManager::instance()->insert(objects::TMP1075_HANDLER_IF_BOARD, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t TemperatureSensorsDummy::initialize() {
|
ReturnValue_t TemperatureSensorsDummy::initialize() {
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <dummies/ComCookieDummy.h>
|
#include <dummies/ComCookieDummy.h>
|
||||||
#include <dummies/ComIFDummy.h>
|
#include <dummies/ComIFDummy.h>
|
||||||
#include <dummies/CoreControllerDummy.h>
|
#include <dummies/CoreControllerDummy.h>
|
||||||
|
#include <dummies/GpsDummy.h>
|
||||||
#include <dummies/GyroAdisDummy.h>
|
#include <dummies/GyroAdisDummy.h>
|
||||||
#include <dummies/GyroL3GD20Dummy.h>
|
#include <dummies/GyroL3GD20Dummy.h>
|
||||||
#include <dummies/ImtqDummy.h>
|
#include <dummies/ImtqDummy.h>
|
||||||
@ -19,10 +20,11 @@
|
|||||||
#include <dummies/SusDummy.h>
|
#include <dummies/SusDummy.h>
|
||||||
#include <dummies/SyrlinksDummy.h>
|
#include <dummies/SyrlinksDummy.h>
|
||||||
#include <dummies/TemperatureSensorsDummy.h>
|
#include <dummies/TemperatureSensorsDummy.h>
|
||||||
|
#include <mission/system/objects/CamSwitcher.h>
|
||||||
|
|
||||||
using namespace dummy;
|
using namespace dummy;
|
||||||
|
|
||||||
void dummy::createDummies(DummyCfg cfg) {
|
void dummy::createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch) {
|
||||||
new ComIFDummy(objects::DUMMY_COM_IF);
|
new ComIFDummy(objects::DUMMY_COM_IF);
|
||||||
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
ComCookieDummy* comCookieDummy = new ComCookieDummy();
|
||||||
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new BpxDummy(objects::BPX_BATT_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
@ -58,14 +60,27 @@ void dummy::createDummies(DummyCfg cfg) {
|
|||||||
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new MgmLIS3MDLDummy(objects::MGM_2_LIS3_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new MgmRm3100Dummy(objects::MGM_1_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new MgmRm3100Dummy(objects::MGM_3_RM3100_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new GpsDummy(objects::GPS_CONTROLLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.addSusDummies) {
|
if (cfg.addSusDummies) {
|
||||||
new SusDummy();
|
new SusDummy(objects::SUS_0_N_LOC_XFYFZM_PT_XF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_1_N_LOC_XBYFZM_PT_XB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_2_N_LOC_XFYBZB_PT_YB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_3_N_LOC_XFYBZF_PT_YF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_4_N_LOC_XMYFZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_5_N_LOC_XFYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_6_R_LOC_XFYBZM_PT_XF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_7_R_LOC_XBYBZM_PT_XB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_8_R_LOC_XBYBZB_PT_YB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_9_R_LOC_XBYBZB_PT_YF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_10_N_LOC_XMYBZF_PT_ZF, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
|
new SusDummy(objects::SUS_11_R_LOC_XBYMZB_PT_ZB, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cfg.addTempSensorDummies) {
|
if (cfg.addTempSensorDummies) {
|
||||||
new TemperatureSensorsDummy();
|
new TemperatureSensorsDummy();
|
||||||
}
|
}
|
||||||
|
new CamSwitcher(objects::CAM_SWITCHER, pwrSwitch, power::NO_SWITCH);
|
||||||
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
new PlPcduDummy(objects::PLPCDU_HANDLER, objects::DUMMY_COM_IF, comCookieDummy);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <fsfw/power/PowerSwitchIF.h>
|
||||||
|
|
||||||
namespace dummy {
|
namespace dummy {
|
||||||
|
|
||||||
struct DummyCfg {
|
struct DummyCfg {
|
||||||
@ -12,6 +14,6 @@ struct DummyCfg {
|
|||||||
bool addRtdComIFDummy = true;
|
bool addRtdComIFDummy = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
void createDummies(DummyCfg cfg);
|
void createDummies(DummyCfg cfg, PowerSwitchIF& pwrSwitch);
|
||||||
|
|
||||||
} // namespace dummy
|
} // namespace dummy
|
||||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
|||||||
Subproject commit e03e7f5260eb92d1903188c5ea14ea01616600ae
|
Subproject commit 5b0ea91222a6b8efb2f4562cfecbcb735dfeedd5
|
@ -123,10 +123,13 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
11901;0x2e7d;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
|
11901;0x2e7d;BOOTING_FIRMWARE_FAILED;LOW;Failed to boot firmware;linux/devices/startracker/StarTrackerHandler.h
|
||||||
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
|
11902;0x2e7e;BOOTING_BOOTLOADER_FAILED;LOW;Failed to boot star tracker into bootloader mode;linux/devices/startracker/StarTrackerHandler.h
|
||||||
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/devices/ploc/PlocSupervisorHandler.h
|
12001;0x2ee1;SUPV_MEMORY_READ_RPT_CRC_FAILURE;LOW;PLOC supervisor crc failure in telemetry packet;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12002;0x2ee2;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/devices/ploc/PlocSupervisorHandler.h
|
12002;0x2ee2;SUPV_UNKNOWN_TM;LOW;Unhandled event. P1: APID, P2: Service ID;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12003;0x2ee3;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
12003;0x2ee3;SUPV_UNINIMPLEMENTED_TM;LOW;;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12004;0x2ee4;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
12004;0x2ee4;SUPV_ACK_FAILURE;LOW;PLOC supervisor received acknowledgment failure report;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12005;0x2ee5;SUPV_MPSOC_SHUWDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
12005;0x2ee5;SUPV_EXE_FAILURE;LOW;PLOC received execution failure report P1: ID of command for which the execution failed P2: Status code sent by the supervisor handler;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
|
12006;0x2ee6;SUPV_CRC_FAILURE_EVENT;LOW;PLOC supervisor reply has invalid crc;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
|
12007;0x2ee7;SUPV_HELPER_EXECUTING;LOW;Supervisor helper currently executing a command;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
|
12008;0x2ee8;SUPV_MPSOC_SHUTDOWN_BUILD_FAILED;LOW;Failed to build the command to shutdown the MPSoC;linux/devices/ploc/PlocSupervisorHandler.h
|
||||||
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/fs/SdCardManager.h
|
12100;0x2f44;SANITIZATION_FAILED;LOW;;bsp_q7s/fs/SdCardManager.h
|
||||||
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/fs/SdCardManager.h
|
12101;0x2f45;MOUNTED_SD_CARD;INFO;;bsp_q7s/fs/SdCardManager.h
|
||||||
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
12300;0x300c;SEND_MRAM_DUMP_FAILED;LOW;Failed to send mram dump command to supervisor handler P1: Return value of commandAction function P2: Start address of MRAM to dump with this command;linux/devices/ploc/PlocMemoryDumper.h
|
||||||
@ -195,31 +198,33 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
|
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/devices/P60DockHandler.h
|
||||||
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/devices/P60DockHandler.h
|
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/devices/P60DockHandler.h
|
||||||
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/devices/P60DockHandler.h
|
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/devices/P60DockHandler.h
|
||||||
13600;0x3520;SUPV_UPDATE_FAILED;LOW;update failed;linux/devices/ploc/PlocSupvHelper.h
|
13600;0x3520;SUPV_UPDATE_FAILED;LOW;update failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13601;0x3521;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux/devices/ploc/PlocSupvHelper.h
|
13601;0x3521;SUPV_UPDATE_SUCCESSFUL;LOW;update successful;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13602;0x3522;SUPV_CONTINUE_UPDATE_FAILED;LOW;Continue update command failed;linux/devices/ploc/PlocSupvHelper.h
|
13602;0x3522;SUPV_CONTINUE_UPDATE_FAILED;LOW;Continue update command failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13603;0x3523;SUPV_CONTINUE_UPDATE_SUCCESSFUL;LOW;Continue update command successful;linux/devices/ploc/PlocSupvHelper.h
|
13603;0x3523;SUPV_CONTINUE_UPDATE_SUCCESSFUL;LOW;Continue update command successful;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13604;0x3524;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux/devices/ploc/PlocSupvHelper.h
|
13604;0x3524;TERMINATED_UPDATE_PROCEDURE;LOW;Terminated update procedure by command;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvHelper.h
|
13605;0x3525;SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL;LOW;Requesting event buffer was successful;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvHelper.h
|
13606;0x3526;SUPV_EVENT_BUFFER_REQUEST_FAILED;LOW;Requesting event buffer failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvHelper.h
|
13607;0x3527;SUPV_EVENT_BUFFER_REQUEST_TERMINATED;LOW;Terminated event buffer request by command P1: Number of packets read before process was terminated;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;;linux/devices/ploc/PlocSupvHelper.h
|
13608;0x3528;SUPV_MEM_CHECK_OK;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;;linux/devices/ploc/PlocSupvHelper.h
|
13609;0x3529;SUPV_MEM_CHECK_FAIL;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
13616;0x3530;SUPV_SENDING_COMMAND_FAILED;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13617;0x3531;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13617;0x3531;SUPV_HELPER_REQUESTING_REPLY_FAILED;LOW;Request receive message of communication interface failed P1: Return value returned by the communication interface requestReceiveMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13618;0x3532;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13618;0x3532;SUPV_HELPER_READING_REPLY_FAILED;LOW;Reading receive message of communication interface failed P1: Return value returned by the communication interface readingReceivedMessage function P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13619;0x3533;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvHelper.h
|
13619;0x3533;SUPV_MISSING_ACK;LOW;Did not receive acknowledgement report P1: Number of bytes missing P2: Internal state of MPSoC helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13620;0x3534;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13620;0x3534;SUPV_MISSING_EXE;LOW;Supervisor did not receive execution report P1: Number of bytes missing P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13621;0x3535;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13621;0x3535;SUPV_ACK_FAILURE_REPORT;LOW;Supervisor received acknowledgment failure report P1: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13622;0x3536;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvHelper.h
|
13622;0x3536;SUPV_EXE_FAILURE_REPORT;LOW;Execution report failure P1:;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13623;0x3537;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13623;0x3537;SUPV_ACK_INVALID_APID;LOW;Supervisor expected acknowledgment report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13624;0x3538;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvHelper.h
|
13624;0x3538;SUPV_EXE_INVALID_APID;LOW;Supervisor helper expected execution report but received space packet with other apid P1: Apid of received space packet P2: Internal state of supervisor helper;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13625;0x3539;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvHelper.h
|
13625;0x3539;ACK_RECEPTION_FAILURE;LOW;Failed to receive acknowledgment report P1: Return value P2: Apid of command for which the reception of the acknowledgment report failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13626;0x353a;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvHelper.h
|
13626;0x353a;EXE_RECEPTION_FAILURE;LOW;Failed to receive execution report P1: Return value P2: Apid of command for which the reception of the execution report failed;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13627;0x353b;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
13627;0x353b;WRITE_MEMORY_FAILED;LOW;Update procedure failed when sending packet. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
13628;0x353c;SUPV_REPLY_SIZE_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvHelper.h
|
13629;0x353d;SUPV_REPLY_CRC_MISSMATCH;LOW;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13630;0x353e;SUPV_UPDATE_PROGRESS;INFO;Will be triggered every 5 percent of the update progress. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvHelper.h
|
13630;0x353e;SUPV_UPDATE_PROGRESS;INFO;Will be triggered every 5 percent of the update progress. P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
|
13631;0x353f;HDLC_FRAME_REMOVAL_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
|
13632;0x3540;HDLC_CRC_ERROR;INFO;;linux/devices/ploc/PlocSupvUartMan.h
|
||||||
13700;0x3584;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
13700;0x3584;ALLOC_FAILURE;MEDIUM;;bsp_q7s/core/CoreController.h
|
||||||
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
13701;0x3585;REBOOT_SW;MEDIUM; Software reboot occurred. Can also be a systemd reboot. P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||||
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
13702;0x3586;REBOOT_MECHANISM_TRIGGERED;MEDIUM;The reboot mechanism was triggered. P1: First 16 bits: Last Chip, Last 16 bits: Last Copy, P2: Each byte is the respective reboot count for the slots;bsp_q7s/core/CoreController.h
|
||||||
|
|
@ -1,22 +1,14 @@
|
|||||||
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||||
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
0x0000;OK;System-wide code for ok.;0;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
0x0001;Failed;Unspecified system-wide code for failed.;1;HasReturnvaluesIF;fsfw/returnvalues/returnvalue.h
|
||||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h
|
||||||
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
|
||||||
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
|
||||||
0x66a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x66a0;SADPL_CommandNotSupported;;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x66a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x66a1;SADPL_DeploymentAlreadyExecuting;;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x66a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x66a2;SADPL_MainSwitchTimeoutFailure;;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x66a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x66a3;SADPL_SwitchingDeplSa1Failed;;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x66a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
0x66a4;SADPL_SwitchingDeplSa2Failed;;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||||
0x51a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
0x58a0;SUSS_ErrorUnlockMutex;;160;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x51a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
0x58a1;SUSS_ErrorLockMutex;;161;SUS_HANDLER;mission/devices/SusHandler.h
|
||||||
0x51a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x51a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x51a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x51a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x51a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
|
||||||
0x52b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b0;RWHA_SpiWriteFailure;;176;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
0x52b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
@ -29,12 +21,25 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x52a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x52a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
0x52a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
0x52a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/devices/RwHandler.h
|
||||||
|
0x4fa1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
|
0x4fa2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
|
0x4fa3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
|
0x4fa4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
|
0x4fa5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
||||||
0x5d00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d00;GOMS_PacketTooLong;;0;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5d01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d01;GOMS_InvalidTableId;;1;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5d02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d02;GOMS_InvalidAddress;;2;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5d03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d03;GOMS_InvalidParamSize;;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5d04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d04;GOMS_InvalidPayloadSize;;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
0x5d05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
0x5d05;GOMS_UnknownReplyId;;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||||
|
0x51a0;IMTQ_InvalidCommandCode;;160;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a1;IMTQ_ParameterMissing;;161;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a2;IMTQ_ParameterInvalid;;162;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a3;IMTQ_CcUnavailable;;163;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a4;IMTQ_InternalProcessingError;;164;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a5;IMTQ_RejectedWithoutReason;;165;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a6;IMTQ_CmdErrUnknown;;166;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
|
0x51a7;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;167;IMTQ_HANDLER;mission/devices/ImtqHandler.h
|
||||||
0x50a0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a0;SYRLINKS_CrcFailure;;160;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x50a1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a1;SYRLINKS_UartFraminOrParityErrorAck;;161;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x50a2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a2;SYRLINKS_BadCharacterAck;;162;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
@ -44,67 +49,87 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x50a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a6;SYRLINKS_BadCrcAck;;166;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x50a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a7;SYRLINKS_ReplyWrongSize;;167;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x50a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
0x50a8;SYRLINKS_MissingStartFrameCharacter;;168;SYRLINKS_HANDLER;mission/devices/SyrlinksHkHandler.h
|
||||||
0x4fa1;HEATER_CommandNotSupported;;161;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NVMParameterBase.h
|
||||||
0x4fa2;HEATER_InitFailed;;162;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x3c00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||||
0x4fa3;HEATER_InvalidSwitchNr;;163;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x3c01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
||||||
0x4fa4;HEATER_MainSwitchSetTimeout;;164;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x3e00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x4fa5;HEATER_CommandAlreadyWaiting;;165;HEATER_HANDLER;mission/devices/HeaterHandler.h
|
0x3e01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h
|
0x3e02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x4500;HSPI_OpeningFileFailed;;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
0x3e03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x4501;HSPI_FullDuplexTransferFailed;;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
0x3e04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x4502;HSPI_HalfDuplexTransferFailed;;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
0x3e05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||||
0x4801;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4802;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4803;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4804;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4805;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4806;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4807;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4601;HURT_UartReadFailure;;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4602;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4603;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
||||||
0x4400;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3201;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||||
0x4401;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3202;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
||||||
0x4402;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3301;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3302;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3303;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
0x4406;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
0x3304;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
||||||
|
0x1e00;PUS_InvalidPusVersion;;0;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||||
|
0x1e01;PUS_InvalidCrc16;;1;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
||||||
|
0x2e01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2e05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
||||||
|
0x2d01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x2d08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
||||||
|
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
|
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
|
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
||||||
0x2801;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2801;SM_DataTooLarge;;1;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2802;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2802;SM_DataStorageFull;;2;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2803;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2803;SM_IllegalStorageId;;3;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2804;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2804;SM_DataDoesNotExist;;4;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2805;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2805;SM_IllegalAddress;;5;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x2806;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
0x2806;SM_PoolTooLarge;;6;STORAGE_MANAGER_IF;fsfw/src/fsfw/storagemanager/StorageManagerIF.h
|
||||||
0x0601;PP_DoItMyself;;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2401;MT_TooDetailedRequest;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x0602;PP_PointsToVariable;;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2402;MT_TooGeneralRequest;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x0603;PP_PointsToMemory;;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2403;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x0604;PP_ActivityCompleted;;4;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2404;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x0605;PP_PointsToVectorUint8;;5;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2405;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||||
0x0606;PP_PointsToVectorUint16;;6;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x3f01;DLEE_StreamTooShort;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||||
0x0607;PP_PointsToVectorUint32;;7;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x3f02;DLEE_DecodingError;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||||
0x0608;PP_PointsToVectorFloat;;8;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2f01;ASC_NoPacketFound;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||||
0x06a0;PP_DumpNotSupported;;160;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2f02;ASC_PossiblePacketLoss;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||||
0x06e0;PP_InvalidSize;;224;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x2f03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
||||||
0x06e1;PP_InvalidAddress;;225;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||||
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
||||||
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a1;SGP4_InvalidEccentricity;;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a2;SGP4_InvalidMeanMotion;;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a3;SGP4_InvalidPerturbationElements;;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a4;SGP4_InvalidSemiLatusRectum;;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a5;SGP4_InvalidEpochElements;;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38a6;SGP4_SatelliteHasDecayed;;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38b1;SGP4_TleTooOld;;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x38b2;SGP4_TleNotInitialized;;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
||||||
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
0x3a01;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
||||||
|
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
||||||
0x3901;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x3901;MUX_NotEnoughResources;;1;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
0x3902;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x3902;MUX_InsufficientMemory;;2;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
0x3903;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x3903;MUX_NoPrivilege;;3;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
@ -117,23 +142,20 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x390a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x390a;MUX_MutexTimeout;;10;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
0x390b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x390b;MUX_MutexInvalidId;;11;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
0x390c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
0x390c;MUX_MutexDestroyedWhileWaiting;;12;MUTEX_IF;fsfw/src/fsfw/ipc/MutexIF.h
|
||||||
0x3a01;MQI_Empty;;1;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
0x2901;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
0x3a02;MQI_Full;No space left for more messages;2;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
0x29f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
0x3a03;MQI_NoReplyPartner;Returned if a reply method was called without partner;3;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
0x29f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
||||||
0x3a04;MQI_DestinationInvalid;Returned if the target destination is invalid.;4;MESSAGE_QUEUE_IF;fsfw/src/fsfw/ipc/MessageQueueIF.h
|
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0f01;CM_UnknownCommand;;1;COMMAND_MESSAGE;fsfw/src/fsfw/ipc/CommandMessageIF.h
|
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
||||||
|
0x3da0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||||
|
0x3da1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
||||||
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
0x0c02;MS_InvalidEntry;;2;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
0x0c03;MS_TooManyElements;;3;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
0x0c04;MS_CantStoreEmpty;;4;MODE_STORE_IF;fsfw/src/fsfw/subsystem/modes/ModeStoreIF.h
|
||||||
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
|
||||||
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0d01;SS_SequenceAlreadyExists;;1;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0d02;SS_TableAlreadyExists;;2;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0d03;SS_TableDoesNotExist;;3;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
@ -148,7 +170,53 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0d0e;SS_TableInUse;;14;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0da1;SS_TargetTableNotReached;;161;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
0x0da2;SS_TableCheckFailed;;162;SUBSYSTEM;fsfw/src/fsfw/subsystem/Subsystem.h
|
||||||
0x2501;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
0x0b01;SB_ChildNotFound;;1;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
|
0x0b02;SB_ChildInfoUpdated;;2;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
|
0x0b03;SB_ChildDoesntHaveModes;;3;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
|
0x0b04;SB_CouldNotInsertChild;;4;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
|
0x0b05;SB_TableContainsInvalidObjectId;;5;SUBSYSTEM_BASE;fsfw/src/fsfw/subsystem/SubsystemBase.h
|
||||||
|
0x0b00;SB_ConnBroken;;0;SUBSYSTEM_BASE;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
||||||
|
0x2a01;IEC_NoConfigurationTable;;1;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a02;IEC_NoCpuTable;;2;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a03;IEC_InvalidWorkspaceAddress;;3;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a04;IEC_TooLittleWorkspace;;4;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a05;IEC_WorkspaceAllocation;;5;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a06;IEC_InterruptStackTooSmall;;6;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a07;IEC_ThreadExitted;;7;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a08;IEC_InconsistentMpInformation;;8;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a09;IEC_InvalidNode;;9;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0a;IEC_NoMpci;;10;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0b;IEC_BadPacket;;11;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0c;IEC_OutOfPackets;;12;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0d;IEC_OutOfGlobalObjects;;13;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0e;IEC_OutOfProxies;;14;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a0f;IEC_InvalidGlobalId;;15;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a10;IEC_BadStackHook;;16;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a11;IEC_BadAttributes;;17;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a12;IEC_ImplementationKeyCreateInconsistency;;18;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a13;IEC_ImplementationBlockingOperationCancel;;19;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a14;IEC_MutexObtainFromBadState;;20;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x2a15;IEC_UnlimitedAndMaximumIs0;;21;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
||||||
|
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
|
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
|
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
||||||
|
0x4c00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||||
|
0x4c01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
||||||
|
0x1d01;ATC_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d02;ATC_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d03;ATC_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
||||||
|
0x2001;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2002;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2003;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2004;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2005;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2006;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2007;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
||||||
|
0x2600;FDI_YourFault;;0;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
|
0x2601;FDI_MyFault;;1;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
|
0x2602;FDI_ConfirmLater;;2;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
||||||
0x04e1;RMP_CommandNoDescriptorsAvailable;;225;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e1;RMP_CommandNoDescriptorsAvailable;;225;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x04e2;RMP_CommandBufferFull;;226;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e2;RMP_CommandBufferFull;;226;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x04e3;RMP_CommandChannelOutOfRange;;227;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x04e3;RMP_CommandChannelOutOfRange;;227;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
@ -189,153 +257,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x040a;RMP_ReplyCommandNotImplementedOrNotAuthorised;;10;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040a;RMP_ReplyCommandNotImplementedOrNotAuthorised;;10;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x040b;RMP_ReplyRmwDataLengthError;;11;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040b;RMP_ReplyRmwDataLengthError;;11;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x040c;RMP_ReplyInvalidTargetLogicalAddress;;12;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
0x040c;RMP_ReplyInvalidTargetLogicalAddress;;12;RMAP_CHANNEL;fsfw/src/fsfw/rmap/RMAP.h
|
||||||
0x1401;SE_BufferTooShort;;1;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
|
||||||
0x1402;SE_StreamTooShort;;2;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
|
||||||
0x1403;SE_TooManyElements;;3;SERIALIZE_IF;fsfw/src/fsfw/serialize/SerializeIF.h
|
|
||||||
0x3da0;PVA_InvalidReadWriteMode;;160;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
|
||||||
0x3da1;PVA_InvalidPoolEntry;;161;POOL_VARIABLE_IF;fsfw/src/fsfw/datapool/PoolVariableIF.h
|
|
||||||
0x0801;DPS_InvalidParameterDefinition;;1;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x0802;DPS_SetWasAlreadyRead;;2;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x0803;DPS_CommitingWithoutReading;;3;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x0804;DPS_DataSetUninitialised;;4;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x0805;DPS_DataSetFull;;5;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x0806;DPS_PoolVarNull;;6;DATA_SET_CLASS;fsfw/src/fsfw/datapool/DataSetIF.h
|
|
||||||
0x1c01;TCD_PacketLost;;1;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
|
||||||
0x1c02;TCD_DestinationNotFound;;2;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
|
||||||
0x1c03;TCD_ServiceIdAlreadyExists;;3;PACKET_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/TcDistributorBase.h
|
|
||||||
0x1b00;TCC_NoDestinationFound;;0;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b01;TCC_InvalidCcsdsVersion;;1;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b02;TCC_InvalidApid;;2;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b03;TCC_InvalidPacketType;;3;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b04;TCC_InvalidSecHeaderField;;4;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b05;TCC_IncorrectPrimaryHeader;;5;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b07;TCC_IncompletePacket;;7;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b08;TCC_InvalidPusVersion;;8;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b09;TCC_IncorrectChecksum;;9;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b0a;TCC_IllegalPacketSubtype;;10;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x1b0b;TCC_IncorrectSecondaryHeader;;11;TMTC_DISTRIBUTION;fsfw/src/fsfw/tcdistribution/definitions.h
|
|
||||||
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
|
||||||
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
|
||||||
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
|
||||||
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
|
||||||
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
|
||||||
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
|
||||||
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
|
||||||
0x3b00;SPH_ConnBroken;;0;SEMAPHORE_IF;fsfw/src/fsfw/osal/common/TcpTmTcServer.h
|
|
||||||
0x2a01;IEC_NoConfigurationTable;;1;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a02;IEC_NoCpuTable;;2;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a03;IEC_InvalidWorkspaceAddress;;3;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a04;IEC_TooLittleWorkspace;;4;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a05;IEC_WorkspaceAllocation;;5;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a06;IEC_InterruptStackTooSmall;;6;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a07;IEC_ThreadExitted;;7;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a08;IEC_InconsistentMpInformation;;8;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a09;IEC_InvalidNode;;9;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0a;IEC_NoMpci;;10;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0b;IEC_BadPacket;;11;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0c;IEC_OutOfPackets;;12;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0d;IEC_OutOfGlobalObjects;;13;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0e;IEC_OutOfProxies;;14;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a0f;IEC_InvalidGlobalId;;15;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a10;IEC_BadStackHook;;16;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a11;IEC_BadAttributes;;17;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a12;IEC_ImplementationKeyCreateInconsistency;;18;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a13;IEC_ImplementationBlockingOperationCancel;;19;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a14;IEC_MutexObtainFromBadState;;20;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2a15;IEC_UnlimitedAndMaximumIs0;;21;INTERNAL_ERROR_CODES;fsfw/src/fsfw/osal/InternalErrorCodes.h
|
|
||||||
0x2600;FDI_YourFault;;0;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
|
||||||
0x2601;FDI_MyFault;;1;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
|
||||||
0x2602;FDI_ConfirmLater;;2;HANDLES_FAILURES_IF;fsfw/src/fsfw/fdir/ConfirmsFailuresIF.h
|
|
||||||
0x1e00;PUS_InvalidPusVersion;;0;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
|
||||||
0x1e01;PUS_InvalidCrc16;;1;PUS_IF;fsfw/src/fsfw/tmtcpacket/pus/PusIF.h
|
|
||||||
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
|
||||||
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
|
||||||
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
|
||||||
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
|
||||||
0x2201;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2202;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2203;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2204;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2205;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2206;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2207;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2208;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2209;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
|
||||||
0x2101;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2102;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2103;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2104;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2105;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2106;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2107;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2108;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2109;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x210f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
|
||||||
0x2d01;PAW_UnknownDatatype;;1;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d02;PAW_DatatypeMissmatch;;2;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d03;PAW_Readonly;;3;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d04;PAW_TooBig;;4;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d05;PAW_SourceNotSet;;5;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d06;PAW_OutOfBounds;;6;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d07;PAW_NotSet;;7;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2d08;PAW_ColumnOrRowsZero;;8;PARAMETER_WRAPPER;fsfw/src/fsfw/parameters/ParameterWrapper.h
|
|
||||||
0x2e01;HPA_InvalidIdentifierId;;1;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
|
||||||
0x2e02;HPA_InvalidDomainId;;2;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
|
||||||
0x2e03;HPA_InvalidValue;;3;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
|
||||||
0x2e05;HPA_ReadOnly;;5;HAS_PARAMETERS_IF;fsfw/src/fsfw/parameters/HasParametersIF.h
|
|
||||||
0x3b01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x3b02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x3b03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
|
||||||
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
|
||||||
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
|
||||||
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
|
||||||
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
|
||||||
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
|
||||||
0x3101;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3102;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3103;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3104;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3105;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3106;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3107;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
|
||||||
0x3601;CFDP_InvalidTlvType;;1;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3602;CFDP_InvalidDirectiveField;;2;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3603;CFDP_InvalidPduDatafieldLen;;3;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3604;CFDP_InvalidAckDirectiveFields;;4;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3605;CFDP_MetadataCantParseOptions;;5;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3606;CFDP_NakCantParseOptions;;6;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3607;CFDP_FinishedCantParseFsResponses;;7;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3608;CFDP_FilestoreRequiresSecondFile;;8;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x3609;CFDP_FilestoreResponseCantParseFsMessage;;9;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x360a;CFDP_InvalidPduFormat;;10;CFDP;fsfw/src/fsfw/cfdp/definitions.h
|
|
||||||
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4301;FILS_GenericDirError;;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4302;FILS_FilesystemInactive;;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4303;FILS_GenericRenameError;;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4304;FILS_IsBusy;;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4305;FILS_InvalidParameters;;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x430a;FILS_FileDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x430b;FILS_FileAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x430c;FILS_NotAFile;;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x430d;FILS_FileLocked;;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x430e;FILS_PermissionDenied;;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4315;FILS_DirectoryDoesNotExist;;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4316;FILS_DirectoryAlreadyExists;;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4317;FILS_NotADirectory;;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x4318;FILS_DirectoryNotEmpty;;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x431e;FILS_SequencePacketMissingWrite;;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x431f;FILS_SequencePacketMissingRead;;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
|
||||||
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c01;CCS_BcIsSetVrCommand;;1;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2c02;CCS_BcIsUnlockCommand;;2;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cb0;CCS_BcIllegalCommand;;176;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
@ -365,16 +286,99 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x2cd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd1;CCS_ShorterThanHeader;;209;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd2;CCS_TooShortBlockedPacket;;210;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
0x2cd3;CCS_TooShortMapExtraction;;211;CCSDS_HANDLER_IF;fsfw/src/fsfw/datalinklayer/CCSDSReturnValuesIF.h
|
||||||
0x4201;PUS11_InvalidTypeTimeWindow;;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x38a1;SGP4_InvalidEccentricity;;161;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x4202;PUS11_InvalidTimeWindow;;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x38a2;SGP4_InvalidMeanMotion;;162;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x4203;PUS11_TimeshiftingNotPossible;;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x38a3;SGP4_InvalidPerturbationElements;;163;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x4204;PUS11_InvalidRelativeTime;;4;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
0x38a4;SGP4_InvalidSemiLatusRectum;;164;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x38a5;SGP4_InvalidEpochElements;;165;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x38a6;SGP4_SatelliteHasDecayed;;166;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x38b1;SGP4_TleTooOld;;177;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x3404;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x38b2;SGP4_TleNotInitialized;;178;SGP4PROPAGATOR_CLASS;fsfw/src/fsfw/coordinates/Sgp4Propagator.h
|
||||||
0x3405;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x4300;FILS_GenericFileError;;0;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
0x3406;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
0x4301;FILS_GenericDirError;;1;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4302;FILS_FilesystemInactive;;2;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4303;FILS_GenericRenameError;;3;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4304;FILS_IsBusy;;4;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4305;FILS_InvalidParameters;;5;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430a;FILS_FileDoesNotExist;;10;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430b;FILS_FileAlreadyExists;;11;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430c;FILS_NotAFile;;12;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430d;FILS_FileLocked;;13;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x430e;FILS_PermissionDenied;;14;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4315;FILS_DirectoryDoesNotExist;;21;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4316;FILS_DirectoryAlreadyExists;;22;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4317;FILS_NotADirectory;;23;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x4318;FILS_DirectoryNotEmpty;;24;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431e;FILS_SequencePacketMissingWrite;;30;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x431f;FILS_SequencePacketMissingRead;;31;FILE_SYSTEM;fsfw/src/fsfw/filesystem/HasFileSystemIF.h
|
||||||
|
0x13e0;MH_UnknownCmd;;224;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
|
0x13e1;MH_InvalidAddress;;225;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
|
0x13e2;MH_InvalidSize;;226;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
|
0x13e3;MH_StateMismatch;;227;MEMORY_HELPER;fsfw/src/fsfw/memory/MemoryHelper.h
|
||||||
|
0x0601;PP_DoItMyself;;1;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0602;PP_PointsToVariable;;2;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0603;PP_PointsToMemory;;3;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0604;PP_ActivityCompleted;;4;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0605;PP_PointsToVectorUint8;;5;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0606;PP_PointsToVectorUint16;;6;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0607;PP_PointsToVectorUint32;;7;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0608;PP_PointsToVectorFloat;;8;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06a0;PP_DumpNotSupported;;160;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06e0;PP_InvalidSize;;224;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06e1;PP_InvalidAddress;;225;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06e2;PP_InvalidContent;;226;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06e3;PP_UnalignedAccess;;227;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x06e4;PP_WriteProtected;;228;HAS_MEMORY_IF;fsfw/src/fsfw/memory/HasMemoryIF.h
|
||||||
|
0x0201;OM_InsertionFailed;;1;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0202;OM_NotFound;;2;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0203;OM_ChildInitFailed;;3;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0204;OM_InternalErrReporterUninit;;4;OBJECT_MANAGER_IF;fsfw/src/fsfw/objectmanager/ObjectManagerIF.h
|
||||||
|
0x0501;PS_SwitchOn;;1;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x0500;PS_SwitchOff;;0;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x0502;PS_SwitchTimeout;;2;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x0503;PS_FuseOn;;3;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x0504;PS_FuseOff;;4;POWER_SWITCH_IF;fsfw/src/fsfw/power/PowerSwitchIF.h
|
||||||
|
0x3001;POS_InPowerTransition;;1;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
|
0x3002;POS_SwitchStateMismatch;;2;POWER_SWITCHER;fsfw/src/fsfw/power/PowerSwitcher.h
|
||||||
|
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
||||||
|
0x3701;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
|
||||||
|
0x2201;TMF_Busy;;1;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2202;TMF_LastPacketFound;;2;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2203;TMF_StopFetch;;3;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2204;TMF_Timeout;;4;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2205;TMF_TmChannelFull;;5;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2206;TMF_NotStored;;6;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2207;TMF_AllDeleted;;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2208;TMF_InvalidData;;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2209;TMF_NotReady;;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||||
|
0x2101;TMB_Busy;;1;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2102;TMB_Full;;2;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2103;TMB_Empty;;3;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2104;TMB_NullRequested;;4;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2105;TMB_TooLarge;;5;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2106;TMB_NotReady;;6;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2107;TMB_DumpError;;7;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2108;TMB_CrcError;;8;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x2109;TMB_Timeout;;9;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210a;TMB_IdlePacketFound;;10;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210b;TMB_TelecommandFound;;11;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210c;TMB_NoPusATm;;12;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210d;TMB_TooSmall;;13;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210e;TMB_BlockNotFound;;14;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x210f;TMB_InvalidRequest;;15;TM_STORE_BACKEND_IF;fsfw/src/fsfw/tmstorage/TmStoreBackendIF.h
|
||||||
|
0x0e01;HM_InvalidMode;;1;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
|
0x0e02;HM_TransNotAllowed;;2;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
|
0x0e03;HM_InTransition;;3;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
|
0x0e04;HM_InvalidSubmode;;4;HAS_MODES_IF;fsfw/src/fsfw/modes/HasModesIF.h
|
||||||
|
0x1601;FMM_MapFull;;1;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||||
|
0x1602;FMM_KeyDoesNotExist;;2;FIXED_MULTIMAP;fsfw/src/fsfw/container/FixedOrderedMultimap.h
|
||||||
|
0x1801;FF_Full;;1;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||||
|
0x1802;FF_Empty;;2;FIFO_CLASS;fsfw/src/fsfw/container/FIFOBase.h
|
||||||
0x03a0;DHB_InvalidChannel;;160;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03a0;DHB_InvalidChannel;;160;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03b0;DHB_AperiodicReply;;176;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03b0;DHB_AperiodicReply;;176;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
0x03b1;DHB_IgnoreReplyData;;177;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
0x03b1;DHB_IgnoreReplyData;;177;DEVICE_HANDLER_BASE;fsfw/src/fsfw/devicehandlers/DeviceHandlerBase.h
|
||||||
@ -411,60 +415,53 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x27c3;DHI_DeviceReplyInvalid;;195;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27c3;DHI_DeviceReplyInvalid;;195;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x27d0;DHI_InvalidCommandParameter;;208;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27d0;DHI_InvalidCommandParameter;;208;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x27d1;DHI_InvalidNumberOrLengthOfParameters;;209;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
0x27d1;DHI_InvalidNumberOrLengthOfParameters;;209;DEVICE_HANDLER_IF;fsfw/src/fsfw/devicehandlers/DeviceHandlerIF.h
|
||||||
0x2401;MT_TooDetailedRequest;;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
0x3401;DC_NoReplyReceived;;1;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x2402;MT_TooGeneralRequest;;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
0x3402;DC_ProtocolError;;2;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x2403;MT_NoMatch;;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
0x3403;DC_Nullpointer;;3;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x2404;MT_Full;;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
0x3404;DC_InvalidCookieType;;4;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x2405;MT_NewNodeCreated;;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
0x3405;DC_NotActive;;5;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3f01;DLEE_NoPacketFound;;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
0x3406;DC_TooMuchData;;6;DEVICE_COMMUNICATION_IF;fsfw/src/fsfw/devicehandlers/DeviceCommunicationIF.h
|
||||||
0x3f02;DLEE_PossiblePacketLoss;;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
0x2501;EV_ListenerNotFound;;1;EVENT_MANAGER_IF;fsfw/src/fsfw/events/EventManagerIF.h
|
||||||
0x2f01;ASC_TooLongForTargetType;;1;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
0x1a01;TRC_NotEnoughSensors;;1;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x2f02;ASC_InvalidCharacters;;2;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
0x1a02;TRC_LowestValueOol;;2;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x2f03;ASC_BufferTooSmall;;3;ASCII_CONVERTER;fsfw/src/fsfw/globalfunctions/AsciiConverter.h
|
0x1a03;TRC_HighestValueOol;;3;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1701;HHI_ObjectNotHealthy;;1;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
0x1a04;TRC_BothValuesOol;;4;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1702;HHI_InvalidHealthState;;2;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
0x1a05;TRC_DuplexOol;;5;TRIPLE_REDUNDACY_CHECK;fsfw/src/fsfw/monitoring/TriplexMonitor.h
|
||||||
0x1703;HHI_IsExternallyControlled;;3;HAS_HEALTH_IF;fsfw/src/fsfw/health/HasHealthIF.h
|
0x3101;LIM_Unchecked;;1;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3201;CF_ObjectHasNoFunctions;;1;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
0x3102;LIM_Invalid;;2;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3202;CF_AlreadyCommanding;;2;COMMANDS_ACTIONS_IF;fsfw/src/fsfw/action/CommandsActionsIF.h
|
0x3103;LIM_Unselected;;3;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3301;HF_IsBusy;;1;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x3104;LIM_BelowLowLimit;;4;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3302;HF_InvalidParameters;;2;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x3105;LIM_AboveHighLimit;;5;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3303;HF_ExecutionFinished;;3;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x3106;LIM_UnexpectedValue;;6;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3304;HF_InvalidActionId;;4;HAS_ACTIONS_IF;fsfw/src/fsfw/action/HasActionsIF.h
|
0x3107;LIM_OutOfRange;;7;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1000;TIM_UnsupportedTimeFormat;;0;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31a0;LIM_FirstSample;;160;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1001;TIM_NotEnoughInformationForTargetFormat;;1;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31e0;LIM_InvalidSize;;224;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1002;TIM_LengthMismatch;;2;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31e1;LIM_WrongType;;225;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1003;TIM_InvalidTimeFormat;;3;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31e2;LIM_WrongPid;;226;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1004;TIM_InvalidDayOfYear;;4;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31e3;LIM_WrongLimitId;;227;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x1005;TIM_TimeDoesNotFitFormat;;5;CCSDS_TIME_HELPER_CLASS;fsfw/src/fsfw/timemanager/CCSDSTime.h
|
0x31ee;LIM_MonitorNotFound;;238;LIMITS_IF;fsfw/src/fsfw/monitoring/MonitoringIF.h
|
||||||
0x3701;TSI_BadTimestamp;;1;TIME_STAMPER_IF;fsfw/src/fsfw/timemanager/TimeStampIF.h
|
0x3b01;SPH_SemaphoreTimeout;;1;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
0x3c00;LPIF_PoolEntryNotFound;;0;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
0x3b02;SPH_SemaphoreNotOwned;;2;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
0x3c01;LPIF_PoolEntryTypeConflict;;1;LOCAL_POOL_OWNER_IF;fsfw/src/fsfw/datapoollocal/localPoolDefinitions.h
|
0x3b03;SPH_SemaphoreInvalid;;3;SEMAPHORE_IF;fsfw/src/fsfw/tasks/SemaphoreIF.h
|
||||||
0x3e00;HKM_QueueOrDestinationInvalid;;0;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4500;HSPI_OpeningFileFailed;;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x3e01;HKM_WrongHkPacketType;;1;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4501;HSPI_FullDuplexTransferFailed;;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x3e02;HKM_ReportingStatusUnchanged;;2;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4502;HSPI_HalfDuplexTransferFailed;;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||||
0x3e03;HKM_PeriodicHelperInvalid;;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4601;HURT_UartReadFailure;;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||||
0x3e04;HKM_PoolobjectNotFound;;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4602;HURT_UartReadSizeMissmatch;;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||||
0x3e05;HKM_DatasetNotFound;;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
0x4603;HURT_UartRxBufferTooSmall;;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||||
0x2901;TC_InvalidTargetState;;1;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
0x4801;HGIO_UnknownGpioId;;1;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x29f1;TC_AboveOperationalLimit;;241;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
0x4802;HGIO_DriveGpioFailure;;2;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x29f2;TC_BelowOperationalLimit;;242;THERMAL_COMPONENT_IF;fsfw/src/fsfw/thermal/ThermalComponentIF.h
|
0x4803;HGIO_GpioTypeFailure;;3;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x2001;CSB_ExecutionComplete;;1;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4804;HGIO_GpioInvalidInstance;;4;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x2002;CSB_NoStepMessage;;2;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4805;HGIO_GpioDuplicateDetected;;5;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x2003;CSB_ObjectBusy;;3;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4806;HGIO_GpioInitFailed;;6;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x2004;CSB_Busy;;4;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4807;HGIO_GpioGetValueFailed;;7;HAL_GPIO;fsfw/src/fsfw_hal/linux/gpio/LinuxLibgpioIF.h
|
||||||
0x2005;CSB_InvalidTc;;5;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4400;UXOS_ExecutionFinished;Execution of the current command has finished;0;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x2006;CSB_InvalidObject;;6;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4401;UXOS_CommandPending;Command is pending. This will also be returned if the user tries to load another command but a command is still pending;1;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x2007;CSB_InvalidReply;;7;COMMAND_SERVICE_BASE;fsfw/src/fsfw/tmtcservices/CommandingServiceBase.h
|
0x4402;UXOS_BytesRead;Some bytes have been read from the executing process;2;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4c00;SPPA_NoPacketFound;;0;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x4c01;SPPA_SplitPacket;;1;SPACE_PACKET_PARSER;fsfw/src/fsfw/tmtcservices/SpacePacketParser.h
|
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x1d01;ATC_ActivityStarted;;1;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
0x4406;UXOS_PcloseCallError;;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||||
0x1d02;ATC_InvalidSubservice;;2;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
|
||||||
0x1d03;ATC_IllegalApplicationData;;3;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
|
||||||
0x1d04;ATC_SendTmFailed;;4;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
|
||||||
0x1d05;ATC_Timeout;;5;ACCEPTS_TELECOMMANDS_IF;fsfw/src/fsfw/tmtcservices/AcceptsTelecommandsIF.h
|
|
||||||
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
|
||||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
|
||||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
|
||||||
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a00;SDMA_OpOngoing;;0;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a01;SDMA_AlreadyOn;;1;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a02;SDMA_AlreadyMounted;;2;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
@ -475,3 +472,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
|||||||
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a0d;SDMA_UnmountError;;13;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a0e;SDMA_SystemCallError;;14;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
0x6a0f;SDMA_PopenCallError;;15;SD_CARD_MANAGER;bsp_q7s/fs/SdCardManager.h
|
||||||
|
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
|
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||||
|
0x6b00;SCBU_KeyNotFound;;0;SCRATCH_BUFFER;bsp_q7s/memory/scratchApi.h
|
||||||
|
|
@ -46,7 +46,7 @@ BSP_DIR_NAME = BSP_SELECT.value
|
|||||||
|
|
||||||
# Store this file in the root of the generators folder
|
# Store this file in the root of the generators folder
|
||||||
CSV_FILENAME = Path(f"{ROOT_DIR}/{BSP_SELECT.value}_events.csv")
|
CSV_FILENAME = Path(f"{ROOT_DIR}/{BSP_SELECT.value}_events.csv")
|
||||||
CSV_COPY_DEST = Path(f"{OBSW_ROOT_DIR}/tmtc/config/events.csv")
|
CSV_COPY_DEST = Path(f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/events.csv")
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
FSFW_CONFIG_ROOT = Path(f"{OBSW_ROOT_DIR}/linux/fsfwconfig")
|
FSFW_CONFIG_ROOT = Path(f"{OBSW_ROOT_DIR}/linux/fsfwconfig")
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 234 translations.
|
* @brief Auto-generated event translation file. Contains 239 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-11-14 17:10:10
|
* Generated on: 2022-12-01 17:07:27
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -129,10 +129,13 @@ const char *RESET_OCCURED_STRING = "RESET_OCCURED";
|
|||||||
const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
|
const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
|
||||||
const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
|
const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
|
||||||
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
|
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
|
||||||
|
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
|
||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUWDOWN_BUILD_FAILED";
|
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||||
|
const char *SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUTDOWN_BUILD_FAILED";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||||
@ -222,6 +225,8 @@ const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
|||||||
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
|
const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR";
|
||||||
|
const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR";
|
||||||
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
@ -487,13 +492,19 @@ const char *translateEvents(Event event) {
|
|||||||
case (12001):
|
case (12001):
|
||||||
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
case (12002):
|
case (12002):
|
||||||
return SUPV_ACK_FAILURE_STRING;
|
return SUPV_UNKNOWN_TM_STRING;
|
||||||
case (12003):
|
case (12003):
|
||||||
return SUPV_EXE_FAILURE_STRING;
|
return SUPV_UNINIMPLEMENTED_TM_STRING;
|
||||||
case (12004):
|
case (12004):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_ACK_FAILURE_STRING;
|
||||||
case (12005):
|
case (12005):
|
||||||
return SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING;
|
return SUPV_EXE_FAILURE_STRING;
|
||||||
|
case (12006):
|
||||||
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
|
case (12007):
|
||||||
|
return SUPV_HELPER_EXECUTING_STRING;
|
||||||
|
case (12008):
|
||||||
|
return SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING;
|
||||||
case (12100):
|
case (12100):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return SANITIZATION_FAILED_STRING;
|
||||||
case (12101):
|
case (12101):
|
||||||
@ -672,6 +683,10 @@ const char *translateEvents(Event event) {
|
|||||||
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
case (13630):
|
case (13630):
|
||||||
return SUPV_UPDATE_PROGRESS_STRING;
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
|
case (13631):
|
||||||
|
return HDLC_FRAME_REMOVAL_ERROR_STRING;
|
||||||
|
case (13632):
|
||||||
|
return HDLC_CRC_ERROR_STRING;
|
||||||
case (13700):
|
case (13700):
|
||||||
return ALLOC_FAILURE_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (13701):
|
case (13701):
|
||||||
|
@ -43,7 +43,7 @@ CPP_COPY_DESTINATION = f"{FSFW_CONFIG_ROOT}/objects/"
|
|||||||
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.cpp"
|
CPP_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.cpp"
|
||||||
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.h"
|
CPP_H_FILENAME = f"{os.path.dirname(os.path.realpath(__file__))}//translateObjects.h"
|
||||||
CSV_OBJECT_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_objects.csv"
|
CSV_OBJECT_FILENAME = f"{ROOT_DIR}/{BSP_SELECT.value}_objects.csv"
|
||||||
CSV_COPY_DEST = f"{OBSW_ROOT_DIR}/tmtc/config/objects.csv"
|
CSV_COPY_DEST = f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/objects.csv"
|
||||||
FILE_SEPARATOR = ";"
|
FILE_SEPARATOR = ";"
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 148 translations.
|
* Contains 148 translations.
|
||||||
* Generated on: 2022-11-14 17:10:10
|
* Generated on: 2022-12-01 17:07:27
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ MAX_STRING_LENGTH = 32
|
|||||||
BSP_SELECT = BspType.BSP_Q7S
|
BSP_SELECT = BspType.BSP_Q7S
|
||||||
BSP_DIR_NAME = BSP_SELECT.value
|
BSP_DIR_NAME = BSP_SELECT.value
|
||||||
CSV_RETVAL_FILENAME = Path(f"{ROOT_DIR}/{BSP_SELECT.value}_returnvalues.csv")
|
CSV_RETVAL_FILENAME = Path(f"{ROOT_DIR}/{BSP_SELECT.value}_returnvalues.csv")
|
||||||
CSV_COPY_DEST = Path(f"{OBSW_ROOT_DIR}/tmtc/config/returnvalues.csv")
|
CSV_COPY_DEST = Path(f"{OBSW_ROOT_DIR}/tmtc/eive_tmtc/config/returnvalues.csv")
|
||||||
ADD_LINUX_FOLDER = False
|
ADD_LINUX_FOLDER = False
|
||||||
|
|
||||||
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
if BSP_SELECT == BspType.BSP_Q7S or BSP_SELECT == BspType.BSP_LINUX_BOARD:
|
||||||
|
@ -3,7 +3,10 @@ add_subdirectory(utility)
|
|||||||
add_subdirectory(callbacks)
|
add_subdirectory(callbacks)
|
||||||
add_subdirectory(boardtest)
|
add_subdirectory(boardtest)
|
||||||
add_subdirectory(devices)
|
add_subdirectory(devices)
|
||||||
add_subdirectory(fsfwconfig)
|
|
||||||
add_subdirectory(ipcore)
|
add_subdirectory(ipcore)
|
||||||
|
|
||||||
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp InitMission.cpp)
|
if(EIVE_ADD_LINUX_FSFWCONFIG)
|
||||||
|
add_subdirectory(fsfwconfig)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_sources(${OBSW_NAME} PUBLIC ObjectFactory.cpp scheduling.cpp)
|
||||||
|
@ -333,14 +333,12 @@ void SpiTestClass::performPeriodicMax1227Test() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void SpiTestClass::performMax1227Test() {
|
void SpiTestClass::performMax1227Test() {
|
||||||
|
std::string deviceName = "";
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
std::string deviceName = q7s::SPI_DEFAULT_DEV;
|
deviceName = q7s::SPI_DEFAULT_DEV;
|
||||||
#elif defined(RASPBERRY_PI)
|
#elif defined(RASPBERRY_PI)
|
||||||
std::string deviceName = "";
|
|
||||||
#elif defined(EGSE)
|
#elif defined(EGSE)
|
||||||
std::string deviceName = "";
|
|
||||||
#elif defined(TE0720_1CFA)
|
#elif defined(TE0720_1CFA)
|
||||||
std::string deviceName = "";
|
|
||||||
#endif
|
#endif
|
||||||
int fd = 0;
|
int fd = 0;
|
||||||
UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface");
|
UnixFileGuard fileHelper(deviceName, &fd, O_RDWR, "SpiComIF::initializeInterface");
|
||||||
@ -381,8 +379,9 @@ void SpiTestClass::max1227RadSensorTest(int fd) {
|
|||||||
DiffSel::NONE_0);
|
DiffSel::NONE_0);
|
||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
||||||
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 7, spiTransferStruct[0].len);
|
size_t tmpSz = spiTransferStruct[0].len;
|
||||||
size_t tmpLen = spiTransferStruct[0].len;
|
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 7, tmpSz);
|
||||||
|
size_t tmpLen = tmpSz;
|
||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
||||||
std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, tmpLen - 1);
|
std::memcpy(sendBuffer.data(), sendBuffer.data() + 1, tmpLen - 1);
|
||||||
@ -403,7 +402,8 @@ void SpiTestClass::max1227RadSensorTest(int fd) {
|
|||||||
for (int idx = 0; idx < 8; idx++) {
|
for (int idx = 0; idx < 8; idx++) {
|
||||||
sif::info << "ADC raw " << idx << ": " << adcRaw[idx] << std::endl;
|
sif::info << "ADC raw " << idx << ": " << adcRaw[idx] << std::endl;
|
||||||
}
|
}
|
||||||
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data(), spiTransferStruct[0].len);
|
tmpSz = spiTransferStruct[0].len;
|
||||||
|
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data(), tmpSz);
|
||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
transfer(fd, gpioIds::CS_RAD_SENSOR);
|
||||||
usleep(65);
|
usleep(65);
|
||||||
@ -467,7 +467,8 @@ void SpiTestClass::max1227SusTest(int fd, SusTestCfg &cfg) {
|
|||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, cfg.gpioId);
|
transfer(fd, cfg.gpioId);
|
||||||
|
|
||||||
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 5, spiTransferStruct[0].len);
|
size_t tmpSz = spiTransferStruct[0].len;
|
||||||
|
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), 5, tmpSz);
|
||||||
transfer(fd, cfg.gpioId);
|
transfer(fd, cfg.gpioId);
|
||||||
uint16_t adcRaw[6] = {};
|
uint16_t adcRaw[6] = {};
|
||||||
adcRaw[0] = (recvBuffer[1] << 8) | recvBuffer[2];
|
adcRaw[0] = (recvBuffer[1] << 8) | recvBuffer[2];
|
||||||
@ -552,7 +553,9 @@ void SpiTestClass::max1227PlPcduTest(int fd) {
|
|||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
||||||
uint8_t n = 11;
|
uint8_t n = 11;
|
||||||
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, spiTransferStruct[0].len);
|
size_t tmpSz = spiTransferStruct[0].len;
|
||||||
|
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, tmpSz);
|
||||||
|
spiTransferStruct[0].len = tmpSz;
|
||||||
size_t dummy = 0;
|
size_t dummy = 0;
|
||||||
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
|
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
|
||||||
dummy);
|
dummy);
|
||||||
@ -585,9 +588,11 @@ void SpiTestClass::max1227PlPcduTest(int fd) {
|
|||||||
spiTransferStruct[0].len = 1;
|
spiTransferStruct[0].len = 1;
|
||||||
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
||||||
uint8_t n = 11;
|
uint8_t n = 11;
|
||||||
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, spiTransferStruct[0].len);
|
size_t tmpLen = spiTransferStruct[0].len;
|
||||||
|
max1227::prepareExternallyClockedRead0ToN(sendBuffer.data(), n, tmpLen);
|
||||||
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
|
max1227::prepareExternallyClockedTemperatureRead(sendBuffer.data() + spiTransferStruct[0].len,
|
||||||
spiTransferStruct[0].len);
|
tmpLen);
|
||||||
|
spiTransferStruct[0].len = tmpLen;
|
||||||
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
transfer(fd, gpioIds::PLPCDU_ADC_CS);
|
||||||
uint16_t adcRaw[n + 1] = {};
|
uint16_t adcRaw[n + 1] = {};
|
||||||
for (uint8_t idx = 0; idx < n + 1; idx++) {
|
for (uint8_t idx = 0; idx < n + 1; idx++) {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
#include "fsfw/globalfunctions/CRC.h"
|
#include "fsfw/globalfunctions/CRC.h"
|
||||||
#include "fsfw/globalfunctions/DleEncoder.h"
|
#include "fsfw/globalfunctions/DleEncoder.h"
|
||||||
#include "fsfw/globalfunctions/arrayprinter.h"
|
#include "fsfw/globalfunctions/arrayprinter.h"
|
||||||
|
@ -98,18 +98,11 @@ ReturnValue_t ScexUartReader::initializeInterface(CookieIF *cookie) {
|
|||||||
}
|
}
|
||||||
// Setting up UART parameters
|
// Setting up UART parameters
|
||||||
tty.c_cflag &= ~PARENB; // Clear parity bit
|
tty.c_cflag &= ~PARENB; // Clear parity bit
|
||||||
if (uartCookie->getStopBits() == StopBits::TWO_STOP_BITS) {
|
uart::setStopbits(tty, uartCookie->getStopBits());
|
||||||
// Use two stop bits
|
uart::setBitsPerWord(tty, BitsPerWord::BITS_8);
|
||||||
tty.c_cflag |= CSTOPB;
|
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
||||||
} else {
|
uart::enableRead(tty);
|
||||||
// Clear stop field, only one stop bit used in communication
|
uart::ignoreCtrlLines(tty);
|
||||||
tty.c_cflag &= ~CSTOPB;
|
|
||||||
}
|
|
||||||
|
|
||||||
tty.c_cflag &= ~CSIZE; // Clear all the size bits
|
|
||||||
tty.c_cflag |= CS8; // 8 bits per byte
|
|
||||||
tty.c_cflag &= ~CRTSCTS; // Disable RTS/CTS hardware flow control
|
|
||||||
tty.c_cflag |= CREAD | CLOCAL; // Turn on READ & ignore ctrl lines (CLOCAL = 1)
|
|
||||||
|
|
||||||
// Use non-canonical mode and clear echo flag
|
// Use non-canonical mode and clear echo flag
|
||||||
tty.c_lflag &= ~(ICANON | ECHO);
|
tty.c_lflag &= ~(ICANON | ECHO);
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef MPSOC_RETURN_VALUES_IF_H_
|
#ifndef MPSOC_RETURN_VALUES_IF_H_
|
||||||
#define MPSOC_RETURN_VALUES_IF_H_
|
#define MPSOC_RETURN_VALUES_IF_H_
|
||||||
|
|
||||||
|
#include "eive/resultClassIds.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
|
|
||||||
class MPSoCReturnValuesIF {
|
class MPSoCReturnValuesIF {
|
||||||
|
@ -153,7 +153,7 @@ class TcBase : public ploc::SpTcBase, public MPSoCReturnValuesIF {
|
|||||||
*/
|
*/
|
||||||
TcBase(ploc::SpTcParams params, uint16_t apid, uint16_t sequenceCount)
|
TcBase(ploc::SpTcParams params, uint16_t apid, uint16_t sequenceCount)
|
||||||
: ploc::SpTcBase(params, apid, sequenceCount) {
|
: ploc::SpTcBase(params, apid, sequenceCount) {
|
||||||
spParams.setDataFieldLen(INIT_LENGTH);
|
spParams.setFullPayloadLen(INIT_LENGTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t buildPacket() { return buildPacket(nullptr, 0); }
|
ReturnValue_t buildPacket() { return buildPacket(nullptr, 0); }
|
||||||
@ -181,7 +181,7 @@ class TcBase : public ploc::SpTcBase, public MPSoCReturnValuesIF {
|
|||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return calcCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -206,7 +206,7 @@ class TcMemRead : public TcBase {
|
|||||||
*/
|
*/
|
||||||
TcMemRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
TcMemRead(ploc::SpTcParams params, uint16_t sequenceCount)
|
||||||
: TcBase(params, apid::TC_MEM_READ, sequenceCount) {
|
: TcBase(params, apid::TC_MEM_READ, sequenceCount) {
|
||||||
spParams.setPayloadLen(COMMAND_LENGTH);
|
spParams.setFullPayloadLen(COMMAND_LENGTH + CRC_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint16_t getMemLen() const { return memLen; }
|
uint16_t getMemLen() const { return memLen; }
|
||||||
@ -267,7 +267,7 @@ class TcMemWrite : public TcBase {
|
|||||||
}
|
}
|
||||||
uint16_t memLen =
|
uint16_t memLen =
|
||||||
*(commandData + MEM_ADDRESS_SIZE) << 8 | *(commandData + MEM_ADDRESS_SIZE + 1);
|
*(commandData + MEM_ADDRESS_SIZE) << 8 | *(commandData + MEM_ADDRESS_SIZE + 1);
|
||||||
spParams.setPayloadLen(MIN_FIXED_PAYLOAD_LENGTH + memLen * 4);
|
spParams.setFullPayloadLen(MIN_FIXED_PAYLOAD_LENGTH + memLen * 4 + CRC_SIZE);
|
||||||
result = checkPayloadLen();
|
result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -313,7 +313,7 @@ class FlashFopen : public ploc::SpTcBase {
|
|||||||
ReturnValue_t createPacket(std::string filename, char accessMode_) {
|
ReturnValue_t createPacket(std::string filename, char accessMode_) {
|
||||||
accessMode = accessMode_;
|
accessMode = accessMode_;
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR) + sizeof(accessMode));
|
spParams.setFullPayloadLen(nameSize + sizeof(NULL_TERMINATOR) + sizeof(accessMode) + CRC_SIZE);
|
||||||
ReturnValue_t result = checkPayloadLen();
|
ReturnValue_t result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -322,7 +322,7 @@ class FlashFopen : public ploc::SpTcBase {
|
|||||||
*(spParams.buf + nameSize) = NULL_TERMINATOR;
|
*(spParams.buf + nameSize) = NULL_TERMINATOR;
|
||||||
std::memcpy(payloadStart + nameSize + sizeof(NULL_TERMINATOR), &accessMode, sizeof(accessMode));
|
std::memcpy(payloadStart + nameSize + sizeof(NULL_TERMINATOR), &accessMode, sizeof(accessMode));
|
||||||
updateSpFields();
|
updateSpFields();
|
||||||
return calcCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -339,14 +339,14 @@ class FlashFclose : public ploc::SpTcBase {
|
|||||||
|
|
||||||
ReturnValue_t createPacket(std::string filename) {
|
ReturnValue_t createPacket(std::string filename) {
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR));
|
spParams.setFullPayloadLen(nameSize + sizeof(NULL_TERMINATOR) + CRC_SIZE);
|
||||||
ReturnValue_t result = checkPayloadLen();
|
ReturnValue_t result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
std::memcpy(payloadStart, filename.c_str(), nameSize);
|
||||||
*(payloadStart + nameSize) = NULL_TERMINATOR;
|
*(payloadStart + nameSize) = NULL_TERMINATOR;
|
||||||
return calcCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -365,7 +365,7 @@ class TcFlashWrite : public ploc::SpTcBase {
|
|||||||
sif::debug << "FlashWrite::createPacket: Command data too big" << std::endl;
|
sif::debug << "FlashWrite::createPacket: Command data too big" << std::endl;
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
spParams.setPayloadLen(static_cast<uint16_t>(writeLen) + 4);
|
spParams.setFullPayloadLen(static_cast<uint16_t>(writeLen) + 4 + CRC_SIZE);
|
||||||
result = checkPayloadLen();
|
result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -382,7 +382,7 @@ class TcFlashWrite : public ploc::SpTcBase {
|
|||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return calcCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -399,7 +399,7 @@ class TcFlashDelete : public ploc::SpTcBase {
|
|||||||
|
|
||||||
ReturnValue_t buildPacket(std::string filename) {
|
ReturnValue_t buildPacket(std::string filename) {
|
||||||
size_t nameSize = filename.size();
|
size_t nameSize = filename.size();
|
||||||
spParams.setPayloadLen(nameSize + sizeof(NULL_TERMINATOR));
|
spParams.setFullPayloadLen(nameSize + sizeof(NULL_TERMINATOR) + CRC_SIZE);
|
||||||
auto res = checkPayloadLen();
|
auto res = checkPayloadLen();
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
@ -412,7 +412,7 @@ class TcFlashDelete : public ploc::SpTcBase {
|
|||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return calcCrc();
|
return calcAndSetCrc();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ class TcReplayStart : public TcBase {
|
|||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
spParams.setPayloadLen(commandDataLen);
|
spParams.setFullPayloadLen(commandDataLen + CRC_SIZE);
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -500,7 +500,7 @@ class TcDownlinkPwrOn : public TcBase {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
spParams.setPayloadLen(commandDataLen + sizeof(MAX_AMPLITUDE));
|
spParams.setFullPayloadLen(commandDataLen + sizeof(MAX_AMPLITUDE) + CRC_SIZE);
|
||||||
result = checkPayloadLen();
|
result = checkPayloadLen();
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -571,7 +571,7 @@ class TcReplayWriteSeq : public TcBase {
|
|||||||
protected:
|
protected:
|
||||||
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
ReturnValue_t initPacket(const uint8_t* commandData, size_t commandDataLen) override {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
spParams.setPayloadLen(commandDataLen + sizeof(NULL_TERMINATOR));
|
spParams.setFullPayloadLen(commandDataLen + sizeof(NULL_TERMINATOR) + CRC_SIZE);
|
||||||
result = lengthCheck(commandDataLen);
|
result = lengthCheck(commandDataLen);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
@ -657,7 +657,8 @@ class TcCamcmdSend : public TcBase {
|
|||||||
return INVALID_LENGTH;
|
return INVALID_LENGTH;
|
||||||
}
|
}
|
||||||
uint16_t dataLen = static_cast<uint16_t>(commandDataLen + sizeof(CARRIAGE_RETURN));
|
uint16_t dataLen = static_cast<uint16_t>(commandDataLen + sizeof(CARRIAGE_RETURN));
|
||||||
spParams.setPayloadLen(sizeof(dataLen) + commandDataLen + sizeof(CARRIAGE_RETURN));
|
spParams.setFullPayloadLen(sizeof(dataLen) + commandDataLen + sizeof(CARRIAGE_RETURN) +
|
||||||
|
CRC_SIZE);
|
||||||
auto res = checkPayloadLen();
|
auto res = checkPayloadLen();
|
||||||
if (res != returnvalue::OK) {
|
if (res != returnvalue::OK) {
|
||||||
return res;
|
return res;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,61 +0,0 @@
|
|||||||
#ifndef SUPV_RETURN_VALUES_IF_H_
|
|
||||||
#define SUPV_RETURN_VALUES_IF_H_
|
|
||||||
|
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
|
||||||
|
|
||||||
class SupvReturnValuesIF {
|
|
||||||
public:
|
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::SUPV_RETURN_VALUES_IF;
|
|
||||||
|
|
||||||
//! [EXPORT] : [COMMENT] Space Packet received from PLOC supervisor has invalid CRC
|
|
||||||
static const ReturnValue_t CRC_FAILURE = MAKE_RETURN_CODE(0xA0);
|
|
||||||
//! [EXPORT] : [COMMENT] Received ACK failure reply from PLOC supervisor
|
|
||||||
static const ReturnValue_t RECEIVED_ACK_FAILURE = MAKE_RETURN_CODE(0xA1);
|
|
||||||
//! [EXPORT] : [COMMENT] Received execution failure reply from PLOC supervisor
|
|
||||||
static const ReturnValue_t RECEIVED_EXE_FAILURE = MAKE_RETURN_CODE(0xA2);
|
|
||||||
//! [EXPORT] : [COMMENT] Received space packet with invalid APID from PLOC supervisor
|
|
||||||
static const ReturnValue_t INVALID_APID = MAKE_RETURN_CODE(0xA3);
|
|
||||||
//! [EXPORT] : [COMMENT] Failed to read current system time
|
|
||||||
static const ReturnValue_t GET_TIME_FAILURE = MAKE_RETURN_CODE(0xA4);
|
|
||||||
//! [EXPORT] : [COMMENT] Received command with invalid watchdog parameter. Valid watchdogs are 0
|
|
||||||
//! for PS, 1 for PL and 2 for INT
|
|
||||||
static const ReturnValue_t INVALID_WATCHDOG = MAKE_RETURN_CODE(0xA5);
|
|
||||||
//! [EXPORT] : [COMMENT] Received watchdog timeout config command with invalid timeout. Valid
|
|
||||||
//! timeouts must be in the range between 1000 and 360000 ms.
|
|
||||||
static const ReturnValue_t INVALID_WATCHDOG_TIMEOUT = MAKE_RETURN_CODE(0xA6);
|
|
||||||
//! [EXPORT] : [COMMENT] Received latchup config command with invalid latchup ID
|
|
||||||
static const ReturnValue_t INVALID_LATCHUP_ID = MAKE_RETURN_CODE(0xA7);
|
|
||||||
//! [EXPORT] : [COMMENT] Received set adc sweep period command with invalid sweep period. Must be
|
|
||||||
//! larger than 21.
|
|
||||||
static const ReturnValue_t SWEEP_PERIOD_TOO_SMALL = MAKE_RETURN_CODE(0xA8);
|
|
||||||
//! [EXPORT] : [COMMENT] Receive auto EM test command with invalid test param. Valid params are 1
|
|
||||||
//! and 2.
|
|
||||||
static const ReturnValue_t INVALID_TEST_PARAM = MAKE_RETURN_CODE(0xA9);
|
|
||||||
//! [EXPORT] : [COMMENT] Returned when scanning for MRAM dump packets failed.
|
|
||||||
static const ReturnValue_t MRAM_PACKET_PARSING_FAILURE = MAKE_RETURN_CODE(0xAA);
|
|
||||||
//! [EXPORT] : [COMMENT] Returned when the start and stop addresses of the MRAM dump or MRAM wipe
|
|
||||||
//! commands are invalid (e.g. start address bigger than stop address)
|
|
||||||
static const ReturnValue_t INVALID_MRAM_ADDRESSES = MAKE_RETURN_CODE(0xAB);
|
|
||||||
//! [EXPORT] : [COMMENT] Expect reception of an MRAM dump packet but received space packet with
|
|
||||||
//! other apid.
|
|
||||||
static const ReturnValue_t NO_MRAM_PACKET = MAKE_RETURN_CODE(0xAC);
|
|
||||||
//! [EXPORT] : [COMMENT] Path to PLOC directory on SD card does not exist
|
|
||||||
static const ReturnValue_t PATH_DOES_NOT_EXIST = MAKE_RETURN_CODE(0xAD);
|
|
||||||
//! [EXPORT] : [COMMENT] MRAM dump file does not exists. The file should actually already have
|
|
||||||
//! been created with the reception of the first dump packet.
|
|
||||||
static const ReturnValue_t MRAM_FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xAE);
|
|
||||||
//! [EXPORT] : [COMMENT] Received action command has invalid length
|
|
||||||
static const ReturnValue_t INVALID_LENGTH = MAKE_RETURN_CODE(0xAF);
|
|
||||||
//! [EXPORT] : [COMMENT] Filename too long
|
|
||||||
static const ReturnValue_t FILENAME_TOO_LONG = MAKE_RETURN_CODE(0xB0);
|
|
||||||
//! [EXPORT] : [COMMENT] Received update status report with invalid packet length field
|
|
||||||
static const ReturnValue_t UPDATE_STATUS_REPORT_INVALID_LENGTH = MAKE_RETURN_CODE(0xB1);
|
|
||||||
//! [EXPORT] : [COMMENT] Update status report does not contain expected CRC. There might be a bit
|
|
||||||
//! flip in the update memory region.
|
|
||||||
static const ReturnValue_t UPDATE_CRC_FAILURE = MAKE_RETURN_CODE(0xB2);
|
|
||||||
//! [EXPORT] : [COMMENT] Supervisor helper task ist currently executing a command (wait until
|
|
||||||
//! helper tas has finished or interrupt by sending the terminate command)
|
|
||||||
static const ReturnValue_t SUPV_HELPER_EXECUTING = MAKE_RETURN_CODE(0xB3);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* SUPV_RETURN_VALUES_IF_H_ */
|
|
@ -1,4 +1,4 @@
|
|||||||
target_sources(
|
target_sources(
|
||||||
${OBSW_NAME}
|
${OBSW_NAME}
|
||||||
PRIVATE PlocSupervisorHandler.cpp PlocMemoryDumper.cpp PlocMPSoCHandler.cpp
|
PRIVATE PlocSupervisorHandler.cpp PlocMemoryDumper.cpp PlocMPSoCHandler.cpp
|
||||||
PlocMPSoCHelper.cpp PlocSupvHelper.cpp)
|
PlocMPSoCHelper.cpp PlocSupvUartMan.cpp)
|
||||||
|
@ -5,7 +5,12 @@
|
|||||||
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
|
#include <linux/devices/devicedefinitions/PlocSupervisorDefinitions.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
|
||||||
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "eive/eventSubsystemIds.h"
|
||||||
#include "fsfw/action/ActionHelper.h"
|
#include "fsfw/action/ActionHelper.h"
|
||||||
#include "fsfw/action/CommandActionHelper.h"
|
#include "fsfw/action/CommandActionHelper.h"
|
||||||
#include "fsfw/action/CommandsActionsIF.h"
|
#include "fsfw/action/CommandsActionsIF.h"
|
||||||
@ -13,7 +18,7 @@
|
|||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "linux/fsfwconfig/objects/systemObjectList.h"
|
#include "objects/systemObjectList.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is
|
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,9 @@
|
|||||||
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
|
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
|
||||||
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
|
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
|
||||||
|
|
||||||
|
#include <linux/devices/ploc/PlocSupvUartMan.h>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "PlocSupvHelper.h"
|
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
|
||||||
#include "devices/powerSwitcherList.h"
|
#include "devices/powerSwitcherList.h"
|
||||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
#include "fsfw/timemanager/Countdown.h"
|
||||||
@ -11,7 +11,12 @@
|
|||||||
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
|
||||||
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
||||||
#include "linux/devices/devicedefinitions/SupvReturnValuesIF.h"
|
|
||||||
|
#ifdef XIPHOS_Q7S
|
||||||
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using supv::ExecutionReport;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
|
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
|
||||||
@ -27,9 +32,8 @@
|
|||||||
*/
|
*/
|
||||||
class PlocSupervisorHandler : public DeviceHandlerBase {
|
class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
PlocSupervisorHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie,
|
PlocSupervisorHandler(object_id_t objectId, CookieIF* comCookie, Gpio uartIsolatorSwitch,
|
||||||
Gpio uartIsolatorSwitch, power::Switch_t powerSwitch,
|
power::Switch_t powerSwitch, PlocSupvUartManager& supvHelper);
|
||||||
PlocSupvHelper* supvHelper);
|
|
||||||
virtual ~PlocSupervisorHandler();
|
virtual ~PlocSupervisorHandler();
|
||||||
|
|
||||||
virtual ReturnValue_t initialize() override;
|
virtual ReturnValue_t initialize() override;
|
||||||
@ -48,7 +52,6 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
ReturnValue_t scanForReply(const uint8_t* start, size_t remainingSize, DeviceCommandId_t* foundId,
|
||||||
size_t* foundLen) override;
|
size_t* foundLen) override;
|
||||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) override;
|
||||||
void setNormalDatapoolEntriesInvalid() override;
|
|
||||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) override;
|
LocalDataPoolManager& poolManager) override;
|
||||||
@ -56,7 +59,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
uint8_t expectedReplies = 1, bool useAlternateId = false,
|
uint8_t expectedReplies = 1, bool useAlternateId = false,
|
||||||
DeviceCommandId_t alternateReplyID = 0) override;
|
DeviceCommandId_t alternateReplyID = 0) override;
|
||||||
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
|
size_t getNextReplyLength(DeviceCommandId_t deviceCommand) override;
|
||||||
ReturnValue_t doSendReadHook() override;
|
// ReturnValue_t doSendReadHook() override;
|
||||||
void doOffActivity() override;
|
void doOffActivity() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -64,18 +67,21 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
//! [EXPORT] : [COMMENT] PLOC supervisor crc failure in telemetry packet
|
//! [EXPORT] : [COMMENT] PLOC supervisor crc failure in telemetry packet
|
||||||
static const Event SUPV_MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW);
|
static const Event SUPV_MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW);
|
||||||
|
//! [EXPORT] : [COMMENT] Unhandled event. P1: APID, P2: Service ID
|
||||||
|
static constexpr Event SUPV_UNKNOWN_TM = MAKE_EVENT(2, severity::LOW);
|
||||||
|
static constexpr Event SUPV_UNINIMPLEMENTED_TM = MAKE_EVENT(3, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] PLOC supervisor received acknowledgment failure report
|
//! [EXPORT] : [COMMENT] PLOC supervisor received acknowledgment failure report
|
||||||
static const Event SUPV_ACK_FAILURE = MAKE_EVENT(2, severity::LOW);
|
static const Event SUPV_ACK_FAILURE = MAKE_EVENT(4, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] PLOC received execution failure report
|
//! [EXPORT] : [COMMENT] PLOC received execution failure report
|
||||||
//! P1: ID of command for which the execution failed
|
//! P1: ID of command for which the execution failed
|
||||||
//! P2: Status code sent by the supervisor handler
|
//! P2: Status code sent by the supervisor handler
|
||||||
static const Event SUPV_EXE_FAILURE = MAKE_EVENT(3, severity::LOW);
|
static const Event SUPV_EXE_FAILURE = MAKE_EVENT(5, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] PLOC supervisor reply has invalid crc
|
//! [EXPORT] : [COMMENT] PLOC supervisor reply has invalid crc
|
||||||
static const Event SUPV_CRC_FAILURE_EVENT = MAKE_EVENT(4, severity::LOW);
|
static const Event SUPV_CRC_FAILURE_EVENT = MAKE_EVENT(6, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Supervisor helper currently executing a command
|
//! [EXPORT] : [COMMENT] Supervisor helper currently executing a command
|
||||||
static const Event SUPV_HELPER_EXECUTING = MAKE_EVENT(5, severity::LOW);
|
static const Event SUPV_HELPER_EXECUTING = MAKE_EVENT(7, severity::LOW);
|
||||||
//! [EXPORT] : [COMMENT] Failed to build the command to shutdown the MPSoC
|
//! [EXPORT] : [COMMENT] Failed to build the command to shutdown the MPSoC
|
||||||
static const Event SUPV_MPSOC_SHUWDOWN_BUILD_FAILED = MAKE_EVENT(5, severity::LOW);
|
static const Event SUPV_MPSOC_SHUTDOWN_BUILD_FAILED = MAKE_EVENT(8, severity::LOW);
|
||||||
|
|
||||||
static const uint16_t APID_MASK = 0x7FF;
|
static const uint16_t APID_MASK = 0x7FF;
|
||||||
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
|
||||||
@ -101,7 +107,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE];
|
||||||
SpacePacketCreator creator;
|
SpacePacketCreator creator;
|
||||||
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
supv::TcParams spParams = supv::TcParams(creator);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This variable is used to store the id of the next reply to receive. This is necessary
|
* This variable is used to store the id of the next reply to receive. This is necessary
|
||||||
@ -113,6 +119,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
SerialComIF* uartComIf = nullptr;
|
SerialComIF* uartComIf = nullptr;
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
Gpio uartIsolatorSwitch;
|
Gpio uartIsolatorSwitch;
|
||||||
|
bool shutdownCmdSent = false;
|
||||||
|
|
||||||
supv::HkSet hkset;
|
supv::HkSet hkset;
|
||||||
supv::BootStatusReport bootStatusReport;
|
supv::BootStatusReport bootStatusReport;
|
||||||
@ -121,8 +128,9 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
supv::AdcReport adcReport;
|
supv::AdcReport adcReport;
|
||||||
|
|
||||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||||
|
supv::TmBase tmReader;
|
||||||
|
|
||||||
PlocSupvHelper* supvHelper = nullptr;
|
PlocSupvUartManager& uartManager;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
|
|
||||||
/** Number of expected replies following the MRAM dump command */
|
/** Number of expected replies following the MRAM dump command */
|
||||||
@ -136,17 +144,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
/** This buffer is used to concatenate space packets received in two different read steps */
|
/** This buffer is used to concatenate space packets received in two different read steps */
|
||||||
uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE];
|
uint8_t spacePacketBuffer[supv::MAX_PACKET_SIZE];
|
||||||
|
|
||||||
#ifndef TE0720_1CFA
|
#ifdef XIPHOS_Q7S
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
#endif /* BOARD_TE0720 == 0 */
|
#endif
|
||||||
|
|
||||||
// Path to supervisor specific files on SD card
|
// Path to supervisor specific files on SD card
|
||||||
std::string supervisorFilePath = "ploc/supervisor";
|
std::string supervisorFilePath = "ploc/supervisor";
|
||||||
std::string activeMramFile;
|
std::string activeMramFile;
|
||||||
|
|
||||||
// Supervisor helper class currently executing a command
|
|
||||||
bool plocSupvHelperExecuting = false;
|
|
||||||
|
|
||||||
Countdown executionReportTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
|
Countdown executionReportTimeout = Countdown(EXECUTION_DEFAULT_TIMEOUT, false);
|
||||||
Countdown acknowledgementReportTimeout = Countdown(ACKNOWLEDGE_DEFAULT_TIMEOUT, false);
|
Countdown acknowledgementReportTimeout = Countdown(ACKNOWLEDGE_DEFAULT_TIMEOUT, false);
|
||||||
// Vorago nees some time to boot properly
|
// Vorago nees some time to boot properly
|
||||||
@ -210,7 +215,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t handleBootStatusReport(const uint8_t* data);
|
ReturnValue_t handleBootStatusReport(const uint8_t* data);
|
||||||
|
|
||||||
ReturnValue_t handleLatchupStatusReport(const uint8_t* data);
|
ReturnValue_t handleLatchupStatusReport(const uint8_t* data);
|
||||||
ReturnValue_t handleLoggingReport(const uint8_t* data);
|
void handleBadApidServiceCombination(Event result, unsigned int apid, unsigned int serviceId);
|
||||||
|
// ReturnValue_t handleLoggingReport(const uint8_t* data);
|
||||||
ReturnValue_t handleAdcReport(const uint8_t* data);
|
ReturnValue_t handleAdcReport(const uint8_t* data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -229,13 +235,13 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @param dataSize Size of telemetry in bytes.
|
* @param dataSize Size of telemetry in bytes.
|
||||||
* @param replyId Id of the reply. This will be added to the ActionMessage.
|
* @param replyId Id of the reply. This will be added to the ActionMessage.
|
||||||
*/
|
*/
|
||||||
void handleDeviceTM(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId);
|
void handleDeviceTm(const uint8_t* data, size_t dataSize, DeviceCommandId_t replyId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function prepares a space packet which does not transport any data in the
|
* @brief This function prepares a space packet which does not transport any data in the
|
||||||
* packet data field apart from the crc.
|
* packet data field apart from the crc.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t prepareEmptyCmd(uint16_t apid);
|
ReturnValue_t prepareEmptyCmd(uint16_t apid, uint8_t serviceId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function initializes the space packet to select the boot image of the MPSoC.
|
* @brief This function initializes the space packet to select the boot image of the MPSoC.
|
||||||
@ -258,6 +264,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
|
|
||||||
ReturnValue_t prepareRestartTriesCmd(const uint8_t* commandData);
|
ReturnValue_t prepareRestartTriesCmd(const uint8_t* commandData);
|
||||||
|
|
||||||
|
ReturnValue_t prepareFactoryResetCmd(const uint8_t* commandData, size_t len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function fills the command buffer with the packet to enable or disable the
|
* @brief This function fills the command buffer with the packet to enable or disable the
|
||||||
* watchdogs on the PLOC.
|
* watchdogs on the PLOC.
|
||||||
@ -278,11 +286,11 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetAdcThresholdCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareDumpMramCmd(const uint8_t* commandData);
|
// ReturnValue_t prepareDumpMramCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareSetGpioCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData);
|
ReturnValue_t prepareReadGpioCmd(const uint8_t* commandData);
|
||||||
ReturnValue_t prepareLoggingRequest(const uint8_t* commandData, size_t commandDataLen);
|
// ReturnValue_t prepareLoggingRequest(const uint8_t* commandData, size_t commandDataLen);
|
||||||
ReturnValue_t prepareEnableNvmsCommand(const uint8_t* commandData);
|
// ReturnValue_t prepareEnableNvmsCommand(const uint8_t* commandData);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Copies the content of a space packet to the command buffer.
|
* @brief Copies the content of a space packet to the command buffer.
|
||||||
@ -317,7 +325,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @brief Function is called in scanForReply and fills the spacePacketBuffer with the read
|
* @brief Function is called in scanForReply and fills the spacePacketBuffer with the read
|
||||||
* data until a full packet has been received.
|
* data until a full packet has been received.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t parseMramPackets(const uint8_t* packet, size_t remainingSize, size_t* foundlen);
|
// ReturnValue_t parseMramPackets(const uint8_t* packet, size_t remainingSize, size_t* foundlen);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function generates the Service 8 packets for the MRAM dump data.
|
* @brief This function generates the Service 8 packets for the MRAM dump data.
|
||||||
@ -335,7 +343,7 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
* @brief Function checks if the packet written to the space packet buffer is really a
|
* @brief Function checks if the packet written to the space packet buffer is really a
|
||||||
* MRAM dump packet.
|
* MRAM dump packet.
|
||||||
*/
|
*/
|
||||||
ReturnValue_t checkMramPacketApid();
|
// ReturnValue_t checkMramPacketApid();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Writes the data of the MRAM dump to a file. The file will be created when receiving
|
* @brief Writes the data of the MRAM dump to a file. The file will be created when receiving
|
||||||
@ -373,8 +381,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
|||||||
supv::UpdateParams& params);
|
supv::UpdateParams& params);
|
||||||
ReturnValue_t eventSubscription();
|
ReturnValue_t eventSubscription();
|
||||||
|
|
||||||
ReturnValue_t handleExecutionSuccessReport(const uint8_t* data);
|
ReturnValue_t handleExecutionSuccessReport(ExecutionReport& report);
|
||||||
void handleExecutionFailureReport(uint16_t statusCode);
|
void handleExecutionFailureReport(ExecutionReport& report);
|
||||||
|
|
||||||
void printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId);
|
void printAckFailureInfo(uint16_t statusCode, DeviceCommandId_t commandId);
|
||||||
};
|
};
|
||||||
|
@ -1,803 +0,0 @@
|
|||||||
#include "PlocSupvHelper.h"
|
|
||||||
|
|
||||||
#include <etl/crc16_ccitt.h>
|
|
||||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
|
||||||
|
|
||||||
#include <cmath>
|
|
||||||
#include <filesystem>
|
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
|
||||||
#ifdef XIPHOS_Q7S
|
|
||||||
#include "bsp_q7s/fs/FilesystemHelper.h"
|
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "fsfw/tasks/TaskFactory.h"
|
|
||||||
#include "fsfw/timemanager/Countdown.h"
|
|
||||||
#include "mission/utility/Filenaming.h"
|
|
||||||
#include "mission/utility/ProgressPrinter.h"
|
|
||||||
#include "mission/utility/Timestamp.h"
|
|
||||||
|
|
||||||
PlocSupvHelper::PlocSupvHelper(object_id_t objectId) : SystemObject(objectId) {
|
|
||||||
spParams.maxSize = sizeof(commandBuffer);
|
|
||||||
resetSpParams();
|
|
||||||
}
|
|
||||||
|
|
||||||
PlocSupvHelper::~PlocSupvHelper() {}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::initialize() {
|
|
||||||
#ifdef XIPHOS_Q7S
|
|
||||||
sdcMan = SdCardManager::instance();
|
|
||||||
if (sdcMan == nullptr) {
|
|
||||||
sif::warning << "PlocSupvHelper::initialize: Invalid SD Card Manager" << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performOperation(uint8_t operationCode) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
semaphore.acquire();
|
|
||||||
while (true) {
|
|
||||||
switch (internalState) {
|
|
||||||
case InternalState::IDLE: {
|
|
||||||
semaphore.acquire();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case InternalState::UPDATE: {
|
|
||||||
result = executeUpdate();
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_UPDATE_SUCCESSFUL, result);
|
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
|
||||||
// Event already triggered
|
|
||||||
} else {
|
|
||||||
triggerEvent(SUPV_UPDATE_FAILED, result);
|
|
||||||
}
|
|
||||||
internalState = InternalState::IDLE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case InternalState::CHECK_MEMORY: {
|
|
||||||
executeFullCheckMemoryCommand();
|
|
||||||
internalState = InternalState::IDLE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case InternalState::CONTINUE_UPDATE: {
|
|
||||||
result = continueUpdate();
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_CONTINUE_UPDATE_SUCCESSFUL, result);
|
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
|
||||||
// Event already triggered
|
|
||||||
} else {
|
|
||||||
triggerEvent(SUPV_CONTINUE_UPDATE_FAILED, result);
|
|
||||||
}
|
|
||||||
internalState = InternalState::IDLE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case InternalState::REQUEST_EVENT_BUFFER: {
|
|
||||||
result = performEventBufferRequest();
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL, result);
|
|
||||||
} else if (result == PROCESS_TERMINATED) {
|
|
||||||
// Event already triggered
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_FAILED, result);
|
|
||||||
}
|
|
||||||
internalState = InternalState::IDLE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
sif::debug << "PlocSupvHelper::performOperation: Invalid state" << std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::setComIF(SerialComIF* uartComIF_) {
|
|
||||||
if (uartComIF_ == nullptr) {
|
|
||||||
sif::warning << "PlocSupvHelper::initialize: Provided invalid uart com if" << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
uartComIF = uartComIF_;
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlocSupvHelper::setComCookie(CookieIF* comCookie_) { comCookie = comCookie_; }
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::startUpdate(std::string file, uint8_t memoryId,
|
|
||||||
uint32_t startAddress) {
|
|
||||||
supv::UpdateParams params;
|
|
||||||
params.file = file;
|
|
||||||
params.memId = memoryId;
|
|
||||||
params.startAddr = startAddress;
|
|
||||||
params.bytesWritten = 0;
|
|
||||||
params.seqCount = 1;
|
|
||||||
params.deleteMemory = true;
|
|
||||||
return performUpdate(params);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performUpdate(const supv::UpdateParams& params) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
#ifdef XIPHOS_Q7S
|
|
||||||
result = FilesystemHelper::checkPath(params.file);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: File " << params.file << " does not exist"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = FilesystemHelper::fileExists(params.file);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: The file " << params.file << " does not exist"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#ifdef TE0720_1CFA
|
|
||||||
if (not std::filesystem::exists(file)) {
|
|
||||||
sif::warning << "PlocSupvHelper::startUpdate: The file " << file << " does not exist"
|
|
||||||
<< std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
update.file = params.file;
|
|
||||||
update.fullFileSize = getFileSize(update.file);
|
|
||||||
if (params.bytesWritten > update.fullFileSize) {
|
|
||||||
sif::warning << "Invalid start bytes counter " << params.bytesWritten
|
|
||||||
<< ", smaller than full file length" << update.fullFileSize << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
update.length = update.fullFileSize - params.bytesWritten;
|
|
||||||
update.memoryId = params.memId;
|
|
||||||
update.startAddress = params.startAddr;
|
|
||||||
update.progressPercent = 0;
|
|
||||||
update.bytesWritten = params.bytesWritten;
|
|
||||||
update.crcShouldBeChecked = true;
|
|
||||||
update.packetNum = 1;
|
|
||||||
update.deleteMemory = params.deleteMemory;
|
|
||||||
update.sequenceCount = params.seqCount;
|
|
||||||
internalState = InternalState::UPDATE;
|
|
||||||
uartComIF->flushUartTxAndRxBuf(comCookie);
|
|
||||||
semaphore.release();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performMemCheck(std::string file, uint8_t memoryId,
|
|
||||||
uint32_t startAddress) {
|
|
||||||
update.file = file;
|
|
||||||
update.fullFileSize = getFileSize(file);
|
|
||||||
return performMemCheck(memoryId, startAddress, getFileSize(update.file), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performMemCheck(uint8_t memoryId, uint32_t startAddress,
|
|
||||||
size_t sizeToCheck, bool checkCrc) {
|
|
||||||
update.memoryId = memoryId;
|
|
||||||
update.startAddress = startAddress;
|
|
||||||
update.length = sizeToCheck;
|
|
||||||
update.crcShouldBeChecked = checkCrc;
|
|
||||||
internalState = InternalState::CHECK_MEMORY;
|
|
||||||
uartComIF->flushUartTxAndRxBuf(comCookie);
|
|
||||||
semaphore.release();
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlocSupvHelper::initiateUpdateContinuation() {
|
|
||||||
internalState = InternalState::CONTINUE_UPDATE;
|
|
||||||
semaphore.release();
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::startEventbBufferRequest(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;
|
|
||||||
internalState = InternalState::REQUEST_EVENT_BUFFER;
|
|
||||||
uartComIF->flushUartTxAndRxBuf(comCookie);
|
|
||||||
semaphore.release();
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlocSupvHelper::stopProcess() { terminate = true; }
|
|
||||||
|
|
||||||
void PlocSupvHelper::executeFullCheckMemoryCommand() {
|
|
||||||
ReturnValue_t result;
|
|
||||||
if (update.crcShouldBeChecked) {
|
|
||||||
sif::info << "PLOC SUPV Mem Check: Calculating Image CRC" << std::endl;
|
|
||||||
result = calcImageCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sif::info << "PLOC SUPV Mem Check: Selecting Memory" << std::endl;
|
|
||||||
result = selectMemory();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sif::info << "PLOC SUPV Mem Check: Preparing Update" << std::endl;
|
|
||||||
result = prepareUpdate();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
sif::info << "PLOC SUPV Mem Check: Memory Check" << std::endl;
|
|
||||||
result = handleCheckMemoryCommand();
|
|
||||||
if (result == returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_MEM_CHECK_OK, result);
|
|
||||||
} else {
|
|
||||||
triggerEvent(SUPV_MEM_CHECK_FAIL, result);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::executeUpdate() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
sif::info << "PLOC SUPV Update MPSoC: Calculating Image CRC" << std::endl;
|
|
||||||
result = calcImageCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
sif::info << "PLOC SUPV Update MPSoC: Selecting Memory" << std::endl;
|
|
||||||
result = selectMemory();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
sif::info << "PLOC SUPV Update MPSoC: Preparing Update" << std::endl;
|
|
||||||
result = prepareUpdate();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
if (update.deleteMemory) {
|
|
||||||
sif::info << "PLOC SUPV Update MPSoC: Erasing Memory" << std::endl;
|
|
||||||
result = eraseMemory();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return updateOperation();
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::continueUpdate() {
|
|
||||||
ReturnValue_t result = prepareUpdate();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return updateOperation();
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::updateOperation() {
|
|
||||||
sif::info << "PlocSupvHelper::performUpdate: Writing Update Packets" << std::endl;
|
|
||||||
auto result = writeUpdatePackets();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
sif::info << "PlocSupvHelper::performUpdate: Memory Check" << std::endl;
|
|
||||||
return handleCheckMemoryCommand();
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::writeUpdatePackets() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
ProgressPrinter progressPrinter("Supervisor update", update.fullFileSize,
|
|
||||||
ProgressPrinter::HALF_PERCENT);
|
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
|
||||||
uint8_t tempData[supv::WriteMemory::CHUNK_MAX + 1]{};
|
|
||||||
std::ifstream file(update.file, std::ifstream::binary);
|
|
||||||
uint16_t dataLength = 0;
|
|
||||||
ccsds::SequenceFlags seqFlags;
|
|
||||||
while (update.bytesWritten < update.fullFileSize) {
|
|
||||||
if (terminate) {
|
|
||||||
terminate = false;
|
|
||||||
triggerEvent(TERMINATED_UPDATE_PROCEDURE);
|
|
||||||
return PROCESS_TERMINATED;
|
|
||||||
}
|
|
||||||
size_t remainingSize = update.fullFileSize - update.bytesWritten;
|
|
||||||
bool lastSegment = false;
|
|
||||||
if (remainingSize > supv::WriteMemory::CHUNK_MAX) {
|
|
||||||
dataLength = supv::WriteMemory::CHUNK_MAX;
|
|
||||||
} else {
|
|
||||||
lastSegment = true;
|
|
||||||
dataLength = static_cast<uint16_t>(remainingSize);
|
|
||||||
}
|
|
||||||
if (file.is_open()) {
|
|
||||||
file.seekg(update.bytesWritten, std::ios::beg);
|
|
||||||
file.read(reinterpret_cast<char*>(tempData), dataLength);
|
|
||||||
if (!file) {
|
|
||||||
sif::warning << "PlocSupvHelper::performUpdate: Read only " << file.gcount() << " of "
|
|
||||||
<< dataLength << " bytes" << std::endl;
|
|
||||||
sif::info << "PlocSupvHelper::performUpdate: Failed when trying to read byte "
|
|
||||||
<< update.bytesWritten << std::endl;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return FILE_CLOSED_ACCIDENTALLY;
|
|
||||||
}
|
|
||||||
if (update.bytesWritten == 0) {
|
|
||||||
seqFlags = ccsds::SequenceFlags::FIRST_SEGMENT;
|
|
||||||
} else if (lastSegment) {
|
|
||||||
seqFlags = ccsds::SequenceFlags::LAST_SEGMENT;
|
|
||||||
} else {
|
|
||||||
seqFlags = ccsds::SequenceFlags::CONTINUATION;
|
|
||||||
}
|
|
||||||
resetSpParams();
|
|
||||||
float progress = static_cast<float>(update.bytesWritten) / update.fullFileSize;
|
|
||||||
uint8_t progPercent = std::floor(progress * 100);
|
|
||||||
if (progPercent > update.progressPercent) {
|
|
||||||
update.progressPercent = progPercent;
|
|
||||||
if (progPercent % 5 == 0) {
|
|
||||||
// Useful to allow restarting the update
|
|
||||||
triggerEvent(SUPV_UPDATE_PROGRESS, buildProgParams1(progPercent, update.sequenceCount),
|
|
||||||
update.bytesWritten);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
supv::WriteMemory packet(spParams);
|
|
||||||
result = packet.buildPacket(seqFlags, update.sequenceCount, update.memoryId,
|
|
||||||
update.startAddress + update.bytesWritten, dataLength, tempData);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
|
||||||
update.bytesWritten);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handlePacketTransmission(packet);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount),
|
|
||||||
update.bytesWritten);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
update.sequenceCount++;
|
|
||||||
update.packetNum += 1;
|
|
||||||
update.bytesWritten += dataLength;
|
|
||||||
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
progressPrinter.print(update.bytesWritten);
|
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t PlocSupvHelper::buildProgParams1(uint8_t percent, uint16_t seqCount) {
|
|
||||||
return (static_cast<uint32_t>(percent) << 24) | static_cast<uint32_t>(seqCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::performEventBufferRequest() {
|
|
||||||
using namespace supv;
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
resetSpParams();
|
|
||||||
RequestLoggingData packet(spParams);
|
|
||||||
result = packet.buildPacket(RequestLoggingData::Sa::REQUEST_EVENT_BUFFERS);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = sendCommand(packet);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handleAck();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result =
|
|
||||||
handleTmReception(ccsds::HEADER_LEN, tmBuf.data(), supv::recv_timeout::UPDATE_STATUS_REPORT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
ploc::SpTmReader spReader(tmBuf.data(), tmBuf.size());
|
|
||||||
bool exeAlreadyReceived = false;
|
|
||||||
if (spReader.getApid() == supv::APID_EXE_FAILURE) {
|
|
||||||
exeAlreadyReceived = true;
|
|
||||||
result = handleRemainingExeReport(spReader);
|
|
||||||
} else if (spReader.getApid() == supv::APID_MRAM_DUMP_TM) {
|
|
||||||
result = handleEventBufferReception(spReader);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (not exeAlreadyReceived) {
|
|
||||||
result = handleExe();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleRemainingExeReport(ploc::SpTmReader& reader) {
|
|
||||||
size_t remBytes = reader.getPacketDataLen() + 1;
|
|
||||||
ReturnValue_t result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "Reading exe failure report failed" << std::endl;
|
|
||||||
}
|
|
||||||
result = exeReportHandling();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "Handling exe report failed" << std::endl;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::selectMemory() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
resetSpParams();
|
|
||||||
supv::MPSoCBootSelect packet(spParams);
|
|
||||||
result = packet.buildPacket(update.memoryId);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handlePacketTransmission(packet);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::prepareUpdate() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
resetSpParams();
|
|
||||||
supv::ApidOnlyPacket packet(spParams, supv::APID_PREPARE_UPDATE);
|
|
||||||
result = packet.buildPacket();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handlePacketTransmission(packet, PREPARE_UPDATE_EXECUTION_REPORT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::eraseMemory() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
resetSpParams();
|
|
||||||
supv::EraseMemory eraseMemory(spParams);
|
|
||||||
result = eraseMemory.buildPacket(update.memoryId, update.startAddress + update.bytesWritten,
|
|
||||||
update.length);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handlePacketTransmission(eraseMemory, supv::recv_timeout::ERASE_MEMORY);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handlePacketTransmission(ploc::SpTcBase& packet,
|
|
||||||
uint32_t timeoutExecutionReport) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
result = sendCommand(packet);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handleAck();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handleExe(timeoutExecutionReport);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::sendCommand(ploc::SpTcBase& packet) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
rememberApid = packet.getApid();
|
|
||||||
result = uartComIF->sendMessage(comCookie, packet.getFullPacket(), packet.getFullPacketLen());
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::sendCommand: Failed to send command" << std::endl;
|
|
||||||
triggerEvent(SUPV_SENDING_COMMAND_FAILED, result, static_cast<uint32_t>(internalState));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleAck() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
|
|
||||||
result = handleTmReception(supv::SIZE_ACK_REPORT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(ACK_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
|
||||||
sif::warning << "PlocSupvHelper::handleAck: Error in reception of acknowledgment report"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
supv::AcknowledgmentReport ackReport(tmBuf.data(), tmBuf.size());
|
|
||||||
result = checkReceivedTm(ackReport);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = ackReport.checkApid();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == SupvReturnValuesIF::RECEIVED_ACK_FAILURE) {
|
|
||||||
triggerEvent(SUPV_ACK_FAILURE_REPORT, static_cast<uint32_t>(ackReport.getRefApid()));
|
|
||||||
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
|
||||||
triggerEvent(SUPV_ACK_INVALID_APID, static_cast<uint32_t>(rememberApid));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleExe(uint32_t timeout) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
|
|
||||||
result = handleTmReception(supv::SIZE_EXE_REPORT, tmBuf.data(), timeout);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(EXE_RECEPTION_FAILURE, result, static_cast<uint32_t>(rememberApid));
|
|
||||||
sif::warning << "PlocSupvHelper::handleExe: Error in reception of execution report"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return exeReportHandling();
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::exeReportHandling() {
|
|
||||||
supv::ExecutionReport exeReport(tmBuf.data(), tmBuf.size());
|
|
||||||
|
|
||||||
ReturnValue_t result = checkReceivedTm(exeReport);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = exeReport.checkApid();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
if (result == SupvReturnValuesIF::RECEIVED_EXE_FAILURE) {
|
|
||||||
triggerEvent(SUPV_EXE_FAILURE_REPORT, static_cast<uint32_t>(exeReport.getRefApid()));
|
|
||||||
} else if (result == SupvReturnValuesIF::INVALID_APID) {
|
|
||||||
triggerEvent(SUPV_EXE_INVALID_APID, static_cast<uint32_t>(rememberApid));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleTmReception(size_t remainingBytes, uint8_t* readBuf,
|
|
||||||
uint32_t timeout) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
size_t readBytes = 0;
|
|
||||||
size_t currentBytes = 0;
|
|
||||||
Countdown countdown(timeout);
|
|
||||||
if (readBuf == nullptr) {
|
|
||||||
readBuf = tmBuf.data();
|
|
||||||
}
|
|
||||||
while (!countdown.hasTimedOut()) {
|
|
||||||
result = receive(readBuf + readBytes, ¤tBytes, remainingBytes);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
readBytes += currentBytes;
|
|
||||||
remainingBytes = remainingBytes - currentBytes;
|
|
||||||
if (remainingBytes == 0) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (remainingBytes != 0) {
|
|
||||||
sif::warning << "PlocSupvHelper::handleTmReception: Failed to read " << std::dec
|
|
||||||
<< remainingBytes << " remaining bytes" << std::endl;
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::checkReceivedTm(ploc::SpTmReader& reader) {
|
|
||||||
ReturnValue_t result = reader.checkSize();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_REPLY_SIZE_MISSMATCH, rememberApid);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = reader.checkCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::receive(uint8_t* data, size_t* readBytes, size_t requestBytes) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
uint8_t* buffer = nullptr;
|
|
||||||
result = uartComIF->requestReceiveMessage(comCookie, requestBytes);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::receive: Failed to request reply" << std::endl;
|
|
||||||
triggerEvent(SUPV_HELPER_REQUESTING_REPLY_FAILED, result,
|
|
||||||
static_cast<uint32_t>(static_cast<uint32_t>(internalState)));
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
result = uartComIF->readReceivedMessage(comCookie, &buffer, readBytes);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::receive: Failed to read received message" << std::endl;
|
|
||||||
triggerEvent(SUPV_HELPER_READING_REPLY_FAILED, result, static_cast<uint32_t>(internalState));
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
if (*readBytes > 0) {
|
|
||||||
std::memcpy(data, buffer, *readBytes);
|
|
||||||
} else {
|
|
||||||
TaskFactory::delayTask(40);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::calcImageCrc() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
if (update.fullFileSize == 0) {
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
#ifdef XIPHOS_Q7S
|
|
||||||
result = FilesystemHelper::checkPath(update.file);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::calcImageCrc: File " << update.file << " does not exist"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
auto crc16Calcer = etl::crc16_ccitt();
|
|
||||||
std::ifstream file(update.file, std::ifstream::binary);
|
|
||||||
std::array<uint8_t, 1025> crcBuf{};
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
ProgressPrinter progress("Supervisor update crc calculation", update.fullFileSize,
|
|
||||||
ProgressPrinter::ONE_PERCENT);
|
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
|
||||||
uint32_t byteCount = 0;
|
|
||||||
size_t bytesToRead = 1024;
|
|
||||||
while (byteCount < update.fullFileSize) {
|
|
||||||
size_t remLen = update.fullFileSize - byteCount;
|
|
||||||
if (remLen < 1024) {
|
|
||||||
bytesToRead = remLen;
|
|
||||||
} else {
|
|
||||||
bytesToRead = 1024;
|
|
||||||
}
|
|
||||||
file.seekg(byteCount, file.beg);
|
|
||||||
file.read(reinterpret_cast<char*>(crcBuf.data()), bytesToRead);
|
|
||||||
crc16Calcer.add(crcBuf.begin(), crcBuf.begin() + bytesToRead);
|
|
||||||
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
progress.print(byteCount);
|
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
|
||||||
byteCount += bytesToRead;
|
|
||||||
}
|
|
||||||
#if OBSW_DEBUG_PLOC_SUPERVISOR == 1
|
|
||||||
progress.print(byteCount);
|
|
||||||
#endif /* OBSW_DEBUG_PLOC_SUPERVISOR == 1 */
|
|
||||||
update.crc = crc16Calcer.value();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleCheckMemoryCommand() {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
resetSpParams();
|
|
||||||
// Will hold status report for later processing
|
|
||||||
std::array<uint8_t, 32> statusReportBuf{};
|
|
||||||
supv::UpdateStatusReport updateStatusReport(tmBuf.data(), tmBuf.size());
|
|
||||||
// Verification of update write procedure
|
|
||||||
supv::CheckMemory packet(spParams);
|
|
||||||
result = packet.buildPacket(update.memoryId, update.startAddress, update.fullFileSize);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = sendCommand(packet);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = handleAck();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool exeAlreadyHandled = false;
|
|
||||||
uint32_t timeout = std::max(CRC_EXECUTION_TIMEOUT, supv::recv_timeout::UPDATE_STATUS_REPORT);
|
|
||||||
result = handleTmReception(ccsds::HEADER_LEN, tmBuf.data(), timeout);
|
|
||||||
ploc::SpTmReader spReader(tmBuf.data(), tmBuf.size());
|
|
||||||
if (spReader.getApid() == supv::APID_EXE_FAILURE) {
|
|
||||||
exeAlreadyHandled = true;
|
|
||||||
result = handleRemainingExeReport(spReader);
|
|
||||||
} else if (spReader.getApid() == supv::APID_UPDATE_STATUS_REPORT) {
|
|
||||||
size_t remBytes = spReader.getPacketDataLen() + 1;
|
|
||||||
result = handleTmReception(remBytes, tmBuf.data() + ccsds::HEADER_LEN,
|
|
||||||
supv::recv_timeout::UPDATE_STATUS_REPORT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning
|
|
||||||
<< "PlocSupvHelper::handleCheckMemoryCommand: Failed to receive update status report"
|
|
||||||
<< std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
result = updateStatusReport.checkCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::handleCheckMemoryCommand: CRC check failed" << std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
// Copy into other buffer because data will be overwritten when reading execution report
|
|
||||||
std::memcpy(statusReportBuf.data(), tmBuf.data(), updateStatusReport.getNominalSize());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (not exeAlreadyHandled) {
|
|
||||||
result = handleExe(CRC_EXECUTION_TIMEOUT);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now process the status report
|
|
||||||
updateStatusReport.setData(statusReportBuf.data(), statusReportBuf.size());
|
|
||||||
result = updateStatusReport.parseDataField();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
if (update.crcShouldBeChecked) {
|
|
||||||
result = updateStatusReport.verifycrc(update.crc);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::warning << "PlocSupvHelper::handleCheckMemoryCommand: CRC failure. Expected CRC 0x"
|
|
||||||
<< std::setfill('0') << std::hex << std::setw(4)
|
|
||||||
<< static_cast<uint16_t>(update.crc) << " but received CRC 0x" << std::setw(4)
|
|
||||||
<< updateStatusReport.getCrc() << std::dec << std::endl;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t PlocSupvHelper::getFileSize(std::string filename) {
|
|
||||||
std::ifstream file(filename, std::ifstream::binary);
|
|
||||||
file.seekg(0, file.end);
|
|
||||||
uint32_t size = file.tellg();
|
|
||||||
file.close();
|
|
||||||
return size;
|
|
||||||
}
|
|
||||||
|
|
||||||
ReturnValue_t PlocSupvHelper::handleEventBufferReception(ploc::SpTmReader& reader) {
|
|
||||||
ReturnValue_t result = returnvalue::OK;
|
|
||||||
#ifdef XIPHOS_Q7S
|
|
||||||
if (not sdcMan->getActiveSdCard()) {
|
|
||||||
return HasFileSystemIF::FILESYSTEM_INACTIVE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
std::string filename = Filenaming::generateAbsoluteFilename(
|
|
||||||
eventBufferReq.path, eventBufferReq.filename, timestamping);
|
|
||||||
std::ofstream file(filename, std::ios_base::app | std::ios_base::out);
|
|
||||||
uint32_t packetsRead = 0;
|
|
||||||
size_t requestLen = 0;
|
|
||||||
bool firstPacket = true;
|
|
||||||
for (packetsRead = 0; packetsRead < NUM_EVENT_BUFFER_PACKETS; packetsRead++) {
|
|
||||||
if (terminate) {
|
|
||||||
triggerEvent(SUPV_EVENT_BUFFER_REQUEST_TERMINATED, packetsRead - 1);
|
|
||||||
file.close();
|
|
||||||
return PROCESS_TERMINATED;
|
|
||||||
}
|
|
||||||
if (packetsRead == NUM_EVENT_BUFFER_PACKETS - 1) {
|
|
||||||
requestLen = SIZE_EVENT_BUFFER_LAST_PACKET;
|
|
||||||
} else {
|
|
||||||
requestLen = SIZE_EVENT_BUFFER_FULL_PACKET;
|
|
||||||
}
|
|
||||||
if (firstPacket) {
|
|
||||||
firstPacket = false;
|
|
||||||
requestLen -= 6;
|
|
||||||
}
|
|
||||||
result = handleTmReception(requestLen);
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
sif::debug << "PlocSupvHelper::handleEventBufferReception: Failed while trying to read packet"
|
|
||||||
<< " " << packetsRead + 1 << std::endl;
|
|
||||||
file.close();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
ReturnValue_t result = reader.checkCrc();
|
|
||||||
if (result != returnvalue::OK) {
|
|
||||||
triggerEvent(SUPV_REPLY_CRC_MISSMATCH, rememberApid);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
uint16_t apid = reader.getApid();
|
|
||||||
if (apid != supv::APID_MRAM_DUMP_TM) {
|
|
||||||
sif::warning << "PlocSupvHelper::handleEventBufferReception: Did not expect space packet "
|
|
||||||
<< "with APID 0x" << std::hex << apid << std::endl;
|
|
||||||
file.close();
|
|
||||||
return EVENT_BUFFER_REPLY_INVALID_APID;
|
|
||||||
}
|
|
||||||
file.write(reinterpret_cast<const char*>(reader.getPacketData()),
|
|
||||||
reader.getPayloadDataLength());
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PlocSupvHelper::resetSpParams() { spParams.buf = commandBuffer; }
|
|
1157
linux/devices/ploc/PlocSupvUartMan.cpp
Normal file
1157
linux/devices/ploc/PlocSupvUartMan.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,13 @@
|
|||||||
#ifndef BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
|
#ifndef BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
|
||||||
#define BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
|
#define BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_
|
||||||
|
|
||||||
|
#include <fsfw/container/SimpleRingBuffer.h>
|
||||||
|
#include <termios.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
|
#include "fsfw/container/FIFO.h"
|
||||||
#include "fsfw/devicehandlers/CookieIF.h"
|
#include "fsfw/devicehandlers/CookieIF.h"
|
||||||
#include "fsfw/objectmanager/SystemObject.h"
|
#include "fsfw/objectmanager/SystemObject.h"
|
||||||
#include "fsfw/osal/linux/BinarySemaphore.h"
|
#include "fsfw/osal/linux/BinarySemaphore.h"
|
||||||
@ -11,6 +15,7 @@
|
|||||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||||
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
#include "fsfw_hal/linux/serial/SerialComIF.h"
|
||||||
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
#include "linux/devices/devicedefinitions/PlocSupervisorDefinitions.h"
|
||||||
|
#include "tas/crc.h"
|
||||||
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
@ -21,8 +26,21 @@
|
|||||||
* the supervisor and the OBC.
|
* the supervisor and the OBC.
|
||||||
* @author J. Meier
|
* @author J. Meier
|
||||||
*/
|
*/
|
||||||
class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
class PlocSupvUartManager : public DeviceCommunicationIF,
|
||||||
|
public SystemObject,
|
||||||
|
public ExecutableObjectIF {
|
||||||
public:
|
public:
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPV_HELPER;
|
||||||
|
|
||||||
|
//! [EXPORT] : [COMMENT] File accidentally close
|
||||||
|
static const ReturnValue_t FILE_CLOSED_ACCIDENTALLY = MAKE_RETURN_CODE(0xA0);
|
||||||
|
//! [EXPORT] : [COMMENT] Process has been terminated by command
|
||||||
|
static const ReturnValue_t PROCESS_TERMINATED = MAKE_RETURN_CODE(0xA1);
|
||||||
|
//! [EXPORT] : [COMMENT] Received command with invalid pathname
|
||||||
|
static const ReturnValue_t PATH_NOT_EXISTS = MAKE_RETURN_CODE(0xA2);
|
||||||
|
//! [EXPORT] : [COMMENT] Expected event buffer TM but received space packet with other APID
|
||||||
|
static const ReturnValue_t EVENT_BUFFER_REPLY_INVALID_APID = MAKE_RETURN_CODE(0xA3);
|
||||||
|
|
||||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPV_HELPER;
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPV_HELPER;
|
||||||
|
|
||||||
//! [EXPORT] : [COMMENT] update failed
|
//! [EXPORT] : [COMMENT] update failed
|
||||||
@ -97,16 +115,15 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
//! [EXPORT] : [COMMENT] Will be triggered every 5 percent of the update progress.
|
//! [EXPORT] : [COMMENT] Will be triggered every 5 percent of the update progress.
|
||||||
//! P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written
|
//! P1: First byte percent, third and fourth byte Sequence Count, P2: Bytes written
|
||||||
static constexpr Event SUPV_UPDATE_PROGRESS = MAKE_EVENT(30, severity::INFO);
|
static constexpr Event SUPV_UPDATE_PROGRESS = MAKE_EVENT(30, 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);
|
||||||
|
|
||||||
PlocSupvHelper(object_id_t objectId);
|
PlocSupvUartManager(object_id_t objectId);
|
||||||
virtual ~PlocSupvHelper();
|
virtual ~PlocSupvUartManager();
|
||||||
|
|
||||||
ReturnValue_t initialize() override;
|
ReturnValue_t initialize() override;
|
||||||
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
|
||||||
|
|
||||||
ReturnValue_t setComIF(SerialComIF* uartComfIF_);
|
|
||||||
void setComCookie(CookieIF* comCookie_);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Starts update procedure
|
* @brief Starts update procedure
|
||||||
*
|
*
|
||||||
@ -119,38 +136,42 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
ReturnValue_t performUpdate(const supv::UpdateParams& params);
|
ReturnValue_t performUpdate(const supv::UpdateParams& params);
|
||||||
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
|
ReturnValue_t startUpdate(std::string file, uint8_t memoryId, uint32_t startAddress);
|
||||||
|
|
||||||
ReturnValue_t performMemCheck(uint8_t memoryId, uint32_t startAddress, size_t sizeToCheck,
|
ReturnValue_t performMemCheck(std::string file, uint8_t memoryId, uint32_t startAddress,
|
||||||
bool checkCrc);
|
size_t sizeToCheck, bool checkCrc);
|
||||||
ReturnValue_t performMemCheck(std::string file, uint8_t memoryId, uint32_t startAddress);
|
ReturnValue_t performMemCheck(std::string file, uint8_t memoryId, uint32_t startAddress);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This initiate the continuation of a failed update.
|
* @brief This initiate the continuation of a failed update.
|
||||||
*/
|
*/
|
||||||
void initiateUpdateContinuation();
|
ReturnValue_t initiateUpdateContinuation();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Calling this function will initiate the procedure to request the event buffer
|
* @brief Calling this function will initiate the procedure to request the event buffer
|
||||||
*/
|
*/
|
||||||
ReturnValue_t startEventbBufferRequest(std::string path);
|
// ReturnValue_t startEventBufferRequest(std::string path);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Can be used to interrupt a running data transfer.
|
* @brief Can be used to stop the UART reception and put the task to sleep
|
||||||
*/
|
*/
|
||||||
void stopProcess();
|
void stop();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Can be used to start the UART reception
|
||||||
|
*/
|
||||||
|
void start();
|
||||||
|
bool longerRequestActive() const;
|
||||||
|
|
||||||
static uint32_t buildProgParams1(uint8_t percent, uint16_t seqCount);
|
static uint32_t buildProgParams1(uint8_t percent, uint16_t seqCount);
|
||||||
|
static uint32_t buildApidServiceParam1(uint8_t apid, uint8_t serviceId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_SUPV_HELPER;
|
static constexpr ReturnValue_t REQUEST_DONE = returnvalue::makeCode(1, 0);
|
||||||
|
static constexpr ReturnValue_t NO_PACKET_FOUND = returnvalue::makeCode(1, 1);
|
||||||
//! [EXPORT] : [COMMENT] File accidentally close
|
static constexpr ReturnValue_t DECODE_BUF_TOO_SMALL = returnvalue::makeCode(1, 2);
|
||||||
static const ReturnValue_t FILE_CLOSED_ACCIDENTALLY = MAKE_RETURN_CODE(0xA0);
|
static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_START =
|
||||||
//! [EXPORT] : [COMMENT] Process has been terminated by command
|
returnvalue::makeCode(1, 3);
|
||||||
static const ReturnValue_t PROCESS_TERMINATED = MAKE_RETURN_CODE(0xA1);
|
static constexpr ReturnValue_t POSSIBLE_PACKET_LOSS_CONSECUTIVE_END = returnvalue::makeCode(1, 4);
|
||||||
//! [EXPORT] : [COMMENT] Received command with invalid pathname
|
static constexpr ReturnValue_t HDLC_ERROR = returnvalue::makeCode(1, 5);
|
||||||
static const ReturnValue_t PATH_NOT_EXISTS = MAKE_RETURN_CODE(0xA2);
|
|
||||||
//! [EXPORT] : [COMMENT] Expected event buffer TM but received space packet with other APID
|
|
||||||
static const ReturnValue_t EVENT_BUFFER_REPLY_INVALID_APID = MAKE_RETURN_CODE(0xA3);
|
|
||||||
|
|
||||||
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
|
||||||
@ -158,19 +179,22 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
static const uint8_t NUM_EVENT_BUFFER_PACKETS = 25;
|
static const uint8_t NUM_EVENT_BUFFER_PACKETS = 25;
|
||||||
static const size_t SIZE_EVENT_BUFFER_FULL_PACKET = 1024;
|
static const size_t SIZE_EVENT_BUFFER_FULL_PACKET = 1024;
|
||||||
static const size_t SIZE_EVENT_BUFFER_LAST_PACKET = 200;
|
static const size_t SIZE_EVENT_BUFFER_LAST_PACKET = 200;
|
||||||
static const uint32_t CRC_EXECUTION_TIMEOUT = 60000;
|
|
||||||
static const uint32_t PREPARE_UPDATE_EXECUTION_REPORT = 2000;
|
static const uint32_t PREPARE_UPDATE_EXECUTION_REPORT = 2000;
|
||||||
|
|
||||||
|
static constexpr uint8_t MAX_STORED_DECODED_PACKETS = 4;
|
||||||
|
static constexpr uint8_t HDLC_START_MARKER = 0x7E;
|
||||||
|
static constexpr uint8_t HDLC_END_MARKER = 0x7C;
|
||||||
|
|
||||||
struct Update {
|
struct Update {
|
||||||
uint8_t memoryId;
|
uint8_t memoryId;
|
||||||
uint32_t startAddress;
|
uint32_t startAddress;
|
||||||
// Absolute name of file containing update data
|
// Absolute name of file containing update data
|
||||||
std::string file;
|
std::string file;
|
||||||
// Length of full file
|
// Length of full file
|
||||||
size_t fullFileSize;
|
size_t fullFileSize = 0;
|
||||||
// Size of update
|
// Size of update
|
||||||
uint32_t length;
|
uint32_t length = 0;
|
||||||
uint32_t crc;
|
uint32_t crc = 0;
|
||||||
bool crcShouldBeChecked = true;
|
bool crcShouldBeChecked = true;
|
||||||
size_t bytesWritten;
|
size_t bytesWritten;
|
||||||
uint32_t packetNum;
|
uint32_t packetNum;
|
||||||
@ -181,6 +205,13 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
|
|
||||||
struct Update update;
|
struct Update update;
|
||||||
|
|
||||||
|
SemaphoreIF* semaphore;
|
||||||
|
MutexIF* lock;
|
||||||
|
MutexIF* ipcLock;
|
||||||
|
supv::TmBase tmReader;
|
||||||
|
int serialPort = 0;
|
||||||
|
struct termios tty = {};
|
||||||
|
|
||||||
struct EventBufferRequest {
|
struct EventBufferRequest {
|
||||||
std::string path = "";
|
std::string path = "";
|
||||||
// Default name of file where event buffer data will be written to. Timestamp will be added to
|
// Default name of file where event buffer data will be written to. Timestamp will be added to
|
||||||
@ -190,54 +221,65 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
|
|
||||||
EventBufferRequest eventBufferReq;
|
EventBufferRequest eventBufferReq;
|
||||||
|
|
||||||
enum class InternalState { IDLE, UPDATE, CONTINUE_UPDATE, REQUEST_EVENT_BUFFER, CHECK_MEMORY };
|
enum class InternalState { SLEEPING, DEFAULT, DEDICATED_REQUEST, GO_TO_SLEEP };
|
||||||
|
|
||||||
InternalState internalState = InternalState::IDLE;
|
enum class Request {
|
||||||
|
DEFAULT,
|
||||||
|
UPDATE,
|
||||||
|
CONTINUE_UPDATE,
|
||||||
|
REQUEST_EVENT_BUFFER,
|
||||||
|
CHECK_MEMORY,
|
||||||
|
};
|
||||||
|
InternalState state = InternalState::SLEEPING;
|
||||||
|
Request request = Request::DEFAULT;
|
||||||
|
|
||||||
BinarySemaphore semaphore;
|
|
||||||
#ifdef XIPHOS_Q7S
|
#ifdef XIPHOS_Q7S
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
#endif
|
#endif
|
||||||
uint8_t commandBuffer[supv::MAX_COMMAND_SIZE]{};
|
SimpleRingBuffer recRingBuf;
|
||||||
|
std::array<uint8_t, 1200> cmdBuf = {};
|
||||||
|
std::array<uint8_t, 2048> encodedSendBuf = {};
|
||||||
|
std::array<uint8_t, 2048> recBuf = {};
|
||||||
|
std::array<uint8_t, 2048> encodedBuf = {};
|
||||||
|
std::array<uint8_t, 1200> decodedBuf = {};
|
||||||
|
std::array<uint8_t, 1200> ipcBuffer = {};
|
||||||
|
SimpleRingBuffer decodedRingBuf;
|
||||||
|
FIFO<size_t, MAX_STORED_DECODED_PACKETS> decodedQueue;
|
||||||
|
SimpleRingBuffer ipcRingBuf;
|
||||||
|
FIFO<size_t, MAX_STORED_DECODED_PACKETS> ipcQueue;
|
||||||
|
|
||||||
SpacePacketCreator creator;
|
SpacePacketCreator creator;
|
||||||
ploc::SpTcParams spParams = ploc::SpTcParams(creator);
|
supv::TcParams spParams = supv::TcParams(creator);
|
||||||
|
|
||||||
std::array<uint8_t, supv::MAX_COMMAND_SIZE> tmBuf{};
|
std::array<uint8_t, supv::MAX_COMMAND_SIZE> tmBuf{};
|
||||||
|
|
||||||
bool terminate = false;
|
bool printTc = false;
|
||||||
|
bool debugMode = false;
|
||||||
/**
|
|
||||||
* Communication interface responsible for data transactions between OBC and Supervisor.
|
|
||||||
*/
|
|
||||||
SerialComIF* uartComIF = nullptr;
|
|
||||||
// Communication cookie. Must be set by the supervisor Handler
|
|
||||||
CookieIF* comCookie = nullptr;
|
|
||||||
|
|
||||||
bool timestamping = true;
|
bool timestamping = true;
|
||||||
|
|
||||||
// Remembers APID to know at which command a procedure failed
|
// Remembers APID to know at which command a procedure failed
|
||||||
uint16_t rememberApid = 0;
|
uint16_t rememberApid = 0;
|
||||||
|
|
||||||
|
ReturnValue_t handleRunningLongerRequest();
|
||||||
|
ReturnValue_t handleUartReception();
|
||||||
|
void addHdlcFraming(const uint8_t* src, size_t slen, uint8_t* dst, size_t* dlen, size_t maxDest);
|
||||||
|
int removeHdlcFramingWithCrcCheck(const uint8_t* src, size_t slen, uint8_t* dst, size_t* dlen);
|
||||||
|
|
||||||
|
ReturnValue_t encodeAndSendPacket(const uint8_t* sendData, size_t sendLen);
|
||||||
void executeFullCheckMemoryCommand();
|
void executeFullCheckMemoryCommand();
|
||||||
|
|
||||||
|
ReturnValue_t tryHdlcParsing();
|
||||||
|
ReturnValue_t parseRecRingBufForHdlc(size_t& readSize, size_t& decodedLen);
|
||||||
ReturnValue_t executeUpdate();
|
ReturnValue_t executeUpdate();
|
||||||
ReturnValue_t continueUpdate();
|
ReturnValue_t continueUpdate();
|
||||||
ReturnValue_t updateOperation();
|
ReturnValue_t updateOperation();
|
||||||
ReturnValue_t writeUpdatePackets();
|
ReturnValue_t writeUpdatePackets();
|
||||||
ReturnValue_t performEventBufferRequest();
|
// ReturnValue_t performEventBufferRequest();
|
||||||
ReturnValue_t handlePacketTransmission(ploc::SpTcBase& packet,
|
ReturnValue_t handlePacketTransmissionNoReply(supv::TcBase& packet,
|
||||||
uint32_t timeoutExecutionReport = 60000);
|
uint32_t timeoutExecutionReport);
|
||||||
ReturnValue_t sendCommand(ploc::SpTcBase& packet);
|
int handleAckReception(supv::TcBase& tc, size_t packetLen);
|
||||||
/**
|
int handleExeAckReception(supv::TcBase& tc, size_t packetLen);
|
||||||
* @brief Function which reads form the communication interface
|
|
||||||
*
|
|
||||||
* @param data Pointer to buffer where read data will be written to
|
|
||||||
* @param raedBytes Actual number of bytes read
|
|
||||||
* @param requestBytes Number of bytes to read
|
|
||||||
*/
|
|
||||||
ReturnValue_t receive(uint8_t* data, size_t* readBytes, size_t requestBytes);
|
|
||||||
ReturnValue_t handleAck();
|
|
||||||
ReturnValue_t handleExe(uint32_t timeout = 1000);
|
|
||||||
/**
|
/**
|
||||||
* @brief Handles reading of TM packets from the communication interface
|
* @brief Handles reading of TM packets from the communication interface
|
||||||
*
|
*
|
||||||
@ -250,7 +292,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
*/
|
*/
|
||||||
ReturnValue_t handleTmReception(size_t remainingBytes, uint8_t* readBuf = nullptr,
|
ReturnValue_t handleTmReception(size_t remainingBytes, uint8_t* readBuf = nullptr,
|
||||||
uint32_t timeout = 70000);
|
uint32_t timeout = 70000);
|
||||||
ReturnValue_t checkReceivedTm(ploc::SpTmReader& reader);
|
ReturnValue_t checkReceivedTm();
|
||||||
|
|
||||||
ReturnValue_t selectMemory();
|
ReturnValue_t selectMemory();
|
||||||
ReturnValue_t prepareUpdate();
|
ReturnValue_t prepareUpdate();
|
||||||
@ -258,7 +300,7 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
// Calculates CRC over image. Will be used for verification after update writing has
|
// Calculates CRC over image. Will be used for verification after update writing has
|
||||||
// finished.
|
// finished.
|
||||||
ReturnValue_t calcImageCrc();
|
ReturnValue_t calcImageCrc();
|
||||||
ReturnValue_t handleCheckMemoryCommand();
|
ReturnValue_t handleCheckMemoryCommand(uint8_t failStep);
|
||||||
ReturnValue_t exeReportHandling();
|
ReturnValue_t exeReportHandling();
|
||||||
/**
|
/**
|
||||||
* @brief Return size of file with name filename
|
* @brief Return size of file with name filename
|
||||||
@ -269,9 +311,64 @@ class PlocSupvHelper : public SystemObject, public ExecutableObjectIF {
|
|||||||
*/
|
*/
|
||||||
uint32_t getFileSize(std::string filename);
|
uint32_t getFileSize(std::string filename);
|
||||||
ReturnValue_t handleEventBufferReception(ploc::SpTmReader& reader);
|
ReturnValue_t handleEventBufferReception(ploc::SpTmReader& reader);
|
||||||
ReturnValue_t handleRemainingExeReport(ploc::SpTmReader& reader);
|
|
||||||
|
|
||||||
void resetSpParams();
|
void resetSpParams();
|
||||||
|
void pushIpcData(const uint8_t* data, size_t len);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Device specific initialization, using the cookie.
|
||||||
|
* @details
|
||||||
|
* The cookie is already prepared in the factory. If the communication
|
||||||
|
* interface needs to be set up in some way and requires cookie information,
|
||||||
|
* this can be performed in this function, which is called on device handler
|
||||||
|
* initialization.
|
||||||
|
* @param cookie
|
||||||
|
* @return
|
||||||
|
* - @c returnvalue::OK if initialization was successfull
|
||||||
|
* - Everything else triggers failure event with returnvalue as parameter 1
|
||||||
|
*/
|
||||||
|
ReturnValue_t initializeInterface(CookieIF* cookie) override;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called by DHB in the SEND_WRITE doSendWrite().
|
||||||
|
* This function is used to send data to the physical device
|
||||||
|
* by implementing and calling related drivers or wrapper functions.
|
||||||
|
* @param cookie
|
||||||
|
* @param data
|
||||||
|
* @param len If this is 0, nothing shall be sent.
|
||||||
|
* @return
|
||||||
|
* - @c returnvalue::OK for successfull send
|
||||||
|
* - Everything else triggers failure event with returnvalue as parameter 1
|
||||||
|
*/
|
||||||
|
ReturnValue_t sendMessage(CookieIF* cookie, const uint8_t* sendData, size_t sendLen) override;
|
||||||
|
/**
|
||||||
|
* Called by DHB in the GET_WRITE doGetWrite().
|
||||||
|
* Get send confirmation that the data in sendMessage() was sent successfully.
|
||||||
|
* @param cookie
|
||||||
|
* @return
|
||||||
|
* - @c returnvalue::OK if data was sent successfully but a reply is expected
|
||||||
|
* - NO_REPLY_EXPECTED if data was sent successfully and no reply is expected
|
||||||
|
* - Everything else to indicate failure
|
||||||
|
*/
|
||||||
|
ReturnValue_t getSendSuccess(CookieIF* cookie) override;
|
||||||
|
/**
|
||||||
|
* Called by DHB in the SEND_WRITE doSendRead().
|
||||||
|
* It is assumed that it is always possible to request a reply
|
||||||
|
* from a device. If a requestLen of 0 is supplied, no reply was enabled
|
||||||
|
* and communication specific action should be taken (e.g. read nothing
|
||||||
|
* or read everything).
|
||||||
|
*
|
||||||
|
* @param cookie
|
||||||
|
* @param requestLen Size of data to read
|
||||||
|
* @return - @c returnvalue::OK to confirm the request for data has been sent.
|
||||||
|
* - Everything else triggers failure event with
|
||||||
|
* returnvalue as parameter 1
|
||||||
|
*/
|
||||||
|
ReturnValue_t requestReceiveMessage(CookieIF* cookie, size_t requestLen) override;
|
||||||
|
ReturnValue_t readReceivedMessage(CookieIF* cookie, uint8_t** buffer, size_t* size) override;
|
||||||
|
|
||||||
|
void performUartShutdown();
|
||||||
|
void updateVtime(uint8_t vtime);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ */
|
#endif /* BSP_Q7S_DEVICES_PLOCSUPVHELPER_H_ */
|
@ -1,6 +1,7 @@
|
|||||||
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
#ifndef BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
||||||
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
#define BSP_Q7S_DEVICES_ARCSECDATALINKLAYER_H_
|
||||||
|
|
||||||
|
#include "eive/resultClassIds.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
#include "eive/resultClassIds.h"
|
||||||
#include "fsfw/returnvalues/returnvalue.h"
|
#include "fsfw/returnvalues/returnvalue.h"
|
||||||
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
|
||||||
|
@ -1591,7 +1591,7 @@ void StarTrackerHandler::preparePowerRequest() {
|
|||||||
|
|
||||||
void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
|
void StarTrackerHandler::prepareSwitchToBootloaderCmd() {
|
||||||
uint32_t length = 0;
|
uint32_t length = 0;
|
||||||
struct RebootActionRequest rebootReq;
|
struct RebootActionRequest rebootReq {};
|
||||||
arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
|
arc_pack_reboot_action_req(&rebootReq, commandBuffer, &length);
|
||||||
dataLinkLayer.encodeFrame(commandBuffer, length);
|
dataLinkLayer.encodeFrame(commandBuffer, length);
|
||||||
rawPacket = dataLinkLayer.getEncodedFrame();
|
rawPacket = dataLinkLayer.getEncodedFrame();
|
||||||
|
@ -1 +0,0 @@
|
|||||||
#include "addresses.h"
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 234 translations.
|
* @brief Auto-generated event translation file. Contains 239 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2022-11-14 17:10:10
|
* Generated on: 2022-12-01 17:07:27
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -129,10 +129,13 @@ const char *RESET_OCCURED_STRING = "RESET_OCCURED";
|
|||||||
const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
|
const char *BOOTING_FIRMWARE_FAILED_STRING = "BOOTING_FIRMWARE_FAILED";
|
||||||
const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
|
const char *BOOTING_BOOTLOADER_FAILED_STRING = "BOOTING_BOOTLOADER_FAILED";
|
||||||
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
const char *SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING = "SUPV_MEMORY_READ_RPT_CRC_FAILURE";
|
||||||
|
const char *SUPV_UNKNOWN_TM_STRING = "SUPV_UNKNOWN_TM";
|
||||||
|
const char *SUPV_UNINIMPLEMENTED_TM_STRING = "SUPV_UNINIMPLEMENTED_TM";
|
||||||
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
const char *SUPV_ACK_FAILURE_STRING = "SUPV_ACK_FAILURE";
|
||||||
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
const char *SUPV_EXE_FAILURE_STRING = "SUPV_EXE_FAILURE";
|
||||||
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
const char *SUPV_CRC_FAILURE_EVENT_STRING = "SUPV_CRC_FAILURE_EVENT";
|
||||||
const char *SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUWDOWN_BUILD_FAILED";
|
const char *SUPV_HELPER_EXECUTING_STRING = "SUPV_HELPER_EXECUTING";
|
||||||
|
const char *SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING = "SUPV_MPSOC_SHUTDOWN_BUILD_FAILED";
|
||||||
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
const char *SANITIZATION_FAILED_STRING = "SANITIZATION_FAILED";
|
||||||
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
const char *MOUNTED_SD_CARD_STRING = "MOUNTED_SD_CARD";
|
||||||
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
const char *SEND_MRAM_DUMP_FAILED_STRING = "SEND_MRAM_DUMP_FAILED";
|
||||||
@ -222,6 +225,8 @@ const char *WRITE_MEMORY_FAILED_STRING = "WRITE_MEMORY_FAILED";
|
|||||||
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
const char *SUPV_REPLY_SIZE_MISSMATCH_STRING = "SUPV_REPLY_SIZE_MISSMATCH";
|
||||||
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
const char *SUPV_REPLY_CRC_MISSMATCH_STRING = "SUPV_REPLY_CRC_MISSMATCH";
|
||||||
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
const char *SUPV_UPDATE_PROGRESS_STRING = "SUPV_UPDATE_PROGRESS";
|
||||||
|
const char *HDLC_FRAME_REMOVAL_ERROR_STRING = "HDLC_FRAME_REMOVAL_ERROR";
|
||||||
|
const char *HDLC_CRC_ERROR_STRING = "HDLC_CRC_ERROR";
|
||||||
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
const char *ALLOC_FAILURE_STRING = "ALLOC_FAILURE";
|
||||||
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
const char *REBOOT_SW_STRING = "REBOOT_SW";
|
||||||
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
const char *REBOOT_MECHANISM_TRIGGERED_STRING = "REBOOT_MECHANISM_TRIGGERED";
|
||||||
@ -487,13 +492,19 @@ const char *translateEvents(Event event) {
|
|||||||
case (12001):
|
case (12001):
|
||||||
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
return SUPV_MEMORY_READ_RPT_CRC_FAILURE_STRING;
|
||||||
case (12002):
|
case (12002):
|
||||||
return SUPV_ACK_FAILURE_STRING;
|
return SUPV_UNKNOWN_TM_STRING;
|
||||||
case (12003):
|
case (12003):
|
||||||
return SUPV_EXE_FAILURE_STRING;
|
return SUPV_UNINIMPLEMENTED_TM_STRING;
|
||||||
case (12004):
|
case (12004):
|
||||||
return SUPV_CRC_FAILURE_EVENT_STRING;
|
return SUPV_ACK_FAILURE_STRING;
|
||||||
case (12005):
|
case (12005):
|
||||||
return SUPV_MPSOC_SHUWDOWN_BUILD_FAILED_STRING;
|
return SUPV_EXE_FAILURE_STRING;
|
||||||
|
case (12006):
|
||||||
|
return SUPV_CRC_FAILURE_EVENT_STRING;
|
||||||
|
case (12007):
|
||||||
|
return SUPV_HELPER_EXECUTING_STRING;
|
||||||
|
case (12008):
|
||||||
|
return SUPV_MPSOC_SHUTDOWN_BUILD_FAILED_STRING;
|
||||||
case (12100):
|
case (12100):
|
||||||
return SANITIZATION_FAILED_STRING;
|
return SANITIZATION_FAILED_STRING;
|
||||||
case (12101):
|
case (12101):
|
||||||
@ -672,6 +683,10 @@ const char *translateEvents(Event event) {
|
|||||||
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
return SUPV_REPLY_CRC_MISSMATCH_STRING;
|
||||||
case (13630):
|
case (13630):
|
||||||
return SUPV_UPDATE_PROGRESS_STRING;
|
return SUPV_UPDATE_PROGRESS_STRING;
|
||||||
|
case (13631):
|
||||||
|
return HDLC_FRAME_REMOVAL_ERROR_STRING;
|
||||||
|
case (13632):
|
||||||
|
return HDLC_CRC_ERROR_STRING;
|
||||||
case (13700):
|
case (13700):
|
||||||
return ALLOC_FAILURE_STRING;
|
return ALLOC_FAILURE_STRING;
|
||||||
case (13701):
|
case (13701):
|
||||||
|
@ -45,10 +45,8 @@ enum sourceObjects : uint32_t {
|
|||||||
ARDUINO_COM_IF = 0x49000000,
|
ARDUINO_COM_IF = 0x49000000,
|
||||||
CSP_COM_IF = 0x49050001,
|
CSP_COM_IF = 0x49050001,
|
||||||
I2C_COM_IF = 0x49040002,
|
I2C_COM_IF = 0x49040002,
|
||||||
UART_COM_IF = 0x49030003,
|
|
||||||
SPI_MAIN_COM_IF = 0x49020004,
|
SPI_MAIN_COM_IF = 0x49020004,
|
||||||
GPIO_IF = 0x49010005,
|
GPIO_IF = 0x49010005,
|
||||||
SCEX_UART_READER = 0x49010006,
|
|
||||||
|
|
||||||
/* Custom device handler */
|
/* Custom device handler */
|
||||||
SPI_RW_COM_IF = 0x49020005,
|
SPI_RW_COM_IF = 0x49020005,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 148 translations.
|
* Contains 148 translations.
|
||||||
* Generated on: 2022-11-14 17:10:10
|
* Generated on: 2022-12-01 17:07:27
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include "InitMission.h"
|
#include "scheduling.h"
|
||||||
|
|
||||||
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
||||||
#include <fsfw/tasks/PeriodicTaskIF.h>
|
#include <fsfw/tasks/PeriodicTaskIF.h>
|
||||||
@ -6,10 +6,11 @@
|
|||||||
|
|
||||||
#include "OBSWConfig.h"
|
#include "OBSWConfig.h"
|
||||||
#include "ObjectFactory.h"
|
#include "ObjectFactory.h"
|
||||||
|
#include "eive/objects.h"
|
||||||
|
|
||||||
void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler,
|
void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler,
|
||||||
PeriodicTaskIF*& scexReaderTask) {
|
PeriodicTaskIF*& scexReaderTask) {
|
||||||
using namespace initmission;
|
using namespace scheduling;
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
#if OBSW_PRINT_MISSED_DEADLINES == 1
|
||||||
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
void (*missedDeadlineFunc)(void) = TaskFactory::printMissedDeadline;
|
||||||
@ -36,6 +37,17 @@ void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHa
|
|||||||
printAddObjectError("SCEX_DEV", objects::SCEX);
|
printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||||
}
|
}
|
||||||
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
|
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||||
|
}
|
||||||
|
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::SEND_READ);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||||
|
}
|
||||||
|
result = scexDevHandler->addComponent(objects::SCEX, DeviceHandlerIF::GET_READ);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
printAddObjectError("SCEX_DEV", objects::SCEX);
|
||||||
|
}
|
||||||
|
|
||||||
result = returnvalue::OK;
|
result = returnvalue::OK;
|
||||||
scexReaderTask = factory.createPeriodicTask(
|
scexReaderTask = factory.createPeriodicTask(
|
||||||
@ -49,17 +61,21 @@ void scheduling::schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHa
|
|||||||
void scheduling::addMpsocSupvHandlers(PeriodicTaskIF* plTask) {
|
void scheduling::addMpsocSupvHandlers(PeriodicTaskIF* plTask) {
|
||||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||||
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::SEND_READ);
|
|
||||||
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::GET_READ);
|
|
||||||
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::SEND_WRITE);
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::SEND_WRITE);
|
||||||
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::GET_WRITE);
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::GET_WRITE);
|
||||||
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::SEND_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::GET_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::SEND_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_SUPERVISOR_HANDLER, DeviceHandlerIF::GET_READ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if OBSW_ADD_PLOC_MPSOC == 1
|
#if OBSW_ADD_PLOC_MPSOC == 1
|
||||||
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::PERFORM_OPERATION);
|
||||||
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_READ);
|
|
||||||
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_READ);
|
|
||||||
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_WRITE);
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_WRITE);
|
||||||
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_WRITE);
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_WRITE);
|
||||||
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::SEND_READ);
|
||||||
|
plTask->addComponent(objects::PLOC_MPSOC_HANDLER, DeviceHandlerIF::GET_READ);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
|
||||||
namespace scheduling {
|
namespace scheduling {
|
||||||
void schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler,
|
void schedulingScex(TaskFactory& factory, PeriodicTaskIF*& scexDevHandler,
|
||||||
PeriodicTaskIF*& scexReaderTask);
|
PeriodicTaskIF*& scexReaderTask);
|
||||||
void addMpsocSupvHandlers(PeriodicTaskIF* task);
|
void addMpsocSupvHandlers(PeriodicTaskIF* task);
|
||||||
|
|
||||||
} // namespace scheduling
|
} // namespace scheduling
|
@ -5,7 +5,25 @@
|
|||||||
#include "mission/devices/torquer.h"
|
#include "mission/devices/torquer.h"
|
||||||
|
|
||||||
AcsController::AcsController(object_id_t objectId)
|
AcsController::AcsController(object_id_t objectId)
|
||||||
: ExtendedControllerBase(objectId), mgmData(this) {}
|
: ExtendedControllerBase(objectId),
|
||||||
|
sensorProcessing(&acsParameters),
|
||||||
|
navigation(&acsParameters),
|
||||||
|
actuatorCmd(&acsParameters),
|
||||||
|
guidance(&acsParameters),
|
||||||
|
safeCtrl(&acsParameters),
|
||||||
|
detumble(&acsParameters),
|
||||||
|
ptgCtrl(&acsParameters),
|
||||||
|
detumbleCounter{0},
|
||||||
|
mgmDataRaw(this),
|
||||||
|
mgmDataProcessed(this),
|
||||||
|
susDataRaw(this),
|
||||||
|
susDataProcessed(this),
|
||||||
|
gyrDataRaw(this),
|
||||||
|
gyrDataProcessed(this),
|
||||||
|
gpsDataProcessed(this),
|
||||||
|
mekfData(this),
|
||||||
|
ctrlValData(this),
|
||||||
|
actuatorCmdData(this) {}
|
||||||
|
|
||||||
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
|
ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -25,6 +43,21 @@ void AcsController::performControlOperation() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case InternalState::READY: {
|
case InternalState::READY: {
|
||||||
|
if (mode != MODE_OFF) {
|
||||||
|
switch (submode) {
|
||||||
|
case SUBMODE_SAFE:
|
||||||
|
performSafe();
|
||||||
|
break;
|
||||||
|
case SUBMODE_DETUMBLE:
|
||||||
|
performDetumble();
|
||||||
|
break;
|
||||||
|
case SUBMODE_PTG_TARGET:
|
||||||
|
case SUBMODE_PTG_NADIR:
|
||||||
|
case SUBMODE_PTG_INERTIAL:
|
||||||
|
performPointingCtrl();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -32,76 +65,569 @@ void AcsController::performControlOperation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// TODO: Calculate actuator output
|
PoolReadGuard pg(&mgmDataRaw);
|
||||||
// PoolReadGuard pg(&dipoleSet);
|
|
||||||
// MutexGuard mg(torquer::lazyLock());
|
|
||||||
// torquer::NEW_ACTUATION_FLAG = true;
|
|
||||||
// TODO: Insert correct values here
|
|
||||||
// dipoleSet.setDipoles(500, 500, 500, 150);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
PoolReadGuard pg(&mgmData);
|
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
copyMgmData();
|
copyMgmData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&susDataRaw);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
copySusData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&gyrDataRaw);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
copyGyrData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcsController::performSafe() {
|
||||||
|
// Concept: SAFE MODE WITH MEKF
|
||||||
|
// -do the sensor processing, maybe is does make more sense do call this class function in
|
||||||
|
// another place since we have to do it for every mode regardless of safe or not
|
||||||
|
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
|
|
||||||
|
timeval now;
|
||||||
|
Clock::getClock_timeval(&now);
|
||||||
|
|
||||||
|
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
|
||||||
|
ReturnValue_t validMekf;
|
||||||
|
navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&mekfData, &validMekf);
|
||||||
|
|
||||||
|
// Give desired satellite rate and sun direction to align
|
||||||
|
double satRateSafe[3] = {0, 0, 0}, sunTargetDir[3] = {0, 0, 0};
|
||||||
|
guidance.getTargetParamsSafe(sunTargetDir, satRateSafe);
|
||||||
|
// IF MEKF is working
|
||||||
|
double magMomMtq[3] = {0, 0, 0}, errAng = 0.0;
|
||||||
|
bool magMomMtqValid = false;
|
||||||
|
if (validMekf == returnvalue::OK) {
|
||||||
|
safeCtrl.safeMekf(now, mekfData.quatMekf.value, mekfData.quatMekf.isValid(),
|
||||||
|
mgmDataProcessed.magIgrfModel.value, mgmDataProcessed.magIgrfModel.isValid(),
|
||||||
|
susDataProcessed.sunIjkModel.value, susDataProcessed.isValid(),
|
||||||
|
mekfData.satRotRateMekf.value, mekfData.satRotRateMekf.isValid(),
|
||||||
|
sunTargetDir, satRateSafe, &errAng, magMomMtq, &magMomMtqValid);
|
||||||
|
} else {
|
||||||
|
safeCtrl.safeNoMekf(
|
||||||
|
now, susDataProcessed.susVecTot.value, susDataProcessed.susVecTot.isValid(),
|
||||||
|
susDataProcessed.susVecTotDerivative.value, susDataProcessed.susVecTotDerivative.isValid(),
|
||||||
|
mgmDataProcessed.mgmVecTot.value, mgmDataProcessed.mgmVecTot.isValid(),
|
||||||
|
mgmDataProcessed.mgmVecTotDerivative.value, mgmDataProcessed.mgmVecTotDerivative.isValid(),
|
||||||
|
sunTargetDir, satRateSafe, &errAng, magMomMtq, &magMomMtqValid);
|
||||||
|
}
|
||||||
|
|
||||||
|
double dipolCmdUnits[3] = {0, 0, 0};
|
||||||
|
actuatorCmd.cmdDipolMtq(magMomMtq, dipolCmdUnits);
|
||||||
|
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&ctrlValData);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
double zeroQuat[4] = {0, 0, 0, 0};
|
||||||
|
std::memcpy(ctrlValData.tgtQuat.value, zeroQuat, 4 * sizeof(double));
|
||||||
|
ctrlValData.tgtQuat.setValid(false);
|
||||||
|
std::memcpy(ctrlValData.errQuat.value, zeroQuat, 4 * sizeof(double));
|
||||||
|
ctrlValData.errQuat.setValid(false);
|
||||||
|
ctrlValData.errAng.value = errAng;
|
||||||
|
ctrlValData.errAng.setValid(true);
|
||||||
|
ctrlValData.setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Detumble check and switch
|
||||||
|
if (mekfData.satRotRateMekf.isValid() &&
|
||||||
|
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) >
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
||||||
|
detumbleCounter++;
|
||||||
|
} else if (gyrDataProcessed.gyrVecTot.isValid() &&
|
||||||
|
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) >
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
||||||
|
detumbleCounter++;
|
||||||
|
} else {
|
||||||
|
detumbleCounter = 0;
|
||||||
|
}
|
||||||
|
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
|
||||||
|
submode = SUBMODE_DETUMBLE;
|
||||||
|
detumbleCounter = 0;
|
||||||
|
triggerEvent(SAFE_RATE_VIOLATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&actuatorCmdData);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
int32_t zeroVec[4] = {0, 0, 0, 0};
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetTorque.value, zeroVec, 4 * sizeof(int32_t));
|
||||||
|
actuatorCmdData.rwTargetTorque.setValid(false);
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetSpeed.value, zeroVec, 4 * sizeof(int32_t));
|
||||||
|
actuatorCmdData.rwTargetSpeed.setValid(false);
|
||||||
|
std::memcpy(actuatorCmdData.mtqTargetDipole.value, dipolCmdUnits, 3 * sizeof(int16_t));
|
||||||
|
actuatorCmdData.mtqTargetDipole.setValid(true);
|
||||||
|
actuatorCmdData.setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// PoolReadGuard pg(&dipoleSet);
|
||||||
|
// MutexGuard mg(torquer::lazyLock());
|
||||||
|
// torquer::NEW_ACTUATION_FLAG = true;
|
||||||
|
// dipoleSet.setDipoles(cmdDipolUnits[0], cmdDipolUnits[1], cmdDipolUnits[2], torqueDuration);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcsController::performDetumble() {
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
|
|
||||||
|
timeval now;
|
||||||
|
Clock::getClock_timeval(&now);
|
||||||
|
|
||||||
|
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
|
||||||
|
ReturnValue_t validMekf;
|
||||||
|
navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&mekfData, &validMekf);
|
||||||
|
|
||||||
|
double magMomMtq[3] = {0, 0, 0};
|
||||||
|
detumble.bDotLaw(mgmDataProcessed.mgmVecTotDerivative.value,
|
||||||
|
mgmDataProcessed.mgmVecTotDerivative.isValid(), mgmDataProcessed.mgmVecTot.value,
|
||||||
|
mgmDataProcessed.mgmVecTot.isValid(), magMomMtq);
|
||||||
|
double dipolCmdUnits[3] = {0, 0, 0};
|
||||||
|
actuatorCmd.cmdDipolMtq(magMomMtq, dipolCmdUnits);
|
||||||
|
|
||||||
|
if (mekfData.satRotRateMekf.isValid() &&
|
||||||
|
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) <
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleEnd) {
|
||||||
|
detumbleCounter++;
|
||||||
|
} else if (gyrDataProcessed.gyrVecTot.isValid() &&
|
||||||
|
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) <
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleEnd) {
|
||||||
|
detumbleCounter++;
|
||||||
|
} else {
|
||||||
|
detumbleCounter = 0;
|
||||||
|
}
|
||||||
|
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
|
||||||
|
submode = SUBMODE_SAFE;
|
||||||
|
detumbleCounter = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int16_t cmdDipolUnitsInt[3] = {0, 0, 0};
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
cmdDipolUnitsInt[i] = std::round(dipolCmdUnits[i]);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&actuatorCmdData);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
int32_t zeroVec[4] = {0, 0, 0, 0};
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetTorque.value, zeroVec, 4 * sizeof(double));
|
||||||
|
actuatorCmdData.rwTargetTorque.setValid(false);
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetSpeed.value, zeroVec, 4 * sizeof(int32_t));
|
||||||
|
actuatorCmdData.rwTargetSpeed.setValid(false);
|
||||||
|
std::memcpy(actuatorCmdData.mtqTargetDipole.value, cmdDipolUnitsInt, 3 * sizeof(int16_t));
|
||||||
|
actuatorCmdData.mtqTargetDipole.setValid(true);
|
||||||
|
actuatorCmdData.setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// PoolReadGuard pg(&dipoleSet);
|
||||||
|
// MutexGuard mg(torquer::lazyLock());
|
||||||
|
// torquer::NEW_ACTUATION_FLAG = true;
|
||||||
|
// dipoleSet.setDipoles(cmdDipolUnitsInt[0], cmdDipolUnitsInt[1], cmdDipolUnitsInt[2],
|
||||||
|
// torqueDuration);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcsController::performPointingCtrl() {
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
|
|
||||||
|
timeval now;
|
||||||
|
Clock::getClock_timeval(&now);
|
||||||
|
|
||||||
|
sensorProcessing.process(now, &sensorValues, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&gyrDataProcessed, &gpsDataProcessed, &acsParameters);
|
||||||
|
ReturnValue_t validMekf;
|
||||||
|
navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed, &susDataProcessed,
|
||||||
|
&mekfData, &validMekf);
|
||||||
|
|
||||||
|
double targetQuat[4] = {0, 0, 0, 0}, refSatRate[3] = {0, 0, 0};
|
||||||
|
guidance.targetQuatPtg(&sensorValues, &mekfData, &susDataProcessed, now, targetQuat, refSatRate);
|
||||||
|
double quatErrorComplete[4] = {0, 0, 0, 0}, quatError[3] = {0, 0, 0},
|
||||||
|
deltaRate[3] = {0, 0, 0}; // ToDo: check if pointer needed
|
||||||
|
guidance.comparePtg(targetQuat, &mekfData, refSatRate, quatErrorComplete, quatError, deltaRate);
|
||||||
|
double rwPseudoInv[4][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv);
|
||||||
|
double torquePtgRws[4] = {0, 0, 0, 0}, mode = 0;
|
||||||
|
ptgCtrl.ptgGroundstation(mode, quatError, deltaRate, *rwPseudoInv, torquePtgRws);
|
||||||
|
double rwTrqNs[4] = {0, 0, 0, 0};
|
||||||
|
ptgCtrl.ptgNullspace(
|
||||||
|
&(sensorValues.rw1Set.currSpeed.value), &(sensorValues.rw2Set.currSpeed.value),
|
||||||
|
&(sensorValues.rw3Set.currSpeed.value), &(sensorValues.rw4Set.currSpeed.value), rwTrqNs);
|
||||||
|
double cmdSpeedRws[4] = {0, 0, 0, 0}; // Should be given to the actuator reaction wheel as input
|
||||||
|
actuatorCmd.cmdSpeedToRws(
|
||||||
|
&(sensorValues.rw1Set.currSpeed.value), &(sensorValues.rw2Set.currSpeed.value),
|
||||||
|
&(sensorValues.rw3Set.currSpeed.value), &(sensorValues.rw4Set.currSpeed.value), torquePtgRws,
|
||||||
|
rwTrqNs, cmdSpeedRws);
|
||||||
|
double mgtDpDes[3] = {0, 0, 0}, dipolUnits[3] = {0, 0, 0}; // Desaturation Dipol
|
||||||
|
ptgCtrl.ptgDesaturation(mgmDataProcessed.mgmVecTot.value, mgmDataProcessed.mgmVecTot.isValid(),
|
||||||
|
mekfData.satRotRateMekf.value, &(sensorValues.rw1Set.currSpeed.value),
|
||||||
|
&(sensorValues.rw2Set.currSpeed.value),
|
||||||
|
&(sensorValues.rw3Set.currSpeed.value),
|
||||||
|
&(sensorValues.rw4Set.currSpeed.value), mgtDpDes);
|
||||||
|
actuatorCmd.cmdDipolMtq(mgtDpDes, dipolUnits);
|
||||||
|
|
||||||
|
int16_t cmdDipolUnitsInt[3] = {0, 0, 0};
|
||||||
|
for (int i = 0; i < 3; ++i) {
|
||||||
|
cmdDipolUnitsInt[i] = std::round(dipolUnits[i]);
|
||||||
|
}
|
||||||
|
int32_t cmdRwSpeedInt[4] = {0, 0, 0, 0};
|
||||||
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
cmdRwSpeedInt[i] = std::round(cmdSpeedRws[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&actuatorCmdData);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetTorque.value, rwTrqNs, 4 * sizeof(double));
|
||||||
|
std::memcpy(actuatorCmdData.rwTargetSpeed.value, cmdRwSpeedInt, 4 * sizeof(int32_t));
|
||||||
|
std::memcpy(actuatorCmdData.mtqTargetDipole.value, cmdDipolUnitsInt, 3 * sizeof(int16_t));
|
||||||
|
actuatorCmdData.setValidity(true, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// PoolReadGuard pg(&dipoleSet);
|
||||||
|
// MutexGuard mg(torquer::lazyLock());
|
||||||
|
// torquer::NEW_ACTUATION_FLAG = true;
|
||||||
|
// dipoleSet.setDipoles(cmdDipolUnitsInt[0], cmdDipolUnitsInt[1], cmdDipolUnitsInt[2],
|
||||||
|
// torqueDuration);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t AcsController::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
LocalDataPoolManager &poolManager) {
|
LocalDataPoolManager &poolManager) {
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_LIS3_UT, &mgm0PoolVec);
|
// MGM Raw
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_RM3100_UT, &mgm1PoolVec);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_LIS3_UT, &mgm0VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_2_LIS3_UT, &mgm2PoolVec);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_RM3100_UT, &mgm1VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_RM3100_UT, &mgm3PoolVec);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_2_LIS3_UT, &mgm2VecRaw);
|
||||||
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_NT, &imtqMgmPoolVec);
|
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_ACT_STATUS, &imtqCalActStatus);
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_IMTQ_CAL_ACT_STATUS, &imtqCalActStatus);
|
||||||
poolManager.subscribeForRegularPeriodicPacket({mgmData.getSid(), false, 5.0});
|
poolManager.subscribeForRegularPeriodicPacket({mgmDataRaw.getSid(), false, 5.0});
|
||||||
|
// MGM Processed
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_0_VEC, &mgm0VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_1_VEC, &mgm1VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_2_VEC, &mgm2VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_3_VEC, &mgm3VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_4_VEC, &mgm4VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT, &mgmVecTot);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MGM_VEC_TOT_DERIVATIVE, &mgmVecTotDer);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MAG_IGRF_MODEL, &magIgrf);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({mgmDataProcessed.getSid(), false, 5.0});
|
||||||
|
// SUS Raw
|
||||||
|
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_2_N_LOC_XFYBZB_PT_YB, &sus2ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_3_N_LOC_XFYBZF_PT_YF, &sus3ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_4_N_LOC_XMYFZF_PT_ZF, &sus4ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_5_N_LOC_XFYMZB_PT_ZB, &sus5ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_6_R_LOC_XFYBZM_PT_XF, &sus6ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_7_R_LOC_XBYBZM_PT_XB, &sus7ValRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_8_R_LOC_XBYBZB_PT_YB, &sus8ValRaw);
|
||||||
|
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_11_R_LOC_XBYMZB_PT_ZB, &sus11ValRaw);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({susDataRaw.getSid(), false, 5.0});
|
||||||
|
// SUS Processed
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_0_VEC, &sus0VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_1_VEC, &sus1VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_2_VEC, &sus2VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_3_VEC, &sus3VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_4_VEC, &sus4VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_5_VEC, &sus5VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_6_VEC, &sus6VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_7_VEC, &sus7VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_8_VEC, &sus8VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_9_VEC, &sus9VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_10_VEC, &sus10VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_11_VEC, &sus11VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT, &susVecTot);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUS_VEC_TOT_DERIVATIVE, &susVecTotDer);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SUN_IJK_MODEL, &sunIjk);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({susDataProcessed.getSid(), false, 5.0});
|
||||||
|
// GYR Raw
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_ADIS, &gyr0VecRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_L3, &gyr1VecRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_ADIS, &gyr2VecRaw);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_L3, &gyr3VecRaw);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({gyrDataRaw.getSid(), false, 5.0});
|
||||||
|
// GYR Processed
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_0_VEC, &gyr0VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_1_VEC, &gyr1VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_2_VEC, &gyr2VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_3_VEC, &gyr3VecProc);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GYR_VEC_TOT, &gyrVecTot);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({gyrDataProcessed.getSid(), false, 5.0});
|
||||||
|
// GPS Processed
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GC_LATITUDE, &gcLatitude);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::GD_LONGITUDE, &gdLongitude);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({gpsDataProcessed.getSid(), false, 5.0});
|
||||||
|
// MEKF
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::QUAT_MEKF, &quatMekf);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::SAT_ROT_RATE_MEKF, &satRotRateMekf);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({mekfData.getSid(), false, 5.0});
|
||||||
|
// Ctrl Values
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::TGT_QUAT, &tgtQuat);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_QUAT, &errQuat);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::ERROR_ANG, &errAng);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({ctrlValData.getSid(), false, 5.0});
|
||||||
|
// Actuator CMD
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_TORQUE, &rwTargetTorque);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::RW_TARGET_SPEED, &rwTargetSpeed);
|
||||||
|
localDataPoolMap.emplace(acsctrl::PoolIds::MTQ_TARGET_DIPOLE, &mtqTargetDipole);
|
||||||
|
poolManager.subscribeForRegularPeriodicPacket({actuatorCmdData.getSid(), false, 5.0});
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) {
|
LocalPoolDataSetBase *AcsController::getDataSetHandle(sid_t sid) {
|
||||||
if (sid == mgmData.getSid()) {
|
switch (sid.ownerSetId) {
|
||||||
return &mgmData;
|
case acsctrl::MGM_SENSOR_DATA:
|
||||||
|
return &mgmDataRaw;
|
||||||
|
case acsctrl::MGM_PROCESSED_DATA:
|
||||||
|
return &mgmDataProcessed;
|
||||||
|
case acsctrl::SUS_SENSOR_DATA:
|
||||||
|
return &susDataRaw;
|
||||||
|
case acsctrl::SUS_PROCESSED_DATA:
|
||||||
|
return &susDataProcessed;
|
||||||
|
case acsctrl::GYR_SENSOR_DATA:
|
||||||
|
return &gyrDataRaw;
|
||||||
|
case acsctrl::GYR_PROCESSED_DATA:
|
||||||
|
return &gyrDataProcessed;
|
||||||
|
case acsctrl::GPS_PROCESSED_DATA:
|
||||||
|
return &gpsDataProcessed;
|
||||||
|
case acsctrl::MEKF_DATA:
|
||||||
|
return &mekfData;
|
||||||
|
case acsctrl::CTRL_VAL_DATA:
|
||||||
|
return &ctrlValData;
|
||||||
|
case acsctrl::ACTUATOR_CMD_DATA:
|
||||||
|
return &actuatorCmdData;
|
||||||
|
default:
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
|
ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
uint32_t *msToReachTheMode) {
|
uint32_t *msToReachTheMode) {
|
||||||
return returnvalue::OK;
|
if (mode == MODE_OFF) {
|
||||||
|
if (submode == SUBMODE_NONE) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
} else {
|
||||||
|
return INVALID_SUBMODE;
|
||||||
|
}
|
||||||
|
} else if ((mode == MODE_ON) || (mode == MODE_NORMAL)) {
|
||||||
|
if ((submode > 6) || (submode < 2)) {
|
||||||
|
return INVALID_SUBMODE;
|
||||||
|
} else {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return INVALID_MODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AcsController::modeChanged(Mode_t mode, Submode_t submode) {}
|
||||||
|
|
||||||
|
void AcsController::announceMode(bool recursive) {}
|
||||||
|
|
||||||
void AcsController::copyMgmData() {
|
void AcsController::copyMgmData() {
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&mgm0Lis3Set);
|
PoolReadGuard pg(&sensorValues.mgm0Lis3Set);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(mgmData.mgm0Lis3.value, mgm0Lis3Set.fieldStrengths.value, 3 * sizeof(float));
|
std::memcpy(mgmDataRaw.mgm0Lis3.value, sensorValues.mgm0Lis3Set.fieldStrengths.value,
|
||||||
|
3 * sizeof(float));
|
||||||
|
mgmDataRaw.mgm0Lis3.setValid(sensorValues.mgm0Lis3Set.fieldStrengths.isValid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&mgm1Rm3100Set);
|
PoolReadGuard pg(&sensorValues.mgm1Rm3100Set);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(mgmData.mgm1Rm3100.value, mgm1Rm3100Set.fieldStrengths.value, 3 * sizeof(float));
|
std::memcpy(mgmDataRaw.mgm1Rm3100.value, sensorValues.mgm1Rm3100Set.fieldStrengths.value,
|
||||||
|
3 * sizeof(float));
|
||||||
|
mgmDataRaw.mgm1Rm3100.setValid(sensorValues.mgm1Rm3100Set.fieldStrengths.isValid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&mgm2Lis3Set);
|
PoolReadGuard pg(&sensorValues.mgm2Lis3Set);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(mgmData.mgm2Lis3.value, mgm2Lis3Set.fieldStrengths.value, 3 * sizeof(float));
|
std::memcpy(mgmDataRaw.mgm2Lis3.value, sensorValues.mgm2Lis3Set.fieldStrengths.value,
|
||||||
|
3 * sizeof(float));
|
||||||
|
mgmDataRaw.mgm2Lis3.setValid(sensorValues.mgm2Lis3Set.fieldStrengths.isValid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&mgm3Rm3100Set);
|
PoolReadGuard pg(&sensorValues.mgm3Rm3100Set);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(mgmData.mgm3Rm3100.value, mgm3Rm3100Set.fieldStrengths.value, 3 * sizeof(float));
|
std::memcpy(mgmDataRaw.mgm3Rm3100.value, sensorValues.mgm3Rm3100Set.fieldStrengths.value,
|
||||||
|
3 + sizeof(float));
|
||||||
|
mgmDataRaw.mgm3Rm3100.setValid(sensorValues.mgm3Rm3100Set.fieldStrengths.isValid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
PoolReadGuard pg(&imtqMgmSet);
|
PoolReadGuard pg(&sensorValues.imtqMgmSet);
|
||||||
if (pg.getReadResult() == returnvalue::OK) {
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
std::memcpy(mgmData.imtqRaw.value, imtqMgmSet.mtmRawNt.value, 3 * sizeof(float));
|
std::memcpy(mgmDataRaw.imtqRaw.value, sensorValues.imtqMgmSet.mtmRawNt.value,
|
||||||
mgmData.actuationCalStatus.value = imtqMgmSet.coilActuationStatus.value;
|
3 * sizeof(float));
|
||||||
|
mgmDataRaw.imtqRaw.setValid(sensorValues.imtqMgmSet.mtmRawNt.isValid());
|
||||||
|
mgmDataRaw.actuationCalStatus.value = sensorValues.imtqMgmSet.coilActuationStatus.value;
|
||||||
|
mgmDataRaw.actuationCalStatus.setValid(sensorValues.imtqMgmSet.coilActuationStatus.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcsController::copySusData() {
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[0]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus0.value, sensorValues.susSets[0].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus0.setValid(sensorValues.susSets[0].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[1]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus1.value, sensorValues.susSets[1].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus1.setValid(sensorValues.susSets[1].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[2]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus2.value, sensorValues.susSets[2].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus2.setValid(sensorValues.susSets[2].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[3]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus3.value, sensorValues.susSets[3].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus3.setValid(sensorValues.susSets[3].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[4]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus4.value, sensorValues.susSets[4].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus4.setValid(sensorValues.susSets[4].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[5]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus5.value, sensorValues.susSets[5].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus5.setValid(sensorValues.susSets[5].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[6]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus6.value, sensorValues.susSets[6].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus6.setValid(sensorValues.susSets[6].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[7]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus7.value, sensorValues.susSets[7].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus7.setValid(sensorValues.susSets[7].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[8]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus8.value, sensorValues.susSets[8].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus8.setValid(sensorValues.susSets[8].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[9]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus9.value, sensorValues.susSets[9].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus9.setValid(sensorValues.susSets[9].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[10]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus10.value, sensorValues.susSets[10].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus10.setValid(sensorValues.susSets[10].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.susSets[11]);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataRaw.sus11.value, sensorValues.susSets[11].channels.value,
|
||||||
|
6 * sizeof(uint16_t));
|
||||||
|
susDataRaw.sus11.setValid(sensorValues.susSets[11].channels.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void AcsController::copyGyrData() {
|
||||||
|
ACS::SensorValues sensorValues;
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.gyr0AdisSet);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
gyrDataRaw.gyr0Adis.value[0] = sensorValues.gyr0AdisSet.angVelocX.value;
|
||||||
|
gyrDataRaw.gyr0Adis.value[1] = sensorValues.gyr0AdisSet.angVelocY.value;
|
||||||
|
gyrDataRaw.gyr0Adis.value[2] = sensorValues.gyr0AdisSet.angVelocZ.value;
|
||||||
|
gyrDataRaw.gyr0Adis.setValid(sensorValues.gyr0AdisSet.angVelocX.isValid() &&
|
||||||
|
sensorValues.gyr0AdisSet.angVelocY.isValid() &&
|
||||||
|
sensorValues.gyr0AdisSet.angVelocZ.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.gyr1L3gSet);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
gyrDataRaw.gyr1L3.value[0] = sensorValues.gyr1L3gSet.angVelocX.value;
|
||||||
|
gyrDataRaw.gyr1L3.value[1] = sensorValues.gyr1L3gSet.angVelocY.value;
|
||||||
|
gyrDataRaw.gyr1L3.value[2] = sensorValues.gyr1L3gSet.angVelocZ.value;
|
||||||
|
gyrDataRaw.gyr1L3.setValid(sensorValues.gyr1L3gSet.angVelocX.isValid() &&
|
||||||
|
sensorValues.gyr1L3gSet.angVelocY.isValid() &&
|
||||||
|
sensorValues.gyr1L3gSet.angVelocZ.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.gyr2AdisSet);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
gyrDataRaw.gyr2Adis.value[0] = sensorValues.gyr2AdisSet.angVelocX.value;
|
||||||
|
gyrDataRaw.gyr2Adis.value[1] = sensorValues.gyr2AdisSet.angVelocY.value;
|
||||||
|
gyrDataRaw.gyr2Adis.value[2] = sensorValues.gyr2AdisSet.angVelocZ.value;
|
||||||
|
gyrDataRaw.gyr2Adis.setValid(sensorValues.gyr2AdisSet.angVelocX.isValid() &&
|
||||||
|
sensorValues.gyr2AdisSet.angVelocY.isValid() &&
|
||||||
|
sensorValues.gyr2AdisSet.angVelocZ.isValid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(&sensorValues.gyr3L3gSet);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
gyrDataRaw.gyr3L3.value[0] = sensorValues.gyr3L3gSet.angVelocX.value;
|
||||||
|
gyrDataRaw.gyr3L3.value[1] = sensorValues.gyr3L3gSet.angVelocY.value;
|
||||||
|
gyrDataRaw.gyr3L3.value[2] = sensorValues.gyr3L3gSet.angVelocZ.value;
|
||||||
|
gyrDataRaw.gyr3L3.setValid(sensorValues.gyr3L3gSet.angVelocX.isValid() &&
|
||||||
|
sensorValues.gyr3L3gSet.angVelocY.isValid() &&
|
||||||
|
sensorValues.gyr3L3gSet.angVelocZ.isValid());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,15 @@
|
|||||||
#define MISSION_CONTROLLER_ACSCONTROLLER_H_
|
#define MISSION_CONTROLLER_ACSCONTROLLER_H_
|
||||||
|
|
||||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
|
||||||
|
#include "acs/ActuatorCmd.h"
|
||||||
|
#include "acs/Guidance.h"
|
||||||
|
#include "acs/Navigation.h"
|
||||||
|
#include "acs/SensorProcessing.h"
|
||||||
|
#include "acs/control/Detumble.h"
|
||||||
|
#include "acs/control/PtgCtrl.h"
|
||||||
|
#include "acs/control/SafeCtrl.h"
|
||||||
#include "controllerdefinitions/AcsCtrlDefinitions.h"
|
#include "controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
#include "eive/objects.h"
|
#include "eive/objects.h"
|
||||||
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
||||||
@ -16,10 +24,38 @@ class AcsController : public ExtendedControllerBase {
|
|||||||
|
|
||||||
AcsController(object_id_t objectId);
|
AcsController(object_id_t objectId);
|
||||||
|
|
||||||
|
static const Submode_t SUBMODE_SAFE = 2;
|
||||||
|
static const Submode_t SUBMODE_DETUMBLE = 3;
|
||||||
|
static const Submode_t SUBMODE_PTG_TARGET = 4;
|
||||||
|
static const Submode_t SUBMODE_PTG_NADIR = 5;
|
||||||
|
static const Submode_t SUBMODE_PTG_INERTIAL = 6;
|
||||||
|
|
||||||
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM;
|
||||||
|
static const Event SAFE_RATE_VIOLATION =
|
||||||
|
MAKE_EVENT(0, severity::MEDIUM); //!< The limits for the rotation in safe mode were violated.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void performSafe();
|
||||||
|
void performDetumble();
|
||||||
|
void performPointingCtrl();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
SensorProcessing sensorProcessing;
|
||||||
|
Navigation navigation;
|
||||||
|
ActuatorCmd actuatorCmd;
|
||||||
|
Guidance guidance;
|
||||||
|
|
||||||
|
SafeCtrl safeCtrl;
|
||||||
|
Detumble detumble;
|
||||||
|
PtgCtrl ptgCtrl;
|
||||||
|
|
||||||
|
uint8_t detumbleCounter;
|
||||||
|
|
||||||
enum class InternalState { STARTUP, INITIAL_DELAY, READY };
|
enum class InternalState { STARTUP, INITIAL_DELAY, READY };
|
||||||
|
|
||||||
InternalState internalState = InternalState::STARTUP;
|
InternalState internalState = InternalState::STARTUP;
|
||||||
|
|
||||||
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
|
||||||
void performControlOperation() override;
|
void performControlOperation() override;
|
||||||
|
|
||||||
@ -30,45 +66,100 @@ class AcsController : public ExtendedControllerBase {
|
|||||||
// Mode abstract functions
|
// Mode abstract functions
|
||||||
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
|
||||||
uint32_t* msToReachTheMode) override;
|
uint32_t* msToReachTheMode) override;
|
||||||
|
void modeChanged(Mode_t mode, Submode_t submode);
|
||||||
|
void announceMode(bool recursive);
|
||||||
|
|
||||||
// MGMs
|
/* ACS Datasets */
|
||||||
acsctrl::MgmDataRaw mgmData;
|
|
||||||
|
|
||||||
MGMLIS3MDL::MgmPrimaryDataset mgm0Lis3Set =
|
|
||||||
MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_0_LIS3_HANDLER);
|
|
||||||
RM3100::Rm3100PrimaryDataset mgm1Rm3100Set =
|
|
||||||
RM3100::Rm3100PrimaryDataset(objects::MGM_1_RM3100_HANDLER);
|
|
||||||
MGMLIS3MDL::MgmPrimaryDataset mgm2Lis3Set =
|
|
||||||
MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_2_LIS3_HANDLER);
|
|
||||||
RM3100::Rm3100PrimaryDataset mgm3Rm3100Set =
|
|
||||||
RM3100::Rm3100PrimaryDataset(objects::MGM_3_RM3100_HANDLER);
|
|
||||||
IMTQ::RawMtmMeasurementSet imtqMgmSet = IMTQ::RawMtmMeasurementSet(objects::IMTQ_HANDLER);
|
|
||||||
IMTQ::DipoleActuationSet dipoleSet = IMTQ::DipoleActuationSet(objects::IMTQ_HANDLER);
|
IMTQ::DipoleActuationSet dipoleSet = IMTQ::DipoleActuationSet(objects::IMTQ_HANDLER);
|
||||||
|
// MGMs
|
||||||
PoolEntry<float> mgm0PoolVec = PoolEntry<float>(3);
|
acsctrl::MgmDataRaw mgmDataRaw;
|
||||||
PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3);
|
PoolEntry<float> mgm0VecRaw = PoolEntry<float>(3);
|
||||||
PoolEntry<float> mgm2PoolVec = PoolEntry<float>(3);
|
PoolEntry<float> mgm1VecRaw = PoolEntry<float>(3);
|
||||||
PoolEntry<float> mgm3PoolVec = PoolEntry<float>(3);
|
PoolEntry<float> mgm2VecRaw = PoolEntry<float>(3);
|
||||||
PoolEntry<float> imtqMgmPoolVec = PoolEntry<float>(3);
|
PoolEntry<float> mgm3VecRaw = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> imtqMgmVecRaw = PoolEntry<float>(3);
|
||||||
PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>();
|
PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>();
|
||||||
|
|
||||||
void copyMgmData();
|
void copyMgmData();
|
||||||
|
|
||||||
// Sun Sensors
|
acsctrl::MgmDataProcessed mgmDataProcessed;
|
||||||
std::array<SUS::SusDataset, 12> susSets{
|
PoolEntry<float> mgm0VecProc = PoolEntry<float>(3);
|
||||||
SUS::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
PoolEntry<float> mgm1VecProc = PoolEntry<float>(3);
|
||||||
SUS::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
PoolEntry<float> mgm2VecProc = PoolEntry<float>(3);
|
||||||
SUS::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
PoolEntry<float> mgm3VecProc = PoolEntry<float>(3);
|
||||||
SUS::SusDataset(objects::SUS_3_N_LOC_XFYBZF_PT_YF),
|
PoolEntry<float> mgm4VecProc = PoolEntry<float>(3);
|
||||||
SUS::SusDataset(objects::SUS_4_N_LOC_XMYFZF_PT_ZF),
|
PoolEntry<double> mgmVecTot = PoolEntry<double>(3);
|
||||||
SUS::SusDataset(objects::SUS_5_N_LOC_XFYMZB_PT_ZB),
|
PoolEntry<double> mgmVecTotDer = PoolEntry<double>(3);
|
||||||
SUS::SusDataset(objects::SUS_6_R_LOC_XFYBZM_PT_XF),
|
PoolEntry<double> magIgrf = PoolEntry<double>(3);
|
||||||
SUS::SusDataset(objects::SUS_7_R_LOC_XBYBZM_PT_XB),
|
|
||||||
SUS::SusDataset(objects::SUS_8_R_LOC_XBYBZB_PT_YB),
|
// SUSs
|
||||||
SUS::SusDataset(objects::SUS_9_R_LOC_XBYBZB_PT_YF),
|
acsctrl::SusDataRaw susDataRaw;
|
||||||
SUS::SusDataset(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
|
PoolEntry<uint16_t> sus0ValRaw = PoolEntry<uint16_t>(6);
|
||||||
SUS::SusDataset(objects::SUS_11_R_LOC_XBYMZB_PT_ZB),
|
PoolEntry<uint16_t> sus1ValRaw = PoolEntry<uint16_t>(6);
|
||||||
};
|
PoolEntry<uint16_t> sus2ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus3ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus4ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus5ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus6ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus7ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus8ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus9ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus10ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
PoolEntry<uint16_t> sus11ValRaw = PoolEntry<uint16_t>(6);
|
||||||
|
void copySusData();
|
||||||
|
|
||||||
|
acsctrl::SusDataProcessed susDataProcessed;
|
||||||
|
PoolEntry<float> sus0VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus1VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus2VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus3VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus4VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus5VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus6VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus7VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus8VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus9VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus10VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<float> sus11VecProc = PoolEntry<float>(3);
|
||||||
|
PoolEntry<double> susVecTot = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> susVecTotDer = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> sunIjk = PoolEntry<double>(3);
|
||||||
|
|
||||||
|
// GYRs
|
||||||
|
acsctrl::GyrDataRaw gyrDataRaw;
|
||||||
|
PoolEntry<double> gyr0VecRaw = PoolEntry<double>(3);
|
||||||
|
PoolEntry<float> gyr1VecRaw = PoolEntry<float>(3);
|
||||||
|
PoolEntry<double> gyr2VecRaw = PoolEntry<double>(3);
|
||||||
|
PoolEntry<float> gyr3VecRaw = PoolEntry<float>(3);
|
||||||
|
void copyGyrData();
|
||||||
|
|
||||||
|
acsctrl::GyrDataProcessed gyrDataProcessed;
|
||||||
|
PoolEntry<double> gyr0VecProc = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> gyr1VecProc = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> gyr2VecProc = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> gyr3VecProc = PoolEntry<double>(3);
|
||||||
|
PoolEntry<double> gyrVecTot = PoolEntry<double>(3);
|
||||||
|
|
||||||
|
// GPS
|
||||||
|
acsctrl::GpsDataProcessed gpsDataProcessed;
|
||||||
|
PoolEntry<double> gcLatitude = PoolEntry<double>();
|
||||||
|
PoolEntry<double> gdLongitude = PoolEntry<double>();
|
||||||
|
|
||||||
|
// MEKF
|
||||||
|
acsctrl::MekfData mekfData;
|
||||||
|
PoolEntry<double> quatMekf = PoolEntry<double>(4);
|
||||||
|
PoolEntry<double> satRotRateMekf = PoolEntry<double>(3);
|
||||||
|
|
||||||
|
// Ctrl Values
|
||||||
|
acsctrl::CtrlValData ctrlValData;
|
||||||
|
PoolEntry<double> tgtQuat = PoolEntry<double>(4);
|
||||||
|
PoolEntry<double> errQuat = PoolEntry<double>(4);
|
||||||
|
PoolEntry<double> errAng = PoolEntry<double>();
|
||||||
|
|
||||||
|
// Actuator CMD
|
||||||
|
acsctrl::ActuatorCmdData actuatorCmdData;
|
||||||
|
PoolEntry<double> rwTargetTorque = PoolEntry<double>(4);
|
||||||
|
PoolEntry<int32_t> rwTargetSpeed = PoolEntry<int32_t>(4);
|
||||||
|
PoolEntry<int16_t> mtqTargetDipole = PoolEntry<int16_t>(3);
|
||||||
|
|
||||||
// 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);
|
||||||
|
@ -2,3 +2,5 @@ if(TGT_BSP MATCHES "arm/q7s" OR TGT_BSP MATCHES "")
|
|||||||
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp
|
target_sources(${LIB_EIVE_MISSION} PRIVATE ThermalController.cpp
|
||||||
AcsController.cpp)
|
AcsController.cpp)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(acs)
|
||||||
|
544
mission/controller/acs/AcsParameters.cpp
Normal file
544
mission/controller/acs/AcsParameters.cpp
Normal file
@ -0,0 +1,544 @@
|
|||||||
|
#include "AcsParameters.h"
|
||||||
|
|
||||||
|
#include <fsfw/src/fsfw/globalfunctions/constants.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
AcsParameters::AcsParameters(){}; //(uint8_t parameterModuleId) :
|
||||||
|
// parameterModuleId(parameterModuleId) {}
|
||||||
|
|
||||||
|
AcsParameters::~AcsParameters() {}
|
||||||
|
|
||||||
|
/*ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint16_t parameterId,
|
||||||
|
ParameterWrapper* parameterWrapper,
|
||||||
|
const ParameterWrapper* newValues,
|
||||||
|
uint16_t startAtIndex) {
|
||||||
|
if (domainId == parameterModuleId) {
|
||||||
|
switch (parameterId >> 8) {
|
||||||
|
case 0x0: // direct members
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x1: // OnBoardParams
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(onBoardParams.sampleTime);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x2: // InertiaEIVE
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(inertiaEIVE.inertiaMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(inertiaEIVE.inertiaMatrixInverse);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x3: // MgmHandlingParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm0orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm1orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm2orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm3orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm4orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm0hardIronOffset);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm1hardIronOffset);
|
||||||
|
break;
|
||||||
|
case 0x7:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm2hardIronOffset);
|
||||||
|
break;
|
||||||
|
case 0x8:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm3hardIronOffset);
|
||||||
|
break;
|
||||||
|
case 0x9:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm4hardIronOffset);
|
||||||
|
break;
|
||||||
|
case 0xA:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm0softIronInverse);
|
||||||
|
break;
|
||||||
|
case 0xB:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm1softIronInverse);
|
||||||
|
break;
|
||||||
|
case 0xC:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm2softIronInverse);
|
||||||
|
break;
|
||||||
|
case 0xD:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm3softIronInverse);
|
||||||
|
break;
|
||||||
|
case 0xE:
|
||||||
|
parameterWrapper->set(mgmHandlingParameters.mgm4softIronInverse);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 0x4: // SusHandlingParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus0orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus1orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus2orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus3orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus4orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus5orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus6orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x7:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus7orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x8:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus8orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x9:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus9orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0xA:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus10orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0xB:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus11orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0xC:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus0coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0xD:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus0coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0xE:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus1coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0xF:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus1coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x10:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus2coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x11:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus2coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x12:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus3coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x13:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus3coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x14:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus4coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x15:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus4coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x16:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus5coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x17:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus5coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x18:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus6coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x19:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus6coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x1A:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus7coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x1B:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus7coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x1C:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus8coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x1D:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus8coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x1E:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus9coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x1F:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus9coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x20:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus10coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x21:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus10coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x22:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus11coeffAlpha);
|
||||||
|
break;
|
||||||
|
case 0x23:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sus11coeffBeta);
|
||||||
|
break;
|
||||||
|
case 0x24:
|
||||||
|
parameterWrapper->set(susHandlingParameters.filterAlpha);
|
||||||
|
break;
|
||||||
|
case 0x25:
|
||||||
|
parameterWrapper->set(susHandlingParameters.sunThresh);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x5): // GyrHandlingParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(gyrHandlingParameters.gyr0orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(gyrHandlingParameters.gyr1orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(gyrHandlingParameters.gyr2orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(gyrHandlingParameters.gyr3orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(gyrHandlingParameters.gyrFusionWeight);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x6): // RwHandlingParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.rw0orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.rw1orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.rw2orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.rw3orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.inertiaWheel);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(rwHandlingParameters.maxTrq);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x7): // RwMatrices
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(rwMatrices.alignmentMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(rwMatrices.pseudoInverse);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(rwMatrices.without0);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(rwMatrices.without1);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(rwMatrices.without2);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(rwMatrices.without3);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x8): // SafeModeControllerParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.k_rate_mekf);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.k_align_mekf);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.k_rate_no_mekf);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.k_align_no_mekf);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.sunMagAngleMin);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.sunTargetDir);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(safeModeControllerParameters.satRateRef);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x9): // DetumbleCtrlParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(detumbleCtrlParameters.gainD);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xA): // PointingModeControllerParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.updtFlag);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.A_rw);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.refDirection);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.refRotRate);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.quatRef);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.avoidBlindStr);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.blindAvoidStart);
|
||||||
|
break;
|
||||||
|
case 0x7:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.blindAvoidStop);
|
||||||
|
break;
|
||||||
|
case 0x8:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.blindRotRate);
|
||||||
|
break;
|
||||||
|
case 0x9:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.zeta);
|
||||||
|
break;
|
||||||
|
case 0xA:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.zetaLow);
|
||||||
|
break;
|
||||||
|
case 0xB:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.om);
|
||||||
|
break;
|
||||||
|
case 0xC:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.omLow);
|
||||||
|
break;
|
||||||
|
case 0xD:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.omMax);
|
||||||
|
break;
|
||||||
|
case 0xE:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.qiMin);
|
||||||
|
break;
|
||||||
|
case 0xF:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.gainNullspace);
|
||||||
|
break;
|
||||||
|
case 0x10:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.desatMomentumRef);
|
||||||
|
break;
|
||||||
|
case 0x11:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.deSatGainFactor);
|
||||||
|
break;
|
||||||
|
case 0x12:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.desatOn);
|
||||||
|
break;
|
||||||
|
case 0x13:
|
||||||
|
parameterWrapper->set(targetModeControllerParameters.omegaEarth);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xB): // StrParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(strParameters.exclusionAngle);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(strParameters.boresightAxis);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xC): // GpsParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xD): // GroundStationParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(groundStationParameters.latitudeGs);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(groundStationParameters.longitudeGs);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(groundStationParameters.altitudeGs);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(groundStationParameters.earthRadiusEquat);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(groundStationParameters.earthRadiusPolar);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xE): // SunModelParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(sunModelParameters.useSunModel);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(sunModelParameters.domega);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(sunModelParameters.omega_0);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(sunModelParameters.m_0);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(sunModelParameters.dm);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(sunModelParameters.e);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(sunModelParameters.e1);
|
||||||
|
break;
|
||||||
|
case 0x7:
|
||||||
|
parameterWrapper->set(sunModelParameters.p1);
|
||||||
|
break;
|
||||||
|
case 0x8:
|
||||||
|
parameterWrapper->set(sunModelParameters.p2);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0xF): // KalmanFilterParameters
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.activateKalmanFilter);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.requestResetFlag);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(
|
||||||
|
kalmanFilterParameters.maxToleratedTimeBetweenKalmanFilterExecutionSteps);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.processNoiseOmega);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.processNoiseQuaternion);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseSTR);
|
||||||
|
break;
|
||||||
|
case 0x6:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseSS);
|
||||||
|
break;
|
||||||
|
case 0x7:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseMAG);
|
||||||
|
break;
|
||||||
|
case 0x8:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseGYR);
|
||||||
|
break;
|
||||||
|
case 0x9:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseArwGYR);
|
||||||
|
break;
|
||||||
|
case 0xA:
|
||||||
|
parameterWrapper->set(kalmanFilterParameters.sensorNoiseBsGYR);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x10): // MagnetorquesParameter
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.mtq0orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.mtq1orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.mtq2orientationMatrix);
|
||||||
|
break;
|
||||||
|
case 0x3:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.alignmentMatrixMtq);
|
||||||
|
break;
|
||||||
|
case 0x4:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.inverseAlignment);
|
||||||
|
break;
|
||||||
|
case 0x5:
|
||||||
|
parameterWrapper->set(magnetorquesParameter.DipolMax);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case (0x11): // DetumbleParameter
|
||||||
|
switch (parameterId & 0xFF) {
|
||||||
|
case 0x0:
|
||||||
|
parameterWrapper->set(detumbleParameter.detumblecounter);
|
||||||
|
break;
|
||||||
|
case 0x1:
|
||||||
|
parameterWrapper->set(detumbleParameter.omegaDetumbleStart);
|
||||||
|
break;
|
||||||
|
case 0x2:
|
||||||
|
parameterWrapper->set(detumbleParameter.omegaDetumbleEnd);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return INVALID_IDENTIFIER_ID;
|
||||||
|
}
|
||||||
|
return returnvalue::OK;
|
||||||
|
} else {
|
||||||
|
return INVALID_DOMAIN_ID;
|
||||||
|
}
|
||||||
|
}*/
|
905
mission/controller/acs/AcsParameters.h
Normal file
905
mission/controller/acs/AcsParameters.h
Normal file
@ -0,0 +1,905 @@
|
|||||||
|
/*******************************
|
||||||
|
* EIVE Flight Software Framework (FSFW)
|
||||||
|
* (c) 2022 IRS, Uni Stuttgart
|
||||||
|
*******************************/
|
||||||
|
|
||||||
|
#ifndef ACSPARAMETERS_H_
|
||||||
|
#define ACSPARAMETERS_H_
|
||||||
|
|
||||||
|
#include <fsfw/parameters/HasParametersIF.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
typedef unsigned char uint8_t;
|
||||||
|
|
||||||
|
class AcsParameters /*: public HasParametersIF*/ {
|
||||||
|
public:
|
||||||
|
AcsParameters();
|
||||||
|
virtual ~AcsParameters();
|
||||||
|
/*
|
||||||
|
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
|
||||||
|
ParameterWrapper *parameterWrapper,
|
||||||
|
const ParameterWrapper *newValues, uint16_t startAtIndex);
|
||||||
|
*/
|
||||||
|
struct OnBoardParams {
|
||||||
|
double sampleTime = 0.1; // [s]
|
||||||
|
} onBoardParams;
|
||||||
|
|
||||||
|
struct InertiaEIVE {
|
||||||
|
double inertiaMatrix[3][3] = {{1.0, 0.0, 0.0}, {0.0, 1.0, 0.0}, {0.0, 0.5, 1.0}};
|
||||||
|
double inertiaMatrixInverse[3][3];
|
||||||
|
} inertiaEIVE;
|
||||||
|
|
||||||
|
struct MgmHandlingParameters {
|
||||||
|
float mgm0orientationMatrix[3][3] = {{0, 0, -1}, {0, 1, 0}, {1, 0, 0}};
|
||||||
|
float mgm1orientationMatrix[3][3] = {{0, 0, 1}, {0, -1, 0}, {1, 0, 0}};
|
||||||
|
float mgm2orientationMatrix[3][3] = {{0, 0, -1}, {0, 1, 0}, {1, 0, 0}};
|
||||||
|
float mgm3orientationMatrix[3][3] = {{0, 0, 1}, {0, -1, 0}, {1, 0, 0}};
|
||||||
|
float mgm4orientationMatrix[3][3] = {{0, 0, -1}, {-1, 0, 0}, {0, 1, 0}};
|
||||||
|
|
||||||
|
float mgm0hardIronOffset[3] = {19.89364, -29.94111, -31.07508};
|
||||||
|
float mgm1hardIronOffset[3] = {10.95500, -8.053403, -33.36383};
|
||||||
|
float mgm2hardIronOffset[3] = {15.72181, -26.87090, -62.19010};
|
||||||
|
float mgm3hardIronOffset[3] = {0.0, 0.0, 0.0};
|
||||||
|
float mgm4hardIronOffset[3] = {0.0, 0.0, 0.0};
|
||||||
|
|
||||||
|
float mgm0softIronInverse[3][3] = {{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] = {{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] = {{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};
|
||||||
|
float mgm13variance[3] = {1, 1, 1};
|
||||||
|
float mgm4variance[3] = {1, 1, 1};
|
||||||
|
|
||||||
|
} mgmHandlingParameters;
|
||||||
|
|
||||||
|
struct SusHandlingParameters {
|
||||||
|
float sus0orientationMatrix[3][3] = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}}; // FM07
|
||||||
|
float sus1orientationMatrix[3][3] = {{0, 0, -1}, {-1, 0, 0}, {0, 1, 0}}; // FM06
|
||||||
|
float sus2orientationMatrix[3][3] = {{-1, 0, 0}, {0, 0, -1}, {0, -1, 0}}; // FM13
|
||||||
|
float sus3orientationMatrix[3][3] = {{1, 0, 0}, {0, 0, 1}, {0, -1, 0}}; // FM14
|
||||||
|
float sus4orientationMatrix[3][3] = {{0, -1, 0}, {1, 0, 0}, {0, 0, 1}}; // FM05
|
||||||
|
float sus5orientationMatrix[3][3] = {{1, 0, 0}, {0, -1, 0}, {0, 0, -1}}; // FM02
|
||||||
|
float sus6orientationMatrix[3][3] = {{0, 0, 1}, {1, 0, 0}, {0, 1, 0}}; // FM10
|
||||||
|
float sus7orientationMatrix[3][3] = {{0, 0, -1}, {-1, 0, 0}, {0, 1, 0}}; // FM01
|
||||||
|
float sus8orientationMatrix[3][3] = {{-1, 0, 0}, {0, 0, -1}, {0, -1, 0}}; // FM03
|
||||||
|
float sus9orientationMatrix[3][3] = {{1, 0, 0}, {0, 0, 1}, {0, -1, 0}}; // FM11
|
||||||
|
float sus10orientationMatrix[3][3] = {{0, -1, 0}, {1, 0, 0}, {0, 0, 1}}; // FM09
|
||||||
|
float sus11orientationMatrix[3][3] = {{1, 0, 0}, {0, -1, 0}, {0, 0, -1}}; // FM08
|
||||||
|
|
||||||
|
float sus0coeffAlpha[9][10] = {
|
||||||
|
{10.4400948050067, 1.38202655603079, 0.975299591736672, 0.0172133914423707,
|
||||||
|
-0.0163482459492803, 0.035730152619911, 0.00021725657060767, -0.000181685375645396,
|
||||||
|
-0.000124096561459262, 0.00040790566176981},
|
||||||
|
{6.38281281805793, 1.81388255990089, 0.28679524291736, 0.0218036823758417,
|
||||||
|
0.010516766426651, 0.000446101708841615, 0.00020187044149361, 0.000114957457831415,
|
||||||
|
1.63114413539632e-05, -2.0187452317724e-05},
|
||||||
|
{-29.3049094555, -0.506844002611835, 1.64911970541112, -0.0336282997119334,
|
||||||
|
0.053185806861685, -0.028164943139695, -0.00021098074590512, 0.000643681643489995,
|
||||||
|
-0.000249094601806692, 0.000231466668650876},
|
||||||
|
{-4.76233790255328, 1.1780710601961, -0.194257188545164, 0.00471817228628384,
|
||||||
|
-0.00183773644319332, -0.00570261621182479, -7.99203367291902e-05, 7.75752247926601e-05,
|
||||||
|
-9.78534772816957e-06, -4.72083745991256e-05},
|
||||||
|
{0.692159025649028, 1.11895461388667, 0.341706834956496, 0.000237989648019541,
|
||||||
|
-0.000188322779563912, 0.000227310789253953, 0.000133001646828401, -0.000305810826248463,
|
||||||
|
0.00010150571088124, -0.000367705461590854},
|
||||||
|
{3.38094203317731, 1.24778838596815, 0.067807236112956, -0.00379395536123526,
|
||||||
|
-0.00339180589343601, -0.00188754615986649, -7.52406312245606e-05, 4.58398750278147e-05,
|
||||||
|
6.97244631313601e-05, 2.50519145070895e-05},
|
||||||
|
{-7.10546287716029, 0.459472977452686, -1.12251049944014, 0.0175406972371191,
|
||||||
|
-0.0310525406867782, -0.0531315970690727, -0.000121107664597462, 0.000544665437051928,
|
||||||
|
-1.78466217018177e-05, -0.00058976234038192},
|
||||||
|
{1.60633684055984, 1.1975095485662, 0.180159204664965, -0.00259157601062089,
|
||||||
|
-0.0038106317634397, 0.000956686555225968, 4.28416721502134e-06, 5.84532336259517e-06,
|
||||||
|
-2.73407888222758e-05, 5.45131881032866e-06},
|
||||||
|
{43.3732235586222, 0.528096786861784, -3.41255850703983, -0.0161629934278675,
|
||||||
|
0.0790998053536612, 0.0743822668655928, 0.000237176965460634, -0.000426691336904078,
|
||||||
|
-0.000889196131314391, -0.000509766491897672}};
|
||||||
|
float sus0coeffBeta[9][10] = {
|
||||||
|
{1.03872648284911, -0.213507239271552, 1.43193059498181, -0.000972717820830235,
|
||||||
|
-0.00661046096415371, 0.00974284211491888, 2.96098456891215e-05, -8.2933115634257e-05,
|
||||||
|
-5.52178824394723e-06, 5.73935295303589e-05},
|
||||||
|
{3.42242235823356, 0.0848392511283237, 1.24574390342586, 0.00356248195980133,
|
||||||
|
0.00100415659893053, -0.00460120247716139, 3.84891005422427e-05, 2.70236417852327e-05,
|
||||||
|
-7.58501977656551e-05, -8.79809730730992e-05},
|
||||||
|
{14.0092526123741, 1.03126714946215, 1.0611008563785, 0.04076462444523, 0.0114106419194518,
|
||||||
|
0.00746959159048058, 0.000388033225774727, -0.000124645014888926, -0.000296639947532341,
|
||||||
|
-0.00020861690864945},
|
||||||
|
{1.3562422681189, -0.241585615891602, 1.49170424068611, 0.000179184170448335,
|
||||||
|
-0.00712399257616284, 0.0121433526723498, 3.29770580642447e-05, 8.78960210966787e-06,
|
||||||
|
-6.00508568552101e-05, 0.000101583822589461},
|
||||||
|
{-0.718855428908583, -0.344067476078684, 1.12397093701762, 0.000236505431484729,
|
||||||
|
-0.000406441415248947, 0.00032834991502413, 0.000359422093285086, 8.18895560425272e-05,
|
||||||
|
0.000316835483508523, 0.000151442890664899},
|
||||||
|
{-0.268764016434841, -0.275272048639511, 1.26239753050527, -0.000511224336925231,
|
||||||
|
0.0095628568270856, -0.00397960092451418, 1.39587366293607e-05, 1.31409051361129e-05,
|
||||||
|
-9.83662017231755e-05, 1.87078667116619e-05},
|
||||||
|
{27.168106989145, -2.43346872338192, 1.91135512970771, 0.0553180826818016,
|
||||||
|
-0.0481878292619383, 0.0052773235604729, -0.000428011927975304, 0.000528018208222772,
|
||||||
|
-0.000285438191474895, -5.71327627917386e-05},
|
||||||
|
{-0.169494136517622, -0.350851545482921, 1.19922076033643, 0.0101120903675328,
|
||||||
|
-0.00151674465424115, 0.00548694086125656, -0.000108240000970513, 1.57202185024105e-05,
|
||||||
|
-9.77555098179959e-05, 2.09624089449761e-05},
|
||||||
|
{-32.3807957489507, 1.8271436443167, 2.51530814328123, -0.0532334586403461,
|
||||||
|
-0.0355980127727253, -0.0213373892796204, 0.00045506092539885, 0.000545065581027688,
|
||||||
|
0.000141998709314758, 0.000101051304611037}};
|
||||||
|
float sus1coeffAlpha[9][10] = {
|
||||||
|
{-27.6783250420482, -0.964805032861791, -0.503974297997131, -0.0446471081874084,
|
||||||
|
-0.048219538329297, 0.000958491361905381, -0.000290972187162876, -0.000657145721554176,
|
||||||
|
-0.000178087038629721, 4.09208968678946e-05},
|
||||||
|
{2.24803085641869, 1.42938692406645, 0.30104994020693, 0.00756499999397385,
|
||||||
|
0.0117765927439368, -0.000743685980641362, 4.69920803836194e-05, 0.000129815636957956,
|
||||||
|
-9.10792250542345e-06, -2.03870119873411e-05},
|
||||||
|
{26.9943033817917, 0.147791175366868, -3.48256070200564, -0.0303332422478656,
|
||||||
|
0.0183377266255394, 0.124593616125966, -0.000466003049304431, -0.000272000698791331,
|
||||||
|
-0.00063621309529853, -0.00158363678978767},
|
||||||
|
{-0.221893380318465, 1.29919955307083, 0.21872487901019, 0.0049448219667127,
|
||||||
|
0.00291224091529189, 0.00654651987282984, -9.86842469311185e-05, 8.20057454706638e-05,
|
||||||
|
6.42331081725944e-05, 7.11656918299053e-05},
|
||||||
|
{1.40178843964621, 1.1733111455249, 0.287485528779234, -0.000793970428759834,
|
||||||
|
0.000170529273905818, -0.00268807864923086, 9.09553964483881e-05, -0.000271892733575409,
|
||||||
|
8.52016306311741e-05, -0.000291797625433646},
|
||||||
|
{0.65549617899457, 1.25716478394514, 0.301396415134214, -0.00357289640403958,
|
||||||
|
-0.000473416364133431, -0.010760332636205, -9.77220176481185e-05, 4.40798040046875e-05,
|
||||||
|
2.84958344955681e-05, 0.000128583400693359},
|
||||||
|
{6.20958048145025, 1.9528406481596, 1.32915657614139, -0.0326944423378284,
|
||||||
|
-0.0158258335207969, 0.0328249756354635, 0.00027113042931131, -0.000133980867173428,
|
||||||
|
-0.000357964552318811, 0.000224235061786191},
|
||||||
|
{2.46222812180944, 1.1731834908026, 0.17440330925151, -0.00132279581980401,
|
||||||
|
-0.00447202005426964, -0.000804321602550913, -1.59526570766446e-05, 2.62946483533391e-05,
|
||||||
|
3.28466749016414e-05, -6.63837547601294e-06},
|
||||||
|
{42.615758859473, 2.46617281707273, -5.742515881283, -0.131942799763164, 0.20250702826603,
|
||||||
|
0.0981562802911027, 0.00189939440077981, -0.0018591621618441, -0.00161121179693977,
|
||||||
|
-0.00058814458116749}};
|
||||||
|
float sus1coeffBeta[9][10] = {
|
||||||
|
{-12.300032617206, -1.06640894101328, 0.33950802247214, -0.00890867870617722,
|
||||||
|
-0.04872758086642, -0.0114263851027856, 0.000141061196404012, -0.000675469545483099,
|
||||||
|
-0.000138249928781575, -0.000138871036200597},
|
||||||
|
{10.1631114109768, 0.261654603839785, 1.2376413405181, 0.00888558138614535,
|
||||||
|
0.00151674939001532, -0.00534577602313027, 9.19430013005559e-05, 5.39804599087081e-05,
|
||||||
|
-4.15760162347772e-05, -7.60797902457032e-05},
|
||||||
|
{-30.142329062199, 1.26939195100229, 6.14467186367471, 0.0464163689935328,
|
||||||
|
0.00379001947505376, -0.165444163648109, 0.000516545385538741, 1.56053219154647e-05,
|
||||||
|
-5.58651971370719e-05, 0.00173185063955313},
|
||||||
|
{12.1454103989862, -0.243589095509132, 2.02543716988677, -0.000857989774598331,
|
||||||
|
-0.00705278543432513, 0.0250580538307654, 3.50683653081847e-05, -2.63093897408875e-05,
|
||||||
|
-5.67352645830913e-05, 0.000232270832022029},
|
||||||
|
{4.4338108906594, -0.305276965994378, 1.17293558142526, 0.000152618994429577,
|
||||||
|
0.00134432642920902, -0.00104036813342885, 0.000334476082056995, 6.74826804343671e-05,
|
||||||
|
0.000275311897725414, 7.58157740577916e-05},
|
||||||
|
{3.47680700379043, -0.154163381023597, 1.389579838768, 0.000799705880026268,
|
||||||
|
0.00401980026462874, -0.00915311817354667, -2.54817301605075e-06, -2.27422984169921e-05,
|
||||||
|
-2.61224817848938e-05, 6.00381132540332e-05},
|
||||||
|
{29.469181543703, -0.722888948550437, 3.3623377135197, 0.00148445490093232,
|
||||||
|
-0.0474780142430845, 0.0486755575785462, 0.000126295091963757, 0.000526632230895258,
|
||||||
|
-0.000259305985126003, 0.000412751148048724},
|
||||||
|
{2.67029041722834, -0.0837968038501666, 1.37628504937018, 0.00165061312885753,
|
||||||
|
-0.00953813055064273, 0.0032433005486936, -1.6522452172598e-05, 0.000144574078261271,
|
||||||
|
-8.47348746872376e-05, -1.92509604512729e-06},
|
||||||
|
{-20.959201441285, -2.23605897639125, 5.73044624806043, 0.0354141964763815,
|
||||||
|
0.0887545371234514, -0.193862330062381, 0.000216532998121618, -0.00207707610520973,
|
||||||
|
0.000552928905346826, 0.00190182163597828}};
|
||||||
|
float sus2coeffAlpha[9][10] = {
|
||||||
|
{6.51602979328333, 0.690575501042577, 1.18185457002269, -0.0153161662266588,
|
||||||
|
0.00145972227341484, 0.0351496474730776, -0.000172645571366945, -6.04213053580018e-05,
|
||||||
|
9.74494676304114e-05, 0.000334122888261002},
|
||||||
|
{0.954398509323963, 1.10996214782069, 0.313314231563221, -0.00367553051112208,
|
||||||
|
0.0110290193380194, 0.000240079475656232, -6.93444423181303e-05, 0.000107433381295167,
|
||||||
|
1.30750132315838e-05, -2.43580795300515e-05},
|
||||||
|
{-55.1159841655056, -1.47449655191106, 3.40106264596874, -0.0621428271456258,
|
||||||
|
0.0659788065633613, -0.0791732068323335, -0.000524264070592741, 0.000582093651418709,
|
||||||
|
-0.000586102213707195, 0.000658133691098817},
|
||||||
|
{1.98614148820353, 1.32058724763677, 0.156843003413303, 0.002748082456053,
|
||||||
|
0.00202677073171519, 0.00382360695862248, -0.000122364309010211, 5.33354637965168e-05,
|
||||||
|
3.93641210098335e-05, 4.06398431916703e-05},
|
||||||
|
{3.41223117010734, 1.1597568029329, 0.31881674291653, -0.000382400010917784,
|
||||||
|
-0.000754945672515052, -0.00079200882313927, 0.000145713118224563, -0.00026910957285589,
|
||||||
|
0.000137876961532787, -0.000326798596746712},
|
||||||
|
{6.23333031852853, 1.24902998148103, -0.0162317540018123, -0.00338184464699201,
|
||||||
|
0.000420329743164687, 0.00202038442335185, -7.10435889754986e-05, -6.04039458988991e-06,
|
||||||
|
7.25318569569788e-06, -2.5930447720704e-05},
|
||||||
|
{191.759784636909, -10.5228276216193, 8.48306234734519, 0.243240262512846,
|
||||||
|
-0.344226468125615, 0.126267158197535, -0.00186612281541009, 0.00304415728817747,
|
||||||
|
-0.00304958575196089, 0.000457236034569107},
|
||||||
|
{5.61375025356727, 1.1692295110657, 0.224665256727786, -0.00230481633344849,
|
||||||
|
-0.00746693012026367, -0.00172583925345173, -7.00823444553058e-06, 7.31362778266959e-05,
|
||||||
|
5.81988007269583e-05, 1.3723604109425e-05},
|
||||||
|
{98.0250669452855, -2.18500123986039, -6.68238707939385, 0.000754807832106659,
|
||||||
|
0.256133336978808, 0.110826583415768, 0.000457663127670018, -0.00197655629847616,
|
||||||
|
-0.00254305206375073, -0.000466731538082995}};
|
||||||
|
float sus2coeffBeta[9][10] = {
|
||||||
|
{41.1102358678699, 2.3034699186519, 2.74551448799899, 0.061701310929235, 0.0317074142089495,
|
||||||
|
0.0308171492962288, 0.00049453042200054, 0.000519222896270701, 2.85420168881716e-05,
|
||||||
|
0.000259197384126413},
|
||||||
|
{4.46821725251333, 0.0125273331991983, 1.32640678842532, 0.000543566569079156,
|
||||||
|
0.00396616601484022, -0.00488408099728387, -3.05734704054868e-06, 7.3424831303621e-05,
|
||||||
|
-5.49439160235527e-05, -8.30708110469922e-05},
|
||||||
|
{64.773396165255, 2.97057686090134, -1.90770757709096, 0.062747116236773,
|
||||||
|
-0.077990648565002, 0.0613989204238974, 0.00055512113297293, -0.000347045533958329,
|
||||||
|
0.00104059576098392, -0.000348638726253297},
|
||||||
|
{3.10352939390402, -0.2376108554276, 1.60523925160222, 0.00116454605680723,
|
||||||
|
-0.0067958260462381, 0.0136561370875238, 2.59929059167486e-05, 3.33825895937897e-05,
|
||||||
|
-5.55828531601728e-05, 0.000109833374761172},
|
||||||
|
{0.156052891975873, -0.320721597024578, 1.15208488414874, 0.00164743688819939,
|
||||||
|
0.000534718891498932, 0.000469870758457642, 0.000308432468885207, 0.00011789470679678,
|
||||||
|
0.000292373398965513, 0.000183599033441813},
|
||||||
|
{2.84967971406268, -0.21374251183113, 1.09938586447269, 2.34894704600407e-05,
|
||||||
|
0.00588345375399262, 0.00296966835738407, 8.42707308834155e-06, 2.81870099202641e-06,
|
||||||
|
-3.56732787246631e-05, -7.04534663356379e-05},
|
||||||
|
{-7.59892007483895, 0.358662160515702, 0.805137646978357, 0.00222144376998348,
|
||||||
|
0.0464438387809707, 0.00847551828841782, 3.24805702347551e-05, 5.45500807838332e-05,
|
||||||
|
0.000941378089367713, 0.000353137737023192},
|
||||||
|
{-4.65367165487109, 0.201306010390421, 1.19135575710523, -0.00692801521395975,
|
||||||
|
0.00394118754078443, 0.00426360093528599, 6.297683536736e-05, -7.15794236895102e-05,
|
||||||
|
-7.47076172176468e-05, -1.94516917836346e-05},
|
||||||
|
{-59.5882618930651, 3.84530212586425, 3.50497032358686, -0.116100453177197,
|
||||||
|
-0.0380997421813177, -0.0581898335691109, 0.00111464935006159, 0.000559313074537689,
|
||||||
|
0.000168067749764069, 0.000563224178849256}};
|
||||||
|
float sus3coeffAlpha[9][10] = {
|
||||||
|
{-174.687021034355, -7.53454036765748, -9.33798316371397, -0.18212338430986,
|
||||||
|
-0.242523652239734, -0.202086838965846, -0.00138648793335223, -0.00225430176012882,
|
||||||
|
-0.00198887215340364, -0.00160678535160774},
|
||||||
|
{6.92009692410602, 1.8192037428209, 0.254908171908415, 0.0179273243472017,
|
||||||
|
0.00894059238779664, -0.000436952529644, 0.000138070523903458, 9.22759645920339e-05,
|
||||||
|
-9.4312261303588e-06, -1.76647897892869e-05},
|
||||||
|
{-17.9720006944368, 0.230510201259892, 1.10751755772907, -0.00973621304161327,
|
||||||
|
0.0554450499198677, -0.00590970792122449, -2.92393772526592e-05, 0.000444329929586969,
|
||||||
|
-0.000436055839773919, -9.5869891049503e-05},
|
||||||
|
{-4.9880829382985, 1.33627775121504, -0.330382157073243, 0.00306744056311184,
|
||||||
|
0.00376353074674973, -0.0107453978169225, -0.00010680477021693, 5.17225535432745e-05,
|
||||||
|
7.4423443938376e-05, -0.000107927900087035},
|
||||||
|
{0.952867982900728, 1.14513280899596, 0.307744203675505, 0.000404669974219378,
|
||||||
|
-0.000737988606997615, 0.00120218232577844, 0.000191147653645603, -0.000275058867995882,
|
||||||
|
0.000137187356620739, -0.000320202731145004},
|
||||||
|
{8.076706574364, 1.31338618710295, -0.334634356394277, -0.00209719438033295,
|
||||||
|
-0.00381753503582303, 0.0100347823323616, -7.00550548221671e-05, -1.97626956996069e-05,
|
||||||
|
7.80079707003333e-05, -8.95904360920744e-05},
|
||||||
|
{-82.4748312650249, 8.63074484663009, -0.949295700187556, -0.178618807265278,
|
||||||
|
0.130143669167547, 0.0284326533865768, 0.00149831261351137, -0.0011583692969717,
|
||||||
|
0.0010560778729661, 0.000635404380970666},
|
||||||
|
{3.34457857521978, 1.09242517408071, 0.241722402244944, 0.00381629887587041,
|
||||||
|
-0.00863580122530851, 0.00137050492069702, -8.91046701171713e-05, 8.44169683308007e-05,
|
||||||
|
-3.54608413548779e-05, 8.54042677832451e-06},
|
||||||
|
{78.1540457908649, -1.30266922193303, -5.33605443700115, 0.0184226131926499,
|
||||||
|
0.146629920899062, 0.110698519952472, 6.64041537651749e-05, -0.00120174584530713,
|
||||||
|
-0.00133177694921411, -0.000796422644338886}};
|
||||||
|
float sus3coeffBeta[9][10] = {
|
||||||
|
{-31.5704266802979, -5.10700699133189, 2.84549700473812, -0.122701561048957,
|
||||||
|
-0.11257100034746, 0.102120576206517, -0.000796645106694696, -0.00192211266325167,
|
||||||
|
-4.99981232866237e-05, 0.00104036677004523},
|
||||||
|
{-0.734294938181273, -0.0694317595592039, 1.34746975389878, -0.00103465544451119,
|
||||||
|
0.00389798465946559, -0.00308561832194191, -2.91843250099708e-06, 7.59634622232999e-05,
|
||||||
|
-6.54571602919161e-05, -0.000104146832644606},
|
||||||
|
{24.2649069708536, 3.08145095664586, 1.88975821636026, 0.0767528234206466,
|
||||||
|
-0.0526971951753399, -0.0477053831942802, 0.000613806533422364, -0.000631628059238499,
|
||||||
|
0.00026217621127941, 0.000555307997961608},
|
||||||
|
{0.62884078560034, -0.152668817824194, 1.70304497205574, 0.000894387499536142,
|
||||||
|
-0.00306495168098874, 0.0180087418010658, 1.74990847586174e-05, 3.1263263531046e-05,
|
||||||
|
-7.1643235604579e-06, 0.000147876621100347},
|
||||||
|
{-3.05400297018165, -0.316256447664344, 1.14841722699638, 0.000671621084688467,
|
||||||
|
-0.000906765726598906, 0.000687041032077189, 0.000323419818039841, 0.000128019308781935,
|
||||||
|
0.000286018723737538, 0.000192248693306256},
|
||||||
|
{-4.39855066935163, -0.322858945262125, 1.44405016355615, -4.93181749911261e-05,
|
||||||
|
0.0127396834052722, -0.00523149676786941, 2.56561922352657e-05, 7.61202764874326e-06,
|
||||||
|
-0.00014623717850039, 8.12219846932013e-06},
|
||||||
|
{110.820397525173, -10.9497307382094, 2.48939759290446, 0.296585618718034,
|
||||||
|
-0.142611297893517, -0.0141810186612052, -0.00275127095595919, 0.00160686698368569,
|
||||||
|
-0.000872029428758877, -0.000410522437887563},
|
||||||
|
{-7.15740446281205, 0.104233532313688, 1.13155893729292, -0.00350418544400852,
|
||||||
|
0.00532058598508803, 0.00459314980222008, 3.09155436939349e-05, -7.60935741692174e-05,
|
||||||
|
-5.87922606348196e-05, 2.56146268588382e-05},
|
||||||
|
{44.8818060495112, -7.94729992210875, 3.59286389225051, 0.217944601088562,
|
||||||
|
0.108087933176612, -0.116711715153385, -0.00194260120960441, -0.0015752762498594,
|
||||||
|
-0.000331129410732722, 0.00125896996438418}};
|
||||||
|
float sus4coeffAlpha[9][10] = {
|
||||||
|
{-12.4581187126738, 0.398038572289047, -0.438887880988151, -0.00965382887938283,
|
||||||
|
-0.0309322349328842, -0.00359106522420111, -7.79546112299913e-06, -0.000432733997178497,
|
||||||
|
-9.79031907635314e-05, -1.49299384451257e-05},
|
||||||
|
{8.41054378583447, 1.87462327360707, 0.266809999719952, 0.0216455385250676,
|
||||||
|
0.00879426079919981, -0.00142295319820553, 0.000194819780653264, 8.57549705064449e-05,
|
||||||
|
-3.56478452552367e-05, -1.65680920554434e-05},
|
||||||
|
{16.4141780945815, 2.57697842088604, 0.373972171754278, 0.0498264199400303,
|
||||||
|
0.0183175817756131, -0.008545409848878, 0.000422696533006382, -0.000268245978898508,
|
||||||
|
-0.000663188021815416, -7.51144017137827e-05},
|
||||||
|
{0.796692054977593, 1.26773229735266, 0.247715261673662, 0.00358183885438128,
|
||||||
|
0.00216435175662881, 0.00713732829335305, -0.000110129715615857, 3.56051594182427e-05,
|
||||||
|
5.03074365340535e-05, 8.40279146176271e-05},
|
||||||
|
{2.37491588500165, 1.05997969088519, 0.309540461340971, -0.000405047711742513,
|
||||||
|
0.000462224730316111, -0.00201887171945793, 0.000260159805167265, -0.000282867209803598,
|
||||||
|
0.000201613303652666, -0.000277796442847579},
|
||||||
|
{6.36749007598708, 1.31659760017973, -0.122724934153231, -0.00328808937096891,
|
||||||
|
-0.00577347207798776, 0.00403172074457999, -7.45676459772001e-05, 1.79838644222274e-05,
|
||||||
|
0.000104552066440564, -2.78115121929346e-05},
|
||||||
|
{-47.9667098848496, 3.97703197139796, -1.96403894754299, -0.0577989657406978,
|
||||||
|
0.0634225576208007, -0.0346023445055141, 0.00045886475369098, -0.000326132951996844,
|
||||||
|
0.000716490441845967, -0.000136132038635483},
|
||||||
|
{6.21505474256094, 0.871830486201601, 0.286906473833627, 0.007875292606045,
|
||||||
|
-0.00974634725746389, 0.00128416935792136, -0.000111796743751489, 0.000102016719989187,
|
||||||
|
-3.3503088289589e-05, -1.03874407813931e-05},
|
||||||
|
{102.09801265482, -4.12715152309748, -5.04594403360339, 0.075499959116996,
|
||||||
|
0.216574192561683, 0.0750031215784663, -0.000147358932612646, -0.0023710703422108,
|
||||||
|
-0.00143310719642393, -0.000431914403446768}};
|
||||||
|
float sus4coeffBeta[9][10] = {
|
||||||
|
{-21.5077132684032, -1.60004839699939, -0.0298995033958561, -0.0315563250430659,
|
||||||
|
-0.0424403625879891, -0.0245426225510417, -0.000209861203016225, -0.000422150973104431,
|
||||||
|
-0.00030514398458781, -0.000211986731019738},
|
||||||
|
{9.07644247897601, 0.207457289788099, 1.26735366597312, 0.00768477352180427,
|
||||||
|
0.00429230749575816, -0.00514802326062087, 7.56149591998578e-05, 8.42794730840662e-05,
|
||||||
|
-3.62215715492783e-05, -5.24384190165239e-05},
|
||||||
|
{-33.5225408043693, -3.11167857248829, 1.91760591695775, -0.0963752386435729,
|
||||||
|
0.00026620241534153, -0.0256680391021823, -0.00102188712837393, 2.63753563968978e-05,
|
||||||
|
0.000113172463974702, 0.000271939918507175},
|
||||||
|
{19.1379025029401, -0.225979661987912, 2.72337120022998, -0.00136982412154458,
|
||||||
|
-0.00447301210555274, 0.046496718064139, 2.09123846958985e-05, -4.30383094864847e-05,
|
||||||
|
-1.22808643520768e-05, 0.000440555709696048},
|
||||||
|
{2.957867714783, -0.316069593806939, 1.06379930645214, 0.00103244713047271,
|
||||||
|
0.00148059212230411, 0.000557885068990542, 0.000288633931072557, 0.000172775380291659,
|
||||||
|
0.000269738457990237, 0.000254577019084984},
|
||||||
|
{2.04155199929521, -0.318303488378033, 1.37820715117028, 0.00114788656817743,
|
||||||
|
0.0130051117909245, -0.00743109928493789, 1.22403390396844e-05, -3.19245785131217e-05,
|
||||||
|
-0.000156735218010879, 3.81458400945988e-05},
|
||||||
|
{27.314954181241, -1.43916155634084, 2.48967706992348, 0.0278695408478388,
|
||||||
|
-0.0341141456915131, 0.0281959785297513, -0.000252996164135396, 0.000163365679366542,
|
||||||
|
-0.000380129463154642, 0.000159350154429114},
|
||||||
|
{-0.274693278266294, 0.0199711721436635, 1.26676843352524, -0.0006713759238817,
|
||||||
|
-0.00389715205101059, 0.00294298337610857, -9.58643121413979e-06, 6.30700938550725e-05,
|
||||||
|
-6.07188867796123e-05, 7.72199861279611e-06},
|
||||||
|
{-74.1601853968901, 2.55641628908672, 6.38533530714782, -0.0582345132980647,
|
||||||
|
-0.0653804553172819, -0.138850555683872, 0.000489364157827405, 0.000469559629292745,
|
||||||
|
0.000698140692952438, 0.00123017528239406}};
|
||||||
|
float sus5coeffAlpha[9][10] = {
|
||||||
|
{-12.1398741236355, 1.99425442858125, -1.9303044815802, 0.0418421279520049,
|
||||||
|
-0.0309683799946315, -0.0562201123081437, 0.000522607299552916, -0.000375386573815007,
|
||||||
|
-0.000183899715035788, -0.000600349486293698},
|
||||||
|
{4.51862054729553, 1.72396080253297, 0.274562680698765, 0.0162681383591035,
|
||||||
|
0.0108410181586673, -0.000272215427359511, 0.000124164068046579, 0.000125586897851351,
|
||||||
|
-1.24082224214974e-05, -1.63339067540159e-05},
|
||||||
|
{63.0100748193658, 7.78014670478172, 0.327263471268564, 0.181264302704374,
|
||||||
|
-0.0652454854214506, -0.03906716801285, 0.00166924078925478, -0.000749939315526625,
|
||||||
|
0.000320696101132374, 0.000499934751180042},
|
||||||
|
{-2.14377722994325, 1.33617641673436, 0.0973465660282871, 0.00389526886867845,
|
||||||
|
0.00526064997381395, 0.00244964888333519, -8.59416490903541e-05, 4.58871931007681e-05,
|
||||||
|
8.6123353128647e-05, 2.85447259858337e-05},
|
||||||
|
{0.164792977301912, 1.17541977248641, 0.348838798760518, -0.000180865118417534,
|
||||||
|
0.000331789515553421, -0.000734333865631793, 9.76677859410759e-05, -0.000324347075049525,
|
||||||
|
8.66683396011167e-05, -0.000385839566009832},
|
||||||
|
{-0.228934187493575, 1.30552820143752, 0.306779576899158, -0.00508763741184706,
|
||||||
|
-0.00318524263093038, -0.00878095392529144, -6.59040013073836e-05, 8.69122529321691e-05,
|
||||||
|
5.73853071731283e-05, 8.56628414466758e-05},
|
||||||
|
{22.6047744510684, -0.591739857860868, 0.566728856847393, 0.0498124268150265,
|
||||||
|
-0.0214126910277926, 0.00538091942017912, -0.000391517685229849, 0.000554321668236216,
|
||||||
|
0.000191004410219065, 0.000102775124022018},
|
||||||
|
{4.54704081104052, 0.844841244606025, 0.181355971462193, 0.0109743851006749,
|
||||||
|
-0.00363467884122547, 0.00108873046814694, -0.000153236888951059, 3.14623342713789e-06,
|
||||||
|
-2.78503202185463e-05, 3.99983788680736e-06},
|
||||||
|
{-30.878359404848, 5.20536009886854, -0.674455093700773, -0.10801865891189,
|
||||||
|
-0.0514805639475938, 0.0503660452068572, 0.00072776817295273, 0.00120288537038655,
|
||||||
|
-0.000301602375634166, -0.000477098479809266}};
|
||||||
|
float sus5coeffBeta[9][10] = {
|
||||||
|
{16.8155737032787, 0.65475660868259, 1.95532810363711, 0.000295624718662669,
|
||||||
|
0.0426379914736747, 0.00192544771588337, -4.94534888281508e-05, 8.32299142575155e-05,
|
||||||
|
0.000645497238623369, -0.000234155227840799},
|
||||||
|
{9.48268090632318, 0.528942263930744, 1.34030963800712, 0.0173605129814363,
|
||||||
|
0.00581086655972212, -0.00365006277801141, 0.000180048140973223, 0.000102002650672644,
|
||||||
|
-4.10833110241736e-05, -8.7810396165556e-05},
|
||||||
|
{-47.8325489165383, -4.78262055949503, 1.66912859871505, -0.143518014673292,
|
||||||
|
0.0288441527062856, -0.00322823115861497, -0.00148509910480755, 0.000284265179004289,
|
||||||
|
-0.000175299737313045, -7.04175618676909e-05},
|
||||||
|
{3.70510151312723, -0.272200626024415, 1.5527519845099, 0.000589727630962265,
|
||||||
|
-0.00889682554869096, 0.0109857452472628, 3.05876215574877e-05, 2.09194236165814e-05,
|
||||||
|
-8.33769024439277e-05, 6.90991113575066e-05},
|
||||||
|
{0.820199776906695, -0.355683467192776, 1.17142130858009, -0.000160174871610729,
|
||||||
|
4.09723480153701e-05, 0.000209103751629257, 0.000390331989170637, 6.45642836249667e-05,
|
||||||
|
0.000318092703362044, 0.000107158633760141},
|
||||||
|
{5.52084497768914, -0.227775345312466, 0.845897282556327, 0.00157426476122436,
|
||||||
|
0.00657189797805861, 0.0103797665963117, 2.51479848048895e-05, -4.78371400399983e-05,
|
||||||
|
-5.20221896473413e-05, -0.000143840492906166},
|
||||||
|
{-33.4875689683454, 0.937557276329106, -1.02741065470967, -0.0140023273976314,
|
||||||
|
0.0401908729477037, -0.0512457211360142, 7.05537967426573e-05, -0.00027521752411122,
|
||||||
|
0.000407657552700476, -0.000458411000693613},
|
||||||
|
{0.931346887326171, -0.320804452025793, 1.28866325376154, 0.00912456151698805,
|
||||||
|
-0.00404367403569981, 0.00477543659981282, -9.43987917474817e-05, 4.66464249533497e-05,
|
||||||
|
-7.89362487264572e-05, -1.0951496495443e-05},
|
||||||
|
{-38.3689359928435, 3.8540516906071, 1.26391725545116, -0.108584643500539,
|
||||||
|
-0.0542697403292778, 0.0285360568428252, 0.000845084580479371, 0.00114184315411245,
|
||||||
|
-0.000169538153750085, -0.000336529204350355}};
|
||||||
|
float sus6coeffAlpha[9][10] = {
|
||||||
|
{13.0465222152293, 0.0639132159808454, 2.98083557560227, -0.0773202212713293,
|
||||||
|
0.0949075412003712, 0.0503055998355815, -0.00104133434256204, 0.000633099036136146,
|
||||||
|
0.00091428505258307, 0.000259857066722932},
|
||||||
|
{1.66740227859888, 1.55804368674744, 0.209274741749388, 0.0123798418560859,
|
||||||
|
0.00724950517167516, -0.000577445375457582, 8.94374551545955e-05, 6.94513586221567e-05,
|
||||||
|
-1.06065583714065e-05, -1.43899892666699e-05},
|
||||||
|
{8.71610925597519, 1.42112818752419, -0.549859300501301, 0.0374581774684577,
|
||||||
|
0.0617635595955198, 0.0447491072679598, 0.00069998577106559, 0.00101018723225412,
|
||||||
|
-4.88501228194031e-06, -0.000434861113274231},
|
||||||
|
{-2.3555601314395, 1.29430213886389, 0.179499593411187, 0.00440896450927253,
|
||||||
|
0.00352052300927628, 0.00434187143967281, -9.66615195654703e-05, 3.64923075694275e-05,
|
||||||
|
6.09619017310129e-05, 4.23908862836885e-05},
|
||||||
|
{-0.858019663974047, 1.10138705956076, 0.278789852526915, -0.000199798507752607,
|
||||||
|
0.00112092406838628, -0.00177346866231588, 0.000217816070307086, -0.000240713988238257,
|
||||||
|
0.000150795563555828, -0.000279246491927943},
|
||||||
|
{7.93661480471297, 1.33902098855997, -0.64010306493848, -0.00307944184518557,
|
||||||
|
-0.00511421127083497, 0.0204008636376403, -9.50042323904954e-05, 6.01530207062221e-05,
|
||||||
|
9.13233708460098e-05, -0.000206717750924323},
|
||||||
|
{16.2658124154565, 0.191301571705827, 1.02390350838635, 0.0258487436355216,
|
||||||
|
-0.0219752092833362, 0.0236916776412211, -0.000350496453661261, -0.000123849795280597,
|
||||||
|
-0.000532190902882765, 9.36018171121253e-05},
|
||||||
|
{-1.53023612303052, 1.29132951637076, 0.181159073530008, -0.0023490608317645,
|
||||||
|
-0.00370741703297037, -0.000229071300377431, -1.6634455407558e-05, 1.11387154630828e-05,
|
||||||
|
1.02609175615251e-05, -9.64717658954667e-06},
|
||||||
|
{-32.9918791079688, 0.093536793089853, 4.76858627395571, 0.0595845684553358,
|
||||||
|
-0.054845749101257, -0.133247382500001, -0.000688999201915199, 7.67286265747961e-05,
|
||||||
|
0.000868163357631254, 0.00120099606910313}};
|
||||||
|
float sus6coeffBeta[9][10] = {
|
||||||
|
{12.7380220453847, -0.6087309901836, 2.60957722462363, -0.0415319939920917,
|
||||||
|
0.0444944768824276, 0.0223231464060241, -0.000421503508733887, -9.39560038638717e-05,
|
||||||
|
0.000821479971871302, -4.5330528329465e-05},
|
||||||
|
{1.96846333975847, -0.33921438143463, 1.23957110477613, -0.00948832495296823,
|
||||||
|
0.00107211134687287, -0.00410820045700199, -9.33679611473279e-05, 3.72984782145427e-05,
|
||||||
|
-4.04514487800062e-05, -7.6296149087237e-05},
|
||||||
|
{5.7454444934481, -1.58476383793609, -0.418479494289251, -0.0985177320630941,
|
||||||
|
-0.0862179276808015, 0.0126762052037897, -0.00118207758271301, -0.000190361442918412,
|
||||||
|
0.0011723869613426, 0.000122882034141316},
|
||||||
|
{2.11042287406433, -0.225942746245056, 1.18084080712528, -0.00103013931607172,
|
||||||
|
-0.00675606790663387, -0.00106646109062746, 1.7708839355979e-05, -3.13642668374253e-05,
|
||||||
|
-5.87601932564404e-05, -3.92033314627704e-05},
|
||||||
|
{2.96049248725882, -0.286261455028255, 1.09122556181319, -0.000672369023155898,
|
||||||
|
0.000574446975796023, 0.000120303729680796, 0.000292285799270644, 0.000170497873487264,
|
||||||
|
0.000259925974231328, 0.000222437797823852},
|
||||||
|
{1.65218061201483, -0.19535446105784, 1.39609640918411, 0.000961524354787167,
|
||||||
|
0.00592400381724333, -0.0078500192096718, -7.02791628080906e-07, -2.07197580883822e-05,
|
||||||
|
-4.33518182614169e-05, 4.66993119419691e-05},
|
||||||
|
{-19.56673237415, 1.06558565338761, 0.151160448373445, -0.0252628659378108,
|
||||||
|
0.0281230551050938, -0.0217328869907185, 0.000241309440918385, -0.000116449585258429,
|
||||||
|
0.000401546410974577, -0.000147563886502726},
|
||||||
|
{1.56167171538684, -0.155299366654736, 1.20084049723279, 0.00457348893890231,
|
||||||
|
0.00118888040006052, 0.0029920178735941, -5.583448120596e-05, -2.34496315691865e-05,
|
||||||
|
-5.3309466243918e-05, 6.20289310356821e-06},
|
||||||
|
{1.95050549495182, -2.74909818412705, 3.80268788018641, 0.0629242254381785,
|
||||||
|
0.0581479035315726, -0.111361283351269, -0.00047845777495158, -0.00075354297736741,
|
||||||
|
-0.000186887396585446, 0.00119710704771344}};
|
||||||
|
float sus7coeffAlpha[9][10] = {
|
||||||
|
{-92.1126183408754, -3.77261746189525, -4.50604668349213, -0.0909560776043523,
|
||||||
|
-0.15646903318971, -0.0766293642415356, -0.00059452135473577, -0.00144790037129283,
|
||||||
|
-0.00119021101127241, -0.000460110780350978},
|
||||||
|
{1.60822506792345, 1.12993931449931, 0.300781032865641, -0.00405149856360946,
|
||||||
|
0.0116663280665617, -0.000746071920075153, -8.36092173253351e-05, 0.000126762041147563,
|
||||||
|
-1.57820750462019e-05, -2.13840141586661e-05},
|
||||||
|
{-151.403952985468, -5.77049222793992, 9.71132757422642, -0.113259116970462,
|
||||||
|
0.284142453949027, -0.198625061659164, -0.000836450164210354, 0.00174062771509636,
|
||||||
|
-0.00323746390757859, 0.00124721932086258},
|
||||||
|
{3.47391964888809, 1.28788318973591, 0.358380140281919, 0.0033863520864927,
|
||||||
|
0.00154601909793475, 0.0103457296050314, -9.56426572270873e-05, 5.48838958555808e-05,
|
||||||
|
2.97537427220847e-05, 0.000104735911514185},
|
||||||
|
{3.32650947866065, 1.16701012685798, 0.293514063672376, -0.00065850791542434,
|
||||||
|
-8.61746510464303e-05, -0.00212038990772211, 0.00010377123197, -0.000262818127593837,
|
||||||
|
0.000103360882478383, -0.000296739688930329},
|
||||||
|
{-0.440176043435378, 1.18923278867097, 0.519516382652818, -0.00138846714677511,
|
||||||
|
0.00266491699926247, -0.014254675949624, -4.20279929822439e-05, -5.49260281515447e-05,
|
||||||
|
-1.00328708454487e-05, 0.000138142092498215},
|
||||||
|
{9.54962966738358, 1.83809145920811, 1.82162819067959, -0.0116786627338505,
|
||||||
|
-0.00496037444422313, 0.0590883547819332, 7.48465315787857e-05, 0.000221693951602584,
|
||||||
|
7.96466345174136e-06, 0.000638822537725177},
|
||||||
|
{7.04862901290925, 0.876813777672465, 0.16368093989381, 0.00928717461441627,
|
||||||
|
-0.00276538956293246, 0.00117995419940653, -0.000141511492474493, -6.09796031786385e-06,
|
||||||
|
-2.62114930414747e-05, -2.88713611443788e-06},
|
||||||
|
{135.349147631811, -7.21933296299596, -6.02379024934871, 0.19557354282067,
|
||||||
|
0.207680233512614, 0.12880101618361, -0.00169832076532024, -0.00192216719797732,
|
||||||
|
-0.00188763612041332, -0.00103101801961442}};
|
||||||
|
float sus7coeffBeta[9][10] = {
|
||||||
|
{-12.7115487367622, -1.08890790360556, 0.0579616268854079, -0.0212303293514951,
|
||||||
|
-0.0395948453851818, -0.0275564242614342, -0.000228652851842222, -0.000148106159109458,
|
||||||
|
-0.000555136649469199, -0.000198260004582737},
|
||||||
|
{-0.988147625946871, -0.759018567468546, 1.20998292002818, -0.0241231836977845,
|
||||||
|
-0.000572110443300516, -0.00294835038249426, -0.00026533039022186, 6.82250069765274e-06,
|
||||||
|
7.21038415209318e-06, -6.54881435118179e-05},
|
||||||
|
{98.0979345921564, 4.27381413621355, -4.39956005193548, 0.0709109587666745,
|
||||||
|
-0.172774236139236, 0.107243391488741, 0.000421832640471043, -0.00140450884710288,
|
||||||
|
0.00158019019392239, -0.00078512547169536},
|
||||||
|
{4.10892685652543, -0.229301778557857, 1.33380992987117, -0.000250095848720304,
|
||||||
|
-0.00555205065514645, 0.00355052914398176, 1.62727119770752e-05, -1.26026527654764e-05,
|
||||||
|
-3.25505031810898e-05, 5.79970895921158e-06},
|
||||||
|
{3.09432502337258, -0.300556003790433, 1.17085811008124, 0.00128679594824324,
|
||||||
|
0.00148229981422985, 9.15267474159147e-05, 0.000300497843413856, 6.31378865575566e-05,
|
||||||
|
0.000258447032558814, 9.79142983264352e-05},
|
||||||
|
{8.92336134924575, -0.197306981784312, 0.659908505354084, 0.00175572239373996,
|
||||||
|
0.006801023678097, 0.0189775987436792, 9.2187857727721e-06, -4.8706332690626e-05,
|
||||||
|
-6.887009887486e-05, -0.000266455617735054},
|
||||||
|
{-52.0734887320227, 2.64822385560272, -1.72387600304694, -0.0383944891609251,
|
||||||
|
0.110873671161269, -0.0475247245070445, 0.000194652401328063, -0.000697307928990137,
|
||||||
|
0.00124021816001, -0.000194213899980878},
|
||||||
|
{2.08203985879155, -0.127503525368396, 1.17628056094647, 0.00283288065938444,
|
||||||
|
0.00394668214608305, 0.00314868636161131, -2.99504350569853e-05, -7.11070816314279e-05,
|
||||||
|
-6.30148122529749e-05, 2.28114298989664e-05},
|
||||||
|
{191.321181158032, -12.2449557187473, -7.21933741885107, 0.267954293388644,
|
||||||
|
0.331529493933124, 0.149867703984027, -0.00222279201444128, -0.00284724570619954,
|
||||||
|
-0.00298774060233964, -0.000988903783752156}};
|
||||||
|
float sus8coeffAlpha[9][10] = {
|
||||||
|
{5.46354311880959, 1.15370126035432, 0.568432485840475, -0.00105094692478431,
|
||||||
|
-0.000472899673842554, 0.015581320536192, 2.26460844314248e-05, -0.000254397947062058,
|
||||||
|
0.000198938007250408, 0.000102026690279006},
|
||||||
|
{8.8976133108173, 1.89502416095352, 0.268670471819199, 0.0217013413241972,
|
||||||
|
0.00973925295182384, -0.00116357269193765, 0.000185865842232419, 0.000103311614912702,
|
||||||
|
-2.46539447920969e-05, -2.06292928734686e-05},
|
||||||
|
{-45.4550803910752, 1.27220123406993, 5.21483855848504, 0.0315791081623634,
|
||||||
|
0.0725172355124129, -0.13947591535243, 0.000412577580637848, 0.000434545096994917,
|
||||||
|
-0.000840043932292312, 0.00126857487044307},
|
||||||
|
{1.81302768546433, 1.20563501267535, 0.344815267182167, 0.00546879453241056,
|
||||||
|
-0.00115382996865884, 0.010597876132341, -7.75885604486581e-05, 8.99568815949154e-05,
|
||||||
|
-2.98129544974679e-06, 0.000108913239345604},
|
||||||
|
{2.19111439539173, 1.06951675598148, 0.283707798607213, 0.00016478588207518,
|
||||||
|
0.000196086067268121, -0.00214980231173703, 0.000237820475654357, -0.000256402967908595,
|
||||||
|
0.000165966620658577, -0.000268394081675921},
|
||||||
|
{15.0858674915897, 1.27922724811168, -1.0803137812576, -0.00184009775302466,
|
||||||
|
-0.00458792284209219, 0.0359393555418547, -6.05121024079603e-05, -1.2288384024143e-05,
|
||||||
|
8.55484605384438e-05, -0.000379241348638065},
|
||||||
|
{-14.9594190080906, 1.79473182195746, -1.00830704063572, 0.000890685410857856,
|
||||||
|
0.0408932029176081, -0.0165460857151619, -0.000170544299916973, -0.000370901607010145,
|
||||||
|
0.000324089709129097, -9.33010240878062e-05},
|
||||||
|
{0.867614491733251, 1.38248194737027, 0.233408537422123, -0.00772942878114575,
|
||||||
|
-0.00783126068079782, -0.000413713955432221, 4.5775750146291e-05, 6.97323029940275e-05,
|
||||||
|
1.70664456940787e-05, 6.75517901233086e-06},
|
||||||
|
{2.34474364146174, -0.777275400251477, 2.09531381577911, 0.0170780716714389,
|
||||||
|
0.102855060371092, -0.1203441505925, 0.000187004964420911, -0.00141720441050986,
|
||||||
|
-0.000336251285258365, 0.00145175125888695}};
|
||||||
|
float sus8coeffBeta[9][10] = {
|
||||||
|
{28.3033101237397, 1.77504446792811, 1.70758838986317, 0.0307800697044683,
|
||||||
|
0.0598759344275936, -0.014461432284373, 0.000128415617799076, 0.000664419128546701,
|
||||||
|
0.000312923304130995, -0.000269026446641855},
|
||||||
|
{7.73040563051023, 0.0267291479555493, 1.16189582308493, 0.000611047892976521,
|
||||||
|
-0.00213680506915073, -0.00517435586596902, -3.60304406049766e-06, -1.74452976404459e-05,
|
||||||
|
-3.95396925228538e-05, -7.01948519410633e-05},
|
||||||
|
{-48.0766126130725, -3.77981206700298, 3.03482861087335, -0.0678496412519532,
|
||||||
|
0.115260678424016, -0.0109681510065038, -0.000438011443691466, 0.00097230136258486,
|
||||||
|
-0.000930875177732769, -0.000203144239955507},
|
||||||
|
{12.1881935626341, -0.234345089308583, 2.01134619426134, 0.000181529284001169,
|
||||||
|
-0.00642848065105061, 0.0243985799415726, 2.0224042581776e-05, 5.22503286757285e-06,
|
||||||
|
-4.75196303016323e-05, 0.000221160482364556},
|
||||||
|
{3.49559433498742, -0.294995112674766, 1.07892379698257, 0.000861664794052587,
|
||||||
|
0.00138978933062055, 0.000436385106465176, 0.000288095124755908, 0.000147259769247883,
|
||||||
|
0.000256686898599516, 0.000198982412957039},
|
||||||
|
{9.36663996178607, -0.171266136751803, 0.799869891484541, -0.000896305696610864,
|
||||||
|
0.00477919972789653, 0.0077876110326094, 9.16475263625076e-06, 3.02461250100473e-05,
|
||||||
|
-3.63917701783264e-05, -0.000101376940843402},
|
||||||
|
{9.93372683055145, 1.02056557854246, 3.01635426591734, -0.0477113881140277,
|
||||||
|
-0.0280426434406976, 0.0438813017696874, 0.000470431190169998, -7.55753674679743e-05,
|
||||||
|
-0.000516444906323815, 0.000253844418223843},
|
||||||
|
{4.12868774589741, -0.305711790187688, 1.15739216407191, 0.00942395115281056,
|
||||||
|
0.00264758462357433, 0.00227985850688479, -0.000107537164019682, -4.91396736189963e-05,
|
||||||
|
-5.3803493814502e-05, 6.80587059728718e-06},
|
||||||
|
{64.9193383444005, -1.57724255547465, -3.82166532626293, 0.0104712238987591,
|
||||||
|
0.0898786950946473, 0.128910456296131, -8.27123227422217e-05, -0.000143979624107479,
|
||||||
|
-0.00146684876653306, -0.00102226799570239}};
|
||||||
|
float sus9coeffAlpha[9][10] = {
|
||||||
|
{65.8975109449121, 2.19115342242175, 6.11069527811832, -0.0219884864133703,
|
||||||
|
0.119985456538482, 0.142746712551924, -0.000465882328687976, 0.000606525132125852,
|
||||||
|
0.00141667074621881, 0.00109715845894006},
|
||||||
|
{5.70337356029945, 1.86705636976809, 0.235584190291708, 0.0194937327615426,
|
||||||
|
0.00973291465247784, -0.00155675297510773, 0.000147099297988423, 0.000115708967219349,
|
||||||
|
-4.1462310493722e-05, -9.80097031103588e-06},
|
||||||
|
{138.221145997284, 6.07665575619595, -9.08085914250542, 0.0839801072927519,
|
||||||
|
-0.143071750033303, 0.237868300719915, 0.000626693630444932, -0.000579788170871402,
|
||||||
|
0.00181740650944343, -0.00207086879728281},
|
||||||
|
{-7.78295582666151, 1.37506685179192, -0.507596181420042, 0.00350118305456038,
|
||||||
|
0.00380814310115541, -0.0174012437563343, -0.000124801268056815, 2.96314830184492e-05,
|
||||||
|
6.3416992450033e-05, -0.000190177262510221},
|
||||||
|
{0.13102597129751, 1.24228303845143, 0.328808873447393, 2.6858679536165e-05,
|
||||||
|
0.000231428138164498, -0.000584089095259736, 5.5322167970451e-05, -0.000322205709821716,
|
||||||
|
7.71348293209208e-05, -0.000393885990364776},
|
||||||
|
{4.64571633968935, 1.2668223691397, -0.158952088650432, -0.0038344859267428,
|
||||||
|
0.0030051503726095, 0.00455578826025588, -9.42520993914957e-05, 5.81633314412289e-05,
|
||||||
|
-4.43545804544095e-05, -4.83524454851519e-05},
|
||||||
|
{99.2385930314563, -3.65569343617926, 5.54203926675588, 0.0975630395981933,
|
||||||
|
-0.15701634159692, 0.107834711298836, -0.000885326636237814, 0.000960753844480462,
|
||||||
|
-0.00179894024848343, 0.000583066757644971},
|
||||||
|
{2.82671549736619, 1.11214198870501, 0.214735318432744, 0.00284415167563662,
|
||||||
|
-0.00743289575690122, 0.000382705440762292, -7.43232442872501e-05, 6.96994098083348e-05,
|
||||||
|
-4.15108111710131e-06, 1.33520085213482e-05},
|
||||||
|
{36.9013743125415, -0.522392401546163, -1.52452843963663, 0.0261375433218879,
|
||||||
|
0.060573568610239, 0.0182582125221054, -0.000244373383911157, -0.000271385147292484,
|
||||||
|
-0.000723799969427732, 6.76324880239196e-05}};
|
||||||
|
float sus9coeffBeta[9][10] = {
|
||||||
|
{128.70886435409, 7.27355509732751, 7.18142203531244, 0.1536100459329, 0.199455846541636,
|
||||||
|
0.101824964939793, 0.00116666116789421, 0.00181595584079788, 0.00159271319494017,
|
||||||
|
0.000556768406475719},
|
||||||
|
{-7.07933839681024, -0.979062424441878, 1.21792546815617, -0.0295740143783226,
|
||||||
|
-0.00442780611714201, -0.00329612819203176, -0.000291373125216143, -7.47259350176359e-05,
|
||||||
|
-4.87265282482212e-05, -7.87490350444332e-05},
|
||||||
|
{41.1357193180502, 2.75138456414254, -0.0160889117718198, 0.0274001112562423,
|
||||||
|
-0.145644717742057, -0.0316076203283094, -0.000136443337244472, -0.00153945199081365,
|
||||||
|
0.000938960439977633, 0.000599987111822885},
|
||||||
|
{2.7980384746608, -0.234741037383589, 1.5342193016705, -0.000993791566721689,
|
||||||
|
-0.00787533639513478, 0.00927468655141365, 2.63308697896639e-05, -3.42816267184975e-05,
|
||||||
|
-8.48879419798771e-05, 3.84043821333798e-05},
|
||||||
|
{0.427687530667804, -0.346076633694936, 1.22968527483851, -4.95098138311122e-05,
|
||||||
|
0.000298245372198029, 0.000332756250024796, 0.00040375986210644, 5.20675972504572e-05,
|
||||||
|
0.000327042170278218, 5.93011568264671e-05},
|
||||||
|
{4.50337810133314, -0.279364254817202, 0.945812187846199, 0.000116182663432306,
|
||||||
|
0.0115646046622083, 0.00908289960302886, 1.90394667311541e-05, -4.4360223646434e-06,
|
||||||
|
-0.000131398914898614, -0.000145568992865512},
|
||||||
|
{-36.3377213654193, 2.21047221783626, 0.0609982245149821, -0.0670546774988572,
|
||||||
|
0.016827777144747, -0.0277834084058314, 0.000778301409125556, 0.000135846745194401,
|
||||||
|
0.00043261858797068, -0.00021172728254561},
|
||||||
|
{-0.737678205841529, -0.217352122193475, 1.23494846329297, 0.00748173441779792,
|
||||||
|
0.0019595873704705, 0.00567253723266176, -8.34768773292938e-05, -3.50608394184873e-05,
|
||||||
|
-0.000107500091550635, -5.1379722947632e-07},
|
||||||
|
{-36.6150844777671, 3.24952006904945, 1.7222457840185, -0.0846362445435584,
|
||||||
|
-0.0625549615377418, 0.019178365782485, 0.000664877496455304, 0.000942971403881222,
|
||||||
|
0.000190754698755098, -0.000372226659190439}};
|
||||||
|
float sus10coeffAlpha[9][10] = {
|
||||||
|
{14.4562393748324, 0.669162330324919, 2.13895255446541, -0.0161997097021299,
|
||||||
|
0.00185995785065838, 0.0621351118528379, -0.000278999272493087, 0.000238469666491965,
|
||||||
|
-0.000279407497782961, 0.000726904943739837},
|
||||||
|
{-4.45678285887022, 0.92869611919737, 0.186752102727282, -0.00706160758952316,
|
||||||
|
0.00532680276723634, -0.00119102617674229, -0.000105283880098953, 3.90673052334419e-05,
|
||||||
|
-3.13338277344246e-05, 5.32977236959767e-06},
|
||||||
|
{30.4255268053197, 3.00991076401191, -1.4855621363519, 0.033934286288413,
|
||||||
|
-0.0553588742704929, 0.0299275582316466, 0.000167915322354466, -0.00050925078118232,
|
||||||
|
0.000463662961330962, -0.000232919143454163},
|
||||||
|
{2.45076465343337, 1.30206564388838, 0.635121046212765, 0.00517109639797675,
|
||||||
|
0.00360579544364496, 0.0198490668911362, -9.31556816982662e-05, 6.7313653707875e-05,
|
||||||
|
6.4669137025142e-05, 0.000209727581169138},
|
||||||
|
{-0.784841314851562, 1.10058314980836, 0.314063830836532, 0.000583003703415889,
|
||||||
|
0.000312635453606579, -0.000183738114552387, 0.000214096205760617, -0.000286744686021244,
|
||||||
|
0.000159157597180407, -0.00032235099420715},
|
||||||
|
{7.19568036510586, 1.33307479701657, -0.465585141952456, -0.0031910726544199,
|
||||||
|
-0.00546273504371797, 0.0145494754402526, -7.9863949693769e-05, 4.83681329120104e-05,
|
||||||
|
8.85844309936609e-05, -0.000143217870916994},
|
||||||
|
{-12.8344546267449, 1.36023633150143, -0.728527724854506, 0.019982118403416,
|
||||||
|
0.0385056413989437, -0.00468598272326268, -0.000303957957649245, -6.37783846968216e-05,
|
||||||
|
0.000514049116643205, 0.000112015427600697},
|
||||||
|
{-2.58279031298065, 1.42167821629586, 0.208769467511292, -0.00640190372145885,
|
||||||
|
-0.0056405289717473, 0.000509611313918708, 2.23310562107823e-05, 3.23685469522147e-05,
|
||||||
|
-7.55982776243849e-06, 2.78417756661088e-06},
|
||||||
|
{-29.7178996143914, 2.636972251183, 1.97316329325243, -0.03983524158327,
|
||||||
|
-0.0193152048730234, -0.0600902798379509, 0.00031786916010672, 0.000162178988605602,
|
||||||
|
0.000224550786416246, 0.000614337977361927}};
|
||||||
|
float sus10coeffBeta[9][10] = {
|
||||||
|
{12.4771349792459, 1.44317849705414, 0.975637226331561, 0.0430284146301043,
|
||||||
|
0.0220810531548995, -0.0220926906772, 0.000310052324529521, 0.000658151808869523,
|
||||||
|
-0.000288026365111098, -0.000214619731807045},
|
||||||
|
{-0.113203260140131, -0.272424061092191, 1.27704377191184, -0.00791746619331075,
|
||||||
|
0.00278646694862191, -0.00398881099259934, -8.09569694307212e-05, 5.99617384829016e-05,
|
||||||
|
-5.4550919751855e-05, -8.6314530565085e-05},
|
||||||
|
{-48.585664295448, -2.04899787231903, 4.48757129623549, -0.0226180460431321,
|
||||||
|
0.090326735447661, -0.0722998813632622, -6.77623771415477e-05, 0.000562585419036509,
|
||||||
|
-0.000956171370931993, 0.000491554402311223},
|
||||||
|
{-1.20986884955482, -0.215604107185474, 1.22123198786617, 0.000256508527822089,
|
||||||
|
-0.00625056735692847, 0.00262961582224303, 2.27433984698861e-05, 1.60471509861372e-05,
|
||||||
|
-4.85061736834262e-05, -1.8387092782907e-06},
|
||||||
|
{-0.250205907903409, -0.315819331560782, 1.09018364376391, -0.000521787614293089,
|
||||||
|
-0.000500747760913489, 2.48184307342838e-05, 0.000313799238640988, 0.000136669146368744,
|
||||||
|
0.000278914324565192, 0.000218512838469476},
|
||||||
|
{-1.38512578184076, -0.240456589364121, 1.34170304231345, 0.00017499230372669,
|
||||||
|
0.0070862275911073, -0.00460640844814105, 1.27594111036696e-05, -4.73855624902052e-06,
|
||||||
|
-5.41141037812903e-05, 8.50767021818388e-06},
|
||||||
|
{58.9917559342216, -2.28705697628345, 5.35995190407842, 0.0214721399750612,
|
||||||
|
-0.112195722921667, 0.0890150265857542, -0.000100675657768708, 0.000493488022135339,
|
||||||
|
-0.00137672908303878, 0.000518683157694955},
|
||||||
|
{3.18905073365834, -0.633376549706314, 1.17190259811174, 0.0188817945597344,
|
||||||
|
0.00107470708915782, 0.00400880471375267, -0.000197312295539118, -2.46543035998379e-05,
|
||||||
|
-6.07871064300252e-05, 1.91822310311955e-05},
|
||||||
|
{-21.6881499304099, -0.563186103920008, 3.70747028664292, 0.021112883967427,
|
||||||
|
-0.00650020689049325, -0.0778533644688476, -0.000131921888670268, -0.000402754836445439,
|
||||||
|
0.000551249824375055, 0.00062236627391337}};
|
||||||
|
float sus11coeffAlpha[9][10] = {
|
||||||
|
{-5.23569698615548, -1.45500092391928, 2.7643243644756, -0.0762912296128707,
|
||||||
|
-0.0201645929971608, 0.0997226845779083, -0.000741669441569556, -0.000485368004931528,
|
||||||
|
0.000166230212359982, 0.00103455037278067},
|
||||||
|
{-7.7405077383712, 0.892040861541276, 0.39014957203484, -0.00952030929935314,
|
||||||
|
0.0185577462685363, 0.000500600568760257, -0.000151227821554572, 0.000245334737283439,
|
||||||
|
1.89380065823205e-05, 1.83481122973969e-07},
|
||||||
|
{-27.462143709831, -1.68192474287299, 0.689411302961069, -0.0146021086710062,
|
||||||
|
0.227153492753605, 0.0815806579791421, 2.92919049429149e-05, 0.00153760357651792,
|
||||||
|
-0.00247865821192621, -0.00166333309739387},
|
||||||
|
{-6.74664748624368, 1.43279156053015, 0.0212787292914553, 0.00764792230365732,
|
||||||
|
0.00796410301290615, 0.0014384998868733, -8.95239151813685e-05, 9.55245417090909e-05,
|
||||||
|
0.000127251739461239, 3.26943341606363e-05},
|
||||||
|
{-2.20391533717674, 1.32902400478083, 0.38633027011889, 0.00104660852197061,
|
||||||
|
0.00105228824412283, -0.00242067551428214, -6.98346290136652e-05, -0.000369075232184835,
|
||||||
|
-1.59510520000704e-05, -0.000448565104826966},
|
||||||
|
{-5.29476778147188, 1.4549556336236, 0.561334186252557, -0.00260896342687109,
|
||||||
|
-0.00855934179001141, -0.0182515354646452, -8.79385828606048e-05, 5.98357681659175e-05,
|
||||||
|
0.000146570207542509, 0.000201596912834554},
|
||||||
|
{-45.7906613832612, 3.77630104475902, -1.67494598155515, -0.0545433897761635,
|
||||||
|
0.047897938410221, -0.0355687158405231, 0.000374738707508583, -0.000448453494537518,
|
||||||
|
0.000377784972619365, -0.000276573228333836},
|
||||||
|
{-9.11681182090372, 2.06933872940742, 0.26131496122122, -0.0259534033367855,
|
||||||
|
-0.00777266937872862, -0.00262135395843891, 0.000223790782655445, 6.40488537928934e-05,
|
||||||
|
7.75581514100296e-05, -9.25934285039627e-06},
|
||||||
|
{183.243883340634, -8.02281039502717, -10.0756951652703, 0.168750521462303,
|
||||||
|
0.314006821405967, 0.200264755034566, -0.0011895153717447, -0.00253812476819896,
|
||||||
|
-0.00291324393641628, -0.00140062522117514}};
|
||||||
|
float sus11coeffBeta[9][10] = {
|
||||||
|
{34.4499366074013, -0.438583698052091, 4.72111001451028, -0.041810050989433,
|
||||||
|
0.0562461093661426, 0.0856849892524893, -0.000477813051406167, -3.16404257494464e-05,
|
||||||
|
0.00102633196865105, 0.000552974013759876},
|
||||||
|
{7.6366298088699, 0.150314752958302, 1.31364679484924, 0.00557696667395871,
|
||||||
|
0.00163731860604376, -0.00454759608980269, 5.83979683674572e-05, 4.45944881220665e-05,
|
||||||
|
-4.27874746147066e-05, -8.77418673597557e-05},
|
||||||
|
{130.156215011893, 1.85759000444524, -10.986892391833, -0.00686275191260681,
|
||||||
|
-0.188837138116058, 0.346177462085361, -0.000183276946352264, -0.000702183496893294,
|
||||||
|
0.00293145272693857, -0.00318194442670715},
|
||||||
|
{-1.67854820161036, -0.358899332859806, 0.956690839640595, -4.93862910503803e-05,
|
||||||
|
-0.0136134783014874, -0.00848731301504507, 3.75950499927045e-05, 1.35374694383289e-06,
|
||||||
|
-0.000156596507890443, -0.000123254220377897},
|
||||||
|
{3.67569209537767, -0.387260959713287, 1.31343215605952, -0.00206444615206506,
|
||||||
|
0.00145334813110285, -0.00151259497696238, 0.000449492568365603, 6.95883968949488e-07,
|
||||||
|
0.000368585523744765, -6.3420715525635e-05},
|
||||||
|
{14.3296323024886, -0.182979476956897, 0.306817119309235, -0.00022212115978293,
|
||||||
|
0.00463485302909649, 0.0277574953550035, 1.1422454625565e-05, 1.06053257479502e-05,
|
||||||
|
-2.05720000720608e-05, -0.000338584671430337},
|
||||||
|
{-18.7534921817754, 1.14272710923224, 0.460498062012866, -0.00995826989278202,
|
||||||
|
0.0658502318647112, 0.00616942819937029, -7.70857153768402e-05, -0.000641755741925561,
|
||||||
|
0.00047849204592989, 0.000158509018296766},
|
||||||
|
{1.26543621388607, -0.176674379740481, 1.38814920935488, 0.00545485262295305,
|
||||||
|
-0.00499775616702264, 0.0038057039142173, -6.59604252054511e-05, 6.40211116049053e-05,
|
||||||
|
-6.74778593434431e-05, -2.81973589469059e-05},
|
||||||
|
{116.975421945286, -5.53022680362263, -5.61081660666997, 0.109754904982136,
|
||||||
|
0.167666815691513, 0.163137400730063, -0.000609874123906977, -0.00205336098697513,
|
||||||
|
-0.000889232196185857, -0.00168429567131815}};
|
||||||
|
|
||||||
|
float filterAlpha;
|
||||||
|
float sunThresh;
|
||||||
|
} susHandlingParameters;
|
||||||
|
|
||||||
|
struct GyrHandlingParameters {
|
||||||
|
double gyr0orientationMatrix[3][3] = {{0, 0, -1}, {0, -1, 0}, {-1, 0, 0}};
|
||||||
|
double gyr1orientationMatrix[3][3] = {{0, 0, -1}, {0, 1, 0}, {1, 0, 0}};
|
||||||
|
double gyr2orientationMatrix[3][3] = {{0, 0, -1}, {0, -1, 0}, {-1, 0, 0}};
|
||||||
|
double gyr3orientationMatrix[3][3] = {{0, 0, -1}, {0, 1, 0}, {1, 0, 0}};
|
||||||
|
// var = sqrt(sigma), sigma = RND*sqrt(freq), following values are RND^2 and not var as freq is
|
||||||
|
// assumed to be equal for the same class of sensors
|
||||||
|
float gyr02variance[3] = {pow(3.0e-3 * sqrt(2), 2), // RND_x = 3.0e-3 deg/s/sqrt(Hz) rms
|
||||||
|
pow(3.0e-3 * sqrt(2), 2), // RND_y = 3.0e-3 deg/s/sqrt(Hz) rms
|
||||||
|
pow(4.3e-3 * sqrt(2), 2)}; // RND_z = 4.3e-3 deg/s/sqrt(Hz) rms
|
||||||
|
float gyr13variance[3] = {pow(11e-3, 2), pow(11e-3, 2), pow(11e-3, 2)};
|
||||||
|
enum PreferAdis { NO = 0, YES = 1 };
|
||||||
|
uint8_t preferAdis = PreferAdis::YES;
|
||||||
|
} gyrHandlingParameters;
|
||||||
|
|
||||||
|
struct RwHandlingParameters {
|
||||||
|
double rw0orientationMatrix[3][3];
|
||||||
|
double rw1orientationMatrix[3][3];
|
||||||
|
double rw2orientationMatrix[3][3];
|
||||||
|
double rw3orientationMatrix[3][3];
|
||||||
|
double inertiaWheel = 0.000028198;
|
||||||
|
double maxTrq = 0.0032; // 3.2 [mNm]
|
||||||
|
} rwHandlingParameters;
|
||||||
|
|
||||||
|
struct RwMatrices {
|
||||||
|
double alignmentMatrix[3][4] = {{0.9205, 0.0000, -0.9205, 0.0000},
|
||||||
|
{0.0000, -0.9205, 0.0000, 0.9205},
|
||||||
|
{0.3907, 0.3907, 0.3907, 0.3907}};
|
||||||
|
double pseudoInverse[4][3] = {{0.4434, -0.2845, 0.3597},
|
||||||
|
{0.2136, -0.3317, 1.0123},
|
||||||
|
{-0.8672, -0.1406, 0.1778},
|
||||||
|
{0.6426, 0.4794, 1.3603}};
|
||||||
|
double without0[4][3];
|
||||||
|
double without1[4][3];
|
||||||
|
double without2[4][3];
|
||||||
|
double without3[4][3];
|
||||||
|
double nullspace[4] = {-0.7358, 0.5469, -0.3637, -0.1649};
|
||||||
|
} rwMatrices;
|
||||||
|
|
||||||
|
struct SafeModeControllerParameters {
|
||||||
|
double k_rate_mekf = 0.00059437;
|
||||||
|
double k_align_mekf = 0.000056875;
|
||||||
|
|
||||||
|
double k_rate_no_mekf;
|
||||||
|
double k_align_no_mekf;
|
||||||
|
double sunMagAngleMin;
|
||||||
|
|
||||||
|
double sunTargetDir[3] = {1, 0, 0}; // Body frame
|
||||||
|
double satRateRef[3]; // Body frame
|
||||||
|
|
||||||
|
} safeModeControllerParameters;
|
||||||
|
|
||||||
|
struct DetumbleCtrlParameters {
|
||||||
|
double gainD = pow(10.0, -3.3);
|
||||||
|
|
||||||
|
} detumbleCtrlParameters;
|
||||||
|
|
||||||
|
// ToDo: mutiple structs for different pointing mode controllers?
|
||||||
|
struct PointingModeControllerParameters {
|
||||||
|
double updtFlag;
|
||||||
|
double A_rw[3][12];
|
||||||
|
|
||||||
|
double refDirection[3] = {1, 0, 0};
|
||||||
|
double refRotRate[3] = {0, 0, 0};
|
||||||
|
double quatRef[4] = {0, 0, 0, 1};
|
||||||
|
bool avoidBlindStr = true;
|
||||||
|
double blindAvoidStart = 1.5;
|
||||||
|
double blindAvoidStop = 2.5;
|
||||||
|
double blindRotRate = 1 * M_PI / 180;
|
||||||
|
|
||||||
|
double zeta = 0.3;
|
||||||
|
double zetaLow;
|
||||||
|
double om = 0.3;
|
||||||
|
double omLow;
|
||||||
|
double omMax = 1 * M_PI / 180;
|
||||||
|
double qiMin = 0.1;
|
||||||
|
double gainNullspace = 0.01;
|
||||||
|
|
||||||
|
double desatMomentumRef[3] = {0, 0, 0};
|
||||||
|
double deSatGainFactor = 1000;
|
||||||
|
bool desatOn = true;
|
||||||
|
|
||||||
|
double omegaEarth = 0.000072921158553;
|
||||||
|
|
||||||
|
} inertialModeControllerParameters, nadirModeControllerParameters, targetModeControllerParameters;
|
||||||
|
|
||||||
|
struct StrParameters {
|
||||||
|
double exclusionAngle = 20 * M_PI / 180;
|
||||||
|
// double strOrientationMatrix[3][3];
|
||||||
|
double boresightAxis[3] = {0.7593, 0.0000, -0.6508}; // in body/geometry frame
|
||||||
|
} strParameters;
|
||||||
|
|
||||||
|
struct GpsParameters {
|
||||||
|
} gpsParameters;
|
||||||
|
|
||||||
|
struct GroundStationParameters {
|
||||||
|
double latitudeGs = 48.7495 * M_PI / 180.; // [rad] Latitude
|
||||||
|
double longitudeGs = 9.10384 * M_PI / 180.; // [rad] Longitude
|
||||||
|
double altitudeGs = 500; // [m] Altitude
|
||||||
|
double earthRadiusEquat = 6378137; // [m]
|
||||||
|
double earthRadiusPolar = 6356752.314; // [m]
|
||||||
|
} groundStationParameters; // Stuttgart
|
||||||
|
|
||||||
|
struct SunModelParameters {
|
||||||
|
enum UseSunModel { NO = 0, YES = 3 };
|
||||||
|
uint8_t useSunModel;
|
||||||
|
float domega = 36000.771;
|
||||||
|
float omega_0 = 282.94 * M_PI / 180.; // RAAN plus argument of perigee
|
||||||
|
float m_0 = 357.5256; // coefficients for mean anomaly
|
||||||
|
float dm = 35999.049; // coefficients for mean anomaly
|
||||||
|
float e = 23.4392911 * M_PI / 180.; // angle of earth's rotation axis
|
||||||
|
float e1 = 0.74508 * M_PI / 180.;
|
||||||
|
|
||||||
|
float p1 = 6892. / 3600. * M_PI / 180.; // some parameter
|
||||||
|
float p2 = 72. / 3600. * M_PI / 180.; // some parameter
|
||||||
|
} sunModelParameters;
|
||||||
|
|
||||||
|
struct KalmanFilterParameters {
|
||||||
|
uint8_t activateKalmanFilter;
|
||||||
|
uint8_t requestResetFlag;
|
||||||
|
double maxToleratedTimeBetweenKalmanFilterExecutionSteps;
|
||||||
|
double processNoiseOmega[3];
|
||||||
|
double processNoiseQuaternion[4];
|
||||||
|
|
||||||
|
double sensorNoiseSTR = 0.1 * M_PI / 180;
|
||||||
|
double sensorNoiseSS = 8 * M_PI / 180;
|
||||||
|
double sensorNoiseMAG = 4 * M_PI / 180;
|
||||||
|
double sensorNoiseRMU[3];
|
||||||
|
|
||||||
|
double sensorNoiseArwRmu; // Angular Random Walk
|
||||||
|
double sensorNoiseBsRMU; // Bias Stability
|
||||||
|
} kalmanFilterParameters;
|
||||||
|
|
||||||
|
struct MagnetorquesParameter {
|
||||||
|
double mtq0orientationMatrix[3][3] = {{1, 0, 0}, {0, 0, 1}, {0, -1, 0}};
|
||||||
|
double mtq1orientationMatrix[3][3] = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};
|
||||||
|
double mtq2orientationMatrix[3][3] = {{0, 0, 1}, {0, 1, 0}, {-1, 0, 0}};
|
||||||
|
double alignmentMatrixMtq[3][3] = {{0, 0, -1}, {-1, 0, 0}, {0, 1, 0}};
|
||||||
|
double inverseAlignment[3][3] = {{0, -1, 0}, {0, 0, 1}, {-1, 0, 0}};
|
||||||
|
double DipolMax = 0.2; // [Am^2]
|
||||||
|
|
||||||
|
} magnetorquesParameter;
|
||||||
|
|
||||||
|
struct DetumbleParameter {
|
||||||
|
uint8_t detumblecounter = 75; // 30 s
|
||||||
|
double omegaDetumbleStart = 2 * M_PI / 180;
|
||||||
|
double omegaDetumbleEnd = 0.4 * M_PI / 180;
|
||||||
|
double gainD = pow(10.0, -3.3);
|
||||||
|
} detumbleParameter;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ACSPARAMETERS_H_ */
|
74
mission/controller/acs/ActuatorCmd.cpp
Normal file
74
mission/controller/acs/ActuatorCmd.cpp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* ActuatorCmd.cpp
|
||||||
|
*
|
||||||
|
* Created on: 4 Aug 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ActuatorCmd.h"
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/constants.h>
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
#include "util/CholeskyDecomposition.h"
|
||||||
|
#include "util/MathOperations.h"
|
||||||
|
|
||||||
|
ActuatorCmd::ActuatorCmd(AcsParameters *acsParameters_) { acsParameters = *acsParameters_; }
|
||||||
|
|
||||||
|
ActuatorCmd::~ActuatorCmd() {}
|
||||||
|
|
||||||
|
void ActuatorCmd::cmdSpeedToRws(const int32_t *speedRw0, const int32_t *speedRw1,
|
||||||
|
const int32_t *speedRw2, const int32_t *speedRw3,
|
||||||
|
const double *rwTrqIn, const double *rwTrqNS, double *rwCmdSpeed) {
|
||||||
|
using namespace Math;
|
||||||
|
// Scaling the commanded torque to a maximum value
|
||||||
|
double torque[4] = {0, 0, 0, 0};
|
||||||
|
double maxTrq = acsParameters.rwHandlingParameters.maxTrq;
|
||||||
|
VectorOperations<double>::add(rwTrqIn, rwTrqNS, torque, 4);
|
||||||
|
|
||||||
|
double maxValue = 0;
|
||||||
|
for (int i = 0; i < 4; i++) { // size of torque, always 4 ?
|
||||||
|
if (abs(torque[i]) > maxValue) {
|
||||||
|
maxValue = abs(torque[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxValue > maxTrq) {
|
||||||
|
double scalingFactor = maxTrq / maxValue;
|
||||||
|
VectorOperations<double>::mulScalar(torque, scalingFactor, torque, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculating the commanded speed in RPM for every reaction wheel
|
||||||
|
double speedRws[4] = {(double)*speedRw0, (double)*speedRw1, (double)*speedRw2, (double)*speedRw3};
|
||||||
|
double deltaSpeed[4] = {0, 0, 0, 0};
|
||||||
|
double commandTime = acsParameters.onBoardParams.sampleTime,
|
||||||
|
inertiaWheel = acsParameters.rwHandlingParameters.inertiaWheel;
|
||||||
|
double radToRpm = 60 / (2 * PI); // factor for conversion to RPM
|
||||||
|
// W_RW = Torque_RW / I_RW * delta t [rad/s]
|
||||||
|
double factor = commandTime / inertiaWheel * radToRpm;
|
||||||
|
VectorOperations<double>::mulScalar(torque, factor, deltaSpeed, 4);
|
||||||
|
VectorOperations<double>::add(speedRws, deltaSpeed, rwCmdSpeed, 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ActuatorCmd::cmdDipolMtq(const double *dipolMoment, double *dipolMomentUnits) {
|
||||||
|
// Convert to Unit frame
|
||||||
|
MatrixOperations<double>::multiply(*acsParameters.magnetorquesParameter.inverseAlignment,
|
||||||
|
dipolMoment, dipolMomentUnits, 3, 3, 1);
|
||||||
|
// Scaling along largest element if dipol exceeds maximum
|
||||||
|
double maxDipol = acsParameters.magnetorquesParameter.DipolMax;
|
||||||
|
double maxValue = 0;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
if (abs(dipolMomentUnits[i]) > maxDipol) {
|
||||||
|
maxValue = abs(dipolMomentUnits[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (maxValue > maxDipol) {
|
||||||
|
double scalingFactor = maxDipol / maxValue;
|
||||||
|
VectorOperations<double>::mulScalar(dipolMomentUnits, scalingFactor, dipolMomentUnits, 3);
|
||||||
|
}
|
||||||
|
}
|
47
mission/controller/acs/ActuatorCmd.h
Normal file
47
mission/controller/acs/ActuatorCmd.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
/*
|
||||||
|
* ActuatorCmd.h
|
||||||
|
*
|
||||||
|
* Created on: 4 Aug 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ACTUATORCMD_H_
|
||||||
|
#define ACTUATORCMD_H_
|
||||||
|
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
#include "MultiplicativeKalmanFilter.h"
|
||||||
|
#include "SensorProcessing.h"
|
||||||
|
#include "SensorValues.h"
|
||||||
|
|
||||||
|
class ActuatorCmd {
|
||||||
|
public:
|
||||||
|
ActuatorCmd(AcsParameters *acsParameters_); // Input mode ?
|
||||||
|
virtual ~ActuatorCmd();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief: cmdSpeedToRws() will set the maximum possible torque for the reaction
|
||||||
|
* wheels, also will calculate the needed revolutions per minute for the RWs, which will be given
|
||||||
|
* as Input to the RWs
|
||||||
|
* @param: rwTrqIn given torque from pointing controller
|
||||||
|
* rwTrqNS Nullspace torque
|
||||||
|
* rwCmdSpeed output revolutions per minute for every
|
||||||
|
* reaction wheel
|
||||||
|
*/
|
||||||
|
void cmdSpeedToRws(const int32_t *speedRw0, const int32_t *speedRw1, const int32_t *speedRw2,
|
||||||
|
const int32_t *speedRw3, const double *rwTrqIn, const double *rwTrqNS,
|
||||||
|
double *rwCmdSpeed);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief: cmdDipolMtq() gives the commanded dipol moment for the magnetorques
|
||||||
|
*
|
||||||
|
* @param: dipolMoment given dipol moment in spacecraft frame
|
||||||
|
* dipolMomentUnits resulting dipol moment for every unit
|
||||||
|
*/
|
||||||
|
void cmdDipolMtq(const double *dipolMoment, double *dipolMomentUnits);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
private:
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ACTUATORCMD_H_ */
|
13
mission/controller/acs/CMakeLists.txt
Normal file
13
mission/controller/acs/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
target_sources(
|
||||||
|
${LIB_EIVE_MISSION}
|
||||||
|
PRIVATE AcsParameters.cpp
|
||||||
|
ActuatorCmd.cpp
|
||||||
|
Guidance.cpp
|
||||||
|
Igrf13Model.cpp
|
||||||
|
MultiplicativeKalmanFilter.cpp
|
||||||
|
Navigation.cpp
|
||||||
|
SensorProcessing.cpp
|
||||||
|
SensorValues.cpp
|
||||||
|
SusConverter.cpp)
|
||||||
|
|
||||||
|
add_subdirectory(control)
|
317
mission/controller/acs/Guidance.cpp
Normal file
317
mission/controller/acs/Guidance.cpp
Normal file
@ -0,0 +1,317 @@
|
|||||||
|
/*
|
||||||
|
* Guidance.cpp
|
||||||
|
*
|
||||||
|
* Created on: 6 Jun 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Guidance.h"
|
||||||
|
|
||||||
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "string.h"
|
||||||
|
#include "util/CholeskyDecomposition.h"
|
||||||
|
#include "util/MathOperations.h"
|
||||||
|
|
||||||
|
Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = *acsParameters_; }
|
||||||
|
|
||||||
|
Guidance::~Guidance() {}
|
||||||
|
|
||||||
|
void Guidance::getTargetParamsSafe(double sunTargetSafe[3], double satRateSafe[3]) {
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
sunTargetSafe[i] = acsParameters.safeModeControllerParameters.sunTargetDir[i];
|
||||||
|
satRateSafe[i] = acsParameters.safeModeControllerParameters.satRateRef[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
// memcpy(sunTargetSafe, acsParameters.safeModeControllerParameters.sunTargetDir, 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Guidance::targetQuatPtg(ACS::SensorValues *sensorValues, acsctrl::MekfData *mekfData,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed, timeval now,
|
||||||
|
double targetQuat[4], double refSatRate[3]) {
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// Calculation of target quaternion to groundstation
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// Transform longitude, latitude and altitude of groundstation to cartesian coordiantes (earth
|
||||||
|
// fixed/centered frame)
|
||||||
|
double groundStationCart[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
MathOperations<double>::cartesianFromLatLongAlt(acsParameters.groundStationParameters.latitudeGs,
|
||||||
|
acsParameters.groundStationParameters.longitudeGs,
|
||||||
|
acsParameters.groundStationParameters.altitudeGs,
|
||||||
|
groundStationCart);
|
||||||
|
|
||||||
|
// Position of the satellite in the earth/fixed frame via GPS
|
||||||
|
double posSatE[3] = {0, 0, 0};
|
||||||
|
MathOperations<double>::cartesianFromLatLongAlt(sensorValues->gpsSet.latitude.value,
|
||||||
|
sensorValues->gpsSet.longitude.value,
|
||||||
|
sensorValues->gpsSet.altitude.value, posSatE);
|
||||||
|
|
||||||
|
// Target direction in the ECEF frame
|
||||||
|
double targetDirE[3] = {0, 0, 0};
|
||||||
|
VectorOperations<double>::subtract(groundStationCart, posSatE, targetDirE, 3);
|
||||||
|
|
||||||
|
// Transformation between ECEF and IJK frame
|
||||||
|
double dcmEJ[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
double dcmJE[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
MathOperations<double>::dcmEJ(now, *dcmEJ);
|
||||||
|
MathOperations<double>::inverseMatrixDimThree(*dcmEJ, *dcmJE);
|
||||||
|
// Derivative of dmcEJ WITHOUT PRECISSION AND NUTATION
|
||||||
|
double dcmEJDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
double dcmJEDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
double dcmDot[3][3] = {{0, 1, 0}, {-1, 0, 0}, {0, 0, 0}};
|
||||||
|
double omegaEarth = acsParameters.targetModeControllerParameters.omegaEarth;
|
||||||
|
|
||||||
|
// TEST SECTION !
|
||||||
|
// double dcmTEST[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
// MatrixOperations<double>::multiply(&acsParameters.magnetorquesParameter.mtq0orientationMatrix,
|
||||||
|
// dcmTEST, dcmTEST, 3, 3, 3);
|
||||||
|
|
||||||
|
MatrixOperations<double>::multiply(*dcmDot, *dcmEJ, *dcmEJDot, 3, 3, 3);
|
||||||
|
MatrixOperations<double>::multiplyScalar(*dcmEJDot, omegaEarth, *dcmEJDot, 3, 3);
|
||||||
|
MathOperations<double>::inverseMatrixDimThree(*dcmEJDot, *dcmJEDot);
|
||||||
|
|
||||||
|
// Transformation between ECEF and Body frame
|
||||||
|
double dcmBJ[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
double dcmBE[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
double quatBJ[4] = {0, 0, 0, 0};
|
||||||
|
std::memcpy(quatBJ, mekfData->quatMekf.value, 4 * sizeof(double));
|
||||||
|
|
||||||
|
QuaternionOperations::toDcm(quatBJ, dcmBJ);
|
||||||
|
MatrixOperations<double>::multiply(*dcmBJ, *dcmJE, *dcmBE, 3, 3, 3);
|
||||||
|
|
||||||
|
// Target Direction in the body frame
|
||||||
|
double targetDirB[3] = {0, 0, 0};
|
||||||
|
MatrixOperations<double>::multiply(*dcmBE, targetDirE, targetDirB, 3, 3, 1);
|
||||||
|
|
||||||
|
// rotation quaternion from two vectors
|
||||||
|
double refDir[3] = {0, 0, 0};
|
||||||
|
refDir[0] = acsParameters.targetModeControllerParameters.refDirection[0];
|
||||||
|
refDir[1] = acsParameters.targetModeControllerParameters.refDirection[1];
|
||||||
|
refDir[2] = acsParameters.targetModeControllerParameters.refDirection[2];
|
||||||
|
double noramlizedTargetDirB[3] = {0, 0, 0};
|
||||||
|
VectorOperations<double>::normalize(targetDirB, noramlizedTargetDirB, 3);
|
||||||
|
VectorOperations<double>::normalize(refDir, refDir, 3);
|
||||||
|
double normTargetDirB = VectorOperations<double>::norm(noramlizedTargetDirB, 3);
|
||||||
|
double normRefDir = VectorOperations<double>::norm(refDir, 3);
|
||||||
|
double crossDir[3] = {0, 0, 0};
|
||||||
|
double dotDirections = VectorOperations<double>::dot(noramlizedTargetDirB, refDir);
|
||||||
|
VectorOperations<double>::cross(noramlizedTargetDirB, refDir, crossDir);
|
||||||
|
targetQuat[0] = crossDir[0];
|
||||||
|
targetQuat[1] = crossDir[1];
|
||||||
|
targetQuat[2] = crossDir[2];
|
||||||
|
targetQuat[3] = sqrt(pow(normTargetDirB, 2) * pow(normRefDir, 2) + dotDirections);
|
||||||
|
VectorOperations<double>::normalize(targetQuat, targetQuat, 4);
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// Calculation of reference rotation rate
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
double velSatE[3] = {0, 0, 0};
|
||||||
|
velSatE[0] = 0.0; // sensorValues->gps0Velocity[0];
|
||||||
|
velSatE[1] = 0.0; // sensorValues->gps0Velocity[1];
|
||||||
|
velSatE[2] = 0.0; // sensorValues->gps0Velocity[2];
|
||||||
|
double velSatB[3] = {0, 0, 0}, velSatBPart1[3] = {0, 0, 0}, velSatBPart2[3] = {0, 0, 0};
|
||||||
|
// Velocity: v_B = dcm_BI * dcmIE * v_E + dcm_BI * DotDcm_IE * v_E
|
||||||
|
MatrixOperations<double>::multiply(*dcmBE, velSatE, velSatBPart1, 3, 3, 1);
|
||||||
|
double dcmBEDot[3][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}};
|
||||||
|
MatrixOperations<double>::multiply(*dcmBJ, *dcmJEDot, *dcmBEDot, 3, 3, 3);
|
||||||
|
MatrixOperations<double>::multiply(*dcmBEDot, posSatE, velSatBPart2, 3, 3, 1);
|
||||||
|
VectorOperations<double>::add(velSatBPart1, velSatBPart2, velSatB, 3);
|
||||||
|
|
||||||
|
double normVelSatB = VectorOperations<double>::norm(velSatB, 3);
|
||||||
|
double normRefSatRate = normVelSatB / normTargetDirB;
|
||||||
|
|
||||||
|
double satRateDir[3] = {0, 0, 0};
|
||||||
|
VectorOperations<double>::cross(velSatB, targetDirB, satRateDir);
|
||||||
|
VectorOperations<double>::normalize(satRateDir, satRateDir, 3);
|
||||||
|
VectorOperations<double>::mulScalar(satRateDir, normRefSatRate, refSatRate, 3);
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
// Calculation of reference rotation rate in case of star tracker blinding
|
||||||
|
//-------------------------------------------------------------------------------------
|
||||||
|
if (acsParameters.targetModeControllerParameters.avoidBlindStr) {
|
||||||
|
double sunDirJ[3] = {0, 0, 0};
|
||||||
|
double sunDirB[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
if (susDataProcessed->sunIjkModel.isValid()) {
|
||||||
|
std::memcpy(sunDirJ, susDataProcessed->sunIjkModel.value, 3 * sizeof(double));
|
||||||
|
MatrixOperations<double>::multiply(*dcmBJ, sunDirJ, sunDirB, 3, 3, 1);
|
||||||
|
} else {
|
||||||
|
std::memcpy(sunDirB, susDataProcessed->susVecTot.value, 3 * sizeof(double));
|
||||||
|
}
|
||||||
|
|
||||||
|
double exclAngle = acsParameters.strParameters.exclusionAngle,
|
||||||
|
blindStart = acsParameters.targetModeControllerParameters.blindAvoidStart,
|
||||||
|
blindEnd = acsParameters.targetModeControllerParameters.blindAvoidStop;
|
||||||
|
double sightAngleSun =
|
||||||
|
VectorOperations<double>::dot(acsParameters.strParameters.boresightAxis, sunDirB);
|
||||||
|
|
||||||
|
if (!(strBlindAvoidFlag)) {
|
||||||
|
double critSightAngle = blindStart * exclAngle;
|
||||||
|
|
||||||
|
if (sightAngleSun < critSightAngle) {
|
||||||
|
strBlindAvoidFlag = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
if (sightAngleSun < blindEnd * exclAngle) {
|
||||||
|
double normBlindRefRate = acsParameters.targetModeControllerParameters.blindRotRate;
|
||||||
|
double blindRefRate[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
if (sunDirB[1] < 0) {
|
||||||
|
blindRefRate[0] = normBlindRefRate;
|
||||||
|
blindRefRate[1] = 0;
|
||||||
|
blindRefRate[2] = 0;
|
||||||
|
} else {
|
||||||
|
blindRefRate[0] = -normBlindRefRate;
|
||||||
|
blindRefRate[1] = 0;
|
||||||
|
blindRefRate[2] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
VectorOperations<double>::add(blindRefRate, refSatRate, refSatRate, 3);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
strBlindAvoidFlag = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Guidance::comparePtg(double targetQuat[4], acsctrl::MekfData *mekfData, double refSatRate[3],
|
||||||
|
double quatErrorComplete[4], double quatError[3], double deltaRate[3]) {
|
||||||
|
double quatRef[4] = {0, 0, 0, 0};
|
||||||
|
quatRef[0] = acsParameters.targetModeControllerParameters.quatRef[0];
|
||||||
|
quatRef[1] = acsParameters.targetModeControllerParameters.quatRef[1];
|
||||||
|
quatRef[2] = acsParameters.targetModeControllerParameters.quatRef[2];
|
||||||
|
quatRef[3] = acsParameters.targetModeControllerParameters.quatRef[3];
|
||||||
|
|
||||||
|
double satRate[3] = {0, 0, 0};
|
||||||
|
std::memcpy(satRate, mekfData->satRotRateMekf.value, 3 * sizeof(double));
|
||||||
|
VectorOperations<double>::subtract(satRate, refSatRate, deltaRate, 3);
|
||||||
|
// valid checks ?
|
||||||
|
double quatErrorMtx[4][4] = {{quatRef[3], quatRef[2], -quatRef[1], -quatRef[0]},
|
||||||
|
{-quatRef[2], quatRef[3], quatRef[0], -quatRef[1]},
|
||||||
|
{quatRef[1], -quatRef[0], quatRef[3], -quatRef[2]},
|
||||||
|
{quatRef[0], -quatRef[1], quatRef[2], quatRef[3]}};
|
||||||
|
|
||||||
|
MatrixOperations<double>::multiply(*quatErrorMtx, targetQuat, quatErrorComplete, 4, 4, 1);
|
||||||
|
|
||||||
|
if (quatErrorComplete[3] < 0) {
|
||||||
|
quatErrorComplete[3] *= -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
quatError[0] = quatErrorComplete[0];
|
||||||
|
quatError[1] = quatErrorComplete[1];
|
||||||
|
quatError[2] = quatErrorComplete[2];
|
||||||
|
|
||||||
|
// target flag in matlab, importance, does look like it only gives
|
||||||
|
// feedback if pointing control is under 150 arcsec ??
|
||||||
|
}
|
||||||
|
|
||||||
|
void Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv) {
|
||||||
|
if (sensorValues->rw1Set.isValid() && sensorValues->rw2Set.isValid() &&
|
||||||
|
sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) {
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.pseudoInverse[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.pseudoInverse[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.pseudoInverse[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.pseudoInverse[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.pseudoInverse[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.pseudoInverse[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.pseudoInverse[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.pseudoInverse[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.pseudoInverse[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.pseudoInverse[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.pseudoInverse[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.pseudoInverse[3][2];
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (!(sensorValues->rw1Set.isValid()) && sensorValues->rw2Set.isValid() &&
|
||||||
|
sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) {
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.without0[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.without0[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.without0[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.without0[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.without0[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.without0[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.without0[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.without0[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.without0[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.without0[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.without0[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.without0[3][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ((sensorValues->rw1Set.isValid()) && !(sensorValues->rw2Set.isValid()) &&
|
||||||
|
sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) {
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.without1[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.without1[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.without1[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.without1[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.without1[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.without1[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.without1[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.without1[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.without1[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.without1[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.without1[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.without1[3][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ((sensorValues->rw1Set.isValid()) && (sensorValues->rw2Set.isValid()) &&
|
||||||
|
!(sensorValues->rw3Set.isValid()) && sensorValues->rw4Set.isValid()) {
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.without2[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.without2[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.without2[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.without2[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.without2[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.without2[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.without2[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.without2[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.without2[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.without2[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.without2[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.without2[3][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
else if ((sensorValues->rw1Set.isValid()) && (sensorValues->rw2Set.isValid()) &&
|
||||||
|
(sensorValues->rw3Set.isValid()) && !(sensorValues->rw4Set.isValid())) {
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.without3[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.without3[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.without3[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.without3[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.without3[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.without3[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.without3[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.without3[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.without3[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.without3[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.without3[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.without3[3][2];
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
// @note: This one takes the normal pseudoInverse of all four raction wheels valid.
|
||||||
|
// Does not make sense, but is implemented that way in MATLAB ?!
|
||||||
|
// Thought: It does not really play a role, because in case there are more then one
|
||||||
|
// reaction wheel the pointing control is destined to fail.
|
||||||
|
rwPseudoInv[0] = acsParameters.rwMatrices.pseudoInverse[0][0];
|
||||||
|
rwPseudoInv[1] = acsParameters.rwMatrices.pseudoInverse[0][1];
|
||||||
|
rwPseudoInv[2] = acsParameters.rwMatrices.pseudoInverse[0][2];
|
||||||
|
rwPseudoInv[3] = acsParameters.rwMatrices.pseudoInverse[1][0];
|
||||||
|
rwPseudoInv[4] = acsParameters.rwMatrices.pseudoInverse[1][1];
|
||||||
|
rwPseudoInv[5] = acsParameters.rwMatrices.pseudoInverse[1][2];
|
||||||
|
rwPseudoInv[6] = acsParameters.rwMatrices.pseudoInverse[2][0];
|
||||||
|
rwPseudoInv[7] = acsParameters.rwMatrices.pseudoInverse[2][1];
|
||||||
|
rwPseudoInv[8] = acsParameters.rwMatrices.pseudoInverse[2][2];
|
||||||
|
rwPseudoInv[9] = acsParameters.rwMatrices.pseudoInverse[3][0];
|
||||||
|
rwPseudoInv[10] = acsParameters.rwMatrices.pseudoInverse[3][1];
|
||||||
|
rwPseudoInv[11] = acsParameters.rwMatrices.pseudoInverse[3][2];
|
||||||
|
}
|
||||||
|
}
|
44
mission/controller/acs/Guidance.h
Normal file
44
mission/controller/acs/Guidance.h
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
* Guidance.h
|
||||||
|
*
|
||||||
|
* Created on: 6 Jun 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef GUIDANCE_H_
|
||||||
|
#define GUIDANCE_H_
|
||||||
|
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
#include "SensorValues.h"
|
||||||
|
|
||||||
|
class Guidance {
|
||||||
|
public:
|
||||||
|
Guidance(AcsParameters *acsParameters_);
|
||||||
|
virtual ~Guidance();
|
||||||
|
|
||||||
|
void getTargetParamsSafe(double sunTargetSafe[3], double satRateRef[3]);
|
||||||
|
|
||||||
|
// Function to get the target quaternion and refence rotation rate from gps position and position
|
||||||
|
// of the ground station
|
||||||
|
void targetQuatPtg(ACS::SensorValues *sensorValues, acsctrl::MekfData *mekfData,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed, timeval now, double targetQuat[4],
|
||||||
|
double refSatRate[3]);
|
||||||
|
|
||||||
|
// @note: compares target Quaternion and reference quaternion, also actual satellite rate and
|
||||||
|
// desired
|
||||||
|
void comparePtg(double targetQuat[4], acsctrl::MekfData *mekfData, double refSatRate[3],
|
||||||
|
double quatErrorComplete[4], double quatError[3], double deltaRate[3]);
|
||||||
|
|
||||||
|
// @note: will give back the pseudoinverse matrix for the reaction wheel depending on the valid
|
||||||
|
// reation wheel maybe can be done in "commanding.h"
|
||||||
|
void getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv);
|
||||||
|
|
||||||
|
private:
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
bool strBlindAvoidFlag = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ACS_GUIDANCE_H_ */
|
125
mission/controller/acs/Igrf13Model.cpp
Normal file
125
mission/controller/acs/Igrf13Model.cpp
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
/*
|
||||||
|
* Igrf13Model.cpp
|
||||||
|
*
|
||||||
|
* Created on: 10 Mar 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Igrf13Model.h"
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/constants.h>
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "util/MathOperations.h"
|
||||||
|
|
||||||
|
Igrf13Model::Igrf13Model() {}
|
||||||
|
Igrf13Model::~Igrf13Model() {}
|
||||||
|
|
||||||
|
void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
||||||
|
const double altitude, timeval timeOfMagMeasurement,
|
||||||
|
double* magFieldModelInertial) {
|
||||||
|
double phi = longitude, theta = gcLatitude; // geocentric
|
||||||
|
/* Here is the co-latitude needed*/
|
||||||
|
theta -= 90 * Math::PI / 180;
|
||||||
|
theta *= (-1);
|
||||||
|
|
||||||
|
double rE = 6371200.0; // radius earth [m]
|
||||||
|
/* Predefine recursive associated Legendre polynomials */
|
||||||
|
double P11 = 1;
|
||||||
|
double P10 = P11; // P10 = P(n-1,m-0)
|
||||||
|
double dP11 = 0; // derivative
|
||||||
|
double dP10 = dP11; // derivative
|
||||||
|
|
||||||
|
double P2 = 0, dP2 = 0, P20 = 0, dP20 = 0, K = 0;
|
||||||
|
|
||||||
|
for (int m = 0; m <= igrfOrder; m++) {
|
||||||
|
for (int n = 1; n <= igrfOrder; n++) {
|
||||||
|
if (m <= n) {
|
||||||
|
/* Calculation of Legendre Polynoms (normalised) */
|
||||||
|
if (n == m) {
|
||||||
|
P2 = sin(theta) * P11;
|
||||||
|
dP2 = sin(theta) * dP11 - cos(theta) * P11;
|
||||||
|
P11 = P2;
|
||||||
|
P10 = P11;
|
||||||
|
P20 = 0;
|
||||||
|
dP11 = dP2;
|
||||||
|
dP10 = dP11;
|
||||||
|
dP20 = 0;
|
||||||
|
} else if (n == 1) {
|
||||||
|
P2 = cos(theta) * P10;
|
||||||
|
dP2 = cos(theta) * dP10 - sin(theta) * P10;
|
||||||
|
P20 = P10;
|
||||||
|
P10 = P2;
|
||||||
|
dP20 = dP10;
|
||||||
|
dP10 = dP2;
|
||||||
|
} else {
|
||||||
|
K = (pow((n - 1), 2) - pow(m, 2)) / ((2 * n - 1) * (2 * n - 3));
|
||||||
|
P2 = cos(theta) * P10 - K * P20;
|
||||||
|
dP2 = cos(theta) * dP10 - sin(theta) * P10 - K * dP20;
|
||||||
|
P20 = P10;
|
||||||
|
P10 = P2;
|
||||||
|
dP20 = dP10;
|
||||||
|
dP10 = dP2;
|
||||||
|
}
|
||||||
|
/* gradient of scalar potential towards radius */
|
||||||
|
magFieldModel[0] +=
|
||||||
|
pow(rE / (altitude + rE), (n + 2)) * (n + 1) *
|
||||||
|
((updatedG[m][n - 1] * cos(m * phi) + updatedH[m][n - 1] * sin(m * phi)) * P2);
|
||||||
|
/* gradient of scalar potential towards phi */
|
||||||
|
magFieldModel[1] +=
|
||||||
|
pow(rE / (altitude + rE), (n + 2)) *
|
||||||
|
((updatedG[m][n - 1] * cos(m * phi) + updatedH[m][n - 1] * sin(m * phi)) * dP2);
|
||||||
|
/* gradient of scalar potential towards theta */
|
||||||
|
magFieldModel[2] +=
|
||||||
|
pow(rE / (altitude + rE), (n + 2)) *
|
||||||
|
((-updatedG[m][n - 1] * sin(m * phi) + updatedH[m][n - 1] * cos(m * phi)) * P2 * m);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
magFieldModel[1] *= -1;
|
||||||
|
magFieldModel[2] *= (-1 / sin(theta));
|
||||||
|
|
||||||
|
/* Next step: transform into inertial KOS (IJK)*/
|
||||||
|
// Julean Centuries
|
||||||
|
double JD2000Floor = 0;
|
||||||
|
double JD2000 = MathOperations<double>::convertUnixToJD2000(timeOfMagMeasurement);
|
||||||
|
JD2000Floor = floor(JD2000);
|
||||||
|
double JC2000 = JD2000Floor / 36525;
|
||||||
|
|
||||||
|
double gst = 100.4606184 + 36000.77005361 * JC2000 + 0.00038793 * pow(JC2000, 2) -
|
||||||
|
0.000000026 * pow(JC2000, 3); // greenwich sidereal time
|
||||||
|
gst *= PI / 180; // convert to radians
|
||||||
|
double sec =
|
||||||
|
(JD2000 - JD2000Floor) * 86400; // Seconds on this day (Universal time) // FROM GPS ?
|
||||||
|
double omega0 = 0.00007292115; // mean angular velocity earth [rad/s]
|
||||||
|
gst += omega0 * sec;
|
||||||
|
|
||||||
|
double lst = gst + longitude; // local sidereal time [rad]
|
||||||
|
|
||||||
|
magFieldModelInertial[0] = magFieldModel[0] * cos(theta) +
|
||||||
|
magFieldModel[1] * sin(theta) * cos(lst) - magFieldModel[1] * sin(lst);
|
||||||
|
magFieldModelInertial[1] = magFieldModel[0] * cos(theta) +
|
||||||
|
magFieldModel[1] * sin(theta) * sin(lst) + magFieldModel[1] * cos(lst);
|
||||||
|
magFieldModelInertial[2] = magFieldModel[0] * sin(theta) + magFieldModel[1] * cos(lst);
|
||||||
|
|
||||||
|
double normVecMagFieldInert[3] = {0, 0, 0};
|
||||||
|
VectorOperations<double>::normalize(magFieldModelInertial, normVecMagFieldInert, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Igrf13Model::updateCoeffGH(timeval timeOfMagMeasurement) {
|
||||||
|
double JD2000Igrf = (2458850.0 - 2451545); // Begin of IGRF-13 (2020-01-01,00:00:00) in JD2000
|
||||||
|
double JD2000 = MathOperations<double>::convertUnixToJD2000(timeOfMagMeasurement);
|
||||||
|
double days = ceil(JD2000 - JD2000Igrf);
|
||||||
|
for (int i = 0; i <= igrfOrder; i++) {
|
||||||
|
for (int j = 0; j <= (igrfOrder - 1); j++) {
|
||||||
|
updatedG[i][j] = coeffG[i][j] + svG[i][j] * (days / 365);
|
||||||
|
updatedH[i][j] = coeffH[i][j] + svH[i][j] * (days / 365);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
122
mission/controller/acs/Igrf13Model.h
Normal file
122
mission/controller/acs/Igrf13Model.h
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
/*
|
||||||
|
* Igrf13Model.h
|
||||||
|
*
|
||||||
|
* Created on: 10 Mar 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
* Description: Calculates the magnetic field vector of earth with the IGRF Model.
|
||||||
|
* Sources: https://www.ngdc.noaa.gov/IAGA/vmod/igrf.html
|
||||||
|
* https://doi.org/10.1186/s40623-020-01288-x
|
||||||
|
* J. Davis, Mathematical Modeling of Earth's Magnetic Field, TN, 2004
|
||||||
|
*
|
||||||
|
* [Conversion of ENU (geocentric) to IJK: Skript Bahnmechanik für Raumfahrzeuge,
|
||||||
|
* Prof. Dr.-Ing. Stefanos Fasoulas / Dr.-Ing. Frank Zimmermann]
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef IGRF13MODEL_H_
|
||||||
|
#define IGRF13MODEL_H_
|
||||||
|
|
||||||
|
#include <fsfw/parameters/HasParametersIF.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
// Output should be transformed to [T] instead of [nT]
|
||||||
|
// Updating Coefficients has to be implemented yet. Question, updating everyday ?
|
||||||
|
class Igrf13Model /*:public HasParametersIF*/ {
|
||||||
|
public:
|
||||||
|
Igrf13Model();
|
||||||
|
virtual ~Igrf13Model();
|
||||||
|
|
||||||
|
// Main Function
|
||||||
|
void magFieldComp(const double longitude, const double gcLatitude, const double altitude,
|
||||||
|
timeval timeOfMagMeasurement, double* magFieldModelInertial);
|
||||||
|
// Right now the radius for igrf is simply with r0 + altitude calculated. In reality the radius is
|
||||||
|
// oriented from the satellite to earth COM Difference up to 25 km, which is 5 % of the total
|
||||||
|
// flight altitude
|
||||||
|
/* Inputs:
|
||||||
|
* - longitude: geocentric longitude [rad]
|
||||||
|
* - latitude: geocentric latitude [rad]
|
||||||
|
* - altitude: [m]
|
||||||
|
* - timeOfMagMeasurement: time of actual measurement [s]
|
||||||
|
*
|
||||||
|
* Outputs:
|
||||||
|
* - magFieldModelInertial: Magnetic Field Vector in IJK KOS [nT]*/
|
||||||
|
|
||||||
|
// Coefficient wary over year, could be updated sometimes.
|
||||||
|
void updateCoeffGH(timeval timeOfMagMeasurement); // Secular variation (SV)
|
||||||
|
double magFieldModel[3];
|
||||||
|
|
||||||
|
private:
|
||||||
|
const double coeffG[14][13] = {
|
||||||
|
{-29404.8, -2499.6, 1363.2, 903.0, -234.3, 66.0, 80.6, 23.7, 5.0, -1.9, 3.0, -2.0, 0.1},
|
||||||
|
{-1450.9, 2982.0, -2381.2, 809.5, 363.2, 65.5, -76.7, 9.7, 8.4, -6.2, -1.4, -0.1, -0.9},
|
||||||
|
{0.0, 1677.0, 1236.2, 86.3, 187.8, 72.9, -8.2, -17.6, 2.9, -0.1, -2.5, 0.5, 0.5},
|
||||||
|
{0.0, 0.0, 525.7, -309.4, -140.7, -121.5, 56.5, -0.5, -1.5, 1.7, 2.3, 1.3, 0.7},
|
||||||
|
{0.0, 0.0, 0.0, 48.0, -151.2, -36.2, 15.8, -21.1, -1.1, -0.9, -0.9, -1.2, -0.3},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 13.5, 13.5, 6.4, 15.3, -13.2, 0.7, 0.3, 0.7, 0.8},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, -64.7, -7.2, 13.7, 1.1, -0.9, -0.7, 0.3, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.8, -16.5, 8.8, 1.9, -0.1, 0.5, 0.8},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.3, -9.3, 1.4, 1.4, -0.3, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -11.9, -2.4, -0.6, -0.5, 0.4},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -3.8, 0.2, 0.1, 0.1},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3.1, -1.1, 0.5},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.3, -0.5},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.4}}; // [m][n] in nT
|
||||||
|
|
||||||
|
const double coeffH[14][13] = {
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0},
|
||||||
|
{4652.5, -2991.6, -82.1, 281.9, 47.7, -19.1, -51.5, 8.4, -23.4, 3.4, 0.0, -1.2, -0.9},
|
||||||
|
{0.0, -734.6, 241.9, -158.4, 208.3, 25.1, -16.9, -15.3, 11.0, -0.2, 2.5, 0.5, 0.6},
|
||||||
|
{0.0, 0.0, -543.4, 199.7, -121.2, 52.8, 2.2, 12.8, 9.8, 3.6, -0.6, 1.4, 1.4},
|
||||||
|
{0.0, 0.0, 0.0, -349.7, 32.3, -64.5, 23.5, -11.7, -5.1, 4.8, -0.4, -1.8, -0.4},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 98.9, 8.9, -2.2, 14.9, -6.3, -8.6, 0.6, 0.1, -1.3},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 68.1, -27.2, 3.6, 7.8, -0.1, -0.2, 0.8, -0.1},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -1.8, -6.9, 0.4, -4.3, -1.7, -0.2, 0.3},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.8, -1.4, -3.4, -1.6, 0.6, -0.1},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.6, -0.1, -3.0, 0.2, 0.5},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -8.8, -2.0, -0.9, 0.5},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -2.6, 0.0, -0.4},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, -0.4},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.6}}; // [m][n] in nT
|
||||||
|
|
||||||
|
const double svG[14][13] = {
|
||||||
|
{5.7, -11.0, 2.2, -1.2, -0.3, -0.5, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{7.4, -7.0, -5.9, -1.6, 0.5, -0.3, -0.2, 0.1, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, -2.1, 3.1, -5.9, -0.6, 0.4, 0.0, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, -12.0, 5.2, 0.2, 1.3, 0.7, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, -5.1, 1.3, -1.4, 0.1, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.9, 0.0, -0.5, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.9, -0.8, 0.3, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.8, -0.1, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; // [m][n] in nT
|
||||||
|
|
||||||
|
const double svH[14][13] = {
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{-25.9, -30.2, 6.0, -0.1, 0.0, 0.0, 0.6, -0.2, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, -22.4, -1.1, 6.5, 2.5, -1.6, 0.6, 0.6, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.5, 3.6, -0.6, -1.3, -0.8, -0.2, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, -5.0, 3.0, 0.8, -0.2, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.3, 0.0, -1.1, -0.3, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.1, -0.4, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0},
|
||||||
|
{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}}; // [m][n] in nT
|
||||||
|
|
||||||
|
double updatedG[14][13];
|
||||||
|
double updatedH[14][13];
|
||||||
|
static const int igrfOrder = 13; // degree of truncation
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* IGRF13MODEL_H_ */
|
1186
mission/controller/acs/MultiplicativeKalmanFilter.cpp
Normal file
1186
mission/controller/acs/MultiplicativeKalmanFilter.cpp
Normal file
File diff suppressed because it is too large
Load Diff
100
mission/controller/acs/MultiplicativeKalmanFilter.h
Normal file
100
mission/controller/acs/MultiplicativeKalmanFilter.h
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
/*
|
||||||
|
* MultiplicativeKalmanFilter.h
|
||||||
|
*
|
||||||
|
* Created on: 4 Feb 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*
|
||||||
|
* @brief: This class handles the calculation of an estimated quaternion and the gyro bias by
|
||||||
|
* means of the spacecraft attitude sensors
|
||||||
|
*
|
||||||
|
* @note: A description of the used algorithms can be found in the bachelor thesis of Robin
|
||||||
|
* Marquardt
|
||||||
|
* https://eive-cloud.irs.uni-stuttgart.de/index.php/apps/files/?dir=/EIVE_Studenten/Marquardt_Robin&openfile=500811
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MULTIPLICATIVEKALMANFILTER_H_
|
||||||
|
#define MULTIPLICATIVEKALMANFILTER_H_
|
||||||
|
|
||||||
|
#include <stdint.h> //uint8_t
|
||||||
|
#include <time.h> /*purpose, timeval ?*/
|
||||||
|
|
||||||
|
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
#include "config/classIds.h"
|
||||||
|
|
||||||
|
class MultiplicativeKalmanFilter {
|
||||||
|
public:
|
||||||
|
/* @brief: Constructor
|
||||||
|
* @param: acsParameters_ Pointer to object which defines the ACS configuration parameters
|
||||||
|
*/
|
||||||
|
MultiplicativeKalmanFilter(AcsParameters *acsParameters_);
|
||||||
|
virtual ~MultiplicativeKalmanFilter();
|
||||||
|
|
||||||
|
void reset(); // NOT YET DEFINED - should only reset all mekf variables
|
||||||
|
|
||||||
|
/* @brief: init() - This function initializes the Kalman Filter and will provide the first
|
||||||
|
* quaternion through the QUEST algorithm
|
||||||
|
* @param: magneticField_ magnetic field vector in the body frame
|
||||||
|
* sunDir_ sun direction vector in the body frame
|
||||||
|
* sunDirJ sun direction vector in the ECI frame
|
||||||
|
* magFieldJ magnetic field vector in the ECI frame
|
||||||
|
*/
|
||||||
|
void init(const double *magneticField_, const bool validMagField_, const double *sunDir_,
|
||||||
|
const bool validSS, const double *sunDirJ, const bool validSSModel,
|
||||||
|
const double *magFieldJ, const bool validMagModel);
|
||||||
|
|
||||||
|
/* @brief: mekfEst() - This function calculates the quaternion and gyro bias of the Kalman Filter
|
||||||
|
* for the current step after the initalization
|
||||||
|
* @param: quaternionSTR Star Tracker Quaternion between from body to ECI frame
|
||||||
|
* rateGYRs_ Estimated satellite rotation rate from the
|
||||||
|
* Gyroscopes [rad/s] magneticField_ magnetic field vector in the body frame sunDir_
|
||||||
|
* sun direction vector in the body frame sunDirJ sun direction vector in the ECI
|
||||||
|
* frame magFieldJ magnetic field vector in the ECI frame
|
||||||
|
* outputQuat Stores the calculated quaternion
|
||||||
|
* outputSatRate Stores the adjusted satellite rate
|
||||||
|
* @return ReturnValue_t Feedback of this class, KALMAN_NO_GYR_MEAS if no satellite rate from
|
||||||
|
* the sensors was provided, KALMAN_NO_MODEL if no sunDirJ or magFieldJ was given from the model
|
||||||
|
* calculations, KALMAN_INVERSION_FAILED if the calculation of the Gain matrix was not possible,
|
||||||
|
* RETURN_OK else
|
||||||
|
*/
|
||||||
|
ReturnValue_t mekfEst(const double *quaternionSTR, const bool validSTR_, const double *rateGYRs_,
|
||||||
|
const bool validGYRs_, const double *magneticField_,
|
||||||
|
const bool validMagField_, const double *sunDir_, const bool validSS,
|
||||||
|
const double *sunDirJ, const bool validSSModel, const double *magFieldJ,
|
||||||
|
const bool validMagModel, acsctrl::MekfData *mekfData);
|
||||||
|
|
||||||
|
// Declaration of Events (like init) and memberships
|
||||||
|
// static const uint8_t INTERFACE_ID = CLASS_ID::MEKF; //CLASS IDS ND
|
||||||
|
// (/config/returnvalues/classIDs.h) static const Event RESET =
|
||||||
|
// MAKE_EVENT(1,severity::INFO);//typedef uint32_t Event (Event.h), should be
|
||||||
|
// resetting Mekf
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::KALMAN;
|
||||||
|
static const ReturnValue_t KALMAN_NO_GYR_MEAS = MAKE_RETURN_CODE(0x01);
|
||||||
|
static const ReturnValue_t KALMAN_NO_MODEL = MAKE_RETURN_CODE(0x02);
|
||||||
|
static const ReturnValue_t KALMAN_INVERSION_FAILED = MAKE_RETURN_CODE(0x03);
|
||||||
|
|
||||||
|
private:
|
||||||
|
/*Parameters*/
|
||||||
|
AcsParameters::InertiaEIVE *inertiaEIVE;
|
||||||
|
AcsParameters::KalmanFilterParameters *kalmanFilterParameters;
|
||||||
|
double quaternion_STR_SB[4];
|
||||||
|
bool validInit;
|
||||||
|
double sampleTime = 0.1;
|
||||||
|
|
||||||
|
/*States*/
|
||||||
|
double initialQuaternion[4]; /*after reset?QUEST*/
|
||||||
|
double initialCovarianceMatrix[6][6]; /*after reset?QUEST*/
|
||||||
|
double propagatedQuaternion[4]; /*Filter Quaternion for next step*/
|
||||||
|
bool validMekf;
|
||||||
|
uint8_t sensorsAvail;
|
||||||
|
|
||||||
|
/*Outputs*/
|
||||||
|
double quatBJ[4]; /* Output Quaternion */
|
||||||
|
double biasGYR[3]; /*Between measured and estimated sat Rate*/
|
||||||
|
/*Parameter INIT*/
|
||||||
|
// double alpha, gamma, beta;
|
||||||
|
/*Functions*/
|
||||||
|
void loadAcsParameters(AcsParameters *acsParameters_);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ACS_MULTIPLICATIVEKALMANFILTER_H_ */
|
57
mission/controller/acs/Navigation.cpp
Normal file
57
mission/controller/acs/Navigation.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
* Navigation.cpp
|
||||||
|
*
|
||||||
|
* Created on: 23 May 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Navigation.h"
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "util/CholeskyDecomposition.h"
|
||||||
|
#include "util/MathOperations.h"
|
||||||
|
|
||||||
|
Navigation::Navigation(AcsParameters *acsParameters_) : multiplicativeKalmanFilter(acsParameters_) {
|
||||||
|
acsParameters = *acsParameters_;
|
||||||
|
}
|
||||||
|
|
||||||
|
Navigation::~Navigation() {}
|
||||||
|
|
||||||
|
void Navigation::useMekf(ACS::SensorValues *sensorValues,
|
||||||
|
acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||||
|
acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed, acsctrl::MekfData *mekfData,
|
||||||
|
ReturnValue_t *mekfValid) {
|
||||||
|
double quatJB[4] = {sensorValues->strSet.caliQx.value, sensorValues->strSet.caliQy.value,
|
||||||
|
sensorValues->strSet.caliQz.value, sensorValues->strSet.caliQw.value};
|
||||||
|
bool quatJBValid = sensorValues->strSet.caliQx.isValid() &&
|
||||||
|
sensorValues->strSet.caliQy.isValid() &&
|
||||||
|
sensorValues->strSet.caliQz.isValid() && sensorValues->strSet.caliQw.isValid();
|
||||||
|
|
||||||
|
if (kalmanInit) {
|
||||||
|
*mekfValid = multiplicativeKalmanFilter.mekfEst(
|
||||||
|
quatJB, quatJBValid, gyrDataProcessed->gyrVecTot.value,
|
||||||
|
gyrDataProcessed->gyrVecTot.isValid(), mgmDataProcessed->mgmVecTot.value,
|
||||||
|
mgmDataProcessed->mgmVecTot.isValid(), susDataProcessed->susVecTot.value,
|
||||||
|
susDataProcessed->susVecTot.isValid(), susDataProcessed->sunIjkModel.value,
|
||||||
|
susDataProcessed->sunIjkModel.isValid(), mgmDataProcessed->magIgrfModel.value,
|
||||||
|
mgmDataProcessed->magIgrfModel.isValid(),
|
||||||
|
mekfData); // VALIDS FOR QUAT AND RATE ??
|
||||||
|
} else {
|
||||||
|
multiplicativeKalmanFilter.init(
|
||||||
|
mgmDataProcessed->mgmVecTot.value, mgmDataProcessed->mgmVecTot.isValid(),
|
||||||
|
susDataProcessed->susVecTot.value, susDataProcessed->susVecTot.isValid(),
|
||||||
|
susDataProcessed->sunIjkModel.value, susDataProcessed->sunIjkModel.isValid(),
|
||||||
|
mgmDataProcessed->magIgrfModel.value, mgmDataProcessed->magIgrfModel.isValid());
|
||||||
|
kalmanInit = true;
|
||||||
|
*mekfValid = returnvalue::OK;
|
||||||
|
|
||||||
|
// Maybe we need feedback from kalmanfilter to identify if there was a problem with the
|
||||||
|
// init of kalman filter where does this class know from that kalman filter was not
|
||||||
|
// initialized ?
|
||||||
|
}
|
||||||
|
}
|
35
mission/controller/acs/Navigation.h
Normal file
35
mission/controller/acs/Navigation.h
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Navigation.h
|
||||||
|
*
|
||||||
|
* Created on: 19 Apr 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NAVIGATION_H_
|
||||||
|
#define NAVIGATION_H_
|
||||||
|
|
||||||
|
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
#include "MultiplicativeKalmanFilter.h"
|
||||||
|
#include "SensorProcessing.h"
|
||||||
|
#include "SensorValues.h"
|
||||||
|
|
||||||
|
class Navigation {
|
||||||
|
public:
|
||||||
|
Navigation(AcsParameters *acsParameters_); // Input mode ?
|
||||||
|
virtual ~Navigation();
|
||||||
|
|
||||||
|
void useMekf(ACS::SensorValues *sensorValues, acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||||
|
acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed, acsctrl::MekfData *mekfData,
|
||||||
|
ReturnValue_t *mekfValid);
|
||||||
|
void processSensorData();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
private:
|
||||||
|
MultiplicativeKalmanFilter multiplicativeKalmanFilter;
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
bool kalmanInit = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* ACS_NAVIGATION_H_ */
|
637
mission/controller/acs/SensorProcessing.cpp
Normal file
637
mission/controller/acs/SensorProcessing.cpp
Normal file
@ -0,0 +1,637 @@
|
|||||||
|
#include "SensorProcessing.h"
|
||||||
|
|
||||||
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
#include <fsfw/globalfunctions/constants.h>
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/timevalOperations.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "Igrf13Model.h"
|
||||||
|
#include "util/MathOperations.h"
|
||||||
|
|
||||||
|
using namespace Math;
|
||||||
|
|
||||||
|
SensorProcessing::SensorProcessing(AcsParameters *acsParameters_)
|
||||||
|
: savedMgmVecTot{0, 0, 0}, validMagField(false), validGcLatitude(false) {}
|
||||||
|
|
||||||
|
SensorProcessing::~SensorProcessing() {}
|
||||||
|
|
||||||
|
void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const float *mgm1Value,
|
||||||
|
bool mgm1valid, const float *mgm2Value, bool mgm2valid,
|
||||||
|
const float *mgm3Value, bool mgm3valid, const float *mgm4Value,
|
||||||
|
bool mgm4valid, timeval timeOfMgmMeasurement,
|
||||||
|
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
||||||
|
const double gpsAltitude, bool gpsValid,
|
||||||
|
acsctrl::MgmDataProcessed *mgmDataProcessed) {
|
||||||
|
if (!mgm0valid && !mgm1valid && !mgm2valid && !mgm3valid && !mgm4valid) {
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(mgmDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(mgmDataProcessed->mgm0vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgm1vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgm2vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgm3vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgm4vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgmVecTot.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->mgmVecTotDerivative.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(mgmDataProcessed->magIgrfModel.value, zeroVector, 3 * sizeof(double));
|
||||||
|
mgmDataProcessed->setValidity(false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
float mgm0ValueNoBias[3] = {0, 0, 0}, mgm1ValueNoBias[3] = {0, 0, 0},
|
||||||
|
mgm2ValueNoBias[3] = {0, 0, 0}, mgm3ValueNoBias[3] = {0, 0, 0},
|
||||||
|
mgm4ValueNoBias[3] = {0, 0, 0};
|
||||||
|
float mgm0ValueCalib[3] = {0, 0, 0}, mgm1ValueCalib[3] = {0, 0, 0}, mgm2ValueCalib[3] = {0, 0, 0},
|
||||||
|
mgm3ValueCalib[3] = {0, 0, 0}, mgm4ValueCalib[3] = {0, 0, 0};
|
||||||
|
float mgm0ValueBody[3] = {0, 0, 0}, mgm1ValueBody[3] = {0, 0, 0}, mgm2ValueBody[3] = {0, 0, 0},
|
||||||
|
mgm3ValueBody[3] = {0, 0, 0}, mgm4ValueBody[3] = {0, 0, 0};
|
||||||
|
float sensorFusionNumerator[3] = {0, 0, 0}, sensorFusionDenominator[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
if (mgm0valid) {
|
||||||
|
VectorOperations<float>::subtract(mgm0Value, mgmParameters->mgm0hardIronOffset, mgm0ValueNoBias,
|
||||||
|
3);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm0softIronInverse[0], mgm0ValueNoBias,
|
||||||
|
mgm0ValueCalib, 3, 3, 1);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm0orientationMatrix[0], mgm0ValueCalib,
|
||||||
|
mgm0ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += mgm0ValueBody[i] / mgmParameters->mgm02variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / mgmParameters->mgm02variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mgm1valid) {
|
||||||
|
VectorOperations<float>::subtract(mgm1Value, mgmParameters->mgm1hardIronOffset, mgm1ValueNoBias,
|
||||||
|
3);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm1softIronInverse[0], mgm1ValueNoBias,
|
||||||
|
mgm1ValueCalib, 3, 3, 1);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm1orientationMatrix[0], mgm1ValueCalib,
|
||||||
|
mgm1ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += mgm1ValueBody[i] / mgmParameters->mgm13variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / mgmParameters->mgm13variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mgm2valid) {
|
||||||
|
VectorOperations<float>::subtract(mgm2Value, mgmParameters->mgm2hardIronOffset, mgm2ValueNoBias,
|
||||||
|
3);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm2softIronInverse[0], mgm2ValueNoBias,
|
||||||
|
mgm2ValueCalib, 3, 3, 1);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm2orientationMatrix[0], mgm2ValueCalib,
|
||||||
|
mgm2ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += mgm2ValueBody[i] / mgmParameters->mgm02variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / mgmParameters->mgm02variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mgm3valid) {
|
||||||
|
VectorOperations<float>::subtract(mgm3Value, mgmParameters->mgm3hardIronOffset, mgm3ValueNoBias,
|
||||||
|
3);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm3softIronInverse[0], mgm3ValueNoBias,
|
||||||
|
mgm3ValueCalib, 3, 3, 1);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm3orientationMatrix[0], mgm3ValueCalib,
|
||||||
|
mgm3ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += mgm3ValueBody[i] / mgmParameters->mgm13variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / mgmParameters->mgm13variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (mgm4valid) {
|
||||||
|
float mgm4ValueNT[3];
|
||||||
|
VectorOperations<float>::mulScalar(mgm4Value, 1e3, mgm4ValueNT, 3); // uT to nT
|
||||||
|
VectorOperations<float>::subtract(mgm4ValueNT, mgmParameters->mgm4hardIronOffset,
|
||||||
|
mgm4ValueNoBias, 3);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm4softIronInverse[0], mgm4ValueNoBias,
|
||||||
|
mgm4ValueCalib, 3, 3, 1);
|
||||||
|
MatrixOperations<float>::multiply(mgmParameters->mgm4orientationMatrix[0], mgm4ValueCalib,
|
||||||
|
mgm4ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += mgm4ValueBody[i] / mgmParameters->mgm4variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / mgmParameters->mgm4variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
double mgmVecTot[3] = {0.0, 0.0, 0.0};
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
mgmVecTot[i] = sensorFusionNumerator[i] / sensorFusionDenominator[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------Mgm Rate Computation ---------------------------------------------------
|
||||||
|
double mgmVecTotDerivative[3] = {0.0, 0.0, 0.0};
|
||||||
|
bool mgmVecTotDerivativeValid = false;
|
||||||
|
double timeDiff = timevalOperations::toDouble(timeOfMgmMeasurement - timeOfSavedMagFieldEst);
|
||||||
|
if (timeOfSavedMagFieldEst.tv_sec != 0) {
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
mgmVecTotDerivative[i] = (mgmVecTot[i] - savedMgmVecTot[i]) / timeDiff;
|
||||||
|
savedMgmVecTot[i] = mgmVecTot[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
timeOfSavedMagFieldEst = timeOfMgmMeasurement;
|
||||||
|
|
||||||
|
// ---------------- IGRF- 13 Implementation here ------------------------------------------------
|
||||||
|
double magIgrfModel[3] = {0.0, 0.0, 0.0};
|
||||||
|
if (gpsValid) {
|
||||||
|
// Should be existing class object which will be called and modified here.
|
||||||
|
Igrf13Model igrf13;
|
||||||
|
// So the line above should not be done here. Update: Can be done here as long updated coffs
|
||||||
|
// stored in acsParameters ?
|
||||||
|
igrf13.updateCoeffGH(timeOfMgmMeasurement);
|
||||||
|
// maybe put a condition here, to only update after a full day, this
|
||||||
|
// class function has around 700 steps to perform
|
||||||
|
igrf13.magFieldComp(gpsDataProcessed->gdLongitude.value, gpsDataProcessed->gcLatitude.value,
|
||||||
|
gpsAltitude, timeOfMgmMeasurement, magIgrfModel);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(mgmDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(mgmDataProcessed->mgm0vec.value, mgm0ValueBody, 3 * sizeof(float));
|
||||||
|
mgmDataProcessed->mgm0vec.setValid(mgm0valid);
|
||||||
|
std::memcpy(mgmDataProcessed->mgm1vec.value, mgm1ValueBody, 3 * sizeof(float));
|
||||||
|
mgmDataProcessed->mgm1vec.setValid(mgm1valid);
|
||||||
|
std::memcpy(mgmDataProcessed->mgm2vec.value, mgm2ValueBody, 3 * sizeof(float));
|
||||||
|
mgmDataProcessed->mgm2vec.setValid(mgm2valid);
|
||||||
|
std::memcpy(mgmDataProcessed->mgm3vec.value, mgm3ValueBody, 3 * sizeof(float));
|
||||||
|
mgmDataProcessed->mgm3vec.setValid(mgm3valid);
|
||||||
|
std::memcpy(mgmDataProcessed->mgm4vec.value, mgm4ValueBody, 3 * sizeof(float));
|
||||||
|
mgmDataProcessed->mgm4vec.setValid(mgm4valid);
|
||||||
|
std::memcpy(mgmDataProcessed->mgmVecTot.value, mgmVecTot, 3 * sizeof(double));
|
||||||
|
mgmDataProcessed->mgmVecTot.setValid(true);
|
||||||
|
std::memcpy(mgmDataProcessed->mgmVecTotDerivative.value, mgmVecTotDerivative,
|
||||||
|
3 * sizeof(double));
|
||||||
|
mgmDataProcessed->mgmVecTotDerivative.setValid(mgmVecTotDerivativeValid);
|
||||||
|
std::memcpy(mgmDataProcessed->magIgrfModel.value, magIgrfModel, 3 * sizeof(double));
|
||||||
|
mgmDataProcessed->magIgrfModel.setValid(gpsValid);
|
||||||
|
mgmDataProcessed->setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SensorProcessing::processSus(
|
||||||
|
const uint16_t *sus0Value, bool sus0valid, const uint16_t *sus1Value, bool sus1valid,
|
||||||
|
const uint16_t *sus2Value, bool sus2valid, const uint16_t *sus3Value, bool sus3valid,
|
||||||
|
const uint16_t *sus4Value, bool sus4valid, const uint16_t *sus5Value, bool sus5valid,
|
||||||
|
const uint16_t *sus6Value, bool sus6valid, const uint16_t *sus7Value, bool sus7valid,
|
||||||
|
const uint16_t *sus8Value, bool sus8valid, const uint16_t *sus9Value, bool sus9valid,
|
||||||
|
const uint16_t *sus10Value, bool sus10valid, const uint16_t *sus11Value, bool sus11valid,
|
||||||
|
timeval timeOfSusMeasurement, const AcsParameters::SusHandlingParameters *susParameters,
|
||||||
|
const AcsParameters::SunModelParameters *sunModelParameters,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed) {
|
||||||
|
if (sus0valid) {
|
||||||
|
sus0valid = susConverter.checkSunSensorData(sus0Value);
|
||||||
|
}
|
||||||
|
if (sus1valid) {
|
||||||
|
sus1valid = susConverter.checkSunSensorData(sus1Value);
|
||||||
|
}
|
||||||
|
if (sus2valid) {
|
||||||
|
sus2valid = susConverter.checkSunSensorData(sus2Value);
|
||||||
|
}
|
||||||
|
if (sus3valid) {
|
||||||
|
sus3valid = susConverter.checkSunSensorData(sus3Value);
|
||||||
|
}
|
||||||
|
if (sus4valid) {
|
||||||
|
sus4valid = susConverter.checkSunSensorData(sus4Value);
|
||||||
|
}
|
||||||
|
if (sus5valid) {
|
||||||
|
sus5valid = susConverter.checkSunSensorData(sus5Value);
|
||||||
|
}
|
||||||
|
if (sus6valid) {
|
||||||
|
sus6valid = susConverter.checkSunSensorData(sus6Value);
|
||||||
|
}
|
||||||
|
if (sus7valid) {
|
||||||
|
sus7valid = susConverter.checkSunSensorData(sus7Value);
|
||||||
|
}
|
||||||
|
if (sus8valid) {
|
||||||
|
sus8valid = susConverter.checkSunSensorData(sus8Value);
|
||||||
|
}
|
||||||
|
if (sus9valid) {
|
||||||
|
sus9valid = susConverter.checkSunSensorData(sus9Value);
|
||||||
|
}
|
||||||
|
if (sus10valid) {
|
||||||
|
sus10valid = susConverter.checkSunSensorData(sus10Value);
|
||||||
|
}
|
||||||
|
if (sus11valid) {
|
||||||
|
sus11valid = susConverter.checkSunSensorData(sus11Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!sus0valid && !sus1valid && !sus2valid && !sus3valid && !sus4valid && !sus5valid &&
|
||||||
|
!sus6valid && !sus7valid && !sus8valid && !sus9valid && !sus10valid && !sus11valid) {
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(susDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataProcessed->sus0vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus1vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus2vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus3vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus4vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus5vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus6vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus7vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus8vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus9vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus10vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sus11vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->susVecTot.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->susVecTotDerivative.value, zeroVector, 3 * sizeof(float));
|
||||||
|
std::memcpy(susDataProcessed->sunIjkModel.value, zeroVector, 3 * sizeof(double));
|
||||||
|
susDataProcessed->setValidity(false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// WARNING: NOT TRANSFORMED IN BODY FRAME YET
|
||||||
|
// Transformation into Geomtry Frame
|
||||||
|
float sus0VecBody[3] = {0, 0, 0}, sus1VecBody[3] = {0, 0, 0}, sus2VecBody[3] = {0, 0, 0},
|
||||||
|
sus3VecBody[3] = {0, 0, 0}, sus4VecBody[3] = {0, 0, 0}, sus5VecBody[3] = {0, 0, 0},
|
||||||
|
sus6VecBody[3] = {0, 0, 0}, sus7VecBody[3] = {0, 0, 0}, sus8VecBody[3] = {0, 0, 0},
|
||||||
|
sus9VecBody[3] = {0, 0, 0}, sus10VecBody[3] = {0, 0, 0}, sus11VecBody[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
if (sus0valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus0orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus0Value, susParameters->sus0coeffAlpha,
|
||||||
|
susParameters->sus0coeffBeta),
|
||||||
|
sus0VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(susDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataProcessed->sus0vec.value, sus0VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus0vec.setValid(sus0valid);
|
||||||
|
if (!sus0valid) {
|
||||||
|
std::memcpy(susDataProcessed->sus0vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sus1valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus1orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus1Value, susParameters->sus1coeffAlpha,
|
||||||
|
susParameters->sus1coeffBeta),
|
||||||
|
sus1VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(susDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataProcessed->sus1vec.value, sus1VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus1vec.setValid(sus1valid);
|
||||||
|
if (!sus1valid) {
|
||||||
|
std::memcpy(susDataProcessed->sus1vec.value, zeroVector, 3 * sizeof(float));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sus2valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus2orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus2Value, susParameters->sus2coeffAlpha,
|
||||||
|
susParameters->sus2coeffBeta),
|
||||||
|
sus2VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus3valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus3orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus3Value, susParameters->sus3coeffAlpha,
|
||||||
|
susParameters->sus3coeffBeta),
|
||||||
|
sus3VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus4valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus4orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus4Value, susParameters->sus4coeffAlpha,
|
||||||
|
susParameters->sus4coeffBeta),
|
||||||
|
sus4VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus5valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus5orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus5Value, susParameters->sus5coeffAlpha,
|
||||||
|
susParameters->sus5coeffBeta),
|
||||||
|
sus5VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus6valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus6orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus6Value, susParameters->sus6coeffAlpha,
|
||||||
|
susParameters->sus6coeffBeta),
|
||||||
|
sus6VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus7valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus7orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus7Value, susParameters->sus7coeffAlpha,
|
||||||
|
susParameters->sus7coeffBeta),
|
||||||
|
sus7VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus8valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus8orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus8Value, susParameters->sus8coeffAlpha,
|
||||||
|
susParameters->sus8coeffBeta),
|
||||||
|
sus8VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus9valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus9orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus9Value, susParameters->sus9coeffAlpha,
|
||||||
|
susParameters->sus9coeffBeta),
|
||||||
|
sus9VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus10valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus10orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus10Value, susParameters->sus10coeffAlpha,
|
||||||
|
susParameters->sus10coeffBeta),
|
||||||
|
sus10VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
if (sus11valid) {
|
||||||
|
MatrixOperations<float>::multiply(
|
||||||
|
susParameters->sus11orientationMatrix[0],
|
||||||
|
susConverter.getSunVectorSensorFrame(sus11Value, susParameters->sus11coeffAlpha,
|
||||||
|
susParameters->sus11coeffBeta),
|
||||||
|
sus11VecBody, 3, 3, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ------ Mean Value: susDirEst ------ */
|
||||||
|
bool validIds[12] = {sus0valid, sus1valid, sus2valid, sus3valid, sus4valid, sus5valid,
|
||||||
|
sus6valid, sus7valid, sus8valid, sus9valid, sus10valid, sus11valid};
|
||||||
|
float susVecBody[3][12] = {{sus0VecBody[0], sus1VecBody[0], sus2VecBody[0], sus3VecBody[0],
|
||||||
|
sus4VecBody[0], sus5VecBody[0], sus6VecBody[0], sus7VecBody[0],
|
||||||
|
sus8VecBody[0], sus9VecBody[0], sus10VecBody[0], sus11VecBody[0]},
|
||||||
|
{sus0VecBody[1], sus1VecBody[1], sus2VecBody[1], sus3VecBody[1],
|
||||||
|
sus4VecBody[1], sus5VecBody[1], sus6VecBody[1], sus7VecBody[1],
|
||||||
|
sus8VecBody[1], sus9VecBody[1], sus10VecBody[1], sus11VecBody[1]},
|
||||||
|
{sus0VecBody[2], sus1VecBody[2], sus2VecBody[2], sus3VecBody[2],
|
||||||
|
sus4VecBody[2], sus5VecBody[2], sus6VecBody[2], sus7VecBody[2],
|
||||||
|
sus8VecBody[2], sus9VecBody[2], sus10VecBody[2], sus11VecBody[2]}};
|
||||||
|
|
||||||
|
double susMeanValue[3] = {0, 0, 0};
|
||||||
|
for (uint8_t i = 0; i < 12; i++) {
|
||||||
|
if (validIds[i]) {
|
||||||
|
susMeanValue[0] += susVecBody[0][i];
|
||||||
|
susMeanValue[1] += susVecBody[1][i];
|
||||||
|
susMeanValue[2] += susVecBody[2][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
double susVecTot[3] = {0.0, 0.0, 0.0};
|
||||||
|
VectorOperations<double>::normalize(susMeanValue, susVecTot, 3);
|
||||||
|
|
||||||
|
/* -------- Sun Derivatiative --------------------- */
|
||||||
|
|
||||||
|
double susVecTotDerivative[3] = {0.0, 0.0, 0.0};
|
||||||
|
bool susVecTotDerivativeValid = false;
|
||||||
|
double timeDiff = timevalOperations::toDouble(timeOfSusMeasurement - timeOfSavedSusDirEst);
|
||||||
|
if (timeOfSavedSusDirEst.tv_sec != 0) {
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
susVecTotDerivative[i] = (susVecTot[i] - savedSusVecTot[i]) / timeDiff;
|
||||||
|
savedSusVecTot[i] = susVecTot[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
timeOfSavedSusDirEst = timeOfSusMeasurement;
|
||||||
|
|
||||||
|
/* -------- Sun Model Direction (IJK frame) ------- */
|
||||||
|
// if (useSunModel) eventuell
|
||||||
|
double JD2000 = MathOperations<double>::convertUnixToJD2000(timeOfSusMeasurement);
|
||||||
|
|
||||||
|
// Julean Centuries
|
||||||
|
double sunIjkModel[3] = {0.0, 0.0, 0.0};
|
||||||
|
double JC2000 = JD2000 / 36525;
|
||||||
|
|
||||||
|
double meanLongitude =
|
||||||
|
(sunModelParameters->omega_0 + (sunModelParameters->domega) * JC2000) * PI / 180;
|
||||||
|
double meanAnomaly = (sunModelParameters->m_0 + sunModelParameters->dm * JC2000) * PI / 180.;
|
||||||
|
|
||||||
|
double eclipticLongitude = meanLongitude + sunModelParameters->p1 * sin(meanAnomaly) +
|
||||||
|
sunModelParameters->p2 * sin(2 * meanAnomaly);
|
||||||
|
|
||||||
|
double epsilon = sunModelParameters->e - (sunModelParameters->e1) * JC2000;
|
||||||
|
|
||||||
|
sunIjkModel[0] = cos(eclipticLongitude);
|
||||||
|
sunIjkModel[1] = sin(eclipticLongitude) * cos(epsilon);
|
||||||
|
sunIjkModel[2] = sin(eclipticLongitude) * sin(epsilon);
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(susDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(susDataProcessed->sus0vec.value, sus0VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus0vec.setValid(sus0valid);
|
||||||
|
std::memcpy(susDataProcessed->sus1vec.value, sus1VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus1vec.setValid(sus1valid);
|
||||||
|
std::memcpy(susDataProcessed->sus2vec.value, sus2VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus2vec.setValid(sus2valid);
|
||||||
|
std::memcpy(susDataProcessed->sus3vec.value, sus3VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus3vec.setValid(sus3valid);
|
||||||
|
std::memcpy(susDataProcessed->sus4vec.value, sus4VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus4vec.setValid(sus4valid);
|
||||||
|
std::memcpy(susDataProcessed->sus5vec.value, sus5VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus5vec.setValid(sus5valid);
|
||||||
|
std::memcpy(susDataProcessed->sus6vec.value, sus6VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus6vec.setValid(sus6valid);
|
||||||
|
std::memcpy(susDataProcessed->sus7vec.value, sus7VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus7vec.setValid(sus7valid);
|
||||||
|
std::memcpy(susDataProcessed->sus8vec.value, sus8VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus8vec.setValid(sus8valid);
|
||||||
|
std::memcpy(susDataProcessed->sus9vec.value, sus9VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus9vec.setValid(sus9valid);
|
||||||
|
std::memcpy(susDataProcessed->sus10vec.value, sus10VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus10vec.setValid(sus10valid);
|
||||||
|
std::memcpy(susDataProcessed->sus11vec.value, sus11VecBody, 3 * sizeof(float));
|
||||||
|
susDataProcessed->sus11vec.setValid(sus11valid);
|
||||||
|
std::memcpy(susDataProcessed->susVecTot.value, susVecTot, 3 * sizeof(double));
|
||||||
|
susDataProcessed->susVecTot.setValid(true);
|
||||||
|
std::memcpy(susDataProcessed->susVecTotDerivative.value, susVecTotDerivative,
|
||||||
|
3 * sizeof(double));
|
||||||
|
susDataProcessed->susVecTotDerivative.setValid(susVecTotDerivativeValid);
|
||||||
|
std::memcpy(susDataProcessed->sunIjkModel.value, sunIjkModel, 3 * sizeof(double));
|
||||||
|
susDataProcessed->sunIjkModel.setValid(true);
|
||||||
|
susDataProcessed->setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SensorProcessing::processGyr(
|
||||||
|
const double gyr0axXvalue, bool gyr0axXvalid, const double gyr0axYvalue, bool gyr0axYvalid,
|
||||||
|
const double gyr0axZvalue, bool gyr0axZvalid, const double gyr1axXvalue, bool gyr1axXvalid,
|
||||||
|
const double gyr1axYvalue, bool gyr1axYvalid, const double gyr1axZvalue, bool gyr1axZvalid,
|
||||||
|
const double gyr2axXvalue, bool gyr2axXvalid, const double gyr2axYvalue, bool gyr2axYvalid,
|
||||||
|
const double gyr2axZvalue, bool gyr2axZvalid, const double gyr3axXvalue, bool gyr3axXvalid,
|
||||||
|
const double gyr3axYvalue, bool gyr3axYvalid, const double gyr3axZvalue, bool gyr3axZvalid,
|
||||||
|
timeval timeOfGyrMeasurement, const AcsParameters::GyrHandlingParameters *gyrParameters,
|
||||||
|
acsctrl::GyrDataProcessed *gyrDataProcessed) {
|
||||||
|
bool gyr0valid = (gyr0axXvalid && gyr0axYvalid && gyr0axZvalid);
|
||||||
|
bool gyr1valid = (gyr1axXvalid && gyr1axYvalid && gyr1axZvalid);
|
||||||
|
bool gyr2valid = (gyr2axXvalid && gyr2axYvalid && gyr2axZvalid);
|
||||||
|
bool gyr3valid = (gyr3axXvalid && gyr3axYvalid && gyr3axZvalid);
|
||||||
|
if (!gyr0valid && !gyr1valid && !gyr2valid && !gyr3valid) {
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(gyrDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(gyrDataProcessed->gyr0vec.value, zeroVector, 3 * sizeof(double));
|
||||||
|
std::memcpy(gyrDataProcessed->gyr1vec.value, zeroVector, 3 * sizeof(double));
|
||||||
|
std::memcpy(gyrDataProcessed->gyr2vec.value, zeroVector, 3 * sizeof(double));
|
||||||
|
std::memcpy(gyrDataProcessed->gyr3vec.value, zeroVector, 3 * sizeof(double));
|
||||||
|
std::memcpy(gyrDataProcessed->gyrVecTot.value, zeroVector, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->setValidity(false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Transforming Values to the Body Frame (actually it is the geometry frame atm)
|
||||||
|
double gyr0ValueBody[3] = {0, 0, 0}, gyr1ValueBody[3] = {0, 0, 0}, gyr2ValueBody[3] = {0, 0, 0},
|
||||||
|
gyr3ValueBody[3] = {0, 0, 0};
|
||||||
|
float sensorFusionNumerator[3] = {0, 0, 0}, sensorFusionDenominator[3] = {0, 0, 0};
|
||||||
|
|
||||||
|
if (gyr0valid) {
|
||||||
|
const double gyr0Value[3] = {gyr0axXvalue, gyr0axYvalue, gyr0axZvalue};
|
||||||
|
MatrixOperations<double>::multiply(gyrParameters->gyr0orientationMatrix[0], gyr0Value,
|
||||||
|
gyr0ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += gyr0ValueBody[i] / gyrParameters->gyr02variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / gyrParameters->gyr02variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gyr1valid) {
|
||||||
|
const double gyr1Value[3] = {gyr1axXvalue, gyr1axYvalue, gyr1axZvalue};
|
||||||
|
MatrixOperations<double>::multiply(gyrParameters->gyr1orientationMatrix[0], gyr1Value,
|
||||||
|
gyr1ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += gyr1ValueBody[i] / gyrParameters->gyr13variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / gyrParameters->gyr13variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gyr2valid) {
|
||||||
|
const double gyr2Value[3] = {gyr2axXvalue, gyr2axYvalue, gyr2axZvalue};
|
||||||
|
MatrixOperations<double>::multiply(gyrParameters->gyr2orientationMatrix[0], gyr2Value,
|
||||||
|
gyr2ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += gyr2ValueBody[i] / gyrParameters->gyr02variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / gyrParameters->gyr02variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gyr3valid) {
|
||||||
|
const double gyr3Value[3] = {gyr3axXvalue, gyr3axYvalue, gyr3axZvalue};
|
||||||
|
MatrixOperations<double>::multiply(gyrParameters->gyr3orientationMatrix[0], gyr3Value,
|
||||||
|
gyr3ValueBody, 3, 3, 1);
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
sensorFusionNumerator[i] += gyr3ValueBody[i] / gyrParameters->gyr13variance[i];
|
||||||
|
sensorFusionDenominator[i] += 1 / gyrParameters->gyr13variance[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------- SatRateEst: Middle Value ------- */
|
||||||
|
// take ADIS measurements, if both avail
|
||||||
|
// if just one ADIS measurement avail, perform sensor fusion
|
||||||
|
double gyrVecTot[3] = {0.0, 0.0, 0.0};
|
||||||
|
if ((gyr0valid && gyr2valid) && gyrParameters->preferAdis == gyrParameters->PreferAdis::YES) {
|
||||||
|
double gyr02ValuesSum[3];
|
||||||
|
VectorOperations<double>::add(gyr0ValueBody, gyr2ValueBody, gyr02ValuesSum, 3);
|
||||||
|
VectorOperations<double>::mulScalar(gyr02ValuesSum, .5, gyrVecTot, 3);
|
||||||
|
} else {
|
||||||
|
for (uint8_t i = 0; i < 3; i++) {
|
||||||
|
gyrVecTot[i] = sensorFusionNumerator[i] / sensorFusionDenominator[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(gyrDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
std::memcpy(gyrDataProcessed->gyr0vec.value, gyr0ValueBody, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->gyr0vec.setValid(gyr0valid);
|
||||||
|
std::memcpy(gyrDataProcessed->gyr1vec.value, gyr1ValueBody, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->gyr1vec.setValid(gyr1valid);
|
||||||
|
std::memcpy(gyrDataProcessed->gyr2vec.value, gyr2ValueBody, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->gyr2vec.setValid(gyr2valid);
|
||||||
|
std::memcpy(gyrDataProcessed->gyr3vec.value, gyr3ValueBody, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->gyr3vec.setValid(gyr3valid);
|
||||||
|
std::memcpy(gyrDataProcessed->gyrVecTot.value, gyrVecTot, 3 * sizeof(double));
|
||||||
|
gyrDataProcessed->gyrVecTot.setValid(true);
|
||||||
|
gyrDataProcessed->setValidity(true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SensorProcessing::processGps(const double gps0latitude, const double gps0longitude,
|
||||||
|
const bool validGps,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed) {
|
||||||
|
// name to convert not process
|
||||||
|
double gdLongitude, gcLatitude;
|
||||||
|
if (validGps) {
|
||||||
|
// Transforming from Degree to Radians and calculation geocentric lattitude from geodetic
|
||||||
|
gdLongitude = gps0longitude * PI / 180;
|
||||||
|
double latitudeRad = gps0latitude * PI / 180;
|
||||||
|
double eccentricityWgs84 = 0.0818195;
|
||||||
|
double factor = 1 - pow(eccentricityWgs84, 2);
|
||||||
|
gcLatitude = atan(factor * tan(latitudeRad));
|
||||||
|
// validGcLatitude = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
PoolReadGuard pg(gpsDataProcessed);
|
||||||
|
if (pg.getReadResult() == returnvalue::OK) {
|
||||||
|
gpsDataProcessed->gdLongitude.value = gdLongitude;
|
||||||
|
gpsDataProcessed->gcLatitude.value = gcLatitude;
|
||||||
|
gpsDataProcessed->setValidity(validGps, validGps);
|
||||||
|
if (!validGps) {
|
||||||
|
gpsDataProcessed->gdLongitude.value = 0.0;
|
||||||
|
gpsDataProcessed->gcLatitude.value = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void SensorProcessing::process(timeval now, ACS::SensorValues *sensorValues,
|
||||||
|
acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed,
|
||||||
|
acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
||||||
|
const AcsParameters *acsParameters) {
|
||||||
|
sensorValues->update();
|
||||||
|
processGps(sensorValues->gpsSet.latitude.value, sensorValues->gpsSet.longitude.value,
|
||||||
|
(sensorValues->gpsSet.latitude.isValid() && sensorValues->gpsSet.longitude.isValid() &&
|
||||||
|
sensorValues->gpsSet.altitude.isValid()),
|
||||||
|
gpsDataProcessed);
|
||||||
|
|
||||||
|
processMgm(sensorValues->mgm0Lis3Set.fieldStrengths.value,
|
||||||
|
sensorValues->mgm0Lis3Set.fieldStrengths.isValid(),
|
||||||
|
sensorValues->mgm1Rm3100Set.fieldStrengths.value,
|
||||||
|
sensorValues->mgm1Rm3100Set.fieldStrengths.isValid(),
|
||||||
|
sensorValues->mgm2Lis3Set.fieldStrengths.value,
|
||||||
|
sensorValues->mgm2Lis3Set.fieldStrengths.isValid(),
|
||||||
|
sensorValues->mgm3Rm3100Set.fieldStrengths.value,
|
||||||
|
sensorValues->mgm3Rm3100Set.fieldStrengths.isValid(),
|
||||||
|
sensorValues->imtqMgmSet.mtmRawNt.value, sensorValues->imtqMgmSet.mtmRawNt.isValid(),
|
||||||
|
now, &acsParameters->mgmHandlingParameters, gpsDataProcessed,
|
||||||
|
sensorValues->gpsSet.altitude.value,
|
||||||
|
(sensorValues->gpsSet.latitude.isValid() && sensorValues->gpsSet.longitude.isValid() &&
|
||||||
|
sensorValues->gpsSet.altitude.isValid()),
|
||||||
|
mgmDataProcessed);
|
||||||
|
|
||||||
|
processSus(sensorValues->susSets[0].channels.value, sensorValues->susSets[0].channels.isValid(),
|
||||||
|
sensorValues->susSets[1].channels.value, sensorValues->susSets[1].channels.isValid(),
|
||||||
|
sensorValues->susSets[2].channels.value, sensorValues->susSets[2].channels.isValid(),
|
||||||
|
sensorValues->susSets[3].channels.value, sensorValues->susSets[3].channels.isValid(),
|
||||||
|
sensorValues->susSets[4].channels.value, sensorValues->susSets[4].channels.isValid(),
|
||||||
|
sensorValues->susSets[5].channels.value, sensorValues->susSets[5].channels.isValid(),
|
||||||
|
sensorValues->susSets[6].channels.value, sensorValues->susSets[6].channels.isValid(),
|
||||||
|
sensorValues->susSets[7].channels.value, sensorValues->susSets[7].channels.isValid(),
|
||||||
|
sensorValues->susSets[8].channels.value, sensorValues->susSets[8].channels.isValid(),
|
||||||
|
sensorValues->susSets[9].channels.value, sensorValues->susSets[9].channels.isValid(),
|
||||||
|
sensorValues->susSets[10].channels.value, sensorValues->susSets[10].channels.isValid(),
|
||||||
|
sensorValues->susSets[11].channels.value, sensorValues->susSets[11].channels.isValid(),
|
||||||
|
now, &acsParameters->susHandlingParameters, &acsParameters->sunModelParameters,
|
||||||
|
susDataProcessed);
|
||||||
|
|
||||||
|
processGyr(
|
||||||
|
sensorValues->gyr0AdisSet.angVelocX.value, sensorValues->gyr0AdisSet.angVelocX.isValid(),
|
||||||
|
sensorValues->gyr0AdisSet.angVelocY.value, sensorValues->gyr0AdisSet.angVelocY.isValid(),
|
||||||
|
sensorValues->gyr0AdisSet.angVelocZ.value, sensorValues->gyr0AdisSet.angVelocZ.isValid(),
|
||||||
|
sensorValues->gyr1L3gSet.angVelocX.value, sensorValues->gyr1L3gSet.angVelocX.isValid(),
|
||||||
|
sensorValues->gyr1L3gSet.angVelocY.value, sensorValues->gyr1L3gSet.angVelocY.isValid(),
|
||||||
|
sensorValues->gyr1L3gSet.angVelocZ.value, sensorValues->gyr1L3gSet.angVelocZ.isValid(),
|
||||||
|
sensorValues->gyr2AdisSet.angVelocX.value, sensorValues->gyr2AdisSet.angVelocX.isValid(),
|
||||||
|
sensorValues->gyr2AdisSet.angVelocY.value, sensorValues->gyr2AdisSet.angVelocY.isValid(),
|
||||||
|
sensorValues->gyr2AdisSet.angVelocZ.value, sensorValues->gyr2AdisSet.angVelocZ.isValid(),
|
||||||
|
sensorValues->gyr3L3gSet.angVelocX.value, sensorValues->gyr3L3gSet.angVelocX.isValid(),
|
||||||
|
sensorValues->gyr3L3gSet.angVelocY.value, sensorValues->gyr3L3gSet.angVelocY.isValid(),
|
||||||
|
sensorValues->gyr3L3gSet.angVelocZ.value, sensorValues->gyr3L3gSet.angVelocZ.isValid(), now,
|
||||||
|
&acsParameters->gyrHandlingParameters, gyrDataProcessed);
|
||||||
|
}
|
84
mission/controller/acs/SensorProcessing.h
Normal file
84
mission/controller/acs/SensorProcessing.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
/*******************************
|
||||||
|
* EIVE Flight Software Framework (FSFW)
|
||||||
|
* (c) 2022 IRS, Uni Stuttgart
|
||||||
|
*******************************/
|
||||||
|
#ifndef SENSORPROCESSING_H_
|
||||||
|
#define SENSORPROCESSING_H_
|
||||||
|
|
||||||
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
#include <stdint.h> //uint8_t
|
||||||
|
#include <time.h> /*purpose, timeval ?*/
|
||||||
|
|
||||||
|
#include "../controllerdefinitions/AcsCtrlDefinitions.h"
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
#include "SensorValues.h"
|
||||||
|
#include "SusConverter.h"
|
||||||
|
#include "config/classIds.h"
|
||||||
|
|
||||||
|
class SensorProcessing {
|
||||||
|
public:
|
||||||
|
void reset();
|
||||||
|
|
||||||
|
SensorProcessing(AcsParameters *acsParameters_);
|
||||||
|
virtual ~SensorProcessing();
|
||||||
|
|
||||||
|
void process(timeval now, ACS::SensorValues *sensorValues,
|
||||||
|
acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed,
|
||||||
|
acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed,
|
||||||
|
const AcsParameters *acsParameters); // Will call protected functions
|
||||||
|
private:
|
||||||
|
protected:
|
||||||
|
// short description needed for every function
|
||||||
|
void processMgm(const float *mgm0Value, bool mgm0valid, const float *mgm1Value, bool mgm1valid,
|
||||||
|
const float *mgm2Value, bool mgm2valid, const float *mgm3Value, bool mgm3valid,
|
||||||
|
const float *mgm4Value, bool mgm4valid, timeval timeOfMgmMeasurement,
|
||||||
|
const AcsParameters::MgmHandlingParameters *mgmParameters,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed, const double gpsAltitude,
|
||||||
|
bool gpsValid, acsctrl::MgmDataProcessed *mgmDataProcessed);
|
||||||
|
|
||||||
|
void processSus(const uint16_t *sus0Value, bool sus0valid, const uint16_t *sus1Value,
|
||||||
|
bool sus1valid, const uint16_t *sus2Value, bool sus2valid,
|
||||||
|
const uint16_t *sus3Value, bool sus3valid, const uint16_t *sus4Value,
|
||||||
|
bool sus4valid, const uint16_t *sus5Value, bool sus5valid,
|
||||||
|
const uint16_t *sus6Value, bool sus6valid, const uint16_t *sus7Value,
|
||||||
|
bool sus7valid, const uint16_t *sus8Value, bool sus8valid,
|
||||||
|
const uint16_t *sus9Value, bool sus9valid, const uint16_t *sus10Value,
|
||||||
|
bool sus10valid, const uint16_t *sus11Value, bool sus11valid,
|
||||||
|
timeval timeOfSusMeasurement,
|
||||||
|
const AcsParameters::SusHandlingParameters *susParameters,
|
||||||
|
const AcsParameters::SunModelParameters *sunModelParameters,
|
||||||
|
acsctrl::SusDataProcessed *susDataProcessed);
|
||||||
|
|
||||||
|
void processGyr(const double gyr0axXvalue, bool gyr0axXvalid, const double gyr0axYvalue,
|
||||||
|
bool gyr0axYvalid, const double gyr0axZvalue, bool gyr0axZvalid,
|
||||||
|
const double gyr1axXvalue, bool gyr1axXvalid, const double gyr1axYvalue,
|
||||||
|
bool gyr1axYvalid, const double gyr1axZvalue, bool gyr1axZvalid,
|
||||||
|
const double gyr2axXvalue, bool gyr2axXvalid, const double gyr2axYvalue,
|
||||||
|
bool gyr2axYvalid, const double gyr2axZvalue, bool gyr2axZvalid,
|
||||||
|
const double gyr3axXvalue, bool gyr3axXvalid, const double gyr3axYvalue,
|
||||||
|
bool gyr3axYvalid, const double gyr3axZvalue, bool gyr3axZvalid,
|
||||||
|
timeval timeOfGyrMeasurement,
|
||||||
|
const AcsParameters::GyrHandlingParameters *gyrParameters,
|
||||||
|
acsctrl::GyrDataProcessed *gyrDataProcessed);
|
||||||
|
|
||||||
|
void processStr();
|
||||||
|
|
||||||
|
void processGps(const double gps0latitude, const double gps0longitude, const bool validGps,
|
||||||
|
acsctrl::GpsDataProcessed *gpsDataProcessed);
|
||||||
|
|
||||||
|
double savedMgmVecTot[3];
|
||||||
|
timeval timeOfSavedMagFieldEst;
|
||||||
|
double savedSusVecTot[3];
|
||||||
|
timeval timeOfSavedSusDirEst;
|
||||||
|
bool validMagField;
|
||||||
|
bool validGcLatitude;
|
||||||
|
|
||||||
|
const float zeroVector[3] = {0.0, 0.0, 0.0};
|
||||||
|
|
||||||
|
SusConverter susConverter;
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*SENSORPROCESSING_H_*/
|
95
mission/controller/acs/SensorValues.cpp
Normal file
95
mission/controller/acs/SensorValues.cpp
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* SensorValues.cpp
|
||||||
|
*
|
||||||
|
* Created on: 30 Mar 2022
|
||||||
|
* Author: rooob
|
||||||
|
*/
|
||||||
|
#include "SensorValues.h"
|
||||||
|
|
||||||
|
#include <fsfw/datapool/PoolReadGuard.h>
|
||||||
|
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
||||||
|
#include <fsfw/datapoollocal/LocalPoolVector.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
|
||||||
|
namespace ACS {
|
||||||
|
|
||||||
|
SensorValues::SensorValues() {}
|
||||||
|
|
||||||
|
SensorValues::~SensorValues() {}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateMgm() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgMgm0(&mgm0Lis3Set), pgMgm1(&mgm1Rm3100Set), pgMgm2(&mgm2Lis3Set),
|
||||||
|
pgMgm3(&mgm3Rm3100Set), pgImtq(&imtqMgmSet);
|
||||||
|
|
||||||
|
result = (pgMgm0.getReadResult() || pgMgm1.getReadResult() || pgMgm2.getReadResult() ||
|
||||||
|
pgMgm3.getReadResult() || pgImtq.getReadResult());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateSus() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgSus0(&susSets[0]), pgSus1(&susSets[1]), pgSus2(&susSets[2]), pgSus3(&susSets[3]),
|
||||||
|
pgSus4(&susSets[4]), pgSus5(&susSets[5]), pgSus6(&susSets[6]), pgSus7(&susSets[7]),
|
||||||
|
pgSus8(&susSets[8]), pgSus9(&susSets[9]), pgSus10(&susSets[10]), pgSus11(&susSets[11]);
|
||||||
|
|
||||||
|
result = (pgSus0.getReadResult() || pgSus1.getReadResult() || pgSus2.getReadResult() ||
|
||||||
|
pgSus3.getReadResult() || pgSus4.getReadResult() || pgSus5.getReadResult() ||
|
||||||
|
pgSus6.getReadResult() || pgSus7.getReadResult() || pgSus8.getReadResult() ||
|
||||||
|
pgSus9.getReadResult() || pgSus10.getReadResult() || pgSus11.getReadResult());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateGyr() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgGyr0(&gyr0AdisSet), pgGyr1(&gyr1L3gSet), pgGyr2(&gyr2AdisSet),
|
||||||
|
pgGyr3(&gyr3L3gSet);
|
||||||
|
|
||||||
|
result = (pgGyr0.getReadResult() || pgGyr1.getReadResult() || pgGyr2.getReadResult() ||
|
||||||
|
pgGyr3.getReadResult());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateStr() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgStr(&strSet);
|
||||||
|
|
||||||
|
result = pgStr.getReadResult();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateGps() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgGps(&gpsSet);
|
||||||
|
|
||||||
|
result = pgGps.getReadResult();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::updateRw() {
|
||||||
|
ReturnValue_t result;
|
||||||
|
PoolReadGuard pgRw1(&rw1Set), pgRw2(&rw2Set), pgRw3(&rw3Set), pgRw4(&rw4Set);
|
||||||
|
|
||||||
|
result = (pgRw1.getReadResult() || pgRw2.getReadResult() || pgRw3.getReadResult() ||
|
||||||
|
pgRw4.getReadResult());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t SensorValues::update() {
|
||||||
|
ReturnValue_t mgmUpdate = updateMgm();
|
||||||
|
ReturnValue_t susUpdate = updateSus();
|
||||||
|
ReturnValue_t gyrUpdate = updateGyr();
|
||||||
|
ReturnValue_t strUpdate = updateStr();
|
||||||
|
ReturnValue_t gpsUpdate = updateGps();
|
||||||
|
ReturnValue_t rwUpdate = updateRw();
|
||||||
|
|
||||||
|
if ((mgmUpdate && susUpdate && gyrUpdate && strUpdate && gpsUpdate && rwUpdate) ==
|
||||||
|
returnvalue::FAILED) {
|
||||||
|
return returnvalue::FAILED;
|
||||||
|
};
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace ACS
|
72
mission/controller/acs/SensorValues.h
Normal file
72
mission/controller/acs/SensorValues.h
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#ifndef SENSORVALUES_H_
|
||||||
|
#define SENSORVALUES_H_
|
||||||
|
|
||||||
|
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
|
||||||
|
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
|
||||||
|
#include "linux/devices/devicedefinitions/StarTrackerDefinitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/GPSDefinitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/GyroADIS1650XDefinitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/GyroL3GD20Definitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/RwDefinitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/SusDefinitions.h"
|
||||||
|
#include "mission/devices/devicedefinitions/imtqHandlerDefinitions.h"
|
||||||
|
|
||||||
|
namespace ACS {
|
||||||
|
|
||||||
|
class SensorValues {
|
||||||
|
public:
|
||||||
|
SensorValues();
|
||||||
|
virtual ~SensorValues();
|
||||||
|
|
||||||
|
ReturnValue_t update();
|
||||||
|
ReturnValue_t updateMgm();
|
||||||
|
ReturnValue_t updateSus();
|
||||||
|
ReturnValue_t updateGyr();
|
||||||
|
ReturnValue_t updateGps();
|
||||||
|
ReturnValue_t updateStr();
|
||||||
|
ReturnValue_t updateRw();
|
||||||
|
|
||||||
|
MGMLIS3MDL::MgmPrimaryDataset mgm0Lis3Set =
|
||||||
|
MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_0_LIS3_HANDLER);
|
||||||
|
RM3100::Rm3100PrimaryDataset mgm1Rm3100Set =
|
||||||
|
RM3100::Rm3100PrimaryDataset(objects::MGM_1_RM3100_HANDLER);
|
||||||
|
MGMLIS3MDL::MgmPrimaryDataset mgm2Lis3Set =
|
||||||
|
MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_2_LIS3_HANDLER);
|
||||||
|
RM3100::Rm3100PrimaryDataset mgm3Rm3100Set =
|
||||||
|
RM3100::Rm3100PrimaryDataset(objects::MGM_3_RM3100_HANDLER);
|
||||||
|
IMTQ::RawMtmMeasurementSet imtqMgmSet = IMTQ::RawMtmMeasurementSet(objects::IMTQ_HANDLER);
|
||||||
|
|
||||||
|
std::array<SUS::SusDataset, 12> susSets{
|
||||||
|
SUS::SusDataset(objects::SUS_0_N_LOC_XFYFZM_PT_XF),
|
||||||
|
SUS::SusDataset(objects::SUS_1_N_LOC_XBYFZM_PT_XB),
|
||||||
|
SUS::SusDataset(objects::SUS_2_N_LOC_XFYBZB_PT_YB),
|
||||||
|
SUS::SusDataset(objects::SUS_3_N_LOC_XFYBZF_PT_YF),
|
||||||
|
SUS::SusDataset(objects::SUS_4_N_LOC_XMYFZF_PT_ZF),
|
||||||
|
SUS::SusDataset(objects::SUS_5_N_LOC_XFYMZB_PT_ZB),
|
||||||
|
SUS::SusDataset(objects::SUS_6_R_LOC_XFYBZM_PT_XF),
|
||||||
|
SUS::SusDataset(objects::SUS_7_R_LOC_XBYBZM_PT_XB),
|
||||||
|
SUS::SusDataset(objects::SUS_8_R_LOC_XBYBZB_PT_YB),
|
||||||
|
SUS::SusDataset(objects::SUS_9_R_LOC_XBYBZB_PT_YF),
|
||||||
|
SUS::SusDataset(objects::SUS_10_N_LOC_XMYBZF_PT_ZF),
|
||||||
|
SUS::SusDataset(objects::SUS_11_R_LOC_XBYMZB_PT_ZB),
|
||||||
|
};
|
||||||
|
|
||||||
|
AdisGyroPrimaryDataset gyr0AdisSet = AdisGyroPrimaryDataset(objects::GYRO_0_ADIS_HANDLER);
|
||||||
|
GyroPrimaryDataset gyr1L3gSet = GyroPrimaryDataset(objects::GYRO_1_L3G_HANDLER);
|
||||||
|
AdisGyroPrimaryDataset gyr2AdisSet = AdisGyroPrimaryDataset(objects::GYRO_2_ADIS_HANDLER);
|
||||||
|
GyroPrimaryDataset gyr3L3gSet = GyroPrimaryDataset(objects::GYRO_3_L3G_HANDLER);
|
||||||
|
|
||||||
|
startracker::SolutionSet strSet = startracker::SolutionSet(objects::STAR_TRACKER);
|
||||||
|
|
||||||
|
GpsPrimaryDataset gpsSet = GpsPrimaryDataset(objects::GPS_CONTROLLER);
|
||||||
|
|
||||||
|
// bool mgt0valid;
|
||||||
|
|
||||||
|
RwDefinitions::StatusSet rw1Set = RwDefinitions::StatusSet(objects::RW1);
|
||||||
|
RwDefinitions::StatusSet rw2Set = RwDefinitions::StatusSet(objects::RW2);
|
||||||
|
RwDefinitions::StatusSet rw3Set = RwDefinitions::StatusSet(objects::RW3);
|
||||||
|
RwDefinitions::StatusSet rw4Set = RwDefinitions::StatusSet(objects::RW4);
|
||||||
|
};
|
||||||
|
} /* namespace ACS */
|
||||||
|
|
||||||
|
#endif /*ENSORVALUES_H_*/
|
129
mission/controller/acs/SusConverter.cpp
Normal file
129
mission/controller/acs/SusConverter.cpp
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
/*
|
||||||
|
* SusConverter.cpp
|
||||||
|
*
|
||||||
|
* Created on: 17.01.2022
|
||||||
|
* Author: Timon Schwarz
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "SusConverter.h"
|
||||||
|
|
||||||
|
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
||||||
|
#include <fsfw/datapoollocal/LocalPoolVector.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <math.h> //for atan2
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
bool SusConverter::checkSunSensorData(const uint16_t susChannel[6]) {
|
||||||
|
if (susChannel[0] <= susChannelValueCheckLow || susChannel[0] > susChannelValueCheckHigh ||
|
||||||
|
susChannel[0] > susChannel[GNDREF]) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (susChannel[1] <= susChannelValueCheckLow || susChannel[1] > susChannelValueCheckHigh ||
|
||||||
|
susChannel[1] > susChannel[GNDREF]) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
if (susChannel[2] <= susChannelValueCheckLow || susChannel[2] > susChannelValueCheckHigh ||
|
||||||
|
susChannel[2] > susChannel[GNDREF]) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
if (susChannel[3] <= susChannelValueCheckLow || susChannel[3] > susChannelValueCheckHigh ||
|
||||||
|
susChannel[3] > susChannel[GNDREF]) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
susChannelValueSum =
|
||||||
|
4 * susChannel[GNDREF] - (susChannel[0] + susChannel[1] + susChannel[2] + susChannel[3]);
|
||||||
|
if ((susChannelValueSum < susChannelValueSumHigh) &&
|
||||||
|
(susChannelValueSum > susChannelValueSumLow)) {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SusConverter::calcAngle(const uint16_t susChannel[6]) {
|
||||||
|
float xout, yout;
|
||||||
|
float s = 0.03; // s=[mm] gap between diodes
|
||||||
|
uint8_t d = 5; // d=[mm] edge length of the quadratic aperture
|
||||||
|
uint8_t h = 1; // h=[mm] distance between diodes and aperture
|
||||||
|
int ch0, ch1, ch2, ch3;
|
||||||
|
// Substract measurement values from GNDREF zero current threshold
|
||||||
|
ch0 = susChannel[GNDREF] - susChannel[0];
|
||||||
|
ch1 = susChannel[GNDREF] - susChannel[1];
|
||||||
|
ch2 = susChannel[GNDREF] - susChannel[2];
|
||||||
|
ch3 = susChannel[GNDREF] - susChannel[3];
|
||||||
|
|
||||||
|
// Calculation of x and y
|
||||||
|
xout = ((d - s) / 2) * (ch2 - ch3 - ch0 + ch1) / (ch0 + ch1 + ch2 + ch3); //[mm]
|
||||||
|
yout = ((d - s) / 2) * (ch2 + ch3 - ch0 - ch1) / (ch0 + ch1 + ch2 + ch3); //[mm]
|
||||||
|
|
||||||
|
// Calculation of the angles
|
||||||
|
alphaBetaRaw[0] = atan2(xout, h) * (180 / M_PI); //[°]
|
||||||
|
alphaBetaRaw[1] = atan2(yout, h) * (180 / M_PI); //[°]
|
||||||
|
}
|
||||||
|
|
||||||
|
void SusConverter::calibration(const float coeffAlpha[9][10], const float coeffBeta[9][10]) {
|
||||||
|
uint8_t index;
|
||||||
|
float k, l;
|
||||||
|
|
||||||
|
// while loop iterates above all calibration cells to use the different calibration functions in
|
||||||
|
// each cell
|
||||||
|
k = 0;
|
||||||
|
while (k < 3) {
|
||||||
|
k++;
|
||||||
|
l = 0;
|
||||||
|
while (l < 3) {
|
||||||
|
l++;
|
||||||
|
// if-condition to check in which cell the data point has to be
|
||||||
|
if ((alphaBetaRaw[0] > ((completeCellWidth * ((k - 1) / 3)) - halfCellWidth) &&
|
||||||
|
alphaBetaRaw[0] < ((completeCellWidth * (k / 3)) - halfCellWidth)) &&
|
||||||
|
(alphaBetaRaw[1] > ((completeCellWidth * ((l - 1) / 3)) - halfCellWidth) &&
|
||||||
|
alphaBetaRaw[1] < ((completeCellWidth * (l / 3)) - halfCellWidth))) {
|
||||||
|
index = (3 * (k - 1) + l) - 1; // calculate the index of the datapoint for the right cell
|
||||||
|
alphaBetaCalibrated[0] =
|
||||||
|
coeffAlpha[index][0] + coeffAlpha[index][1] * alphaBetaRaw[0] +
|
||||||
|
coeffAlpha[index][2] * alphaBetaRaw[1] +
|
||||||
|
coeffAlpha[index][3] * alphaBetaRaw[0] * alphaBetaRaw[0] +
|
||||||
|
coeffAlpha[index][4] * alphaBetaRaw[0] * alphaBetaRaw[1] +
|
||||||
|
coeffAlpha[index][5] * alphaBetaRaw[1] * alphaBetaRaw[1] +
|
||||||
|
coeffAlpha[index][6] * alphaBetaRaw[0] * alphaBetaRaw[0] * alphaBetaRaw[0] +
|
||||||
|
coeffAlpha[index][7] * alphaBetaRaw[0] * alphaBetaRaw[0] * alphaBetaRaw[1] +
|
||||||
|
coeffAlpha[index][8] * alphaBetaRaw[0] * alphaBetaRaw[1] * alphaBetaRaw[1] +
|
||||||
|
coeffAlpha[index][9] * alphaBetaRaw[1] * alphaBetaRaw[1] * alphaBetaRaw[1]; //[°]
|
||||||
|
alphaBetaCalibrated[1] =
|
||||||
|
coeffBeta[index][0] + coeffBeta[index][1] * alphaBetaRaw[0] +
|
||||||
|
coeffBeta[index][2] * alphaBetaRaw[1] +
|
||||||
|
coeffBeta[index][3] * alphaBetaRaw[0] * alphaBetaRaw[0] +
|
||||||
|
coeffBeta[index][4] * alphaBetaRaw[0] * alphaBetaRaw[1] +
|
||||||
|
coeffBeta[index][5] * alphaBetaRaw[1] * alphaBetaRaw[1] +
|
||||||
|
coeffBeta[index][6] * alphaBetaRaw[0] * alphaBetaRaw[0] * alphaBetaRaw[0] +
|
||||||
|
coeffBeta[index][7] * alphaBetaRaw[0] * alphaBetaRaw[0] * alphaBetaRaw[1] +
|
||||||
|
coeffBeta[index][8] * alphaBetaRaw[0] * alphaBetaRaw[1] * alphaBetaRaw[1] +
|
||||||
|
coeffBeta[index][9] * alphaBetaRaw[1] * alphaBetaRaw[1] * alphaBetaRaw[1]; //[°]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float* SusConverter::calculateSunVector() {
|
||||||
|
// Calculate the normalized Sun Vector
|
||||||
|
sunVectorSensorFrame[0] = -(tan(alphaBetaCalibrated[0] * (M_PI / 180)) /
|
||||||
|
(sqrt((powf(tan(alphaBetaCalibrated[0] * (M_PI / 180)), 2)) +
|
||||||
|
powf(tan((alphaBetaCalibrated[1] * (M_PI / 180))), 2) + (1))));
|
||||||
|
sunVectorSensorFrame[1] = -(tan(alphaBetaCalibrated[1] * (M_PI / 180)) /
|
||||||
|
(sqrt(powf((tan(alphaBetaCalibrated[0] * (M_PI / 180))), 2) +
|
||||||
|
powf(tan((alphaBetaCalibrated[1] * (M_PI / 180))), 2) + (1))));
|
||||||
|
sunVectorSensorFrame[2] =
|
||||||
|
-(-1 / (sqrt(powf((tan(alphaBetaCalibrated[0] * (M_PI / 180))), 2) +
|
||||||
|
powf((tan(alphaBetaCalibrated[1] * (M_PI / 180))), 2) + (1))));
|
||||||
|
|
||||||
|
return sunVectorSensorFrame;
|
||||||
|
}
|
||||||
|
|
||||||
|
float* SusConverter::getSunVectorSensorFrame(const uint16_t susChannel[6],
|
||||||
|
const float coeffAlpha[9][10],
|
||||||
|
const float coeffBeta[9][10]) {
|
||||||
|
calcAngle(susChannel);
|
||||||
|
calibration(coeffAlpha, coeffBeta);
|
||||||
|
return calculateSunVector();
|
||||||
|
}
|
59
mission/controller/acs/SusConverter.h
Normal file
59
mission/controller/acs/SusConverter.h
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
/*
|
||||||
|
* SusConverter.h
|
||||||
|
*
|
||||||
|
* Created on: Sep 22, 2022
|
||||||
|
* Author: marius
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MISSION_CONTROLLER_ACS_SUSCONVERTER_H_
|
||||||
|
#define MISSION_CONTROLLER_ACS_SUSCONVERTER_H_
|
||||||
|
|
||||||
|
#include <fsfw/datapoollocal/LocalPoolVector.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "AcsParameters.h"
|
||||||
|
|
||||||
|
class SusConverter {
|
||||||
|
public:
|
||||||
|
SusConverter() {}
|
||||||
|
|
||||||
|
bool checkSunSensorData(const uint16_t susChannel[6]);
|
||||||
|
|
||||||
|
void calcAngle(const uint16_t susChannel[6]);
|
||||||
|
void calibration(const float coeffAlpha[9][10], const float coeffBeta[9][10]);
|
||||||
|
float* calculateSunVector();
|
||||||
|
|
||||||
|
float* getSunVectorSensorFrame(const uint16_t susChannel[6], const float coeffAlpha[9][10],
|
||||||
|
const float coeffBeta[9][10]);
|
||||||
|
|
||||||
|
private:
|
||||||
|
float alphaBetaRaw[2]; //[°]
|
||||||
|
// float coeffAlpha[9][10];
|
||||||
|
// float coeffBeta[9][10];
|
||||||
|
float alphaBetaCalibrated[2]; //[°]
|
||||||
|
float sunVectorSensorFrame[3]; //[-]
|
||||||
|
|
||||||
|
bool validFlag[12] = {returnvalue::OK, returnvalue::OK, returnvalue::OK, returnvalue::OK,
|
||||||
|
returnvalue::OK, returnvalue::OK, returnvalue::OK, returnvalue::OK,
|
||||||
|
returnvalue::OK, returnvalue::OK, returnvalue::OK, returnvalue::OK};
|
||||||
|
|
||||||
|
static const uint8_t GNDREF = 4;
|
||||||
|
uint16_t susChannelValueCheckHigh =
|
||||||
|
4096; //=2^12[Bit]high borderline for the channel values of one sun sensor for validity Check
|
||||||
|
uint8_t susChannelValueCheckLow =
|
||||||
|
0; //[Bit]low borderline for the channel values of one sun sensor for validity Check
|
||||||
|
uint16_t susChannelValueSumHigh =
|
||||||
|
100; // 4096[Bit]high borderline for check if the sun sensor is illuminated by the sun or by
|
||||||
|
// the reflection of sunlight from the moon/earth
|
||||||
|
uint8_t susChannelValueSumLow =
|
||||||
|
0; //[Bit]low borderline for check if the sun sensor is illuminated
|
||||||
|
// by the sun or by the reflection of sunlight from the moon/earth
|
||||||
|
uint8_t completeCellWidth = 140,
|
||||||
|
halfCellWidth = 70; //[°] Width of the calibration cells --> necessary for checking in
|
||||||
|
// which cell a data point should be
|
||||||
|
uint16_t susChannelValueSum = 0;
|
||||||
|
|
||||||
|
AcsParameters acsParameters;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* MISSION_CONTROLLER_ACS_SUSCONVERTER_H_ */
|
18
mission/controller/acs/config/classIds.h
Normal file
18
mission/controller/acs/config/classIds.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef ACS_CONFIG_CLASSIDS_H_
|
||||||
|
#define ACS_CONFIG_CLASSIDS_H_
|
||||||
|
|
||||||
|
#include <common/config/eive/resultClassIds.h>
|
||||||
|
#include <fsfw/returnvalues/FwClassIds.h>
|
||||||
|
|
||||||
|
namespace CLASS_ID {
|
||||||
|
enum eiveclassIds : uint8_t {
|
||||||
|
EIVE_CLASS_ID_START = COMMON_CLASS_ID_END,
|
||||||
|
KALMAN,
|
||||||
|
SAFE,
|
||||||
|
PTG,
|
||||||
|
DETUMBLE,
|
||||||
|
EIVE_CLASS_ID_END // [EXPORT] : [END]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* ACS_CONFIG_CLASSIDS_H_ */
|
2
mission/controller/acs/control/CMakeLists.txt
Normal file
2
mission/controller/acs/control/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
target_sources(${LIB_EIVE_MISSION} PRIVATE Detumble.cpp PtgCtrl.cpp
|
||||||
|
SafeCtrl.cpp)
|
52
mission/controller/acs/control/Detumble.cpp
Normal file
52
mission/controller/acs/control/Detumble.cpp
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
|
||||||
|
/*
|
||||||
|
* Detumble.cpp
|
||||||
|
*
|
||||||
|
* Created on: 17 Aug 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "Detumble.h"
|
||||||
|
|
||||||
|
#include <fsfw/globalfunctions/constants.h>
|
||||||
|
#include <fsfw/globalfunctions/math/MatrixOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/math/VectorOperations.h>
|
||||||
|
#include <fsfw/globalfunctions/sign.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
#include "../util/MathOperations.h"
|
||||||
|
|
||||||
|
Detumble::Detumble(AcsParameters *acsParameters_) { loadAcsParameters(acsParameters_); }
|
||||||
|
|
||||||
|
Detumble::~Detumble() {}
|
||||||
|
|
||||||
|
void Detumble::loadAcsParameters(AcsParameters *acsParameters_) {
|
||||||
|
detumbleCtrlParameters = &(acsParameters_->detumbleCtrlParameters);
|
||||||
|
magnetorquesParameter = &(acsParameters_->magnetorquesParameter);
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t Detumble::bDotLaw(const double *magRate, const bool magRateValid,
|
||||||
|
const double *magField, const bool magFieldValid, double *magMom) {
|
||||||
|
if (!magRateValid || !magFieldValid) {
|
||||||
|
return DETUMBLE_NO_SENSORDATA;
|
||||||
|
}
|
||||||
|
double gain = detumbleCtrlParameters->gainD;
|
||||||
|
double factor = -gain / pow(VectorOperations<double>::norm(magField, 3), 2);
|
||||||
|
VectorOperations<double>::mulScalar(magRate, factor, magMom, 3);
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReturnValue_t Detumble::bangbangLaw(const double *magRate, const bool magRateValid,
|
||||||
|
double *magMom) {
|
||||||
|
if (!magRateValid) {
|
||||||
|
return DETUMBLE_NO_SENSORDATA;
|
||||||
|
}
|
||||||
|
|
||||||
|
double dipolMax = magnetorquesParameter->DipolMax;
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
magMom[i] = -dipolMax * sign(magRate[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
43
mission/controller/acs/control/Detumble.h
Normal file
43
mission/controller/acs/control/Detumble.h
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Detumble.h
|
||||||
|
*
|
||||||
|
* Created on: 17 Aug 2022
|
||||||
|
* Author: Robin Marquardt
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef ACS_CONTROL_DETUMBLE_H_
|
||||||
|
#define ACS_CONTROL_DETUMBLE_H_
|
||||||
|
|
||||||
|
#include <fsfw/returnvalues/returnvalue.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "../AcsParameters.h"
|
||||||
|
#include "../SensorValues.h"
|
||||||
|
#include "../config/classIds.h"
|
||||||
|
|
||||||
|
class Detumble {
|
||||||
|
public:
|
||||||
|
Detumble(AcsParameters *acsParameters_);
|
||||||
|
virtual ~Detumble();
|
||||||
|
|
||||||
|
static const uint8_t INTERFACE_ID = CLASS_ID::DETUMBLE;
|
||||||
|
static const ReturnValue_t DETUMBLE_NO_SENSORDATA = MAKE_RETURN_CODE(0x01);
|
||||||
|
|
||||||
|
/* @brief: Load AcsParameters für this class
|
||||||
|
* @param: acsParameters_ Pointer to object which defines the ACS configuration parameters
|
||||||
|
*/
|
||||||
|
void loadAcsParameters(AcsParameters *acsParameters_);
|
||||||
|
|
||||||
|
ReturnValue_t bDotLaw(const double *magRate, const bool magRateValid, const double *magField,
|
||||||
|
const bool magFieldValid, double *magMom);
|
||||||
|
|
||||||
|
ReturnValue_t bangbangLaw(const double *magRate, const bool magRateValid, double *magMom);
|
||||||
|
|
||||||
|
private:
|
||||||
|
AcsParameters::DetumbleCtrlParameters *detumbleCtrlParameters;
|
||||||
|
AcsParameters::MagnetorquesParameter *magnetorquesParameter;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /*ACS_CONTROL_DETUMBLE_H_*/
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user