elapsedtime.cpp (conceptually Layer 1 / CORE UTILITIES) calls currentmjd() which is declared in timelib.h (Layer 2 / DATA I/O). This is a one-way upward dependency, not circular — timelib has no reference to elapsedtime. Both are currently bundled into the same CosmosTime CMake target as a workaround.
Fix: Extract currentmjd() (and its double offset variant) into a new support/timebase.h at Layer 1 with a corresponding timebase.cpp. Both elapsedtime and timelib include timebase.h. The CosmosTime CMake target can then be split into CosmosTimeBase (Layer 1) and CosmosTime (Layer 2) if desired.
Files: support/elapsedtime.cpp:292, support/timelib.h:137-138, support/CMakeLists.txt:30
elapsedtime.cpp(conceptually Layer 1 / CORE UTILITIES) callscurrentmjd()which is declared intimelib.h(Layer 2 / DATA I/O). This is a one-way upward dependency, not circular —timelibhas no reference toelapsedtime. Both are currently bundled into the sameCosmosTimeCMake target as a workaround.Fix: Extract
currentmjd()(and itsdouble offsetvariant) into a newsupport/timebase.hat Layer 1 with a correspondingtimebase.cpp. Bothelapsedtimeandtimelibincludetimebase.h. TheCosmosTimeCMake target can then be split intoCosmosTimeBase(Layer 1) andCosmosTime(Layer 2) if desired.Files:
support/elapsedtime.cpp:292,support/timelib.h:137-138,support/CMakeLists.txt:30