Merge remote-tracking branch 'origin/main' into payload-module
EIVE/eive-obsw/pipeline/pr-main This commit looks good Details

This commit is contained in:
Robin Müller 2024-04-17 15:11:58 +02:00
commit 18cf46ea31
21 changed files with 199 additions and 107 deletions

View File

@ -16,10 +16,40 @@ will consitute of a breaking change warranting a new major release:
# [unreleased] # [unreleased]
# [v7.8.1] 2024-04-11
- Reverted fix for wrong order in quaternion multiplication for computation of the error quaternion.
# [v7.8.0] 2024-04-10
## Changed ## Changed
- Reverted lower OP limit of `PLOC` to -10°C. - Reverted lower OP limit of `PLOC` to -10°C.
- All pointing laws are now allowed to use the `MEKF` per default. - All pointing laws are now allowed to use the `MEKF` per default.
- Changed limits in `PWR Controller`.
- PUS time service: Now dumps the time before and after relative timeshift or setting absolute time
- The `GPS Controller` does not set itself to `OFF` anymore, if it has not detected a valid fix for
some time. Instead it attempts to reset both GNSS devices once.
- The maximum time to reach a fix is shortened from 30min to 15min.
- The time the reset pin of the GNSS devices is pulled is prolonged from 5ms to 10s.
- A `GPS FIX HAS CHANGED` is now only triggered if no fix change has been detected within the past
2min. This means, this event might be thrown with a 2min delay. It is instantly thrown, if the mode
of the controller is changed. As arguments it now displays the new fix and the numer of fix changes
missed.
- The number of satellites seen and used is reset to 0, in case they are set to invalid.
- Altitude, latitude and longitude messages are not checked anymore, in case the mode message was
already invalid.
## Added
- PUS timeservice relative timeshift.
## Fixed
- Fixed wrong order in quaternion multiplication for computation of the error quaternion.
- Re-worked some FDIR logic in the FSFW. The former logic prevented events with a severity
higher than INFO if the device was in EXTERNAL CONTROL. The new logic will allow to trigger
events but still inhibit FDIR reactions if the device is in EXTERNAL CONTROL.
# [v7.7.4] 2024-03-21 # [v7.7.4] 2024-03-21
@ -27,16 +57,11 @@ will consitute of a breaking change warranting a new major release:
- Rotational rate limit for the GS target pointing is now seperated from controller limit. It - Rotational rate limit for the GS target pointing is now seperated from controller limit. It
is also reduced to 0.75°/s now. is also reduced to 0.75°/s now.
- PUS time service: Now dumps the time before and after relative timeshift or setting absolute time
## Fixed ## Fixed
- Fixed wrong sign in calculation of total current within the `PWR Controller`. - Fixed wrong sign in calculation of total current within the `PWR Controller`.
## Added
- PUS timeservice relative timeshift.
# [v7.7.3] 2024-03-18 # [v7.7.3] 2024-03-18
- Bumped `eive-fsfw` - Bumped `eive-fsfw`

View File

