Home GPS Download Business Partners Contact Family AVL Links History AsOnTV

Adding Your Own Maps and Places - Page 2

Updated 1000 Wednesday 8th August 2001 UK Time

Robin Crikey ! I see this page was last updated on 21st August 1998 ! First a word of warning to you "GPS Enthusiasts" out there, digging into these inner workings of GPSS: These facilities are not intended for the "End-User", or the non-technical "enthusiast". They are more relevant to someone already engaged in GIS-related business, familiar with being able to automatically create this type of data from suitable street databases and/or automatic route guidance logic. However, having said all that, the fact is that some of you will find these facilities useful to "play with" - and you may help me find bugs in GPSS :-)

RGI files needed better documentation - better than that below. Most of you can skip over the .ROO file information - it is not directly related to .RGI files - which provide the more interesting facilities, like "turn left at the cross roads". Thanks for those "enthusiasts" among you who kept asking me RGI-related questions, forcing me to update this page :-)

Robin Lovelock, Sunninghill, UK. August 2001.


7. Route and Turn-By-Turn Guidance .ROO and .RGI files
8. Sounds linked to categories and names $*.WAV #*.WAV
9. More Information linked to AVI Multimedia Video files
10. Multiple Languages GPSS.HLP and CONTROLS.CFG
11. Modification of CONTROLS Icons & CONTROLI.CFG
12. Map Rotation
13. Some GPSS Configuration files.

7. Route and Turn-By-Turn Guidance .ROO and .RGI files

GPSS has always included support for turn-by-turn guidance, when Version 1 it was first released in 1995. However, these types of facility require accurate map data which is not available - at consumer prices - in many countries.

It therefore supports voice guidance at several levels :

  • to final destination. e.g. "Destination 550 yards to our right at your 2 o'clock"
  • as a route of intermediate waypoints, with similar guidance above (.ROO files)
  • as Route Guidance Instructions. e.g. "turn left at crossroads ahead" (.RGI files).
The first, basic facilty, does not require any map data to guide you within a few metres of a location - GPSS just needs the final destination location, and the data from its GPS unit.

Guidance through waypoints with .ROO files

Here is a typical .ROO file, in GPSS.ROO :

SU 93414 67357 *R140
SU 93570 67688 *R140
SU 93860 68349 *R140
SU 93360 68659 *R140
SU 92700 68760 *R140
SU 92205 68795 *R140

6 is the number of waypoints, and *R140 is the threshold of 140m used by GPSS to decide if the vehicle is close enough, to switch to the next waypoint. Larger values would be used within aircraft, or with less accurate locations - which can be in GPSS lat/lon format.

The ROOMAN facilty supports generation of this route data by clicking on the map.

Turn-By-Turn Guidance .RGI files

A RGI file provides Turn-By-Turn instructions to reach a particular destination location, via many different places or areas. These instructions can be as detailed as you like:
e.g. "turn right opposite the school into Church road"
They can also be very crude:
e.g. "Hop on a plane from here in USA, to London Heathrow in UK" :-)

In these examples you will see locations expressed in UK Grid (e.g. SU 93414 67357 ), but for most of you outside the UK, location would be expressed in one of the other supported GPSS formats, such as a 15 character lat/lon in degrees and minutes (e.g. 493075N0854599W ).

The RGI file holds pairs of lines for each instruction. The first line gives the criterea for giving the instruction (location, direction of movement) and sounds and/or images. The second line gives the detailed text of the instruction.

Here is a typical .RGI file, in ASCOT.RGI :

SU 93320 67300,50,090,40,RGI$TL.WAV,RGI$TL
turn left out of Robin's Drive
SU 93410 67357,50,140,40,RGI$TL.WAV,RGI$TLT
turn left out of Armitage Court to Sunninghill Village
SU 93500 67600,50,025,40,$LS.WAV,RGI$SCHO
School ! Children !
SU 93700 68200,200,22,60,RGI$TL.WAV,RGI$TLR
turn left at roundabout towards Ascot on A329

The first four items in SU 93320 67300,50,090,40,RGI$TL.WAV,RGI$TL
are location, distance threshold in metres, direction in degrees clockwise from true north, and direction threshold as a bearing width in degrees.

When the car position and direction of travel meet this criterea, a message is given to the driver based on the other data - a sound, a picture, and text.

You will recognise RGI$TL.WAV as a sound file, and this one is already included as a standard sound in the GPSS Baseline.

RGI$TL is a "standard image", also supported in the GPSS Baseline by a file which holds the detailed instructions to draw lines and text to compose the image. This saves space compared with BMP image files - although these can give a more impressive result (e.g. picture from a digital camera as seen approaching the location).

GPSS looks for an extention of .BMP - and looks for a BMP file (e.g. RGI$TL.BMP) If it does not find the .BMP, then GPSS looks for an entry in the file of "vector data" describing this image, which is held in file GPSSSIGN.TXT (See below - but you need not get into the details of GPSSSIGN.TXT).

Selection of a RGI file is automatic when a destination is selected. This is done by including an entry in GPSS.MOR :

SHR,SU 93200 67100,The Berystede Forte,SU932671.MOR,NULL
LPOP,SU 92220 68810,Ascot,NULL,ASCOT.RGI

The destination name text (such as "Ascot"), and location (such as "SU 92220 68810") should match exactly the text appearing in files used to select the destination such as GPSS.CFG or GPSS.GTX.

Selection of this destination should then make this RGI file "active". i.e. GPSS will continually monitor the RGI and give instructions based on the cars movement.

When an RGI file is active GPSS will monitor the car's GPS position and heading, until it matches a new RGI in the RGI file. It will then use the WAV, BMP and text to provide the Route Guidance Instruction. It will preceed the sound, by the sound in ATTENTIO.WAV which is normally "attention !". This could be replaced by the sound of the drivers name. The sounds and pictures may be general (e.g. "turn right" and arrow turning right), more detailed (e.g. "take third exit at roundabout ahead" with appropriate picture) or even a specific sound and image for that place (e.g. "turn left after Esso gas station" with a labelled photo of the road as seen from that car position).

The last RGI might provide actual pictures of the destination, as seen from different approaches, with text and sound such as, "we have reached our destination".

GPSS includes a RGIMAN facility to assist in the manual creation of RGI files for a particular destination. It is reached by hitting Control-C for the "Experimental" Controls then the RGIMAN button. The Control Panel should then be cancelled. RGIMAN appends data into NEW.RGI which should be deleted before creating an RGI file for a new place. The order of RGI do not matter.

While RGIMAN is active, the left mouse button will update the grid box, and the right mouse button the heading box. i.e. click on where the RGI position is, then on the road in the direction the car will move. Clicking on a standard RGI icon will select that name (e.g. RGI$TL, RGI$TL.WAV for "turn left") and text from the appropriate TXT file. The default text and other parameters may be ammended or added to, before clicking on the button [->NEW.RGI] to append the RGI data into NEW.RGI.

Testing RGI files "on the desk"

Some tests can obviously be done "on the road", but please get someone else to drive, while you look at the screen. It makes sense to test "on the desk" first - to save time and for safety.

For those who want to test "on the desk", here are a few tips:

  • run GPSS without your GPS connected.
  • use Control-C STOP DEMO to switch off the demonstration.
  • click with right mouse button to move the car.
  • Z key should zoom out, and X zoom in to most detailed map.

Image Descriptions as vectors in GPSSSIGN.TXT

As said earlier, you don't need to get into this level of detail - but for those that need it, here is an extract from GPSSSIGN.TXT from the GPSS Baseline:

T,"Slow - Children !"
RGI$TL,turn left
(rest deleted here for clarity)

Suppose GPSS needs to display the RGI image RGI$TL - this makes GPSS scan the file GPSSSIGN.TXT to find RGI$TL.

The line "COL,0,0,0" is interpreted as selecting a colour of Red=0, Green=0, Blue=0 -->Black. Earlier you saw "COL,255,0,0" -->Red. (colours are values 0 to 255).

The lines starting "L" are then interpreted as instructions to draw lines in a simple coordinate system. e.g. "L,50,0,50,70" = Line from X1,Y1 to X2,Y2 = vertical. Easiest here to refer back to the GPSS demonstration, where you will see this image.

Sorry no further documentation here on GPSSSIGN.TXT at this stage.


8. Sounds linked to categories and names $*.WAV #*.WAV

