Flight Plan Update implementation
2/26/2014
To update a flight plan,
- Register a handler in KDS thread to handle updates of moving points from all devices.
Handler handleUpdates(List<MovingPoint> p){
for each p:
check if p is similar to KDS’s prediction
if not {updateFlightPlan(p);}
}
2. In GetLocation Async background task, after getting the data of all moving points, put them into a list of MovingPoint and call KDS.handleUpdates(list of moving points) to handle the updates. This is done repeatedly each 2 seconds because GetLocation is called every 2 seconds.