@ -10,8 +10,8 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
set(OBSW_VERSION_MAJOR 7) set(OBSW_VERSION_MAJOR 7)
set(OBSW_VERSION_MINOR 7) set(OBSW_VERSION_MINOR 8)
set(OBSW_VERSION_REVISION 4) set(OBSW_VERSION_REVISION 1)
# set(CMAKE_VERBOSE TRUE) # set(CMAKE_VERBOSE TRUE)

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 321 translations. * @brief Auto-generated event translation file. Contains 324 translations.
* @details * @details
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -85,6 +85,8 @@ const char *CLOCK_SET_STRING = "CLOCK_SET";
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY"; const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP"; const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
const char *CLOCK_DUMP_BEFORE_SETTING_TIME_STRING = "CLOCK_DUMP_BEFORE_SETTING_TIME";
const char *CLOCK_DUMP_AFTER_SETTING_TIME_STRING = "CLOCK_DUMP_AFTER_SETTING_TIME";
const char *TC_DELETION_FAILED_STRING = "TC_DELETION_FAILED"; 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";
@ -242,6 +244,7 @@ const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANS
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE"; const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE"; const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX"; const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
const char *RESET_FAIL_STRING = "RESET_FAIL";
const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT"; const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT";
const char *BATT_MODE_STRING = "BATT_MODE"; const char *BATT_MODE_STRING = "BATT_MODE";
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED"; const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
@ -489,6 +492,10 @@ const char *translateEvents(Event event) {
return CLOCK_SET_FAILURE_STRING; return CLOCK_SET_FAILURE_STRING;
case (8903): case (8903):
return CLOCK_DUMP_STRING; return CLOCK_DUMP_STRING;
case (8904):
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
case (8905):
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
case (9100): case (9100):
return TC_DELETION_FAILED_STRING; return TC_DELETION_FAILED_STRING;
case (9700): case (9700):
@ -803,6 +810,8 @@ const char *translateEvents(Event event) {
return GPS_FIX_CHANGE_STRING; return GPS_FIX_CHANGE_STRING;
case (13101): case (13101):
return CANT_GET_FIX_STRING; return CANT_GET_FIX_STRING;
case (13102):
return RESET_FAIL_STRING;
case (13200): case (13200):
return P60_BOOT_COUNT_STRING; return P60_BOOT_COUNT_STRING;
case (13201): case (13201):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 175 translations. * Contains 175 translations.
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -2150,8 +2150,7 @@ ReturnValue_t CoreController::initClockFromTimeFile() {
std::string fileName = currMntPrefix + BACKUP_TIME_FILE; std::string fileName = currMntPrefix + BACKUP_TIME_FILE;
std::error_code e; std::error_code e;
if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e) and if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e) and
((gpsFix == FixMode::UNKNOWN or gpsFix == FixMode::NOT_SEEN) or ((gpsFix == FixMode::NOT_SEEN) or not utility::timeSanityCheck())) {
not utility::timeSanityCheck())) {
ifstream timeFile(fileName); ifstream timeFile(fileName);
string nextWord; string nextWord;
getline(timeFile, nextWord); getline(timeFile, nextWord);

View File

@ -9,7 +9,7 @@
#include <fsfw/parameters/ReceivesParameterMessagesIF.h> #include <fsfw/parameters/ReceivesParameterMessagesIF.h>
#include <fsfw_hal/linux/uio/UioMapper.h> #include <fsfw_hal/linux/uio/UioMapper.h>
#include <libxiphos.h> #include <libxiphos.h>
#include <mission/acs/archive/GPSDefinitions.h> #include <linux/acs/GPSDefinitions.h>
#include <mission/utility/trace.h> #include <mission/utility/trace.h>
#include <atomic> #include <atomic>
@ -211,7 +211,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING; static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING;
static constexpr uint32_t MUTEX_TIMEOUT = 20; static constexpr uint32_t MUTEX_TIMEOUT = 20;
bool enableHkSet = false; bool enableHkSet = false;
GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::UNKNOWN; GpsHyperion::FixMode gpsFix = GpsHyperion::FixMode::NOT_SEEN;
// States for SD state machine, which is used in non-blocking mode // States for SD state machine, which is used in non-blocking mode
enum class SdStates { enum class SdStates {

View File

@ -510,7 +510,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
debugGps = true; debugGps = true;
#endif #endif
RESET_ARGS_GNSS.gpioComIF = gpioComIF; RESET_ARGS_GNSS.gpioComIF = gpioComIF;
RESET_ARGS_GNSS.waitPeriodMs = 5; RESET_ARGS_GNSS.waitPeriodMs = 10 * 1e3;
auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT, auto gpsCtrl = new GpsHyperionLinuxController(objects::GPS_CONTROLLER, objects::NO_OBJECT,
enableHkSets, debugGps); enableHkSets, debugGps);
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS); gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);

View File

