Moving map File Hook

The file hook provides a means of getting position data for moving map operations into OziExplorer by using a simple file handling protocol. An additional program written by yourself or a 3rd party is used to read the position data from another source (it could be APRS through the serial port or APRS via telnet or a GPS which does not output standard NMEA etc) and write the files which OziExplorer knows how to read.

How does it Work

The 3rd party software reads the position data from whatever source, converts the data into a standard NMEA sentence ($GPRMC, or ($GPGGA and $GPVTG) or $GPGLL) depending on how you want the data processed. $GPRMC is preferred but if only position data is known the $GPGLL can be used (its simplier). All sentences can be included, then OziExplorer will choose the ones it requires.

The software then writes the sentence (string) into a text file called "mmfile.dat", only 1 sentence of each type should be written into the file, the line(s) in the file must end with a CRLF (Carriage Return and Line Feed). The software then writes the flag file "mmfile.flg", it doesn't matter what is in this file. These files are written in a loop as often as needed or as position data is available, but no more than once per second.

When moving map is started in OziExplorer the existence of the file "mmfile.flg" will be checked, it it exists the position information will then be read from the file "mmfile.dat" and processed as normal. The file "mmfile.flg" is then deleted and OziExplorer will keep checking until it appears again, when it does the position is processed and on it goes.OziExplorer checks for the existence of the file 4 times per second.

Notes

The 3rd party software must be started before moving map in OziExplorer as the existence of the flag file is checked, if the flag file is not there then NMEA data is read from the serial port as usual.

Do not write the file more than once per second, OziExplorer needs time to scroll the map etc, trying to make it update too fast may lead to problems. OziExplorer checks for the flag every 0.25 seconds to reduce the latentcy in processing the position not because it can process that fast.

The files must not be kept open, as soon as they are written they must be closed to give OziExplorer time to read them and delete the flag file.

You must have error checking around the file create code because the 2 programs share access to them and eventually there will be a clash, with error checking the operation can be aborted and it another attempt can be made on the next pass.

Delete the 2 files when you stop your program from processing and/or when you exit the program otherwise Oziexplorer will see the flag file the next time moving map is started and assume file input is required, although Oziexplorer does check for the existence of the flag file and deletes it on program startup.

A VB5 example program which reads NMEA from a GPS and writes the files is available on the web site. Obviously this program is not useful but it gives a guide on what to do. I am not a VB programmer so forgive my crude attempt.

Sharing the Programs

If anyone writes programs which they would like to share with others please contact me and I will serve them from my web site or provide a link.