Sounds have been linked to categories (e.g. $E.WAV holds sound "Eating Place" linked to category "E") and sounds to roadnames (e.g. #CHURCHR.WAV may hold "Church Road" in a GEO file) for some time. This has now been extended to landmark and other place names within GTX files. The sound file starts with # then up to the first 7 characters (excluding SPACE) of the name.

9. More Information linked to AVI Multimedia Video files

GPSS Versions 4.6g and later support linkage to AVI files played with DISVIDEO - see the OLDNEW page for more information, and download of required support software. Here is a typical example of FREDS.MOR linked to a place :

FREDS.MOR provides more information on an imaginary Freds place
ROBINHI.AVI             is a video clip
DISVIDEO.WAV            is a sound (start with spaces if none)
FREDS.TXT               is text (start with spaces if none)
The top line, this and following lines are comments.
- where FREDS.TXT and DISVIDEO.WAV hold test and sound :
Let me play you a video ..
The location of the place would normally be in a GTX file, and also in GPSS.MOR, which links to FRED.MOR above. Finding the place would result in GPSS saying, "more information is available". The driver asking, "tell me more" (M) would result in GPSS responding with saying and displaying, "let me play you a video", followed by the video and sound held in ROBINHI.AVI.

10. Multiple Languages GPSS.HLP and CONTROLS.CFG

The first version of GPSS, released in 1995, supported speech in both English and Japanese. This was achieved by taking sounds from a seperate \JAPAN directory, and by GPSS changing logic to accomodate the different syntax. i.e. phrases are not spoken with the same sequence of words.

Version 4.6h and later, provide a more general mechanism, to accomodate additional languages such as Mandarin (Chinese) and Malay. 4.7j extended this to other languages such as German. An additional file, LANGUAGE.CFG specifies the directories for each language. e.g.

0 is the default language of English. 4 is the startup language: German in this example.
e.g. German sounds should be held in directory c:\german.
e.g. the German sound for 1.WAV = "ein" (German for English "one").

The directory should also contain :

  • A file named SYNTAX.CFG with first line holding 0, 1 or 2 for 0=English syntax, 1=Japanese, 2=German. This is the order words are spoken. e.g. "Zwei und Zwanzig" in German, and "Twenty Two" in English.
  • FLAG.ICO a 32x32 Icon displayed by GPSS. Based on National Flag. e.g. ENGLISH.ICO is the British flag.
  • TRANSLAT.TXT lookup file of English and other language text, which GPSS displays on the white speech bar near the bottom of the map display.
  • CONTROLS.CFG for that language.

The J key (or spoken command "language" - Jump to new language) causes GPSS to :

  • select the next language. e.g. English->Japanese->Mandarin->Malay->English
  • say "hello" in that language
  • display the flag icon from FLAG.ICO in the language directory
  • Select GPSS.HLP from that directory
It is therefore possible to switch between multiple languages, and get online help in each language.

Language-specific files called CONTROLS.CFG may also be placed in each language directory, providing help for each of the touch screen actions - also supported in Version 4.6h and later. e.g.

TITLE,a,a,use the controls below to select facility then hit OK
W,WAW.ICO,ok.wav,Where are we ?
H,home.ico,home.wav,Make Destination Home
S,$S.ICO,$S.wav,Nearest Hotel ?
E,$E.ICO,$e.wav,Nearest Eating Place ?
M,MORE.ICO,ok.wav,Tell me more
D,desti.ico,desti.wav,Make that place destination
KEYS,KEYS.ICO,ok.wav,Show Full Keyboard
HIDE,HIDE.ICO,ok.wav,Hide these Controls
~,KEYS.ico,ok.wav,Search by name GPSS.GTX
`,KEYS.ico,ok.wav,Search last category by name
#027,gpss.ico,goodbye.wav,Exit from GPSS
Each line corresponds to a GPSS Operator command, and there are 4 fields on each line :
  • The command (single letter, # followed by 3 digit ASCII code, or special code for TITLE, HIDE or KEYS.
  • The Icon that provides that command on the touch screen.
  • The sound response to selection of the command.
  • The meaning of the command - translated to that language.

Replacement of WAV sound files by those re-recorded in the required language will translate the sound, but not the text displayed in the white bar low on the screen. Translation of this text can be achieved by creating a text file called TRANSLAT.TXT with a list of phrases and words needing to be translated. In the example lines below, the upper case text after = should contain the text in the required language. This would normally be done for the most commonly used phrases. Not all need be translated. GPSS requires the smallest words to be last.
Here are extracts from TRANSLAT.TXT before translation :

use these controls to select required function then hit OK=USE THESE CONTROLS TO SELECT REQUIRED FUNCTION THEN HIT OK
Please check the Printer. It may have run out of paper.=PLEASE CHECK THE PRINTER. IT MAY HAVE RUN OUT OF PAPER.
Let me show you something I did earlier ..=LET ME SHOW YOU SOMETHING I DID EARLIER ..
Please be patient while I check my data..=PLEASE BE PATIENT WHILE I CHECK MY DATA..
what direction we are moving regularly ?=WHAT DIRECTION WE ARE MOVING REGULARLY ?
Shall I say the same things as before ?=SHALL I SAY THE SAME THINGS AS BEFORE ?
Changing Destination to Next Waypoint=CHANGING DESTINATION TO NEXT WAYPOINT
Are you sure you want to exit GPSS ?=ARE YOU SURE YOU WANT TO EXIT GPSS ?
more information is not available=MORE INFORMATION IS NOT AVAILABLE
I'm not receiving any GPS data=I'M NOT RECEIVING ANY GPS DATA
more information is available=MORE INFORMATION IS AVAILABLE
I am receiving GPS data !=I AM RECEIVING GPS DATA !
moving north east=MOVING NORTH EAST
moving south east=MOVING SOUTH EAST
moving south west=MOVING SOUTH WEST
moving north west=MOVING NORTH WEST
OK I'll be quiet=OK I'LL BE QUIET
Changing map to=CHANGING MAP TO
the nearest is=THE NEAREST IS
to our right=TO OUR RIGHT
The nearest=THE NEAREST
ahead of us=AHEAD OF US
to our left=TO OUR LEFT
We are near=WE ARE NEAR
north of=NORTH OF
south of=SOUTH OF
at your=AT YOUR
east of=EAST OF
west of=WEST OF
We are=WE ARE
Km of=KM OF

Robin will e-mail this file, containg the English text strings within GPSS.EXE, to those who are assisting with translation.

Modification of CONTROLS Icons & CONTROLI.CFG

There are applications in which GPSS may need to be configured so that the Icons on the CONTROLS bar are different, or link into different shortcuts into the CONTROLS.CFG list.

This might be to provide special symbols such as chinese characters, or symbols for a different application such as use 'in the air'.

This is achieved by the presence of an additional file CONTROLI.CFG with the following typical contents :

- where NULL means the default Icon appearing on the control bar, and BZOOMOUT.ICO (which also happens to be the default) is the Icon file to appear in the second shortcut position, X being in the first.

There are always 9 lines of data in this file, corresponding to the 9 shortcut icons.

This option was introduced in GPSS.EXE v4.7L (24 March 98).

So to change the second Icon to that providing a shortcut to "E" Eating Place the file might contain :

These CONTROLI.CFG files would normally be placed with the CONTROLS.CFG file in c:\gpss04 and individual language directories.

Version 4.7 6 April 98 introduced 'hot keys', by appending two asterisks **.
i.e. hitting an icon results in immediate action.

- will invoke E immediately.

12. Map Rotation

Early pre-release versions of 4.6 introduced optional 180 degree map rotation. This facility was toggled on or off with the ! key. From 4.6h it can be configured ON by the presence of any file with the name ROTATION.CFG present on startup.

When map rotation is on, GPSS will look for a BMP file with the correct name according to the direction the car is heading. e.g. 180ASCOT.BMP for ASCOT.BMP,DES,etc. - if the car is heading roughly south.

This map rotation has been extended in GPSS v4.6i to more rotations of 45 degrees, or 90 degrees. The map name system now uses one numeric character preceeding the unique first 7 characters of the north oriented BMP,DES map.

i.e. unrotated maps can still have any file name, but rotated maps start with 0. Only the unrotated 0 map need be calibrated and have a .DES file. e.g. if ASCOT.BMP,DES were a rotated map, the file names would be 0ASCOT.BMP, 0ASCOT.DES, 1ASCOT.BMP, 2ASCOT.BMP, etc until 7ASCOT.BMP.

The digit will be the number of anti-clockwise rotations of 45 degrees from north. e.g. 2ASCOT.BMP will be 0ASCOT.BMP rotated 90 degrees anti-clockwise, for when the car is travelling roughly eastward. The centre of rotation is the centre of the map at 320,240.

On startup, GPSS looks for rotated maps, and counts the maximum number of rotations found - which could be 8 if at least one map has 0,1,2..7 images. When map rotation is switched on (by the presence of any file called ROTATION.CFG or by the ! key) this maximum number of rotations is selected. Hitting ! will sequence through 8, 4, 2 and zero rotations, back to 8.

If GPSS cannot find a rotated map image, it will display a normal unrotated map. This means that it is possible to produce a system where not all maps are rotated, and where the number of rotations can be 2, 4 or 8 - depending on the requirement and the space available for BMP images.

Note that the car may not be in the centre of the map, and that rotation will therefore cause the car to change position on the map when it changes direction. For this reason it may be considered advisable to limit the number of rotations to 4 or 2.

For 2 rotations, only the 0 and 4 images are needed; for 4 rotations, 0,2,4,6 are needed; for 8 rotations, 0,1,2,3,4,5,6,7 are needed.

You may find the ROTATER program useful which can be downloaded from the 'Old and New' download page of this site. ROTATER creates 8 rotated 640x480 BMP images from a single BMP image of at least 800x800 pixels.

13. Some GPSS Configuration files

There are many 'hidden' facilities within GPSS. Many of these facilities are 'switched on' by simply including a file with the right name. If GPSS sees this file on startup, it does not read the contents, but simply 'switches on' that feature.

Click here for CFG File Info