@ -2,7 +2,7 @@
#define DUMMIES_GPSCTRLDUMMY_H_ #define DUMMIES_GPSCTRLDUMMY_H_
#include <fsfw/controller/ExtendedControllerBase.h> #include <fsfw/controller/ExtendedControllerBase.h>
#include <mission/acs/archive/GPSDefinitions.h> #include <linux/acs/GPSDefinitions.h>
class GpsCtrlDummy : public ExtendedControllerBase { class GpsCtrlDummy : public ExtendedControllerBase {
public: public:

View File

@ -1,5 +1,5 @@
#include <dummies/GpsDhbDummy.h> #include <dummies/GpsDhbDummy.h>
#include <mission/acs/archive/GPSDefinitions.h> #include <linux/acs/GPSDefinitions.h>
GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie) GpsDhbDummy::GpsDhbDummy(object_id_t objectId, object_id_t comif, CookieIF *comCookie)
: DeviceHandlerBase(objectId, comif, comCookie) {} : DeviceHandlerBase(objectId, comif, comCookie) {}

View File

@ -79,6 +79,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
8901;0x22c5;CLOCK_DUMP_LEGACY;INFO;Clock dump event. P1: timeval seconds P2: timeval milliseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8901;0x22c5;CLOCK_DUMP_LEGACY;INFO;Clock dump event. P1: timeval seconds P2: timeval milliseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8902;0x22c6;CLOCK_SET_FAILURE;LOW;Clock could not be set. P1: Returncode.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8902;0x22c6;CLOCK_SET_FAILURE;LOW;Clock could not be set. P1: Returncode.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8903;0x22c7;CLOCK_DUMP;INFO;Clock dump event. P1: timeval seconds P2: timeval microseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8903;0x22c7;CLOCK_DUMP;INFO;Clock dump event. P1: timeval seconds P2: timeval microseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8904;0x22c8;CLOCK_DUMP_BEFORE_SETTING_TIME;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
8905;0x22c9;CLOCK_DUMP_AFTER_SETTING_TIME;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
9700;0x25e4;TEST;INFO;No description;fsfw/src/fsfw/pus/Service17Test.h 9700;0x25e4;TEST;INFO;No description;fsfw/src/fsfw/pus/Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;No description;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h 10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;No description;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
@ -234,8 +236,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h 12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h 12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h 13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h 13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: New fix. P2: Missed fix changes 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;linux/acs/GPSDefinitions.h
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h 13101;0x332d;CANT_GET_FIX;MEDIUM;Could not get fix in maximum allowed time. Trying to reset both GNSS devices. P1: Maximum allowed time to get a fix after the GPS was switched on.;linux/acs/GPSDefinitions.h
13102;0x332e;RESET_FAIL;HIGH;Failed to reset an GNNS Device. P1: Board-Side.;linux/acs/GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h 13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/power/P60DockHandler.h 13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/power/P60DockHandler.h
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/power/P60DockHandler.h 13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/power/P60DockHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
79 8901 0x22c5 CLOCK_DUMP_LEGACY INFO Clock dump event. P1: timeval seconds P2: timeval milliseconds. fsfw/src/fsfw/pus/Service9TimeManagement.h
80 8902 0x22c6 CLOCK_SET_FAILURE LOW Clock could not be set. P1: Returncode. fsfw/src/fsfw/pus/Service9TimeManagement.h
81 8903 0x22c7 CLOCK_DUMP INFO Clock dump event. P1: timeval seconds P2: timeval microseconds. fsfw/src/fsfw/pus/Service9TimeManagement.h
82 8904 0x22c8 CLOCK_DUMP_BEFORE_SETTING_TIME INFO No description fsfw/src/fsfw/pus/Service9TimeManagement.h
83 8905 0x22c9 CLOCK_DUMP_AFTER_SETTING_TIME INFO No description fsfw/src/fsfw/pus/Service9TimeManagement.h
84 9100 0x238c TC_DELETION_FAILED MEDIUM Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
85 9700 0x25e4 TEST INFO No description fsfw/src/fsfw/pus/Service17Test.h
86 10600 0x2968 CHANGE_OF_SETUP_PARAMETER LOW No description fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
236 12902 0x3266 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/SusAssembly.h
237 12903 0x3267 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/acs/SusAssembly.h
238 13000 0x32c8 CHILDREN_LOST_MODE MEDIUM No description mission/system/tcs/TcsBoardAssembly.h
239 13100 0x332c GPS_FIX_CHANGE INFO Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix Fix has changed. P1: New fix. P2: Missed fix changes 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix mission/acs/archive/GPSDefinitions.h linux/acs/GPSDefinitions.h
240 13101 0x332d CANT_GET_FIX LOW MEDIUM Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on. Could not get fix in maximum allowed time. Trying to reset both GNSS devices. P1: Maximum allowed time to get a fix after the GPS was switched on. mission/acs/archive/GPSDefinitions.h linux/acs/GPSDefinitions.h
241 13102 0x332e RESET_FAIL HIGH Failed to reset an GNNS Device. P1: Board-Side. linux/acs/GPSDefinitions.h
242 13200 0x3390 P60_BOOT_COUNT INFO P60 boot count is broadcasted once at SW startup. P1: Boot count mission/power/P60DockHandler.h
243 13201 0x3391 BATT_MODE INFO Battery mode is broadcasted at startup. P1: Mode mission/power/P60DockHandler.h
244 13202 0x3392 BATT_MODE_CHANGED MEDIUM Battery mode has changed. P1: Old mode. P2: New mode mission/power/P60DockHandler.h

View File

@ -79,6 +79,8 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
8901;0x22c5;CLOCK_DUMP_LEGACY;INFO;Clock dump event. P1: timeval seconds P2: timeval milliseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8901;0x22c5;CLOCK_DUMP_LEGACY;INFO;Clock dump event. P1: timeval seconds P2: timeval milliseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8902;0x22c6;CLOCK_SET_FAILURE;LOW;Clock could not be set. P1: Returncode.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8902;0x22c6;CLOCK_SET_FAILURE;LOW;Clock could not be set. P1: Returncode.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8903;0x22c7;CLOCK_DUMP;INFO;Clock dump event. P1: timeval seconds P2: timeval microseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h 8903;0x22c7;CLOCK_DUMP;INFO;Clock dump event. P1: timeval seconds P2: timeval microseconds.;fsfw/src/fsfw/pus/Service9TimeManagement.h
8904;0x22c8;CLOCK_DUMP_BEFORE_SETTING_TIME;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
8905;0x22c9;CLOCK_DUMP_AFTER_SETTING_TIME;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h 9100;0x238c;TC_DELETION_FAILED;MEDIUM;Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
9700;0x25e4;TEST;INFO;No description;fsfw/src/fsfw/pus/Service17Test.h 9700;0x25e4;TEST;INFO;No description;fsfw/src/fsfw/pus/Service17Test.h
10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;No description;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h 10600;0x2968;CHANGE_OF_SETUP_PARAMETER;LOW;No description;fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
@ -234,8 +236,9 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h 12902;0x3266;POWER_STATE_MACHINE_TIMEOUT;MEDIUM;No description;mission/system/acs/SusAssembly.h
12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h 12903;0x3267;SIDE_SWITCH_TRANSITION_NOT_ALLOWED;LOW;Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination;mission/system/acs/SusAssembly.h
13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h 13000;0x32c8;CHILDREN_LOST_MODE;MEDIUM;No description;mission/system/tcs/TcsBoardAssembly.h
13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;mission/acs/archive/GPSDefinitions.h 13100;0x332c;GPS_FIX_CHANGE;INFO;Fix has changed. P1: New fix. P2: Missed fix changes 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix;linux/acs/GPSDefinitions.h
13101;0x332d;CANT_GET_FIX;LOW;Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on.;mission/acs/archive/GPSDefinitions.h 13101;0x332d;CANT_GET_FIX;MEDIUM;Could not get fix in maximum allowed time. Trying to reset both GNSS devices. P1: Maximum allowed time to get a fix after the GPS was switched on.;linux/acs/GPSDefinitions.h
13102;0x332e;RESET_FAIL;HIGH;Failed to reset an GNNS Device. P1: Board-Side.;linux/acs/GPSDefinitions.h
13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h 13200;0x3390;P60_BOOT_COUNT;INFO;P60 boot count is broadcasted once at SW startup. P1: Boot count;mission/power/P60DockHandler.h
13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/power/P60DockHandler.h 13201;0x3391;BATT_MODE;INFO;Battery mode is broadcasted at startup. P1: Mode;mission/power/P60DockHandler.h
13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/power/P60DockHandler.h 13202;0x3392;BATT_MODE_CHANGED;MEDIUM;Battery mode has changed. P1: Old mode. P2: New mode;mission/power/P60DockHandler.h

1 Event ID (dec) Event ID (hex) Name Severity Description File Path
79 8901 0x22c5 CLOCK_DUMP_LEGACY INFO Clock dump event. P1: timeval seconds P2: timeval milliseconds. fsfw/src/fsfw/pus/Service9TimeManagement.h
80 8902 0x22c6 CLOCK_SET_FAILURE LOW Clock could not be set. P1: Returncode. fsfw/src/fsfw/pus/Service9TimeManagement.h
81 8903 0x22c7 CLOCK_DUMP INFO Clock dump event. P1: timeval seconds P2: timeval microseconds. fsfw/src/fsfw/pus/Service9TimeManagement.h
82 8904 0x22c8 CLOCK_DUMP_BEFORE_SETTING_TIME INFO No description fsfw/src/fsfw/pus/Service9TimeManagement.h
83 8905 0x22c9 CLOCK_DUMP_AFTER_SETTING_TIME INFO No description fsfw/src/fsfw/pus/Service9TimeManagement.h
84 9100 0x238c TC_DELETION_FAILED MEDIUM Deletion of a TC from the map failed. P1: First 32 bit of request ID, P2. Last 32 bit of Request ID fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
85 9700 0x25e4 TEST INFO No description fsfw/src/fsfw/pus/Service17Test.h
86 10600 0x2968 CHANGE_OF_SETUP_PARAMETER LOW No description fsfw/src/fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h
236 12902 0x3266 POWER_STATE_MACHINE_TIMEOUT MEDIUM No description mission/system/acs/SusAssembly.h
237 12903 0x3267 SIDE_SWITCH_TRANSITION_NOT_ALLOWED LOW Not implemented, would increase already high complexity. Operator should instead command the assembly off first and then command the assembly on into the desired mode/submode combination mission/system/acs/SusAssembly.h
238 13000 0x32c8 CHILDREN_LOST_MODE MEDIUM No description mission/system/tcs/TcsBoardAssembly.h
239 13100 0x332c GPS_FIX_CHANGE INFO Fix has changed. P1: Old fix. P2: New fix 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix Fix has changed. P1: New fix. P2: Missed fix changes 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix mission/acs/archive/GPSDefinitions.h linux/acs/GPSDefinitions.h
240 13101 0x332d CANT_GET_FIX LOW MEDIUM Could not get fix in maximum allowed time. P1: Maximum allowed time to get a fix after the GPS was switched on. Could not get fix in maximum allowed time. Trying to reset both GNSS devices. P1: Maximum allowed time to get a fix after the GPS was switched on. mission/acs/archive/GPSDefinitions.h linux/acs/GPSDefinitions.h
241 13102 0x332e RESET_FAIL HIGH Failed to reset an GNNS Device. P1: Board-Side. linux/acs/GPSDefinitions.h
242 13200 0x3390 P60_BOOT_COUNT INFO P60 boot count is broadcasted once at SW startup. P1: Boot count mission/power/P60DockHandler.h
243 13201 0x3391 BATT_MODE INFO Battery mode is broadcasted at startup. P1: Mode mission/power/P60DockHandler.h
244 13202 0x3392 BATT_MODE_CHANGED MEDIUM Battery mode has changed. P1: Old mode. P2: New mode mission/power/P60DockHandler.h

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 321 translations. * @brief Auto-generated event translation file. Contains 324 translations.
* @details * @details
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -85,6 +85,8 @@ const char *CLOCK_SET_STRING = "CLOCK_SET";
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY"; const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP"; const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
const char *CLOCK_DUMP_BEFORE_SETTING_TIME_STRING = "CLOCK_DUMP_BEFORE_SETTING_TIME";
const char *CLOCK_DUMP_AFTER_SETTING_TIME_STRING = "CLOCK_DUMP_AFTER_SETTING_TIME";
const char *TC_DELETION_FAILED_STRING = "TC_DELETION_FAILED"; 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";
@ -242,6 +244,7 @@ const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANS
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE"; const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE"; const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX"; const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
const char *RESET_FAIL_STRING = "RESET_FAIL";
const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT"; const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT";
const char *BATT_MODE_STRING = "BATT_MODE"; const char *BATT_MODE_STRING = "BATT_MODE";
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED"; const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
@ -489,6 +492,10 @@ const char *translateEvents(Event event) {
return CLOCK_SET_FAILURE_STRING; return CLOCK_SET_FAILURE_STRING;
case (8903): case (8903):
return CLOCK_DUMP_STRING; return CLOCK_DUMP_STRING;
case (8904):
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
case (8905):
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
case (9100): case (9100):
return TC_DELETION_FAILED_STRING; return TC_DELETION_FAILED_STRING;
case (9700): case (9700):
@ -803,6 +810,8 @@ const char *translateEvents(Event event) {
return GPS_FIX_CHANGE_STRING; return GPS_FIX_CHANGE_STRING;
case (13101): case (13101):
return CANT_GET_FIX_STRING; return CANT_GET_FIX_STRING;
case (13102):
return RESET_FAIL_STRING;
case (13200): case (13200):
return P60_BOOT_COUNT_STRING; return P60_BOOT_COUNT_STRING;
case (13201): case (13201):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 179 translations. * Contains 179 translations.
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -7,15 +7,19 @@
namespace GpsHyperion { namespace GpsHyperion {
enum class FixMode : uint8_t { NOT_SEEN = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3, UNKNOWN = 4 }; enum FixMode : uint8_t { NOT_SEEN = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
enum GnssChip : uint8_t { A_SIDE = 0, B_SIDE = 1 };
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER; static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::GPS_HANDLER;
//! [EXPORT] : [COMMENT] Fix has changed. P1: Old fix. P2: New fix //! [EXPORT] : [COMMENT] Fix has changed. P1: New fix. P2: Missed fix changes
//! 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix //! 0: Not seen, 1: No Fix, 2: 2D-Fix, 3: 3D-Fix
static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO); static constexpr Event GPS_FIX_CHANGE = event::makeEvent(SUBSYSTEM_ID, 0, severity::INFO);
//! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. P1: Maximum allowed time //! [EXPORT] : [COMMENT] Could not get fix in maximum allowed time. Trying to reset both GNSS
//! to get a fix after the GPS was switched on. //! devices. P1: Maximum allowed time to get a fix after the GPS was switched on.
static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW); static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::MEDIUM);
//! [EXPORT] : [COMMENT] Failed to reset an GNNS Device. P1: Board-Side.
static constexpr Event RESET_FAIL = event::makeEvent(SUBSYSTEM_ID, 2, severity::HIGH);
static constexpr DeviceCommandId_t GPS_REPLY = 0; static constexpr DeviceCommandId_t GPS_REPLY = 0;
static constexpr DeviceCommandId_t TRIGGER_RESET_PIN_GNSS = 5; static constexpr DeviceCommandId_t TRIGGER_RESET_PIN_GNSS = 5;
@ -53,8 +57,6 @@ static constexpr uint8_t SKYVIEW_ENTRIES = 6;
static constexpr uint8_t MAX_SATELLITES = 30; static constexpr uint8_t MAX_SATELLITES = 30;
enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
} // namespace GpsHyperion } // namespace GpsHyperion
class GpsPrimaryDataset : public StaticLocalDataSet<GpsHyperion::CORE_DATASET_ENTRIES> { class GpsPrimaryDataset : public StaticLocalDataSet<GpsHyperion::CORE_DATASET_ENTRIES> {

View File

@ -44,24 +44,21 @@ LocalPoolDataSetBase *GpsHyperionLinuxController::getDataSetHandle(sid_t sid) {
ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode, ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode) { uint32_t *msToReachTheMode) {
if (not modeCommanded) { if (mode == MODE_ON) {
if (mode == MODE_ON or mode == MODE_OFF) { maxTimeToReachFix.resetTimer();
// 5h time to reach fix gainedNewFix.timeOut();
*msToReachTheMode = MAX_SECONDS_TO_REACH_FIX; } else if (mode == MODE_NORMAL) {
maxTimeToReachFix.resetTimer(); return HasModesIF::INVALID_MODE;
modeCommanded = true;
} else if (mode == MODE_NORMAL) {
return HasModesIF::INVALID_MODE;
}
} }
if (mode == MODE_OFF) { if (mode == MODE_OFF) {
maxTimeToReachFix.timeOut();
gainedNewFix.timeOut();
PoolReadGuard pg(&gpsSet); PoolReadGuard pg(&gpsSet);
gpsSet.setValidity(false, true); gpsSet.setValidity(false, true);
// There can't be a fix with a device that is off. // The ctrl is off, so it cannot detect the data from the devices.
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, 0); handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN);
gpsSet.fixMode.value = 0; gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN;
oneShotSwitches.reset(); oneShotSwitches.reset();
modeCommanded = false;
} }
return returnvalue::OK; return returnvalue::OK;
} }
@ -75,13 +72,16 @@ ReturnValue_t GpsHyperionLinuxController::executeAction(ActionId_t actionId,
PoolReadGuard pg(&gpsSet); PoolReadGuard pg(&gpsSet);
// Set HK entries invalid // Set HK entries invalid
gpsSet.setValidity(false, true); gpsSet.setValidity(false, true);
resetCallback(data, size, resetCallbackArgs); ReturnValue_t result = resetCallback(data, size, resetCallbackArgs);
if (result != returnvalue::OK) {
return result;
}
return HasActionsIF::EXECUTION_FINISHED; return HasActionsIF::EXECUTION_FINISHED;
} }
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED; return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
} }
} }
return returnvalue::OK; return HasActionsIF::INVALID_ACTION_ID;
} }
ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool( ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
@ -216,15 +216,9 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
bool modeIsSet = true; bool modeIsSet = true;
if (MODE_SET != (MODE_SET & gps.set)) { if (MODE_SET != (MODE_SET & gps.set)) {
if (mode != MODE_OFF) { if (mode != MODE_OFF) {
if (maxTimeToReachFix.hasTimedOut() and oneShotSwitches.cantGetFixSwitch) {
sif::warning << "GpsHyperionLinuxController: No mode could be set in allowed "
<< maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl;
triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs());
oneShotSwitches.cantGetFixSwitch = false;
}
modeIsSet = false; modeIsSet = false;
} else { } else {
// GPS device is off anyway, so do other handling // GPS ctrl is off anyway, so do other handling
return returnvalue::FAILED; return returnvalue::FAILED;
} }
} }
@ -249,27 +243,44 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
uint8_t newFix = 0; uint8_t newFix = 0;
if (modeIsSet) { if (modeIsSet) {
// 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix // 0: Not seen, 1: No fix, 2: 2D-Fix, 3: 3D-Fix
if (gps.fix.mode == 2 or gps.fix.mode == 3) { if (gps.fix.mode == GpsHyperion::FixMode::FIX_2D or
gps.fix.mode == GpsHyperion::FixMode::FIX_3D) {
validFix = true; validFix = true;
maxTimeToReachFix.resetTimer();
} }
newFix = gps.fix.mode; newFix = gps.fix.mode;
if (newFix == 0 or newFix == 1) {
if (modeCommanded and maxTimeToReachFix.hasTimedOut()) {
// We are supposed to be on and functioning, but no fix was found
if (mode == MODE_ON or mode == MODE_NORMAL) {
mode = MODE_OFF;
}
modeCommanded = false;
}
}
} }
if (gpsSet.fixMode.value != newFix) { if (gpsSet.fixMode.value != newFix) {
#if OBSW_Q7S_EM != 1 handleFixChangedEvent(newFix);
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix);
#endif
} }
gpsSet.fixMode = newFix; gpsSet.fixMode = newFix;
gpsSet.fixMode.setValid(modeIsSet); gpsSet.fixMode.setValid(modeIsSet);
// We are supposed to be on and functioning, but no fix was found
if (not validFix) {
if (maxTimeToReachFix.hasTimedOut()) {
// Set HK entries invalid
gpsSet.setValidity(false, true);
if (oneShotSwitches.cantGetFixSwitch) {
sif::warning << "GpsHyperionLinuxController: No fix detected in allowed "
<< maxTimeToReachFix.getTimeoutMs() / 1000 << " seconds" << std::endl;
triggerEvent(GpsHyperion::CANT_GET_FIX, maxTimeToReachFix.getTimeoutMs());
oneShotSwitches.cantGetFixSwitch = false;
// Try resetting the devices
if (resetCallback != nullptr) {
uint8_t chip = GpsHyperion::GnssChip::A_SIDE;
ReturnValue_t result = resetCallback(&chip, 1, resetCallbackArgs);
if (result != returnvalue::OK) {
triggerEvent(GpsHyperion::RESET_FAIL, chip);
}
chip = GpsHyperion::GnssChip::B_SIDE;
result = resetCallback(&chip, 1, resetCallbackArgs);
if (result != returnvalue::OK) {
triggerEvent(GpsHyperion::RESET_FAIL, chip);
}
}
}
}
}
// Only set on specific messages, so only set a valid flag to invalid // Only set on specific messages, so only set a valid flag to invalid
// if not set for more than a full message set (10 messages here) // if not set for more than a full message set (10 messages here)
@ -282,9 +293,12 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
} }
satNotSetCounter = 0; satNotSetCounter = 0;
} else { } else {
satNotSetCounter++; if (satNotSetCounter < 10) {
if (gpsSet.satInUse.isValid() and satNotSetCounter >= 10) { satNotSetCounter++;
} else {
gpsSet.satInUse.value = 0;
gpsSet.satInUse.setValid(false); gpsSet.satInUse.setValid(false);
gpsSet.satInView.value = 0;
gpsSet.satInView.setValid(false); gpsSet.satInView.setValid(false);
} }
} }
@ -292,22 +306,24 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
// LATLON is set for every message, no need for a counter // LATLON is set for every message, no need for a counter
bool latValid = false; bool latValid = false;
bool longValid = false; bool longValid = false;
if (LATLON_SET == (LATLON_SET & gps.set)) { if (modeIsSet) {
if (std::isfinite(gps.fix.latitude)) { if (LATLON_SET == (LATLON_SET & gps.set)) {
// Negative latitude -> South direction if (std::isfinite(gps.fix.latitude)) {
gpsSet.latitude.value = gps.fix.latitude; // Negative latitude -> South direction
// As specified in gps.h: Only valid if mode >= 2 gpsSet.latitude.value = gps.fix.latitude;
if (gps.fix.mode >= 2) { // As specified in gps.h: Only valid if mode >= 2
latValid = true; if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) {
latValid = true;
}
} }
}
if (std::isfinite(gps.fix.longitude)) { if (std::isfinite(gps.fix.longitude)) {
// Negative longitude -> West direction // Negative longitude -> West direction
gpsSet.longitude.value = gps.fix.longitude; gpsSet.longitude.value = gps.fix.longitude;
// As specified in gps.h: Only valid if mode >= 2 // As specified in gps.h: Only valid if mode >= 2
if (gps.fix.mode >= 2) { if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) {
longValid = true; longValid = true;
}
} }
} }
} }
@ -316,20 +332,24 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
// ALTITUDE is set for every message, no need for a counter // ALTITUDE is set for every message, no need for a counter
bool altitudeValid = false; bool altitudeValid = false;
if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) { if (modeIsSet) {
gpsSet.altitude.value = gps.fix.altitude; if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) {
// As specified in gps.h: Only valid if mode == 3 gpsSet.altitude.value = gps.fix.altitude;
if (gps.fix.mode == 3) { // As specified in gps.h: Only valid if mode == 3
altitudeValid = true; if (gps.fix.mode == GpsHyperion::FixMode::FIX_3D) {
altitudeValid = true;
}
} }
} }
gpsSet.altitude.setValid(altitudeValid); gpsSet.altitude.setValid(altitudeValid);
// SPEED is set for every message, no need for a counter // SPEED is set for every message, no need for a counter
bool speedValid = false; bool speedValid = false;
if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) { if (modeIsSet) {
gpsSet.speed.value = gps.fix.speed; if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) {
speedValid = true; gpsSet.speed.value = gps.fix.speed;
speedValid = true;
}
} }
gpsSet.speed.setValid(speedValid); gpsSet.speed.setValid(speedValid);
@ -430,3 +450,14 @@ void GpsHyperionLinuxController::overwriteTimeIfNotSane(timeval time, bool valid
timeInit = true; timeInit = true;
} }
} }
void GpsHyperionLinuxController::handleFixChangedEvent(uint8_t newFix) {
if (gainedNewFix.hasTimedOut()) {
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, newFix, fixChangeCounter);
fixChangeCounter = 0;
gainedNewFix.resetTimer();
return;
}
fixChangeCounter++;
gainedNewFix.resetTimer();
}

