I hope this is a right place to ask this question.
mutable struct LLA
lat::Float64
lon::Float64
alt::Float64
end
LLA(lat, lon) = LLA(lat, lon, 0.0)
function linearInterpolation(startLoc::LLA, endLoc::LLA, fraction::Float)
startLat = startLoc.lat # start latitude
startLon = startLoc.lon # start longitude
endLat = endLoc.lat # end latitude
endLon = endLoc.lon # end longitude
return LLA( startLat + fraction*(endLat-startLat), startLon + fraction*(endLon-startLon) )
end
Does this make sense? I guess I was a bit hesitant, bacause all latitude, longitude and altitude trips are angles in the essence, so they might not follow the normal linearInterpolation way. What do you think? Any comments are greatly appreciated.