Google Summer of Code/2010/AcceptedProjects/OpenSatNavImprovements

From OpenStreetMap Wiki
Jump to navigation Jump to search

Multiple improvements to OpenSatNav

OpenSatNav is a new open source navigation application for the Android mobile platform.

Note: Android does not run a true Java VM, but uses Dalvik VM instead (which runs a separate DEX class formats, as the standard Java class format is not supported and has to be converted using an external "dx" compiler tool). The core library in Dalvik VM still does not implement all the core API of the standard JME platform: notably for the SAX parser (with namespaces, XML comment nodes, XML external entities, DTD declarations and substitutions, and XML-conforming handling of whitespaces), as well and in the SQL API (JDBC not fully implemented, and SQL schema metadata not supported), and in the domain-space isolation (normally part of the core Java API in all versions). DalvikVM however does recognize and implements basic JNI for interfacing from Java to native code, but not its debugging interface ; it is also very different when instanciating a VM from an external native API. Finally, Dalvik VM has some critical conformance bugs for the IEEE 754-compatible Math packages (notably for the precision requirements and rounding modes).

My proposal outlines several medium size improvements to OpenSatNav that would bring it up to the class of commercial satnavs.

People

Objectives

The objectives of this project are to improve OpenSatNav through a series of medium size improvements that can bring OpenSatNav up to the class of commercial satnavs. These improvements are:

  • Much more reliable trace recording tools, including voice and picture notes. This will take about a week, as much of the work is already done by osmtracker and opensatnav.
  • Add in support for alternative online routers other than yournavigation. This will take less than a week, and will allow for the next point:
  • Turn-by-turn driving directions. This is the larger task, and will bring it much closer to the standard set by AndNav and other satnav products. This will include text to speech, using the standard android libraries if using Android 2.0+, or the TTS download from the marketplace. I estimate that this will take 3 weeks for the basic visual view, and algorithms to detect moving off route and moving past a step in the journey, and another 2 weeks to get the TTS implemented, including intelligent TTS when there are several instructions close together in a route.
  • POI search around a place (choose a destination, then search for POIs near it such as pubs or atms, using the Nominatum geocoder). This will take about a week.
  • Finally, there are two features that will be actually innovative:
    • A widget view, so that someone can leave the application closed, but still see driving directions in a 2x2 android widget, and thus change music or other tasks without loosing view of the driving directions. This will take another week.
    • Driving directions to the status bar when the application is minimised: driving directions will be posted as notifications, so even if someone is in a call, they will still be able to see where to go. This will take about a week (could be done much more quickly, but will take a week to get perfect)

Wiki Page

The main wiki page for the project is OpenSatNav/GSocImprovements. This will contain documentation for the completed project.

Outline Programme

  • Community Bonding Period: As I'm already an OpenSatNav developer, I already have full access to the source control. We recently moved to bzr so this would be less of a problem anyway, but I have set up a working branch for the developer team that will form the trunk branch. All developers in the OpenSatNav-admins team on launchpad have access to this branch.

I have exams around the end of May, so my total work effort will have to be low during this time, but I hope to have finished updating osm-droid by this time so thats out of the way. There are only a few bugs left with zooming and filesystem db left, as seen in my recent push to the osm-droid-update branch.

I will also talking more to the other OpenSatNav users and developers to see if they have any more specific comments on my proposals, or ideas on good ways of implementing them (ie what details should be displayed on a widget, how big the widget should be to fit well on a home screen).

  • Week 1-10 of coding: I will be implementing features with the timescale shown in the above section. Each of these will be broken down into a sections of designing, coding, and then releasing for testing. I will expand this section over the next couple of days with more specific details
  • Week 10: Final testing of all features
  • Week 11: A possible market release containing all new features.

Midterm Assessment Criteria

My midterm I will have completed half of my expected tasks. This will be:

  • Better contribute features
  • Alternative Routing Providers
  • Visual Turn By Turn Directions

Current Outstanding Issues

I need to resolve the following issues to complete the project: OpenSatNav blueprints

Weekly Reports

Week 1

Achievements this week:

  • Created the wiki page under Gsoc2010/AcceptedProjects
  • Worked on opensatnav some more to get the osm-droid port finished before "proper" coding starts.

Problems Encountered:

Help Required:

-

Progress Against Plan:

As predicted. I already have commit access to the repository and so that needs no work. [1]

Week 2

