Expand Globalfunctions #168

Merged
meggert merged 8 commits from expand-globalfunctions into develop 2024-02-27 12:50:30 +01:00
Showing only changes of commit 9894935e99 - Show all commits

View File

@ -0,0 +1,20 @@
#ifndef FSFW_SRC_FSFW_GLOBALFUNCTIONS_TIMESYSTEMS_H_
#define FSFW_SRC_FSFW_GLOBALFUNCTIONS_TIMESYSTEMS_H_
#ifdef PLATFORM_WIN
#include <winsock2.h>
#else
#include <sys/time.h>
#endif
class TimeSystems {
public:
virtual ~TimeSystems() {}
static double convertUnixToJD2000(timeval time) {
// time = {{s},{us}}
return (time.tv_sec / 86400.0) + 2440587.5 - 2451545;
}
};
#endif /* FSFW_SRC_FSFW_GLOBALFUNCTIONS_TIMESYSTEMS_H_ */