# Linear interpolations of (langitude, latitude, altitude) triples?

**URL:** <https://discourse.julialang.org/t/linear-interpolations-of-langitude-latitude-altitude-triples/31903>\
**Category:** General Usage\
**Created:** [December 5, 2019, 12:50pm UTC](https://discourse.julialang.org/t/linear-interpolations-of-langitude-latitude-altitude-triples/31903 "2019-12-05T12:50:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [December 5, 2019, 12:50pm UTC](https://discourse.julialang.org/t/linear-interpolations-of-langitude-latitude-altitude-triples/31903/1 "2019-12-05T12:50:53Z")

</div>

I hope this is a right place to ask this question.

```julia
mutable struct LLA
    lat::Float64
    lon::Float64
    alt::Float64
end
LLA(lat, lon) = LLA(lat, lon, 0.0)

```

```julia
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.
