Hi,
http://code.google.com/p/monav/source/browse/?name=permaroute
As anticipated, creating useful speech output is more than demanding.
It's quite challenging, and frankly, I'm not suprised about that.
The current code contains ugly hacks (Stevie Wonder would sing »Isn't it
ugly«) and is anything else than usable (exept for hardcore OSM addicts
like me, of course).
What I have done so far
* Persistent route
MoNav now is capable of detecting whether the current position is near
the computed route or not. This helps to take GPS inaccuracy into
account. The route is not recalculated at each GPS update anymore.
Instead, MoNav checks whether ther current position is near one of the
route's segments. If so, it keeps the route (or truncates it in case the
vehicle moves along the route). In case the vehicle leaves the route for
more than x meters, MoNav recalculates the route.
* Position clicking
Clicking the source on the map now behaves like a moving vehicle. In
case the click is near the route, it will either be shortened, retained
or recomputed as if the click was a real GPS position. This mainly
serves for debugging purposes, but is useful for demonstration anyway.
* Audio output
MoNav now is capable of playing back prerecorded audio samples. As a
preparation for improved turn instructions, the audio output can handle
a QStringList of filenames to play back. This allows for features like
"In 100 meter" "turn left" "then" "turn right".
* Routing issues
The work on spoken turn instructions shows a lot of issues with MoNav's
routing. Consider a small deviation in a residential area and a
branching of a motorway link. While in the first case, you don't want to
announce a "turn slightly right in 100 meters", you expect something
like "keep right in 100 meters" in the latter case. Appearenly it was
desirable to gain more information about the context of a crossing.
Additionally, it was desirable to get better turn restrictions from the
router directly. See the attached hard copies. I have no clue how to
cope with such situations correctly. But I hope we agree that such
routes are rather difficult to cope with.
That's less than the tip of an iceberg. It's just what I've seen while
writing the very first turn instruction code. Which means we need people
aware of and hacking on the issues.
It's fun anyway. For my personal needs, bike routing is more important
than car routing. And I guess it will be easier to cope with :) .
Yes, it's plain fun to use the Xmas holidays for hacking MoNav. I'm
still grateful that MoNav exists and the code is such a joy to read.
Thanks to all involved :) .
--
Beste Grüße,
Best regards,
ce