View File

@ -1,14 +1,13 @@
#ifndef MISSION_DEVICES_GPSHYPERIONHANDLER_H_ #ifndef MISSION_DEVICES_GPSHYPERIONHANDLER_H_
#define MISSION_DEVICES_GPSHYPERIONHANDLER_H_ #define MISSION_DEVICES_GPSHYPERIONHANDLER_H_
#include <mission/acs/archive/GPSDefinitions.h> #include <common/config/eive/eventSubsystemIds.h>
#include <fsfw/FSFW.h>
#include <fsfw/controller/ExtendedControllerBase.h>
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <linux/acs/GPSDefinitions.h>
#include <mission/utility/trace.h> #include <mission/utility/trace.h>
#include "eive/eventSubsystemIds.h"
#include "fsfw/FSFW.h"
#include "fsfw/controller/ExtendedControllerBase.h"
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
#ifdef FSFW_OSAL_LINUX #ifdef FSFW_OSAL_LINUX
#include <gps.h> #include <gps.h>
#include <libgpsmm.h> #include <libgpsmm.h>
@ -24,8 +23,8 @@
*/ */
class GpsHyperionLinuxController : public ExtendedControllerBase { class GpsHyperionLinuxController : public ExtendedControllerBase {
public: public:
// 30 minutes // 15 minutes
static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 30; static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 15;
enum ReadModes { SHM = 0, SOCKET = 1 }; enum ReadModes { SHM = 0, SOCKET = 1 };
@ -65,7 +64,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
const char* currentClientBuf = nullptr; const char* currentClientBuf = nullptr;
ReadModes readMode = ReadModes::SOCKET; ReadModes readMode = ReadModes::SOCKET;
Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000); Countdown maxTimeToReachFix = Countdown(MAX_SECONDS_TO_REACH_FIX * 1000);
bool modeCommanded = false; Countdown gainedNewFix = Countdown(60 * 2 * 1000);
uint32_t fixChangeCounter = 0;
bool timeInit = false; bool timeInit = false;
uint8_t satNotSetCounter = 0; uint8_t satNotSetCounter = 0;
@ -92,6 +92,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
// we set it with the roughly valid time from the GPS. For some reason, NTP might only work // we set it with the roughly valid time from the GPS. For some reason, NTP might only work
// if the time difference between sys time and current time is not too large // if the time difference between sys time and current time is not too large
void overwriteTimeIfNotSane(timeval time, bool validFix); void overwriteTimeIfNotSane(timeval time, bool validFix);
void handleFixChangedEvent(uint8_t newFix);
}; };
#endif /* MISSION_DEVICES_GPSHYPERIONHANDLER_H_ */ #endif /* MISSION_DEVICES_GPSHYPERIONHANDLER_H_ */

View File

@ -1,7 +1,7 @@
/** /**
* @brief Auto-generated event translation file. Contains 321 translations. * @brief Auto-generated event translation file. Contains 324 translations.
* @details * @details
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateEvents.h" #include "translateEvents.h"
@ -85,6 +85,8 @@ const char *CLOCK_SET_STRING = "CLOCK_SET";
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY"; const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE"; const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP"; const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
const char *CLOCK_DUMP_BEFORE_SETTING_TIME_STRING = "CLOCK_DUMP_BEFORE_SETTING_TIME";
const char *CLOCK_DUMP_AFTER_SETTING_TIME_STRING = "CLOCK_DUMP_AFTER_SETTING_TIME";
const char *TC_DELETION_FAILED_STRING = "TC_DELETION_FAILED"; 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";
@ -242,6 +244,7 @@ const char *SIDE_SWITCH_TRANSITION_NOT_ALLOWED_12903_STRING = "SIDE_SWITCH_TRANS
const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE"; const char *CHILDREN_LOST_MODE_STRING = "CHILDREN_LOST_MODE";
const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE"; const char *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
const char *CANT_GET_FIX_STRING = "CANT_GET_FIX"; const char *CANT_GET_FIX_STRING = "CANT_GET_FIX";
const char *RESET_FAIL_STRING = "RESET_FAIL";
const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT"; const char *P60_BOOT_COUNT_STRING = "P60_BOOT_COUNT";
const char *BATT_MODE_STRING = "BATT_MODE"; const char *BATT_MODE_STRING = "BATT_MODE";
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED"; const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
@ -489,6 +492,10 @@ const char *translateEvents(Event event) {
return CLOCK_SET_FAILURE_STRING; return CLOCK_SET_FAILURE_STRING;
case (8903): case (8903):
return CLOCK_DUMP_STRING; return CLOCK_DUMP_STRING;
case (8904):
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
case (8905):
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
case (9100): case (9100):
return TC_DELETION_FAILED_STRING; return TC_DELETION_FAILED_STRING;
case (9700): case (9700):
@ -803,6 +810,8 @@ const char *translateEvents(Event event) {
return GPS_FIX_CHANGE_STRING; return GPS_FIX_CHANGE_STRING;
case (13101): case (13101):
return CANT_GET_FIX_STRING; return CANT_GET_FIX_STRING;
case (13102):
return RESET_FAIL_STRING;
case (13200): case (13200):
return P60_BOOT_COUNT_STRING; return P60_BOOT_COUNT_STRING;
case (13201): case (13201):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file. * @brief Auto-generated object translation file.
* @details * @details
* Contains 179 translations. * Contains 179 translations.
* Generated on: 2024-04-08 13:37:59 * Generated on: 2024-04-10 11:49:35
*/ */
#include "translateObjects.h" #include "translateObjects.h"

