Compare commits
139 Commits
Author | SHA1 | Date |
---|---|---|
Marius Eggert | c1b8e891c5 | |
Robin Müller | 18cf46ea31 | |
Marius Eggert | 2d7356b9ed | |
Marius Eggert | 675dda8e9e | |
Marius Eggert | 5bb1bd8946 | |
Marius Eggert | eff9116aec | |
Marius Eggert | 4ed516e0bc | |
Marius Eggert | e2ee6a492c | |
Marius Eggert | a6422f2d73 | |
Marius Eggert | ceb2130726 | |
Marius Eggert | fcd3b7815c | |
Marius Eggert | 1067abba9a | |
Marius Eggert | 53376fd9ed | |
Marius Eggert | c2d05b2045 | |
Marius Eggert | 48914a2aba | |
Marius Eggert | ef8736bd81 | |
Marius Eggert | 584a16a67c | |
Robin Müller | addfadddb6 | |
Marius Eggert | df392d3319 | |
Robin Müller | b079ce85f2 | |
Marius Eggert | bc9b8efdb8 | |
Robin Müller | 51dcb56583 | |
Robin Müller | df0c8eefab | |
Robin Müller | 5a7df626ab | |
Marius Eggert | 7b53275d61 | |
Marius Eggert | 709c53d533 | |
Marius Eggert | 3a70155105 | |
Marius Eggert | 7a12c1c8fe | |
Robin Müller | 0f1c41e828 | |
Robin Müller | c4340c3515 | |
Robin Müller | eec934e1b0 | |
Robin Müller | b01d4f6363 | |
Robin Müller | d9789a48d8 | |
Robin Müller | c3237cae3c | |
Marius Eggert | 427c53df8c | |
Marius Eggert | c89e81cac9 | |
Robin Müller | fb54d976d2 | |
Robin Müller | 25a1e4ea25 | |
Robin Müller | a63eb331eb | |
Robin Müller | 1793b325ec | |
Marius Eggert | 1c36f36b1f | |
Marius Eggert | 0f3eeb42d6 | |
Marius Eggert | 887f165484 | |
Robin Müller | 6cc1d86018 | |
Marius Eggert | d4eb124cdf | |
Robin Müller | 47cedb90f9 | |
Marius Eggert | f3d4e09487 | |
Marius Eggert | 2057ab9c10 | |
Robin Müller | 1f0e2d99e9 | |
Robin Müller | 35181a2693 | |
Robin Müller | e1b5625086 | |
Robin Müller | 72626582f6 | |
Robin Müller | 3e6d26669a | |
Marius Eggert | 69f378f8b6 | |
Marius Eggert | a46f6f34d6 | |
Marius Eggert | e6855120f3 | |
Marius Eggert | e59235fd75 | |
Robin Müller | 3875ddf92b | |
Robin Müller | 4171b11928 | |
Robin Müller | 43de097812 | |
Robin Müller | 56512fae0d | |
Robin Müller | 76d00ddd37 | |
Marius Eggert | 539221a458 | |
Marius Eggert | 9f03341108 | |
Marius Eggert | 4193a565a4 | |
Marius Eggert | c1c254330b | |
Marius Eggert | c46c6cd28b | |
Marius Eggert | aeb8b92bc4 | |
Marius Eggert | 8011686fbe | |
Marius Eggert | 58be09bd4b | |
Marius Eggert | ad82573a35 | |
Marius Eggert | a1be15e939 | |
Marius Eggert | ba7c9e1c26 | |
Marius Eggert | 46c125d9fe | |
Marius Eggert | 889dd04c6b | |
Marius Eggert | c52746a2df | |
Marius Eggert | f2f856e227 | |
Marius Eggert | 0cbac07f15 | |
Marius Eggert | 18d3c8fa91 | |
Marius Eggert | 3e1ef8bcaf | |
Marius Eggert | d1fc876f03 | |
Marius Eggert | 0278aabee0 | |
Marius Eggert | a9f5b6d2c7 | |
Marius Eggert | 80ea0b341b | |
Marius Eggert | 9740831755 | |
Marius Eggert | c4e18432e2 | |
Marius Eggert | f9f5ba5d46 | |
Marius Eggert | 3b521966a9 | |
Marius Eggert | c58bae5aa5 | |
Marius Eggert | 67e6ccf4ae | |
Marius Eggert | b795beef85 | |
Marius Eggert | 311ecd7fd2 | |
Marius Eggert | 950e86ce4b | |
Marius Eggert | 096328aadc | |
Marius Eggert | 36edd3e324 | |
Marius Eggert | c65e813e94 | |
Marius Eggert | 1c93f51f69 | |
Marius Eggert | 7a43e1bc67 | |
Marius Eggert | dade2d519a | |
Marius Eggert | c4680f85bb | |
Marius Eggert | 6c9a7c3ee5 | |
Marius Eggert | 346f4ff9de | |
Marius Eggert | ad5282ca4a | |
Marius Eggert | 3c869e5215 | |
Marius Eggert | 8374a02ae2 | |
Marius Eggert | f2d1e16697 | |
Marius Eggert | 158927ce5c | |
Marius Eggert | e97105820a | |
Marius Eggert | 88102b26a6 | |
Marius Eggert | 7e689c9f55 | |
Marius Eggert | 97ada32f33 | |
Marius Eggert | 244c364f60 | |
Marius Eggert | c0c3576131 | |
Marius Eggert | c2a4578b81 | |
Marius Eggert | 781feffc90 | |
Marius Eggert | 7efd48c695 | |
Marius Eggert | d0765fdcce | |
Marius Eggert | be0bae58ac | |
Marius Eggert | 616803c6a8 | |
Marius Eggert | 3501763cf0 | |
Marius Eggert | efaf48beff | |
Marius Eggert | e052470cf4 | |
Marius Eggert | 2364f7d5d9 | |
Marius Eggert | c52818a5ce | |
Marius Eggert | fb8a92ecb5 | |
Marius Eggert | 39032249b2 | |
Marius Eggert | aa4bfa8d88 | |
Marius Eggert | c2d8ef9fe4 | |
Marius Eggert | 440d989490 | |
Marius Eggert | 85ed8420fd | |
Marius Eggert | 2a2a173ebd | |
Marius Eggert | cda2a9df33 | |
Marius Eggert | 6da37c0fa4 | |
Marius Eggert | 141f82d0a9 | |
Marius Eggert | b7bf927288 | |
Marius Eggert | 8fe7307a58 | |
Marius Eggert | 7e7d8c249e | |
Marius Eggert | ffce866ad0 | |
Marius Eggert | 236916bf67 |
91
CHANGELOG.md
91
CHANGELOG.md
|
@ -16,6 +16,97 @@ will consitute of a breaking change warranting a new major release:
|
|||
|
||||
# [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
|
||||
|
||||
- Reverted lower OP limit of `PLOC` to -10°C.
|
||||
- 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
|
||||
|
||||
## Changed
|
||||
|
||||
- Rotational rate limit for the GS target pointing is now seperated from controller limit. It
|
||||
is also reduced to 0.75°/s now.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed wrong sign in calculation of total current within the `PWR Controller`.
|
||||
|
||||
# [v7.7.3] 2024-03-18
|
||||
|
||||
- Bumped `eive-fsfw`
|
||||
|
||||
## Added
|
||||
|
||||
- Added parameter to disable STR input for MEKF.
|
||||
|
||||
## Changed
|
||||
|
||||
- If a primary heater is set to `EXTERNAL CONTROL` and `ON`, the `TCS Controller` will no
|
||||
try to control the temperature of that object.
|
||||
- Set lower OP limit of `PLOC` to -5°C.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Added prevention of sign jump for target quaternion of GS pointing, which would reduce the
|
||||
performance of the controller.
|
||||
- Heaters set to `EXTERNAL CONTROL` no longer can be switched off by the `TCS Controller`, if
|
||||
they violate the maximum burn duration of the controller.
|
||||
|
||||
# [v7.7.2] 2024-03-06
|
||||
|
||||
## Fixed
|
||||
|
||||
- Camera and E-band antenna now point towards the target instead of away from the target for the
|
||||
pointing target mode.
|
||||
|
||||
# [v7.7.1] 2024-03-06
|
||||
|
||||
- Bumped `eive-tmtc` to v6.1.1
|
||||
- Bumped `eive-fsfw`
|
||||
|
||||
## Added
|
||||
|
||||
- The `CoreController` now sets the leap seconds on initalization. They are stored in a persistent
|
||||
file. If the file does yet not exist, it will be created. The leap seconds can be updated using an
|
||||
action command. This will also update the file.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed wrong dimension of a matrix within the `MEKF`, which would lead to a seg fault, if the
|
||||
star tracker was available.
|
||||
- Fixed case in which control values within the `AcsController` could become NaN.
|
||||
|
||||
# [v7.7.0] 2024-02-29
|
||||
|
||||
- Bumped `eive-tmtc` to v6.1.0
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 7)
|
||||
set(OBSW_VERSION_MINOR 7)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
set(OBSW_VERSION_MINOR 8)
|
||||
set(OBSW_VERSION_REVISION 1)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @brief Auto-generated event translation file. Contains 320 translations.
|
||||
* @brief Auto-generated event translation file. Contains 324 translations.
|
||||
* @details
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -82,8 +82,11 @@ const char *BIT_LOCK_STRING = "BIT_LOCK";
|
|||
const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
||||
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
||||
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
||||
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
|
||||
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
|
||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||
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 *TEST_STRING = "TEST";
|
||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||
|
@ -241,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 *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||
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 *BATT_MODE_STRING = "BATT_MODE";
|
||||
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
|
||||
|
@ -483,9 +487,15 @@ const char *translateEvents(Event event) {
|
|||
case (8900):
|
||||
return CLOCK_SET_STRING;
|
||||
case (8901):
|
||||
return CLOCK_DUMP_STRING;
|
||||
return CLOCK_DUMP_LEGACY_STRING;
|
||||
case (8902):
|
||||
return CLOCK_SET_FAILURE_STRING;
|
||||
case (8903):
|
||||
return CLOCK_DUMP_STRING;
|
||||
case (8904):
|
||||
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
|
||||
case (8905):
|
||||
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
|
||||
case (9100):
|
||||
return TC_DELETION_FAILED_STRING;
|
||||
case (9700):
|
||||
|
@ -800,6 +810,8 @@ const char *translateEvents(Event event) {
|
|||
return GPS_FIX_CHANGE_STRING;
|
||||
case (13101):
|
||||
return CANT_GET_FIX_STRING;
|
||||
case (13102):
|
||||
return RESET_FAIL_STRING;
|
||||
case (13200):
|
||||
return P60_BOOT_COUNT_STRING;
|
||||
case (13201):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 175 translations.
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
|
|
@ -480,6 +480,16 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||
successRecipient = commandedBy;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (UPDATE_LEAP_SECONDS): {
|
||||
if (size != sizeof(uint16_t)) {
|
||||
return HasActionsIF::INVALID_PARAMETERS;
|
||||
}
|
||||
ReturnValue_t result = actionUpdateLeapSeconds(data);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return HasActionsIF::EXECUTION_FINISHED;
|
||||
}
|
||||
default: {
|
||||
return HasActionsIF::INVALID_ACTION_ID;
|
||||
}
|
||||
|
@ -1411,6 +1421,9 @@ void CoreController::performMountedSdCardOperations() {
|
|||
if (not timeFileInitDone) {
|
||||
initClockFromTimeFile();
|
||||
}
|
||||
if (not leapSecondsInitDone) {
|
||||
initLeapSeconds();
|
||||
}
|
||||
performRebootWatchdogHandling(false);
|
||||
performRebootCountersHandling(false);
|
||||
}
|
||||
|
@ -2066,14 +2079,78 @@ ReturnValue_t CoreController::backupTimeFileHandler() {
|
|||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void CoreController::initLeapSeconds() {
|
||||
ReturnValue_t result = initLeapSecondsFromFile();
|
||||
if (result != returnvalue::OK) {
|
||||
Clock::setLeapSeconds(config::LEAP_SECONDS);
|
||||
writeLeapSecondsToFile(config::LEAP_SECONDS);
|
||||
}
|
||||
leapSecondsInitDone = true;
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::initLeapSecondsFromFile() {
|
||||
std::string fileName = currMntPrefix + LEAP_SECONDS_FILE;
|
||||
std::error_code e;
|
||||
if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e)) {
|
||||
std::ifstream leapSecondsFile(fileName);
|
||||
std::string nextWord;
|
||||
std::getline(leapSecondsFile, nextWord);
|
||||
std::istringstream iss(nextWord);
|
||||
iss >> nextWord;
|
||||
if (iss.bad() or nextWord != "LEAP") {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
iss >> nextWord;
|
||||
if (iss.bad() or nextWord != "SECONDS:") {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
iss >> nextWord;
|
||||
uint16_t leapSeconds = 0;
|
||||
leapSeconds = std::stoi(nextWord.c_str());
|
||||
if (iss.bad()) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
Clock::setLeapSeconds(leapSeconds);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
sif::error
|
||||
<< "CoreController::leapSecondsFileHandler: Initalization of leap seconds from file failed"
|
||||
<< std::endl;
|
||||
return returnvalue::FAILED;
|
||||
};
|
||||
|
||||
ReturnValue_t CoreController::writeLeapSecondsToFile(const uint16_t leapSeconds) {
|
||||
std::string fileName = currMntPrefix + LEAP_SECONDS_FILE;
|
||||
if (not sdcMan->isSdCardUsable(std::nullopt)) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
std::ofstream leapSecondsFile(fileName.c_str(), std::ofstream::out | std::ofstream::trunc);
|
||||
if (not leapSecondsFile.good()) {
|
||||
sif::error << "CoreController::leapSecondsFileHandler: Error opening leap seconds file: "
|
||||
<< strerror(errno) << std::endl;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
leapSecondsFile << "LEAP SECONDS: " << leapSeconds << std::endl;
|
||||
return returnvalue::OK;
|
||||
};
|
||||
|
||||
ReturnValue_t CoreController::actionUpdateLeapSeconds(const uint8_t *data) {
|
||||
uint16_t leapSeconds = data[1] | (data[0] << 8);
|
||||
ReturnValue_t result = writeLeapSecondsToFile(leapSeconds);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
Clock::setLeapSeconds(leapSeconds);
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t CoreController::initClockFromTimeFile() {
|
||||
using namespace GpsHyperion;
|
||||
using namespace std;
|
||||
std::string fileName = currMntPrefix + BACKUP_TIME_FILE;
|
||||
std::error_code e;
|
||||
if (sdcMan->isSdCardUsable(std::nullopt) and std::filesystem::exists(fileName, e) and
|
||||
((gpsFix == FixMode::UNKNOWN or gpsFix == FixMode::NOT_SEEN) or
|
||||
not utility::timeSanityCheck())) {
|
||||
((gpsFix == FixMode::NOT_SEEN) or not utility::timeSanityCheck())) {
|
||||
ifstream timeFile(fileName);
|
||||
string nextWord;
|
||||
getline(timeFile, nextWord);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||
#include <libxiphos.h>
|
||||
#include <mission/acs/archive/GPSDefinitions.h>
|
||||
#include <linux/acs/GPSDefinitions.h>
|
||||
#include <mission/utility/trace.h>
|
||||
|
||||
#include <atomic>
|
||||
|
@ -150,6 +150,8 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||
std::string(core::LEGACY_REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string REBOOT_WATCHDOG_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::REBOOT_WATCHDOG_FILE_NAME);
|
||||
const std::string LEAP_SECONDS_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::LEAP_SECONDS_FILE_NAME);
|
||||
const std::string BACKUP_TIME_FILE =
|
||||
"/" + std::string(core::CONF_FOLDER) + "/" + std::string(core::TIME_FILE_NAME);
|
||||
const std::string REBOOT_COUNTERS_FILE =
|
||||
|
@ -209,7 +211,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||
static constexpr MutexIF::TimeoutType TIMEOUT_TYPE = MutexIF::TimeoutType::WAITING;
|
||||
static constexpr uint32_t MUTEX_TIMEOUT = 20;
|
||||
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
|
||||
enum class SdStates {
|
||||
|
@ -296,6 +298,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||
|
||||
std::string currMntPrefix;
|
||||
bool timeFileInitDone = false;
|
||||
bool leapSecondsInitDone = false;
|
||||
bool performOneShotSdCardOpsSwitch = false;
|
||||
uint8_t shortSdCardCdCounter = 0;
|
||||
#if OBSW_THREAD_TRACING == 1
|
||||
|
@ -335,7 +338,11 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||
void performMountedSdCardOperations();
|
||||
ReturnValue_t initVersionFile();
|
||||
|
||||
void initLeapSeconds();
|
||||
ReturnValue_t initLeapSecondsFromFile();
|
||||
ReturnValue_t initClockFromTimeFile();
|
||||
ReturnValue_t actionUpdateLeapSeconds(const uint8_t* data);
|
||||
ReturnValue_t writeLeapSecondsToFile(const uint16_t leapSeconds);
|
||||
ReturnValue_t performSdCardCheck();
|
||||
ReturnValue_t backupTimeFileHandler();
|
||||
ReturnValue_t initBootCopyFile();
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/com/SyrlinksFdir.h"
|
||||
#include "mission/system/com/comModeTree.h"
|
||||
#include "mission/system/payloadModeTree.h"
|
||||
#include "mission/system/payload/payloadModeTree.h"
|
||||
#include "mission/system/power/GomspacePowerFdir.h"
|
||||
#include "mission/system/tcs/RtdFdir.h"
|
||||
#include "mission/system/tcs/TcsBoardAssembly.h"
|
||||
|
@ -510,7 +510,7 @@ void ObjectFactory::createAcsBoardComponents(SpiComIF& spiComIF, LinuxLibgpioIF*
|
|||
debugGps = true;
|
||||
#endif
|
||||
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,
|
||||
enableHkSets, debugGps);
|
||||
gpsCtrl->setResetPinTriggerFunction(gps::triggerGpioResetPin, &RESET_ARGS_GNSS);
|
||||
|
|
|
@ -20,6 +20,9 @@ static constexpr char OBSW_VERSION_FILE_PATH[] = "/usr/share/eive-obsw/obsw_vers
|
|||
// ISO8601 timestamp.
|
||||
static constexpr char FILE_DATE_FORMAT[] = "%FT%H%M%SZ";
|
||||
|
||||
// Leap Seconds as of 2024-03-04
|
||||
static constexpr uint16_t LEAP_SECONDS = 37;
|
||||
|
||||
static constexpr uint16_t EIVE_PUS_APID = 0x65;
|
||||
static constexpr uint16_t EIVE_CFDP_APID = 0x66;
|
||||
static constexpr uint16_t EIVE_LOCAL_CFDP_ENTITY_ID = EIVE_CFDP_APID;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define DUMMIES_GPSCTRLDUMMY_H_
|
||||
|
||||
#include <fsfw/controller/ExtendedControllerBase.h>
|
||||
#include <mission/acs/archive/GPSDefinitions.h>
|
||||
#include <linux/acs/GPSDefinitions.h>
|
||||
|
||||
class GpsCtrlDummy : public ExtendedControllerBase {
|
||||
public:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#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)
|
||||
: DeviceHandlerBase(objectId, comif, comCookie) {}
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#include "mission/genericFactory.h"
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/com/comModeTree.h"
|
||||
#include "mission/system/payloadModeTree.h"
|
||||
#include "mission/system/payload/payloadModeTree.h"
|
||||
#include "mission/system/tcs/tcsModeTree.h"
|
||||
#include "mission/tcs/defs.h"
|
||||
|
||||
|
|
2
fsfw
2
fsfw
|
@ -1 +1 @@
|
|||
Subproject commit 516357d855c07786b492e981230988186376d301
|
||||
Subproject commit 8b21dd276de72b46b41bc7080d6646180bfa0662
|
|
@ -75,9 +75,12 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8901;0x22c5;CLOCK_DUMP;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8902;0x22c6;CLOCK_SET_FAILURE;LOW;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;Clock has been set. P1: old timeval seconds. P2: new timeval seconds.;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
|
||||
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
|
||||
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
|
||||
|
@ -233,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
|
||||
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
|
||||
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
|
||||
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
|
||||
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;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
|
||||
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
|
||||
|
|
|
|
@ -75,9 +75,12 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||
7902;0x1ede;BIT_LOCK;INFO;A Bit Lock signal. Was detected. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7903;0x1edf;BIT_LOCK_LOST;INFO;A previously found Bit Lock signal was lost. P1: raw BLO state, P2: 0;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
7905;0x1ee1;FRAME_PROCESSING_FAILED;LOW;The CCSDS Board could not interpret a TC;fsfw/src/fsfw/datalinklayer/DataLinkLayer.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8901;0x22c5;CLOCK_DUMP;INFO;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8902;0x22c6;CLOCK_SET_FAILURE;LOW;No description;fsfw/src/fsfw/pus/Service9TimeManagement.h
|
||||
8900;0x22c4;CLOCK_SET;INFO;Clock has been set. P1: old timeval seconds. P2: new timeval seconds.;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
|
||||
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
|
||||
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
|
||||
|
@ -233,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
|
||||
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
|
||||
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
|
||||
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
|
||||
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;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
|
||||
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
|
||||
|
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @brief Auto-generated event translation file. Contains 320 translations.
|
||||
* @brief Auto-generated event translation file. Contains 324 translations.
|
||||
* @details
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -82,8 +82,11 @@ const char *BIT_LOCK_STRING = "BIT_LOCK";
|
|||
const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
||||
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
||||
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
||||
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
|
||||
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
|
||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||
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 *TEST_STRING = "TEST";
|
||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||
|
@ -241,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 *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||
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 *BATT_MODE_STRING = "BATT_MODE";
|
||||
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
|
||||
|
@ -483,9 +487,15 @@ const char *translateEvents(Event event) {
|
|||
case (8900):
|
||||
return CLOCK_SET_STRING;
|
||||
case (8901):
|
||||
return CLOCK_DUMP_STRING;
|
||||
return CLOCK_DUMP_LEGACY_STRING;
|
||||
case (8902):
|
||||
return CLOCK_SET_FAILURE_STRING;
|
||||
case (8903):
|
||||
return CLOCK_DUMP_STRING;
|
||||
case (8904):
|
||||
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
|
||||
case (8905):
|
||||
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
|
||||
case (9100):
|
||||
return TC_DELETION_FAILED_STRING;
|
||||
case (9700):
|
||||
|
@ -800,6 +810,8 @@ const char *translateEvents(Event event) {
|
|||
return GPS_FIX_CHANGE_STRING;
|
||||
case (13101):
|
||||
return CANT_GET_FIX_STRING;
|
||||
case (13102):
|
||||
return RESET_FAIL_STRING;
|
||||
case (13200):
|
||||
return P60_BOOT_COUNT_STRING;
|
||||
case (13201):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 179 translations.
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "devConf.h"
|
||||
#include "devices/gpioIds.h"
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/payloadModeTree.h"
|
||||
#include "mission/system/payload/payloadModeTree.h"
|
||||
#include "mission/system/power/epsModeTree.h"
|
||||
|
||||
void ObjectFactory::createSunSensorComponents(GpioIF* gpioComIF, SpiComIF* spiComIF,
|
||||
|
|
|
@ -7,15 +7,19 @@
|
|||
|
||||
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;
|
||||
//! [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
|
||||
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
|
||||
//! to get a fix after the GPS was switched on.
|
||||
static constexpr Event CANT_GET_FIX = event::makeEvent(SUBSYSTEM_ID, 1, severity::LOW);
|
||||
//! [EXPORT] : [COMMENT] 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.
|
||||
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 TRIGGER_RESET_PIN_GNSS = 5;
|
||||
|
@ -53,8 +57,6 @@ static constexpr uint8_t SKYVIEW_ENTRIES = 6;
|
|||
|
||||
static constexpr uint8_t MAX_SATELLITES = 30;
|
||||
|
||||
enum GpsFixModes : uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 };
|
||||
|
||||
} // namespace GpsHyperion
|
||||
|
||||
class GpsPrimaryDataset : public StaticLocalDataSet<GpsHyperion::CORE_DATASET_ENTRIES> {
|
|
@ -44,24 +44,21 @@ LocalPoolDataSetBase *GpsHyperionLinuxController::getDataSetHandle(sid_t sid) {
|
|||
|
||||
ReturnValue_t GpsHyperionLinuxController::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
uint32_t *msToReachTheMode) {
|
||||
if (not modeCommanded) {
|
||||
if (mode == MODE_ON or mode == MODE_OFF) {
|
||||
// 5h time to reach fix
|
||||
*msToReachTheMode = MAX_SECONDS_TO_REACH_FIX;
|
||||
maxTimeToReachFix.resetTimer();
|
||||
modeCommanded = true;
|
||||
} else if (mode == MODE_NORMAL) {
|
||||
return HasModesIF::INVALID_MODE;
|
||||
}
|
||||
if (mode == MODE_ON) {
|
||||
maxTimeToReachFix.resetTimer();
|
||||
gainedNewFix.timeOut();
|
||||
} else if (mode == MODE_NORMAL) {
|
||||
return HasModesIF::INVALID_MODE;
|
||||
}
|
||||
if (mode == MODE_OFF) {
|
||||
maxTimeToReachFix.timeOut();
|
||||
gainedNewFix.timeOut();
|
||||
PoolReadGuard pg(&gpsSet);
|
||||
gpsSet.setValidity(false, true);
|
||||
// There can't be a fix with a device that is off.
|
||||
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, 0);
|
||||
gpsSet.fixMode.value = 0;
|
||||
// The ctrl is off, so it cannot detect the data from the devices.
|
||||
handleFixChangedEvent(GpsHyperion::FixMode::NOT_SEEN);
|
||||
gpsSet.fixMode.value = GpsHyperion::FixMode::NOT_SEEN;
|
||||
oneShotSwitches.reset();
|
||||
modeCommanded = false;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
@ -75,13 +72,16 @@ ReturnValue_t GpsHyperionLinuxController::executeAction(ActionId_t actionId,
|
|||
PoolReadGuard pg(&gpsSet);
|
||||
// Set HK entries invalid
|
||||
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 DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||
}
|
||||
}
|
||||
return returnvalue::OK;
|
||||
return HasActionsIF::INVALID_ACTION_ID;
|
||||
}
|
||||
|
||||
ReturnValue_t GpsHyperionLinuxController::initializeLocalDataPool(
|
||||
|
@ -216,15 +216,9 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
|||
bool modeIsSet = true;
|
||||
if (MODE_SET != (MODE_SET & gps.set)) {
|
||||
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;
|
||||
} else {
|
||||
// GPS device is off anyway, so do other handling
|
||||
// GPS ctrl is off anyway, so do other handling
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
@ -249,27 +243,44 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
|
|||
uint8_t newFix = 0;
|
||||
if (modeIsSet) {
|
||||
// 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;
|
||||
maxTimeToReachFix.resetTimer();
|
||||
}
|
||||
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 OBSW_Q7S_EM != 1
|
||||
triggerEvent(GpsHyperion::GPS_FIX_CHANGE, gpsSet.fixMode.value, newFix);
|
||||
#endif
|
||||
handleFixChangedEvent(newFix);
|
||||
}
|
||||
gpsSet.fixMode = newFix;
|
||||
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
|
||||
// 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;
|
||||
} else {
|
||||
satNotSetCounter++;
|
||||
if (gpsSet.satInUse.isValid() and satNotSetCounter >= 10) {
|
||||
if (satNotSetCounter < 10) {
|
||||
satNotSetCounter++;
|
||||
} else {
|
||||
gpsSet.satInUse.value = 0;
|
||||
gpsSet.satInUse.setValid(false);
|
||||
gpsSet.satInView.value = 0;
|
||||
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
|
||||
bool latValid = false;
|
||||
bool longValid = false;
|
||||
if (LATLON_SET == (LATLON_SET & gps.set)) {
|
||||
if (std::isfinite(gps.fix.latitude)) {
|
||||
// Negative latitude -> South direction
|
||||
gpsSet.latitude.value = gps.fix.latitude;
|
||||
// As specified in gps.h: Only valid if mode >= 2
|
||||
if (gps.fix.mode >= 2) {
|
||||
latValid = true;
|
||||
if (modeIsSet) {
|
||||
if (LATLON_SET == (LATLON_SET & gps.set)) {
|
||||
if (std::isfinite(gps.fix.latitude)) {
|
||||
// Negative latitude -> South direction
|
||||
gpsSet.latitude.value = gps.fix.latitude;
|
||||
// As specified in gps.h: Only valid if mode >= 2
|
||||
if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) {
|
||||
latValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (std::isfinite(gps.fix.longitude)) {
|
||||
// Negative longitude -> West direction
|
||||
gpsSet.longitude.value = gps.fix.longitude;
|
||||
// As specified in gps.h: Only valid if mode >= 2
|
||||
if (gps.fix.mode >= 2) {
|
||||
longValid = true;
|
||||
if (std::isfinite(gps.fix.longitude)) {
|
||||
// Negative longitude -> West direction
|
||||
gpsSet.longitude.value = gps.fix.longitude;
|
||||
// As specified in gps.h: Only valid if mode >= 2
|
||||
if (gps.fix.mode >= GpsHyperion::FixMode::FIX_2D) {
|
||||
longValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -316,20 +332,24 @@ ReturnValue_t GpsHyperionLinuxController::handleCoreTelemetry(bool modeIsSet) {
|
|||
|
||||
// ALTITUDE is set for every message, no need for a counter
|
||||
bool altitudeValid = false;
|
||||
if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) {
|
||||
gpsSet.altitude.value = gps.fix.altitude;
|
||||
// As specified in gps.h: Only valid if mode == 3
|
||||
if (gps.fix.mode == 3) {
|
||||
altitudeValid = true;
|
||||
if (modeIsSet) {
|
||||
if (ALTITUDE_SET == (ALTITUDE_SET & gps.set) && std::isfinite(gps.fix.altitude)) {
|
||||
gpsSet.altitude.value = gps.fix.altitude;
|
||||
// As specified in gps.h: Only valid if mode == 3
|
||||
if (gps.fix.mode == GpsHyperion::FixMode::FIX_3D) {
|
||||
altitudeValid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
gpsSet.altitude.setValid(altitudeValid);
|
||||
|
||||
// SPEED is set for every message, no need for a counter
|
||||
bool speedValid = false;
|
||||
if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) {
|
||||
gpsSet.speed.value = gps.fix.speed;
|
||||
speedValid = true;
|
||||
if (modeIsSet) {
|
||||
if (SPEED_SET == (SPEED_SET & gps.set) && std::isfinite(gps.fix.speed)) {
|
||||
gpsSet.speed.value = gps.fix.speed;
|
||||
speedValid = true;
|
||||
}
|
||||
}
|
||||
gpsSet.speed.setValid(speedValid);
|
||||
|
||||
|
@ -430,3 +450,14 @@ void GpsHyperionLinuxController::overwriteTimeIfNotSane(timeval time, bool valid
|
|||
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();
|
||||
}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
#ifndef 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 "eive/eventSubsystemIds.h"
|
||||
#include "fsfw/FSFW.h"
|
||||
#include "fsfw/controller/ExtendedControllerBase.h"
|
||||
#include "fsfw/devicehandlers/DeviceHandlerBase.h"
|
||||
|
||||
#ifdef FSFW_OSAL_LINUX
|
||||
#include <gps.h>
|
||||
#include <libgpsmm.h>
|
||||
|
@ -24,8 +23,8 @@
|
|||
*/
|
||||
class GpsHyperionLinuxController : public ExtendedControllerBase {
|
||||
public:
|
||||
// 30 minutes
|
||||
static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 30;
|
||||
// 15 minutes
|
||||
static constexpr uint32_t MAX_SECONDS_TO_REACH_FIX = 60 * 15;
|
||||
|
||||
enum ReadModes { SHM = 0, SOCKET = 1 };
|
||||
|
||||
|
@ -65,7 +64,8 @@ class GpsHyperionLinuxController : public ExtendedControllerBase {
|
|||
const char* currentClientBuf = nullptr;
|
||||
ReadModes readMode = ReadModes::SOCKET;
|
||||
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;
|
||||
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
|
||||
// if the time difference between sys time and current time is not too large
|
||||
void overwriteTimeIfNotSane(timeval time, bool validFix);
|
||||
|
||||
void handleFixChangedEvent(uint8_t newFix);
|
||||
};
|
||||
|
||||
#endif /* MISSION_DEVICES_GPSHYPERIONHANDLER_H_ */
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @brief Auto-generated event translation file. Contains 320 translations.
|
||||
* @brief Auto-generated event translation file. Contains 324 translations.
|
||||
* @details
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
|
@ -82,8 +82,11 @@ const char *BIT_LOCK_STRING = "BIT_LOCK";
|
|||
const char *BIT_LOCK_LOST_STRING = "BIT_LOCK_LOST";
|
||||
const char *FRAME_PROCESSING_FAILED_STRING = "FRAME_PROCESSING_FAILED";
|
||||
const char *CLOCK_SET_STRING = "CLOCK_SET";
|
||||
const char *CLOCK_DUMP_STRING = "CLOCK_DUMP";
|
||||
const char *CLOCK_DUMP_LEGACY_STRING = "CLOCK_DUMP_LEGACY";
|
||||
const char *CLOCK_SET_FAILURE_STRING = "CLOCK_SET_FAILURE";
|
||||
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 *TEST_STRING = "TEST";
|
||||
const char *CHANGE_OF_SETUP_PARAMETER_STRING = "CHANGE_OF_SETUP_PARAMETER";
|
||||
|
@ -241,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 *GPS_FIX_CHANGE_STRING = "GPS_FIX_CHANGE";
|
||||
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 *BATT_MODE_STRING = "BATT_MODE";
|
||||
const char *BATT_MODE_CHANGED_STRING = "BATT_MODE_CHANGED";
|
||||
|
@ -483,9 +487,15 @@ const char *translateEvents(Event event) {
|
|||
case (8900):
|
||||
return CLOCK_SET_STRING;
|
||||
case (8901):
|
||||
return CLOCK_DUMP_STRING;
|
||||
return CLOCK_DUMP_LEGACY_STRING;
|
||||
case (8902):
|
||||
return CLOCK_SET_FAILURE_STRING;
|
||||
case (8903):
|
||||
return CLOCK_DUMP_STRING;
|
||||
case (8904):
|
||||
return CLOCK_DUMP_BEFORE_SETTING_TIME_STRING;
|
||||
case (8905):
|
||||
return CLOCK_DUMP_AFTER_SETTING_TIME_STRING;
|
||||
case (9100):
|
||||
return TC_DELETION_FAILED_STRING;
|
||||
case (9700):
|
||||
|
@ -800,6 +810,8 @@ const char *translateEvents(Event event) {
|
|||
return GPS_FIX_CHANGE_STRING;
|
||||
case (13101):
|
||||
return CANT_GET_FIX_STRING;
|
||||
case (13102):
|
||||
return RESET_FAIL_STRING;
|
||||
case (13200):
|
||||
return P60_BOOT_COUNT_STRING;
|
||||
case (13201):
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 179 translations.
|
||||
* Generated on: 2024-02-29 13:15:00
|
||||
* Generated on: 2024-04-10 11:49:35
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
|
|
@ -180,7 +180,8 @@ void AcsController::performAttitudeControl() {
|
|||
mode, &susDataProcessed, &mgmDataProcessed, &gyrDataProcessed, &sensorValues,
|
||||
&attitudeEstimationData, timeDelta, &fusedRotRateSourcesData, &fusedRotRateData);
|
||||
result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed,
|
||||
&susDataProcessed, timeDelta, &attitudeEstimationData);
|
||||
&susDataProcessed, timeDelta, &attitudeEstimationData,
|
||||
acsParameters.kalmanFilterParameters.allowStr);
|
||||
|
||||
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING and
|
||||
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
|
||||
|
|
|
@ -182,7 +182,7 @@ void PowerController::calculateStateOfCharge() {
|
|||
}
|
||||
|
||||
// calculate total battery current
|
||||
iBat = p60CoreHk.batteryCurrent.value + bpxBatteryHk.dischargeCurrent.value;
|
||||
iBat = p60CoreHk.batteryCurrent.value - bpxBatteryHk.dischargeCurrent.value;
|
||||
|
||||
result = calculateOpenCircuitVoltageCharge();
|
||||
if (result != returnvalue::OK) {
|
||||
|
|
|
@ -57,9 +57,9 @@ class PowerController : public ExtendedControllerBase, public ReceivesParameterM
|
|||
float batteryMaximumCapacity = 2.6 * 2; // [Ah]
|
||||
float coulombCounterVoltageUpperThreshold = 16.2; // [V]
|
||||
double maxAllowedTimeDiff = 1.5; // [s]
|
||||
float payloadOpLimitOn = 0.90; // [%]
|
||||
float payloadOpLimitLow = 0.75; // [%]
|
||||
float higherModesLimit = 0.6; // [%]
|
||||
float payloadOpLimitOn = 0.80; // [%]
|
||||
float payloadOpLimitLow = 0.65; // [%]
|
||||
float higherModesLimit = 0.60; // [%]
|
||||
|
||||
// OCV Look-up-Table {[Ah],[V]}
|
||||
static constexpr uint8_t LOOK_UP_TABLE_MAX_IDX = 99;
|
||||
|
|
|
@ -1641,7 +1641,11 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||
bool heaterAvailable = true;
|
||||
|
||||
HasHealthIF::HealthState mainHealth = heaterHandler.getHealth(switchNr);
|
||||
heater::SwitchState mainState = heaterHandler.getSwitchState(switchNr);
|
||||
HasHealthIF::HealthState redHealth = heaterHandler.getHealth(redSwitchNr);
|
||||
if (mainHealth == HasHealthIF::EXTERNAL_CONTROL and mainState == heater::SwitchState::ON) {
|
||||
return false;
|
||||
}
|
||||
if (mainHealth != HasHealthIF::HEALTHY) {
|
||||
if (redHealth == HasHealthIF::HEALTHY) {
|
||||
switchNr = redSwitchNr;
|
||||
|
@ -1656,6 +1660,7 @@ bool ThermalController::chooseHeater(heater::Switch& switchNr, heater::Switch re
|
|||
} else {
|
||||
ctrlCtx.redSwitchNrInUse = false;
|
||||
}
|
||||
|
||||
return heaterAvailable;
|
||||
}
|
||||
|
||||
|
@ -1792,7 +1797,8 @@ void ThermalController::heaterMaxDurationControl(
|
|||
for (unsigned i = 0; i < heater::Switch::NUMBER_OF_SWITCHES; i++) {
|
||||
// Right now, we only track the maximum duration for heater which were commanded by the TCS
|
||||
// controller.
|
||||
if (currentHeaterStates[i] == heater::SwitchState::ON and
|
||||
if (heaterHandler.getHealth(static_cast<heater::Switch>(i)) != HasHealthIF::EXTERNAL_CONTROL and
|
||||
currentHeaterStates[i] == heater::SwitchState::ON and
|
||||
heaterStates[i].trackHeaterMaxBurnTime and
|
||||
heaterStates[i].heaterOnMaxBurnTime.hasTimedOut()) {
|
||||
heaterStates[i].switchTransition = false;
|
||||
|
|
|
@ -554,6 +554,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
|
|||
case 0xE:
|
||||
parameterWrapper->set(gsTargetModeControllerParameters.altitudeTgt);
|
||||
break;
|
||||
case 0xF:
|
||||
parameterWrapper->set(gsTargetModeControllerParameters.rotRateLimit);
|
||||
break;
|
||||
default:
|
||||
return INVALID_IDENTIFIER_ID;
|
||||
}
|
||||
|
@ -734,6 +737,9 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId,
|
|||
case 0x5:
|
||||
parameterWrapper->set(kalmanFilterParameters.sensorNoiseGyrBs);
|
||||
break;
|
||||
case 0x6:
|
||||
parameterWrapper->set(kalmanFilterParameters.allowStr);
|
||||
break;
|
||||
default:
|
||||
return INVALID_IDENTIFIER_ID;
|
||||
}
|
||||
|
|
|
@ -866,7 +866,7 @@ class AcsParameters : public HasParametersIF {
|
|||
double desatMomentumRef[3] = {0, 0, 0};
|
||||
double deSatGainFactor = 1000;
|
||||
uint8_t desatOn = true;
|
||||
uint8_t useMekf = false;
|
||||
uint8_t useMekf = true;
|
||||
} pointingLawParameters;
|
||||
|
||||
struct IdleModeControllerParameters : PointingLawParameters {
|
||||
|
@ -898,6 +898,7 @@ class AcsParameters : public HasParametersIF {
|
|||
double latitudeTgt = 48.7495 * DEG2RAD; // [rad] Latitude
|
||||
double longitudeTgt = 9.10384 * DEG2RAD; // [rad] Longitude
|
||||
double altitudeTgt = 500; // [m]
|
||||
double rotRateLimit = .75 * DEG2RAD;
|
||||
} gsTargetModeControllerParameters;
|
||||
|
||||
struct NadirModeControllerParameters : PointingLawParameters {
|
||||
|
@ -947,6 +948,8 @@ class AcsParameters : public HasParametersIF {
|
|||
|
||||
double sensorNoiseGyrArw = 3. * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk
|
||||
double sensorNoiseGyrBs = 3. / 3600. * DEG2RAD; // Bias Stability
|
||||
|
||||
uint8_t allowStr = false;
|
||||
} kalmanFilterParameters;
|
||||
|
||||
struct MagnetorquerParameter {
|
||||
|
|
|
@ -59,6 +59,7 @@ void Guidance::targetQuatPtgTarget(timeval timeAbsolute, const double timeDelta,
|
|||
// this aligns with the camera, E- and S-band antennas
|
||||
double xAxisIX[3] = {0, 0, 0};
|
||||
VectorOperations<double>::normalize(targetDirI, xAxisIX, 3);
|
||||
VectorOperations<double>::mulScalar(xAxisIX, -1, xAxisIX, 3);
|
||||
|
||||
// transform velocity into inertial frame
|
||||
double velSatI[3] = {0, 0, 0};
|
||||
|
@ -243,12 +244,14 @@ void Guidance::limitReferenceRotation(const double xAxisIX[3], double quatIX[4])
|
|||
return;
|
||||
}
|
||||
|
||||
QuaternionOperations::preventSignJump(quatIX, quatIXprev);
|
||||
|
||||
// check required rotation and return if below limit
|
||||
double quatXprevX[4] = {0, 0, 0, 0}, quatXprevI[4] = {0, 0, 0, 0};
|
||||
QuaternionOperations::inverse(quatIXprev, quatXprevI);
|
||||
QuaternionOperations::multiply(quatIX, quatXprevI, quatXprevX);
|
||||
QuaternionOperations::normalize(quatXprevX);
|
||||
double phiMax = acsParameters->gsTargetModeControllerParameters.omMax *
|
||||
double phiMax = acsParameters->gsTargetModeControllerParameters.rotRateLimit *
|
||||
acsParameters->onBoardParams.sampleTime;
|
||||
if (2 * std::acos(quatXprevX[3]) < phiMax) {
|
||||
return;
|
||||
|
@ -273,7 +276,11 @@ void Guidance::limitReferenceRotation(const double xAxisIX[3], double quatIX[4])
|
|||
QuaternionOperations::multiply(quatIXtilde, quatXI, quatXXtilde);
|
||||
|
||||
double phiResidual = 0, phiResidualVec[3] = {0, 0, 0};
|
||||
phiResidual = std::sqrt((phiMax * phiMax) - (phiX * phiX));
|
||||
if ((phiX * phiX) > (phiMax * phiMax)) {
|
||||
phiResidual = 0;
|
||||
} else {
|
||||
phiResidual = std::sqrt((phiMax * phiMax) - (phiX * phiX));
|
||||
}
|
||||
std::memcpy(phiResidualVec, quatXXtilde, sizeof(phiResidualVec));
|
||||
VectorOperations<double>::normalize(phiResidualVec, phiResidualVec, 3);
|
||||
|
||||
|
|
|
@ -69,7 +69,8 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
|||
magFieldModel[1] *= -1;
|
||||
magFieldModel[2] *= (-1 / sin(theta));
|
||||
|
||||
double JD2000 = TimeSystems::convertUnixToJD2000(timeOfMagMeasurement);
|
||||
double JD2000 = 0;
|
||||
Clock::convertTimevalToJD2000(timeOfMagMeasurement, &JD2000);
|
||||
double UT1 = JD2000 / 36525.;
|
||||
|
||||
double gst =
|
||||
|
@ -93,7 +94,8 @@ void Igrf13Model::magFieldComp(const double longitude, const double gcLatitude,
|
|||
|
||||
void Igrf13Model::updateCoeffGH(timeval timeOfMagMeasurement) {
|
||||
double JD2000Igrf = (2458850.0 - 2451545); // Begin of IGRF-13 (2020-01-01,00:00:00) in JD2000
|
||||
double JD2000 = TimeSystems::convertUnixToJD2000(timeOfMagMeasurement);
|
||||
double JD2000 = 0;
|
||||
Clock::convertTimevalToJD2000(timeOfMagMeasurement, &JD2000);
|
||||
double days = ceil(JD2000 - JD2000Igrf);
|
||||
for (int i = 0; i <= igrfOrder; i++) {
|
||||
for (int j = 0; j <= (igrfOrder - 1); j++) {
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
#ifndef IGRF13MODEL_H_
|
||||
#define IGRF13MODEL_H_
|
||||
|
||||
#include <fsfw/src/fsfw/globalfunctions/TimeSystems.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/constants.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/MatrixOperations.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/QuaternionOperations.h>
|
||||
#include <fsfw/src/fsfw/globalfunctions/math/VectorOperations.h>
|
||||
#include <fsfw/src/fsfw/timemanager/Clock.h>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ ReturnValue_t MultiplicativeKalmanFilter::kfGain(
|
|||
double *measSensMatrix, double *measCovMatrix, double *kalmanGain,
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData) {
|
||||
// Kalman Gain: K = P * H' / (H * P * H' + R)
|
||||
double kalmanGainDen[6][matrixDimensionFactor] = {{0}},
|
||||
double kalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}},
|
||||
invKalmanGainDen[matrixDimensionFactor][matrixDimensionFactor] = {{0}},
|
||||
residualCov[6][matrixDimensionFactor] = {{0}},
|
||||
measSensMatrixTransposed[6][matrixDimensionFactor] = {{0}};
|
||||
|
@ -626,11 +626,11 @@ void MultiplicativeKalmanFilter::updateDataSet(
|
|||
}
|
||||
}
|
||||
|
||||
void MultiplicativeKalmanFilter::setStrData(double qX, double qY, double qZ, double qW,
|
||||
bool valid) {
|
||||
void MultiplicativeKalmanFilter::setStrData(double qX, double qY, double qZ, double qW, bool valid,
|
||||
bool allowStr) {
|
||||
strData.strQuat.value[0] = qX;
|
||||
strData.strQuat.value[1] = qY;
|
||||
strData.strQuat.value[2] = qZ;
|
||||
strData.strQuat.value[3] = qW;
|
||||
strData.strQuat.valid = valid;
|
||||
strData.strQuat.valid = (valid and allowStr);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class MultiplicativeKalmanFilter {
|
|||
void updateStandardDeviations(const AcsParameters *acsParameters);
|
||||
|
||||
void setStrData(const double qX, const double qY, const double qZ, const double qW,
|
||||
const bool valid);
|
||||
const bool valid, const bool allowStr);
|
||||
|
||||
static constexpr uint8_t IF_MEKF_ID = CLASS_ID::ACS_MEKF;
|
||||
static constexpr ReturnValue_t MEKF_UNINITIALIZED = returnvalue::makeCode(IF_MEKF_ID, 2);
|
||||
|
|
|
@ -9,11 +9,12 @@ ReturnValue_t Navigation::useMekf(const ACS::SensorValues *sensorValues,
|
|||
const acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||
const acsctrl::SusDataProcessed *susDataProcessed,
|
||||
const double timeDelta,
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData) {
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData,
|
||||
const bool allowStr) {
|
||||
multiplicativeKalmanFilter.setStrData(
|
||||
sensorValues->strSet.caliQx.value, sensorValues->strSet.caliQy.value,
|
||||
sensorValues->strSet.caliQz.value, sensorValues->strSet.caliQw.value,
|
||||
sensorValues->strSet.caliQx.isValid());
|
||||
sensorValues->strSet.caliQx.isValid(), allowStr);
|
||||
|
||||
if (mekfStatus == MultiplicativeKalmanFilter::MEKF_UNINITIALIZED) {
|
||||
mekfStatus = multiplicativeKalmanFilter.init(susDataProcessed, mgmDataProcessed,
|
||||
|
|
|
@ -17,7 +17,8 @@ class Navigation {
|
|||
const acsctrl::GyrDataProcessed *gyrDataProcessed,
|
||||
const acsctrl::MgmDataProcessed *mgmDataProcessed,
|
||||
const acsctrl::SusDataProcessed *susDataProcessed, const double timeDelta,
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData);
|
||||
acsctrl::AttitudeEstimationData *attitudeEstimationData,
|
||||
const bool allowStr);
|
||||
void resetMekf(acsctrl::AttitudeEstimationData *mekfData);
|
||||
|
||||
ReturnValue_t useSpg4(timeval now, acsctrl::GpsDataProcessed *gpsDataProcessed);
|
||||
|
|
|
@ -180,7 +180,8 @@ void SensorProcessing::processSus(
|
|||
const AcsParameters::SunModelParameters *sunModelParameters,
|
||||
acsctrl::SusDataProcessed *susDataProcessed) {
|
||||
/* -------- Sun Model Direction (IJK frame) ------- */
|
||||
double JD2000 = TimeSystems::convertUnixToJD2000(timeAbsolute);
|
||||
double JD2000 = 0;
|
||||
Clock::convertTimevalToJD2000(timeAbsolute, &JD2000);
|
||||
|
||||
// Julean Centuries
|
||||
double sunIjkModel[3] = {0.0, 0.0, 0.0};
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
#include <common/config/eive/resultClassIds.h>
|
||||
#include <fsfw/coordinates/CoordinateTransformations.h>
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <fsfw/globalfunctions/TimeSystems.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 <fsfw/returnvalues/returnvalue.h>
|
||||
#include <fsfw/timemanager/Clock.h>
|
||||
#include <mission/acs/defs.h>
|
||||
#include <mission/controller/acs/AcsParameters.h>
|
||||
#include <mission/controller/acs/Igrf13Model.h>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h>
|
||||
#include <fsfw_hal/devicehandlers/MgmRM3100Handler.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/imtqHelpers.h>
|
||||
#include <mission/acs/rwHelpers.h>
|
||||
|
|
|
@ -55,6 +55,7 @@ static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
|||
static constexpr char LEGACY_REBOOT_WATCHDOG_FILE_NAME[] = "reboot.txt";
|
||||
static constexpr char REBOOT_WATCHDOG_FILE_NAME[] = "reboot_watchdog.txt";
|
||||
static constexpr char REBOOT_COUNTER_FILE_NAME[] = "reboot_counters.txt";
|
||||
static constexpr char LEAP_SECONDS_FILE_NAME[] = "leapseconds.txt";
|
||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||
|
||||
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
||||
|
@ -93,6 +94,8 @@ static constexpr ActionId_t MV_HELPER = 53;
|
|||
static constexpr ActionId_t RM_HELPER = 54;
|
||||
static constexpr ActionId_t MKDIR_HELPER = 55;
|
||||
|
||||
static constexpr ActionId_t UPDATE_LEAP_SECONDS = 60;
|
||||
|
||||
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
|
||||
|
||||
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
|
||||
|
|
|
@ -3,8 +3,9 @@ add_subdirectory(acs)
|
|||
add_subdirectory(tcs)
|
||||
add_subdirectory(com)
|
||||
add_subdirectory(power)
|
||||
add_subdirectory(payload)
|
||||
|
||||
target_sources(
|
||||
${LIB_EIVE_MISSION}
|
||||
PRIVATE systemTree.cpp DualLanePowerStateMachine.cpp EiveSystem.cpp
|
||||
treeUtil.cpp SharedPowerAssemblyBase.cpp payloadModeTree.cpp)
|
||||
treeUtil.cpp SharedPowerAssemblyBase.cpp)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
target_sources(${LIB_EIVE_MISSION} PRIVATE payloadModeTree.cpp)
|
|
@ -10,7 +10,7 @@
|
|||
#include "mission/com/defs.h"
|
||||
#include "mission/sysDefs.h"
|
||||
#include "mission/system/acs/acsModeTree.h"
|
||||
#include "mission/system/payloadModeTree.h"
|
||||
#include "mission/system/payload/payloadModeTree.h"
|
||||
#include "mission/system/power/epsModeTree.h"
|
||||
#include "mission/system/tcs/tcsModeTree.h"
|
||||
#include "treeUtil.h"
|
||||
|
|
2
tmtc
2
tmtc
|
@ -1 +1 @@
|
|||
Subproject commit 73a4260f337aa39475baef999466b200c9123e62
|
||||
Subproject commit a8d0143b1ed9a14f7e071ee3344dc4e8f1937c55
|
Loading…
Reference in New Issue