100 likes | 301 Views
iDrive. Mid-term project review. Team Objectives. Retrieve the route from the routing engines at regular intervals M anipulate the in-built phone GPS such that it will send programmer defined GPS co-ordinates to the OSMAND application
E N D
iDrive Mid-term project review
Team Objectives • Retrieve the route from the routing engines at regular intervals • Manipulate the in-built phone GPS such that it will send programmer defined GPS co-ordinates to the OSMAND application • Faking the GPS will enable the application to be tested in any part of the world
Approach • Get the route from the route engine (GPX file) and display the route on the screen • Store the co-ordinates from the GPX file into an ArrayList (done in the code) • Override the app code to provide new lat, long values wherever onLocationChanged (Location location) is called • Replace Location.getLatitude() with mock_res.get(count).getLatitude() and similarly for longitude • Built a timer to increment the count and provide new location on requestLocationUpdate() • Getting built without errors
Route • Screenshot of the route being displayed
Justification • There were three options for implementation: • Changing the framework • Changing the app code • Difficult to implement. Changes in one section of the code may cause problems in other sections. • Using the Eclipse Emulator • The phone would not be able to be tested for performance meaaures
Modified Approach • Add code to framework to pass the array entries to the public abstract void onLocationChanged (Location location) • Each time onLocationChanged is called, it should be passed a new set of co-ordinates from the ArrayList • After a set time interval, the OSMAND code should send the current location of the device to the route engine and retrieve a new route
Flow OSMAND application Route Engine Get Route Store coordinates Send Location onLocationChanged Android Framework Pass fake co-ordinates to onLocationChanged
Obstacles • Understanding the android code • According to the initial approach, it was tough to identify the parts of code that would need modifications • Compile and edit framework • Testing (wireless signal …)
Schedule • Tasks • Displaying the route • Modifying the android framework to fake the GPS readings • Implementing a timer function to call the route engine at regular intervals and refreshing the route • Add current location to UI • Finish by Mid-November