Achievements this week:

  • A bit more communication with OpenSatNav team. Decided on time for webcam chat tomorrow (9:00GMT, 10AM UK time).
  • Added blueprints for project into the opensatnav bug tracker: https://blueprints.launchpad.net/opensatnav

Problems Encountered:

Help Required:

Progress Against Plan:

Week 3

Achievements this week

Problems Encountered:

Help Required:

Progress Against Plan:

As per predictions. Thanks to the work of other OSN contributors, launchpad is now fully set up for OSN and that will be important over the next weeks.

Week 4

Achievements this week

Another webcam conference, this time with another member of the OpenSatNav team. Attended Mapitude and talked with CycleStreets and others about OSN. Looked a bit at moving code around to get things ready for next week.

Problems Encountered:

Several Exams ===Help Required:=== -

Progress Against Plan:

As predicted

Coding Weeks

Week 1

Achievements this week

Finished half my exams. Ported code from newly opensourced MyTracks into OpenSatNav, as the trace recording is second to none and there's no use in re-inventing the wheel! New functionality implemented by this:

  • Saves to database, so no loosing tracks like the old implementation
  • See old tracks in list
  • All runs as a service backend
  • With a content provider, so could be more easily hooked into other applications.
  • Really really good statistics support

See http://www.youtube.com/watch?v=rav9Bz40Uu0 for a quick video demo of the new interface.

Left to do:

  • Picture/audio notes
  • Hooking the exporters back in - GPX into filesystem and OSM export is there in the project, but not hooked up to the actions
  • Set up proper settings control
  • Code tidy up - getting it all to work was a bit of a rush after getting "distracted" by exams, so some of the code is in the wrong place, or needs to be commented.


Exams have left me slightly behind where I wanted to be, but the hard part of this weeks work is done, and can be seen in the branch https://code.launchpad.net/~steve-evolvedlight/opensatnav/store-tracks-to-database

I'll be doing more on this next week, but with my hardest two exams on Thursday and Friday I will obviously not be doing as much work in this next week as for the rest of the summer.

Problems Encountered

Several Exams A slight learning curve with learning about Android Services, IPC calls and Content Providers.

Help Required

In a week, I'll be putting out a call for testers, as there will undoubtedly be some small bugs.

Progress Against Plan

Slightly behind, but I'm actually quite happy with this weeks work - I have gotten pretty angry with OpenSatNav when it lost my hard-earned GPX traces while uploading, and this weeks work fixes all that. Even if it crashes, results are still stored in the database.

Week 2

Achievements this week

Finished exams, investigated the workings of various apis such as Cloudmade and ORS.

Problems Encountered

Exams

Help Required

-

Progress Against Plan

Behind for this week, but will be kicking back up to full speed next week.

Week 3

Achievements this week

Looked over the format for routing specifications from cloudmade (and a quick look at OpenRouteService's) and implemented the basic data types. Created new parser for cloudmade routing provider, implemented token based authentication and got that all working nicely. Parser doesn't yet parse directions into the new data types but that is quite easy to do now.

Problems Encountered

OpenRouteService seemed quite flakey, and so I've decided not to implement support for it. Cloudmade is very nice though.

Help Required:

Progress Against Plan

Getting back on schedule, but still need to go back to the first week's work and finish that a bit more!

Week 4

Achievements this week

  • Moved some existing routing code around, hopefully got speed increases.
  • Moved to new data structure that allows route instructions as well as the GPX trace to follow.
  • Moved old YOURS routing code to new data structure
  • Implemented SAX parser for cloudmade routing files
  • Started work on HUD for showing navigation instructions

Problems Encountered

Turns out SAX is a little buggy on Android, so my PC (Sun) Java version of the parser (developed to speed up testing as I didnt need to run it on the phone all the time) which worked fine didn't work on the mobile, that one took a while to figure out: http://code.google.com/p/android/issues/detail?id=990

Help Required

Progress Against Plan

Roughly on target. Busy week this one again, and will put some more time into finishing off the contribute function.

Week 5

Achievements this week

Playing around with drawing HUDs in code, a couple of bugfixes and more work on navigation.

Problems Encountered

Taking slightly more time for this part than expected, but still under control

Help Required

-

Progress Against Plan

Slightly behind, but not much.

Week 6

Achievements this week

  • More work on the navigation controller to tell it when to move to the next instruction, and work on the HUD.
  • Webcam meeting with Kieran to talk about progress and plans.

Problems Encountered

Some random niggles with Android about needing the application context to load pictures into memory that took a while to work out properly.

Help Required