You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I define a custom time scale inside a package, conversion will not work:
module FooBar
using AstroTime
@timescale GPSTime TAI
AstroTime.Epochs.getoffset(
::GPSTimeScale,
::InternationalAtomicTime,
second,
fraction) =19
AstroTime.Epochs.getoffset(
::InternationalAtomicTime,
::GPSTimeScale,
second,
fraction) =-19end
Note that when copying this into the REPL, it will actually work. It does not work when it is a real package (not a module inside Main).
I get the following error:
julia>using FooBar, AstroTime
julia>TAIEpoch(FooBar.GPSTimeEpoch(2021,5,31))
ERROR: No conversion path between 'GPSTime' and 'TAI' available.
Stacktrace:
[1] apply_offset
@ ~/.julia/packages/AstroTime/944cN/src/Epochs/offsets.jl:154 [inlined]
[2] (TAIEpoch{T} where T)(ep::Epoch{IGS.GPSTimeScale, Float64})
@ AstroTime.Epochs ~/.julia/packages/AstroTime/944cN/src/Epochs/offsets.jl:39
[3] top-level scope
@ REPL[3]:1
The text was updated successfully, but these errors were encountered:
If I define a custom time scale inside a package, conversion will not work:
Note that when copying this into the REPL, it will actually work. It does not work when it is a real package (not a module inside Main).
I get the following error:
The text was updated successfully, but these errors were encountered: