GPS Skinner: Documentation
This section contains in
depth documentation on how to create your own skins for GPS Skinner.
Synopsis
The magic behind GPS Skinner is the ability to create an
on-the-fly user interface from a skin file. Skin files tell the
application what pages you want and what objects you want on each page.
Skin files are plain text files with a generic *.txt extension. The
reason for this is to allow editing via many text editors on the
desktop or directly on your Windows Mobile device.
File
Layout
Since GPS Skinner skins files are nothing more than text
files, other text files must be eliminated if the user attempts to load
a text file which is not a skin file.
In order to achieve this the first line of any skin file
must be "GPS
SKINNER" (without the quotes). If this isnt the first line of the text
file the application will not load the text file.
Skin files should generally follow this layout;
Header (ie GPS SKINNER)
Fonts
Colours
Page 1
Object 1
Object 2
Page 2
Object 1
Object 2
...
Page X
Object 1
Object 2
etc
The file is read sequentially and hence objects are
considered to be
part of the last page declaration. Fonts and colours are considerd to
be global declarations which span an entire skin file.
Example;
GPS SKINNER
FN|0|Tahoma|18|0|0
CL|0|255|255|255
PG|0|First Page|Tutorial.bmp
TX|This is the first page|12|12|232|22|0|0|C
PG|1|Second Page|Tutorial.bmp
TX|This is the seond page|12|12|232|22|0|0|C
The example skin file above contains 1 font declaration and
1 colour
declaration. The skin also declares two pages which contain one text
object each. Numbers must start at zero for all declarations.
Variables for objects are divided by a pipe symbol (ie "|")
and
generally follow the trend of;
Object Type|Text or Style|Left Co-ordinate|Top
Co-ordinate|Right
Co-ordinate|Bottom Co-ordinate|Option 1|Option 2 etc
The co-ordinates refer to a bounding rectangle for the
object. For
graphical objects this is used to calculate the extents of the object.
Text objects are more forgiving in that they can go over their
bounding rectangle if the text is longer than the area assigned.
Page
Object (PG)
The page object is declared with the text "PG".
Example;
PG|0|First Page|Tutorial.bmp
PG|1|Page 1|1
The object has the following options;
Declaration|Page Number|Page Name|Page Background (image name or colour
number)
The page name can be any text up to 60 characters in
length. The page
background can be any bitmap image or a predefined colour.
When
using an image specify the file name of the image, the image should be
in the same directory as the skin file. When using a colour the
background will be a solid fill using the colour specified.
Font
Object (FN)
The font object is declared with the text "FN".
Example;
FN|0|Tahoma|18|0|0
The object has the following options;
Declaration|Font Number|Font Name|Font Size|Bold
Flag|Italic Flag
The font name can be any installed font on your device. If
you are
unsure what font you have on your device take a look at the fonts
listed in Word Mobile. Additional fonts can be installed to your device
by copying true types fonts from your PC to the \Windows\Fonts
directory on your device (via ActiveSync).
The font size can be any valid font size (in points).
The bold flag specifies if the font is bold or not.
The italic flag specifies if the font is itaic or not.
Colour
Object (CL)
The colour object is declared with the text "CL".
Example;
CL|0|255|255|255
The object has the following options;
Declaration|Colour Number|Red Value|Green
Value|Blue Value
Colours are specified using RGB values. Each colour is
built up using
the red, green and blue components of the colour.
Text
Object (TX)
The text object is declared with the text "TX".
Example;
TX|This is the first page|12|12|232|22|0|0|C
The object has the following options;
Declaration|Text|Left|Top|Right|Bottom|Font Number|Colour
Number|Text
Alignment
The font number is any font number that has been declared
earlier.
The colour number is an colour number that has been
decalred earlier.
The text alignment can be either "L", "C" or "R"
which stand
for left, centre or right justification.
The text can be user text (eg "This is the first page") or
it can be a
system generated text (eg #SPEED_CURRENT)
User text can be any free text except for the pipe (ie "|")
character. There is no word wrapping at the moment.
System text is declared
with a "#" symbol prefix and can be any of the following;
-
#PAGENUM - This is the page number of the page the object
belongs to.
-
#PAGENAME - This is the page name of the page the object
belongs to.
-
#STATUS_GPS - This is the status of the GPS (i.e. GPS is
On/Off).
-
#STATUS_LOG - This is the status of logging (i.e. Logging
is On/Off).
-
#SATELLITES_IN_VIEW - This is the number of
satellites over head that the GPS can "see".
-
#SATELLITES_LOCKED - This is the number of satellites the
GPS has
locked to derive a fix.
-
#PDOP - PDOP is the overall dilution of precison value.
-
#HDOP - HDOP is the horizontal dilution of precison value.
-
#VDOP - PDOP is the vertical dilution of precison value.
-
#FIXMODE - This is the GPS fix mode (NA, 2D, 3D).
-
#TRACK_BEARING - This is the true bearing that the GPS is
moving in.
-
#TRACK_DIRECTION - This is the compass direction that the
GPS is moving
in.
-
#SPEED_CURRENT - This is the current speed in the
selected
unts of
measure (km/h, mph or knots).
-
#SPEED_TOP - This is the maximum speed in the
selected
unts of
measure (km/h, mph or knots). This is remembered between sessions
unless reset by the user using the menu or a hot spot.
-
#SPEED_UNITS - This is the units of measure that are
currently selected
for speed.
-
#SPEED_CURRENT_FULL - This is the full text of the
current speed including the
selected
unts of
measure.
-
#ACCELERATION - This is the current acceleration in m/s2.
-
#ACCELERATION_G - This is the current acceleration
measured in g's (1g
= 9.80665 m/s2).
-
#ACCELERATION_UNITS - This is the units of measure for
acceleration (ie
m/s2).
-
#ELEVATION - This is the altitude above mean sea level in
the selected
units of measure (m or ft).
-
#ELEVATION_UNITS - This is the units of measure for the
elevation units.
-
#ELEVATION_FULL - This is the full text of the current
altitude above mean sea level including
the selected
units of measure.
-
#TIME_UTC - This is the current Coordinated Universal
Time
(UTC) which
is also GMT.
-
#DATE_UTC - This is the current UTC date derived from the
GPS time.
-
#TIME_LOCAL - This is the current local time derived from
the GPS time.
-
#DATE_LOCAL - This is the current local date derived from
the GPS time.
-
#TIME_SUNRISE - This is the calculate sunrise time for
the current
position.
-
#TIME_SUNSET - This is the calculate sunset time for the
current
position.
-
#TRIP_TIME_TOTAL - This is the total time the trip meter
has been
running.
-
#TRIP_TIME_STOPPED - This is the stopped component of the
trip meter
time.
-
#TRIP_TIME_MOVING - This is the moving component of the
trip meter time.
-
#TRIP_DISTANCE - This is the distance for the current
trip.
-
#TRIP_AVERAGE_TOTAL - This is the total average speed for
the trip.
-
#TRIP_AVERAGE_MOVING - This is the moving average speed
of the trip
-
#TRIP_DISTANCE_UNITS - This is the units of measure for
the distance
measure for the trip.
-
#TRIP_TIME_TOTAL_1/2/3/4/5 - This is 1 of 5 independently
activated trip meters showing the total trip time. The independent trip
meters are not activated by default and must be started by using the
corresponding hotspot (i.e. START_TRIP_X).
-
#TRIP_DISTANCE_1/2/3/4/5 - This is 1 of 5 independently
activated trip meters showing the total trip distance. The independent
trip meters are not activated by default and must be started by using
the corresponding hotspot (i.e. START_TRIP_X).
-
#TRIP_AVERAGE_TOTAL_1/2/3/4/5 - This is 1 of 5
independently
activated trip meters showing the average speed for the total trip. The
independent
trip meters are not activated by default and must be started by using
the corresponding hotspot (i.e. START_TRIP_X).
-
#OSGB - This is a ten figure grid reference (e.g. NN 32269 32599) for the current position in terms of the
Ordnance Survey
Great Britain Grid.
-
#OSGB_SHORT - This is a six figure grid
reference (e.g. NN 322 325) for the current position in terms of the
Ordnance Survey
Great Britain Grid.
-
#GRID_LOCATOR - This is the current position in terms of
the Maidenhead
Locator Grid.
-
#LATITUDE_DDD - This is the current latitude expressed as
decimal
degrees.
-
#LATITUDE_DMM - This is the current latitude expressed as
degrees and
decimal minutes.
-
#LATITUDE_DMS - This is the current latitude expressed as
degrees,
minutes and seconds.
-
#LONGITUDE_DDD - This is the current longitude expressed
as decimal
degrees.
-
#LONGITUDE_DMM - This is the current longitude expressed
as degrees and
decimal minutes.
-
#LONGITUDE_DMS - This is the current longitude expressed
as degrees,
minutes and seconds.
-
#WAYPOINT_NAME - This is the name of the current waypont.
-
#WAYPOINT_DISTANCE - This is the distance to the current
waypoint.
-
#WAYPOINT_BEARING - This is the bearing in degrees to the
current waypoint.
-
#WAYPOINT_DIRECTION - This is the direction to the
current waypoint (i.e. N, S, E, W etc)
-
#WAYPOINT_NUMBER - This is the current waypoint number.
-
#WAYPOINT_LATITUDE_DDD - This is the current waypoint
latitude expressed as decimal degrees.
-
#WAYPOINT_LATITUDE_DMM - This is the current waypoint
latitude expressed as degrees and decimal minutes.
-
#WAYPOINT_LATITUDE_DMS - This is the current waypoint
latitude expressed as degrees, minutes and seconds.
-
#WAYPOINT_LONGITUDE_DDD - This is the current waypoint
longitude expressed as decimal degrees.
-
#WAYPOINT_LONGITUDE_DMM - This is the current waypoint
longitude expressed as degrees and decimal minutes.
-
#WAYPOINT_LONGITUDE_DMS - This is the current waypoint
longitude expressed as degrees, minutes and seconds.
-
#WAYPOINT_DISTANCE_UNITS - This is the units of measure
used for the distance to the waypoint.
-
#WAYPOINT_DISTANCE_FULL - This is the distance to the
current waypoint with the selected units of measure.
-
#SPEED_LIMIT_CURRENT - This is the value of the currently
select speed limit.
Hot
Spot Object (HS)
The hot spot object is declared with the text "HS".
Hot spots are areas that generate an action when tapped by
the user such as switching to a different page or resetting the trip
meter.
Example;
HS|PAGE_NEXT|0|0|33|31|0
The object has the following options;
Declaration|Hot Spot Type|Left|Top|Right|Bottom|Hot Spot
Option
Each hot spot allows the perform an action by tapping
anywhere in the
rectangle defined by the object. The declaration is followed by a type
which can be any of the following;
-
PAGE - Switches to the defined page number, the
specific
page number
is defined by the last option.
-
PAGE_NEXT - Switches to the next page.
-
PAGE_PREV - Switches to the previous page.
-
RESET_TRIP - Resets the trip meter.
-
RESET_TOP_SPEED - Resets the top speed.
-
SKIN_LOAD - Opens the dialog toload a new skin file.
-
SKIN_REFRESH - Refreshes the current skin.
-
GPS_TOGGLE - Toggles the GPS connection on or off.
-
SETUP_GPS - Opens the dialog to set up the GPS
connection.
-
SETUP_UNITS - Opens the dialog to set up the units of
measure.
-
EXIT - Exits the application.
-
MENU - Displays the main pop up menu (normally brought up
by pressing the right soft key or clicking on the menu bar).
-
RESET_TRIP_X - Resets an independent trip meter, the
specific
trip number is defined by the hot spot option. Resetting a trip also
deactivates it.
-
START_TRIP_X - Starts an independent trip meter, the
specific trip number is defined by the hot spot option.
-
STOP_TRIP_X - Stops an independent trip meter (does not
reset
the trip), the specific trip number is defined by the hot spot option
-
WAYPOINT_NEXT - Moves the current waypoint forward one
(loops back to the beginning if past the last waypoint).
-
WAYPOINT_PREV - Moves the current waypoint back one
(loops nack to the last waypoint of past the beginning).
-
WAYPOINT_SAVE - Saves the current location as a new
waypoint without user input.
-
WAYPOINT_SAVE_DIALOG - Save the current location a new
waypoint and prompts for a waypoint name.
-
MAP_ZOOM_IN - Zooms in the current map one level.
-
MAP_ZOOM_OUT - Zooms out the current map one level.
-
MAP_REFRESH - Forces a refresh of the current map.
-
SPEED_LIMIT_X - Makes the specified speed limit (using
the hotspot option) the active one.
-
LOG_NEW - Starts a new log file, a prompt will appear if the option to prompt is enabled.
-
LOG_ON - Activates logging.
-
LOG_OFF - Deactivates logging.
-
LOG_TOGGLE - Toggle the logging on or off.
-
SETUP_LOG - Opens the dialog to set up the logging options.
Note: Only the PAGE, TRIP_X and SPEED_LIMIT_X hot spots use
the option flag
at the
present
time. All other hot spots should however include the option declaration
(just add a "|0" to the end of the hot spot definition).
Graphics
Object (GR/RD/GA)
The graphics objects are declared with either of the
following
texts "GR", "RD" or "GA". These stand for graph, radial graph and gauge
respectively. Each graphic shares similar attributes but are obviously
different when displayed.
Example;
GR|ACCELERATION|90|35|230|100|3|3|7|8
RD|ACCELERATION|10|75|85|130|0|0|7|8
GA|ACCELERATION|10|35|85|70|5|0|0|3
The object has the following options;
Declaration (Style)|Type|Left|Top|Right|Bottom|Font
Number|Colour 1|Colour 2|Colour 3
The declaration is also the style of the graphic, which
determines what
the graphic looks like. The type is what the actual graphic will show
in terms of data. It can be any of the following;
-
SATELLITES_LOCKED
-
SATELLITES_IN_VIEW
-
PDOP
-
HDOP
-
VDOP
-
SPEED_CURRENT
-
ELEVATION
-
TRIP_AVERAGE_TOTAL
-
TRIP_AVERAGE_MOVING
-
ACCELERATION
-
DECELERATION
-
DECELERATION_REV (reversed so it can be placed below the
acceleration graph to form a complete acceleration/deceleration graph)
These values are the same as their textual counterparts but
they are
displayed graphically. Each graphic type can display any of these types
of data.
The left, bottom, right and top values determine a bounding
rectangle
for the graphic object. The display of the graphic will be contained
withing this rectangle. The graph and gauge graphics will be fitted to
the extent of the graphic while the smallest dimeniosn (ie width or
height) will form the diamtere of the radial graph.
The three colour are as follows (ie Colour 1|Colour
2|Colour 3);
Graph - Text|Grid Lines|Value Line
Radial Graph -Text|Value Outline|Value Fill
Gauge - Text|Gauge Outline|Gauge Value
Note: For the graph graphic, the height of the rectangle should ideally
be divisible by 4 as this avoids rounding issues which result in the
graph line being slightly offset.
Widget
Object (WG)
The widget objects are declared with the
text "WG". Widgets are unique graphical elements that show information
in a specific manner
Example;
WG|CLOCK|10|70|230|175|3|0|2|3|4
WG|SPEEDO|15|25|225|175|1|0|2|6|5
WG|SATELLITE_SKY_PLOT|15|25|225|175|3|0|0|4|6
WG|SPEED_LIMIT|240|156|315|185|3|1|7|2|5|6
The object has the following options;
Declaration|Type|Left|Top|Right|Bottom|Font Number|Colour
1|Colour 2|Colour 3|Colour 4|Widget Option
The type of the widget is what determines how
the widget looks, the following widget types are currently available;
-
COMPASS
- Displays a compass
-
WAYPOINT_COMPASS - Displays an arrow
style compass which points in the direction of the current
waypoint.
-
CLOCK - Displays an analog clock
showing the local time
-
CLOCK_UTC - Displays an analog
clock showing the Coordinated Universal Time (UTC)
-
SPEEDO
- Displays an analog speedometer
-
ACCELEROMETER
- Displays an simple accelerometer
-
SATELLITE_BARS -
Displays a set of bars indicating statlite recpetion
-
SATELLITE_SKY_PLOT
- Displays a plot of the satellites visible over head
-
ALTIMETER - An aeroplane styled altimeter
-
SPEED_LIMIT -
The font number is any font number that has been declared earlier.
The colour number is an colour number that has been
decalred earlier.
The text alignment is handled automatically by the widget.
The
left, bottom, right and top values determine a bounding
rectangle
for the widget object. The display of the widget will be contained
within this rectangle.
The fours colours are for different aspects of each widget.
In all cases colour 1 will be the colour of the text (and ocassionaly
something else).
Refer to the table below;
Widget Type
|
Colour 1
|
Colour 2
|
Colour 3
|
Colour 4
|
COMPASS
|
Text
|
Outline/Tics
|
North Fill
|
South Fill
|
| WAYPOINT_COMPASS |
Text |
Outline/Tics |
Right Fill |
Left Fill |
CLOCK/CLOCK_UTC
|
Text/Outline/Tics
|
Hour Hand
|
Minute Hand
|
Second Hand
|
SPEEDO
|
Text
|
Outline/Tics
|
Needle Outline
|
Needle Fill
|
ACCELEROMETER
|
Text
|
Acceleration Fill
|
Decceleration Fill
|
Not Used
|
SATELLITE_BARS
|
Text
|
Outline
|
Active Satellite Fill
|
Non-active Satellite Fill
|
SATELLITE_SKY_PLOT
|
Text
|
Outline
|
Active Satellite Fill
|
Non-active Satellite Fill
|
ALTIMETER
|
Text/Outline/Tics
|
10 000's Fill
|
1000's Fill
|
100's Fill
|
SPEED_LIMIT
|
Text
|
Outline
|
Unselected Limit Fill
|
Selected Limit Fill
|
The widget option is not required for most widgets but is needed for
the SPEED_LIMIT widget.
Map Object (MP)
GPS Skinner can utilise internet mapping services (Google
only at
the moment) to display a map of your location. Maps are declated with
the text "MP".
Example;
MP|GOOGLE_MOBILE|0|0|200|200|12|3|6|10
MP|GOOGLE_ROAD|0|0|100|100|12|3|6|10
The object has the following options;
Declaration|Type|Left|Top|Right|Bottom|Zoom Level|Marker Colour|Marker
Radius|Refresh Distance (in pixels)
The type is map style. It can be any of the following;
GOOGLE_MOBILE
|
 |
