Summary/simplified version
Given a list of track points defined by three 1-dimensional arrays (lats, lons and dtime
lats
lons
dtime