java - Best way to predict as trajectory path point -


i recording movement of vehicle every 3 minute interval.so @ every 3 minute know location update of vehicle.from data predict next point @ each point.for example last 5 location updates below:

    latitude,longitude,timestamp     1.527219139 103.7791514,2017-08-21 00:03:00     1.528935142 103.7805676,2017-08-21 00:06:00     1.530651144 103.7812113,2017-08-21 00:09:00     1.531895244 103.7819838,2017-08-21 00:12:00     1.533353844 103.7832713,2017-08-21 00:15:00 

with thid data predict next point heading towards.is use linear regression or extrapolation.or there other methodologies calculate predicted latitude , longitude.any appreciated.

i'm assuming earth flat (seriously -- math unspeakable otherwise).

you need decide how many data points want analyze make prediction. if take last 2 data points problem relatively simple (on flat earth). you've traveled appears 3 minutes (12:00 15:00), , increase in latitude 1.533353844 - 1.531895244, whilst increase in longitude 103.7832713 - 03.7819838. figures can estimate change in latitude per minute, , change in longitude per minute. can add per-minute changes recent latitude , longitude figures estimate 1 minute last reading. , on.

linear regression use if assume traveling along approximates straight line. using regression enable "average out" errors in recorded positions, not give better prediction unless motion in straight line.

you can use multiple data points in prediction. example, can use last 3 data points , fit values sort of cubic polynomial. can use parameters of polynomial function estimate next data point.

using more 3 data points practicable if know underlying movement being recorded (e.g., straight line, or curve of particular shape).


Comments