-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ecef_to_geocentric
returns error when called with a Vector{Taylor1{Float64}}
#6
Comments
Btw, our current workaround is to overload this method for |
That said, beyond the possible type piracy, we would like to be able to use this function without having to re-write it (it's essentially the same code, but without the conversion to float), so we thought it'd be best to ask for help here 😅 |
Hi @PerezHz ! I really need that conversion to float to make the output type consistent (we use these algorithms with promote_type(Int32, Int64, Float32) |> float
Float32 Otherwise, the algorithm will be promoted to I am still not sure what is the best approach. However, since julia> v = Taylor1.(rand(Float32, 3), 2)
3-element Vector{Taylor1{Float32}}:
0.22708648 + 𝒪(t³)
0.6600746 + 𝒪(t³)
0.6802838 + 𝒪(t³)
julia> Core.AbstractFloat(S::Taylor1{T}) where T<:Number = S
julia> ecef_to_geocentric(v)
( 0.7725128686145345 + 𝒪(t³), 1.2394485 + 𝒪(t³), 0.9747065024345271 + 𝒪(t³)) |
Many thanks for the swift reply @ronisbr! Indeed, this seems in principle like a plausible solution on TaylorSeries side; I'd like to keep this issue open just in case things don't work out as expected if that's okay 😄 |
Fixed by JuliaDiff/TaylorSeries.jl#353, thanks @ronisbr! |
Hi!
When trying to run
the following error is returned:
i.e., the error is coming from
SatelliteToolboxTransformations.jl/src/reference_frames/geodetic_geocentric.jl
Line 45 in b779038
where the error occurs since
Taylor1{Float64}
cannot be converted to a float... maybe a possible fix can be to usepromote_type
somehow?The text was updated successfully, but these errors were encountered: