flightplan={
let date = spacetime(d, departureTz).time(departureTime)
let s=spacetime.now()
let getPoint= spacetimeGeo.point.bind(s)
let startPoint=getPoint(date)
let landing=date.add(hours,'hours').goto(arrivalTz)
getPoint= spacetimeGeo.point.bind(landing)
let endPoint=getPoint(landing)
return {
date:{
year:date.year(),
month:date.month(),
date:date.date()
},
start:{
tz:departureTz,
hour:date.hour(),
coord:[startPoint.lng, startPoint.lat]
},
end:{
tz:arrivalTz,
hour:landing.hour(),
coord:[endPoint.lng, endPoint.lat]
},
}
}