JuliaGeo / Geodesy.jl

Work with points defined in various coordinate systems.
MIT License
111 stars 24 forks source link

ENUfromLLA errors out with origin defined using integers #78

Open cchderrick opened 2 years ago

cchderrick commented 2 years ago

Possibly related to this #62.

origin_int = LLA(45,100)
origin_float = LLA(45.0,100.0)
t = ENUfromLLA(origin_float, wgs84) # this works
t = ENUfromLLA(origin_int, wgs84) # this throws an error

So it throws this

ERROR: MethodError: no method matching ENUfromECEF(::ECEF{Float64}, ::Int64, ::Int64)

Because of this signature

ENUfromECEF(origin::ECEF{T}, lat::T, lon::T) where T

The ECEF translated origin was auto-promoted from LLA{Int64} to ECEF{Float64}, now T don't match.