GOOGLE_ROAD
|
 |
GOOGLE_SATELLITE
|
 |
GOOGLE_TERRAIN
|
 |
GOOGLE_HYBRID
|
 |
The marker is your current location in relation to the map
(see red
dot in picture below). Initially it will be in the centre of the map
but will move as your location changes. When the marker reaches the
edge of the map the map will be refreshed and the marker will be placed
in the centre of the new map.
The map is refreshed automatically when the marker is less
than the refresh distance (measured in pixels) from any edge of the
map. The default is 10 pixels. Thus a 200x200 pixel map may initially
be a bigger download it may result in less download traffic if the
marker stays within the bounds of the map. Also using a smaller zoom
value will keep the marker on the map for longer since the map covers a
larger region.
Note: You must have an open internet connection on your
device in
order to use the map object. The maps do not work in a disconnected
fashion as this violates the Google Maps terms of use. At this stage
the software does not open an internet connection automatically.
Note: The Google Maps terms of use dicate that for a single viewer
(i.e. per device) you cannot
request more than 1000 maps per day. If you exceed this quota you will
be shown this image instead.
Advanced
Options
GPS Skinner has several advanced options that can be used to
customise the application even further through the skin file. Options
are declared at the top of the skin file where fonts and colours are
declared. Options are declated with the text "OP".
Example;
OP|FULLSCREEN
OP|MIRRORSCREEN
OP|NOMENU
The following advanced options are currently
available;
-
FULLSCREEN - The application will be full screen
and the"Start" bar at the top of the screen will be hidden.
-
MIRRORSCREEN - Mirrors the display (for heads up
display usage).
-
NOMENU - The menu bar normally along the bottom will not
be displayed.
-
ROUNDSPEED - The speed readout associated with the
#SPEED_CURRENT text item will be rounded to an integer value.
-
AUTOSCROLL - The skin page will automatically scroll
after 15 seconds.
-
ROUNDTRIP - All trip distances will be rounded to 1
decimal place (instead of 3).
-
NOANIMATION - Turns the page transition animation off.
-
NOPOPUPMENU - Turns the popup menu off (use with
caution!!!).
-
NOSOUNDS - Turns all sounds/warnings off.
-
PADFULLTEXT - Adds a space between numbers and text for
text
objects such as #SPEED_CURRENT_FULL (e.g. 100km/h becomes 100 km/h).
Note: The NOMENU option should be used with caution as
settings
cannot be
accessed or the application cannot be exited if no alternative hot
spots are set up to provide this functionality.
Note: As of version 1.4 you
can bring up the popup menu by using the tap-n-hold technique or
pressing zero on the device key pad. This ensures you can always exit
the application even if the menu can be accessed through the menu bar
(unless the NOPOPUPMENU has been used).
Note: As of version 1.1.0 all options are reset when a new skin is
loaded, hence advanced options are now skin specific. This includes the
switching to/from FULLSCREEN mode.
Limitations
GPS Skinner is currently limited to 15 Pages per skin file.
Each page can however contain;
-
30 text objects
-
10 widgets objects
-
10 graphical objects
-
15 hot spot objects
- 1 map object