Pages by Andreas B. M. Hofmeier
An-H
email Impressum/Note Privacy
http[s]://www.abmh.de/en/osm4treo/index.html

Like to be free? ... then: Fight for Freedom

osm4treo - GPS4Palm port for Treo and Open Street Map

osm4treo is a application for PalmOS which is able to connect to a GPS receiver and to show you current position on a map (downloaded from Open Street Map (OSM)). Additionally it is able to manage way-points. It can display to the distance and the direction to this waypoints. The waypoints and a GPS log are exported to a googleearth readable format.

I am using a Palm Treo and I like to play with GPS navigation. It's a really good for hiking, or bicycle-tours because Open Street Map contains more interesting routes than anything else I found. And it is free! Unfortunately I don't find a good gps program for the Treo. I found gps4palm but it crashed. So I started to adapt it for my purpose.

Disclaimer and Licence

This software is buggy and I added a lot of really dirty hacks! YOU MUST ENSURE THAT YOU DO NOT PUT YOURSELF IN JEOPARDY IF THIS SOFTWARE FAILS! You should have always a plan B to find your way for the case of a soft- or a hardware failure. I recommend a real map and a compas. A second Palm Treo is not a good idea because there could be a systematic problem which causes both system to fail. SO PLEASE USE YOUR OWN BRAIN AND THINK ABOUT THIS! IT IS NOT MY RESPONSIBILITY TO TAKE CARE FOR YOU!

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

I run the map converting service in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I have the right to discontinue, change the service or its conditions at any time.

The original Source

A big thankyou goes to Matthias Prinke who developed the original gps4palm. It can be downloaded here: http://gps4palm.sourceforge.net/.

There is some documentation for this program which is difficult to find. That's why I think it is a good idea to put it on my server:
User Manual
Development Documentation

The download of the map from OSM is realised by an additionally program: FetchMap. This original can be found on Matthias Prinke's Homepage. It fetches the maps from expedia.de. http://home.arcor.de/m.prinke/computers/palmgps.en.htm

My Changes

Fetchmap: Download the map from OSM.

Unfortunately the gps4palm is not able to read the png files created by the OSM exporter. That's why I created a small interface on my server which converts the images to gif. So, if you find a way to export gifs directly or solve the problem of reading the pngs please let me know. I could help you with the source of the converter which translates some coordinates. This changed version of the program should work together with the original version of GPS4Palm. It works only for 320x320 pixel maps.

GPS Logging

Every ten seconds the current position is logged to gps4palm.log. Here is a small awk script which converts this log to googleearth redable waylogs. Just pipe the log into it and it will create several .kml files which containing the routes: e.g. which will format the logfile a bit nicer:
cat /mnt/gps4palm.log | tr ' -' ',' | awk -F ',' '{printf "%02d-%02d-%02d %s %s %s %3s %s %6s %s\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}' | tee "gps4palm.$(date +%Y%m%d.%H).log" | gps4palm_log2kml.awk
Different routes will be split up if two points are too far from each other. If you get strange effects when you recorded a gps-trek of a fast moving thing, e.g. a car, try to change the values "0.006736" and "0.004532" to higher values, e.g. to "0.6736" and "0.4532". These values define the distance in gps from which on a point is considered to be from a new track.

Waypoint Export

Every time the map is opened the first time after a program start the file gps4wayp.kml is written. This file can be opened by google earth and contains all waypoints.

Bigger Crosshair

I enlarged the crosshair and set new colors. Additionally I added a red line which shows in the direction in which the crosshair is moving.

Status Text on the Map

If the map is opened now status information is displayed: The current time, the distance to the selected waypoint, and the current speed.

Navigation on the Map

The black line beginning in the middle of the screen shows the direction to the next waypoint. This is the real direction and not the direction on the map. I assume that the head of the Treo shows in the heading direction. The map is not redrawn automatically. so you will get traces of the line on the map. I consider this more a feature than a bug because it shows you a spectrum of the direction. Just touch the screen to redraw the map.

Primitive Scrolling

When the button in the middle of the four-way-navigator is pressed the scroll mode is entered. "** scroll **" is displayed. Now you can move the crosshair with the four-way-navigator. The distance the crosshair moves is reduced if you press the middle button again. After four times pressing it (and reducing the moving distance) the scrolling mode is left. The starting point of the scrolling mode is either er current position or the center of the map if not position is available. The distance between the currently selected position and the staring point is shown. When you are in scrolling mode you can enter "Waypoints". If you create a new one and select "Here" than the current selected position is inserted. In this way you can save the selected position. Later you can navigate to this point. You can set the current selected position by using the "Go To"-Button in the "Waypoints" form. You will go back to the map and the crosshair is set to the waypoint-position. The displayed distance is the distance from the beginning of the scrolling to the current selected position (the waypoint).

Display Waypoint Names on the Map

This option was added to the Map-Option. It will show the waypoints on the map. I'm sorry about this primitive way, but...it works.

Bugfix: Program crashes if more than about 240 maps are installed.

The program seeks now also in the subdirectory scale.n for the map. scale is the scale as full number without the M or the k suffix. n is a number between 0 and 9. This allows you to manage more maps.

Placeholder for all the details I forgot ;-)

Download of osm4treo - GPS4Palm port for Treo and Open Street Map

Palm Program: osm4treo and fetchmap

Source Code: osm4treo and fetchmap

see also

bfcoder - A small linux command line utility for decryption and encryption of .bfc-Files used by UniCMD on the Palm.

Last modified: Wed May 13 19:13:16 CEST 2009


Pages by Andreas B. M. Hofmeier
An-H
email Impressum/Note Privacy
http[s]://www.abmh.de/en/osm4treo/index.html
Creative Commons License
(c) Andreas B. M. Hofmeier
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Germany License