From b2576d34225f2cdb4cf89788bbd254d470ad6c20 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 23 Feb 2024 11:33:20 +0100 Subject: [PATCH] why are we ignoring usec --- src/fsfw/globalfunctions/TimeSystems.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fsfw/globalfunctions/TimeSystems.h b/src/fsfw/globalfunctions/TimeSystems.h index bb03ebd3..533dc5cb 100644 --- a/src/fsfw/globalfunctions/TimeSystems.h +++ b/src/fsfw/globalfunctions/TimeSystems.h @@ -12,8 +12,7 @@ class TimeSystems { virtual ~TimeSystems() {} static double convertUnixToJD2000(timeval time) { - // time = {{s},{us}} - return (time.tv_sec / 86400.0) + 2440587.5 - 2451545; + return ((time.tv_sec + time.tv_usec * 1e-6) / 86400.0) + 2440587.5 - 2451545; } };