JuliaSpaceMissionDesign/IERSConventions.jl

ERA returns NaN with ForwardDiff

Closed this issue · 1 comments

When trying to compute a derivative with ForwardDiff, the iers_era function returns a NaN type, which does not allow the AD computation of the GCRF-to-ITRF rotation

julia> using IERSConventions 
julia> using JSMDUtils.Math: D¹

julia> (t->iers_era(iers2010a, t), 1)
NaN

This is caused by the usage of the mod function:

julia> ForwardDiff.derivative(t->mod(t, 1), 2)
NaN