Opened 7 years ago

Last modified 5 years ago

#905 reopened enhancement/feature request

Add better support for hiking into navit

Reported by: tegzed Owned by: Singesang
Priority: minor Milestone:
Component: osd/core Version: git master
Severity: Keywords: map, route, tracking



Yesterday I had a hiking tour and used navit to display the points of the route using the csv map driver (I converted a gpx file downloaded from a hiking webpage to csv format using gpsbabel). I found this quite useful, but I think hiking can be assisted better with Navit. I think it would be a good idea to warn the hiker by announcement when she/he goes off the route by a specified distance (also suppress announcements outside another given limit) so the user should not check the device all the time if she/he is still on the correct path. This can save time finding the correct way when walking on unmarked pathes. Maybe the functionality can be developed as a new osd type. Please let me know if you find this useful or if you have some more ideas on this topic. I will start working on this when my time allows, until then I keep this ticket as a reminder.

Bye David Tegze

Attachments (3)

route_guard_example_map.txt (377 bytes) - added by tegzed 7 years ago.
example textfile map for route guard
navit_route_guard.diff (8.8 KB) - added by tegzed 7 years ago.
added support for imperial units (535 bytes) - added by tegzed 7 years ago.
simple script to create navit textfile map from a gpx track to use with route_guard osd

Download all attachments as: .zip

Change History (9)

Changed 7 years ago by tegzed

example textfile map for route guard

comment:1 Changed 7 years ago by tegzed


I attached an initial version of the above desribed OSD (navit_route_guard.diff). Currently it notifies the user only by TTS announcements. Later the distance to the route will also be displayed. The usage is the following. One should create a texfile or binfile map from the route points(an example textfile map is attached). For tracklogs it is recommended to do polygon simplification to reduce the number of route points. (for example gpsbabel tool can do this) The name attribute of the map item that contains the route waypoints should be set so the OSD can distinguish the route item from other items. Any item type can be used that supports multiple coordinates. The map entry in the active mapset of navit.xml should also have its unique name set:

<map name="route_guard_test"  type="textfile" enabled="yes" active="1"  data="/home/dandor/tmp/navit_path_guard_test/route_guard_example_map.txt"/>

An OSD entry should be set up with the appropriate item and map names and with a type="route_guard" attribute:

<osd enabled="yes" type="route_guard" item_name="route_guard_test" map_name="route_guard_test" x="-200" y="650" min_dist="10"  max_dist="200" update_period="10" />

At distances greater than min_dist meters from the route polyline a warning will be announced. At distances greater than max_dist meters from the route polyline no warning will be announced to avoid annoyance of the user when she/he intentionally leaves the route. The update_period parameter is used to set the periodicity of the distance checks.

Please test this patch and let me know if you find some problems or have some suggestion.

Changed 7 years ago by tegzed

added support for imperial units

comment:2 Changed 7 years ago by tegzed

  • Resolution set to fixed
  • Status changed from new to closed

This patch is committed with SVN 4792, so ticket is closed.

comment:3 Changed 7 years ago by ah be

  • Resolution fixed deleted
  • Status changed from closed to reopened

I think the solution so far is really great for hiking. As with the new hiking settings one can just put the phone in the pocket an enjoy the walk, as one will be corrected by navit automatically once one gets lost. I have only one concern:

If gps signal is lost, I will not be notified, so navit would not tell me anymore if I was starting to get off track until I look at the device and notice myself. Therefore my suggestion. Could there be another variable which throws a signal once gps is lost eg via a voice call "gps signal lost" or similar or vibration.

comment:4 Changed 7 years ago by tegzed

Hello Spielraum,

For this purpose i would use the cmd_interface OSD type. For example you can use something like this:

<osd name="my_osd_cmdif"  update_period="10"  enabled="yes" type="cmd_interface" w="200" h="20" x="350"  y="175" command='say( (vehicle.position_sats_used < 4 ) ? "GPS fix lost" : "") '> 

This will check with a period of 10 seconds if the number of used satellites drops below 4 and emit an announcement if so. You should check if your vehicle type supports the retrieval of attribute position_sats_used. If not it should be implemented for your vehicle type.

Changed 7 years ago by tegzed

simple script to create navit textfile map from a gpx track to use with route_guard osd

comment:5 Changed 7 years ago by tegzed


I attached a simple shell script to create a textfile (see: map for route_guard osd. It uses gpsbabel to simplify a gpx track to a specified point count and then create a textfile from the output.

Usage example:

sh inputfile.gpx outputfile.txt 200

This will create a navit textfile map called outputfile.txt from the input gpx after simplifying the track to 200 points. The output file can be added to the active mapset and used for a route_guard osd.

comment:6 Changed 5 years ago by usul

  • Keywords map route tracking added

I think this ticket can be closed again?

Anybody feel free to reopen this ticket at anytime.

Note: See TracTickets for help on using tickets.