I have the following available:
- last reported lat,lon w/timestamp
- target lat,lon
- estimated time to target
- heading
How can I interpolate an estimated position over time?
I know that's enough to calculate the required average velocity for the remainder of the trip. Given a straight-line distance, it's pretty trivial. I know it has to do with vectors but I'm a bit rusty and thought it better to consult some experts.
The reason I need this update rate is limited, so to show smooth animation I need to guess at the current position between updates.
The target platform is a Google Maps application so I have available some basic functionality like a Geo-correct function for distance between two coordinates. Language is unimportant as I know many and can port or adapt any examples if needed. General solutions would be preferred however.
Is this simply two independent vector calculations?
latestimate = latstart + (Δlat * P) lonestimate = lonstart + (Δlon * P) Where: testimated = the reported estimated time to target telapsed = time since last time estimate P = telapsed / testimated Δlat = latreported - lattarget Δlon = lonreported - lontarget