GPS Sight

From Openmoko

(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 +
[[Image:Gpv 0 0 screen shot.png|frame|right|The program, running on the mobile phone, but visible on a desktop machine via X. As GPS does not work indoors, only the time field shows the value]]
 
The GPS preview is a GTK based project to create a usable GUI tool with the simple output (no maps). It is build and tested around the gllin driver but should work with any other driver via pipe at /tmp/nmeaNP. It detects GPRMC and GPGGA messages and constantly shows on the screen the following data:
 
The GPS preview is a GTK based project to create a usable GUI tool with the simple output (no maps). It is build and tested around the gllin driver but should work with any other driver via pipe at /tmp/nmeaNP. It detects GPRMC and GPGGA messages and constantly shows on the screen the following data:
  
Line 12: Line 13:
 
The most interesting part of this project was to keep the external driver thread and GUI thread sufficiently happy together. We cannot just read from the pipe in a loop as this blocks the GUI repainting! Instead, the code schedules the GTK timer, and then it needs to check if any input from the pipe is available - again, without blocking the current thread for too long. This is done using select function.
 
The most interesting part of this project was to keep the external driver thread and GUI thread sufficiently happy together. We cannot just read from the pipe in a loop as this blocks the GUI repainting! Instead, the code schedules the GTK timer, and then it needs to check if any input from the pipe is available - again, without blocking the current thread for too long. This is done using select function.
  
The GPS Preview program (gpv) is released either in .ipk file or in the form of the source code. The released installer still needs the gllin to run.  
+
The GPS Preview program (gpv) is released either in .ipk file or in the form of the source code. The released installer still needs the gllin to run, but, if needed, can start it itself.
  
 
[[Category:GPS]]
 
[[Category:GPS]]

Revision as of 19:01, 20 January 2008

File:Gpv 0 0 screen shot.png
The program, running on the mobile phone, but visible on a desktop machine via X. As GPS does not work indoors, only the time field shows the value

The GPS preview is a GTK based project to create a usable GUI tool with the simple output (no maps). It is build and tested around the gllin driver but should work with any other driver via pipe at /tmp/nmeaNP. It detects GPRMC and GPGGA messages and constantly shows on the screen the following data:

  • Location.
  • Speed in kilometers per hour (converts from knots).
  • Altitude
  • Curved distance from the initially marked point (uses advanced IERC 2003 geodetic reference to convert degrees into kilometers).
  • Number of the satellites.
  • Time (UTM, not a local time).

The source code of this project is available in the project page (http://projects.openmoko.org/projects/gpv/), under LGPL.

The most interesting part of this project was to keep the external driver thread and GUI thread sufficiently happy together. We cannot just read from the pipe in a loop as this blocks the GUI repainting! Instead, the code schedules the GTK timer, and then it needs to check if any input from the pipe is available - again, without blocking the current thread for too long. This is done using select function.

The GPS Preview program (gpv) is released either in .ipk file or in the form of the source code. The released installer still needs the gllin to run, but, if needed, can start it itself.

Personal tools

The GPS preview is a GTK based project to create a usable GUI tool with the simple output (no maps). It is build and tested around the gllin driver but should work with any other driver via pipe at /tmp/nmeaNP. It detects GPRMC and GPGGA messages and constantly shows on the screen the following data:

  • Location.
  • Speed in kilometers per hour (converts from knots).
  • Altitude
  • Curved distance from the initially marked point (uses advanced IERC 2003 geodetic reference to convert degrees into kilometers).
  • Number of the satellites.
  • Time (UTM, not a local time).

The source code of this project is available in the project page (http://projects.openmoko.org/projects/gpv/), under LGPL.

The most interesting part of this project was to keep the external driver thread and GUI thread sufficiently happy together. We cannot just read from the pipe in a loop as this blocks the GUI repainting! Instead, the code schedules the GTK timer, and then it needs to check if any input from the pipe is available - again, without blocking the current thread for too long. This is done using select function.

The GPS Preview program (gpv) is released either in .ipk file or in the form of the source code. The released installer still needs the gllin to run.