View File

@ -57,9 +57,9 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM
float batteryMaximumCapacity = 2.6 * 2; // [Ah] float batteryMaximumCapacity = 2.6 * 2; // [Ah]
float coulombCounterVoltageUpperThreshold = 16.2; // [V] float coulombCounterVoltageUpperThreshold = 16.2; // [V]
double maxAllowedTimeDiff = 1.5; // [s] double maxAllowedTimeDiff = 1.5; // [s]
float payloadOpLimitOn = 0.90; // [%] float payloadOpLimitOn = 0.80; // [%]
float payloadOpLimitLow = 0.75; // [%] float payloadOpLimitLow = 0.65; // [%]
float higherModesLimit = 0.6; // [%] float higherModesLimit = 0.60; // [%]
// OCV Look-up-Table {[Ah],[V]} // OCV Look-up-Table {[Ah],[V]}
static constexpr uint8_t LOOK_UP_TABLE_MAX_IDX = 99; static constexpr uint8_t LOOK_UP_TABLE_MAX_IDX = 99;

View File

@ -4,7 +4,7 @@
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h> #include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.h> #include <fsfw_hal/devicehandlers/MgmRM3100Handler.h>
#include <fsfw_hal/devicehandlers/devicedefinitions/gyroL3gHelpers.h> #include <fsfw_hal/devicehandlers/devicedefinitions/gyroL3gHelpers.h>
#include <mission/acs/archive/GPSDefinitions.h> #include <linux/acs/GPSDefinitions.h>
#include <mission/acs/gyroAdisHelpers.h> #include <mission/acs/gyroAdisHelpers.h>
#include <mission/acs/imtqHelpers.h> #include <mission/acs/imtqHelpers.h>
#include <mission/acs/rwHelpers.h> #include <mission/acs/rwHelpers.h>

2
tmtc

@ -1 +1 @@
Subproject commit 102821fc718fb70b01ef949bd54da3d438f0d455 Subproject commit a8d0143b1ed9a14f7e071ee3344dc4e8f1937c55