SLERP #163

Merged
muellerr merged 4 commits from slerp into develop 2023-12-05 09:25:50 +01:00
3 changed files with 15 additions and 2 deletions
Showing only changes of commit 3978524181 - Show all commits

View File

@ -166,9 +166,9 @@ ReturnValue_t Sgp4Propagator::propagate(double* position, double* velocity, time
timeval timeSinceEpoch = time - epoch; timeval timeSinceEpoch = time - epoch;
double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.; double minutesSinceEpoch = timeSinceEpoch.tv_sec / 60. + timeSinceEpoch.tv_usec / 60000000.;
double monthsSinceEpoch = minutesSinceEpoch / 60 / 24 / 30; double daysSinceEpoch = minutesSinceEpoch / 60 / 24;
if ((monthsSinceEpoch > 1) || (monthsSinceEpoch < -1)) { if ((daysSinceEpoch > 7) || (daysSinceEpoch < -7)) {
return TLE_TOO_OLD; return TLE_TOO_OLD;
} }

View File

@ -28,12 +28,17 @@ FreshDeviceHandlerBase::~FreshDeviceHandlerBase() {
} }
ReturnValue_t FreshDeviceHandlerBase::performOperation(uint8_t opCode) { ReturnValue_t FreshDeviceHandlerBase::performOperation(uint8_t opCode) {
performDeviceOperationPreQueueHandling(opCode);
handleQueue(); handleQueue();
performDeviceOperation(opCode); performDeviceOperation(opCode);
poolManager.performHkOperation(); poolManager.performHkOperation();
return returnvalue::OK; return returnvalue::OK;
} }
ReturnValue_t FreshDeviceHandlerBase::performDeviceOperationPreQueueHandling(uint8_t opCode) {
return returnvalue::OK;
}
void FreshDeviceHandlerBase::startTransition(Mode_t mode_, Submode_t submode_) { void FreshDeviceHandlerBase::startTransition(Mode_t mode_, Submode_t submode_) {
triggerEvent(CHANGING_MODE, mode_, submode_); triggerEvent(CHANGING_MODE, mode_, submode_);
// Complete mode transition immediately by default. // Complete mode transition immediately by default.

View File

@ -82,6 +82,12 @@ class FreshDeviceHandlerBase : public SystemObject,
MessageQueueIF* messageQueue; MessageQueueIF* messageQueue;
/**
* The default queue handler will process all messages for the interfaces implemented
* by this class. If there are special requirements, for example that action commands are
* received on a different queue, the user can override this function for those special
* requirements.
*/
virtual ReturnValue_t handleQueue(); virtual ReturnValue_t handleQueue();
// Mode Helpers. // Mode Helpers.
@ -153,6 +159,8 @@ class FreshDeviceHandlerBase : public SystemObject,
ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper, ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper,
const ParameterWrapper* newValues, uint16_t startAtIndex) override; const ParameterWrapper* newValues, uint16_t startAtIndex) override;
virtual ReturnValue_t performDeviceOperationPreQueueHandling(uint8_t opCode);
private: private:
// Executable Overrides. // Executable Overrides.
void setTaskIF(PeriodicTaskIF* task) override; void setTaskIF(PeriodicTaskIF* task) override;