Ghost GPX files and ghost display settings can be defined in a
JSON file.
Overview
- Defined in a JSON file
- One JSON file is one ghost setting
- Multiple GPX files can be loaded together as ghosts
- The base GPX is the currently opened GPX
- Up to 9 ghosts can be loaded
| Item |
Description |
| Format |
JSON |
| Character encoding |
UTF-8 (without BOM) |
| Key names |
Case-insensitive |
Root Structure -
JSON Keys (Top Level)
| Item |
Type |
Required |
Description |
| FileType |
String |
Yes |
File type identifier |
| Version |
Integer |
Yes |
Format version |
| Settings |
Object |
- |
Common ghost settings |
| Ghosts |
Array |
Yes |
Ghost GPX definition array |
Item Specification
| Item |
Type |
Required |
Value / Description |
If omitted |
| FileType |
String |
Yes |
"TurboGPX.Ghost" |
- |
| Version |
Integer |
Yes |
1 |
- |
| Settings |
Object |
- |
Common ghost settings |
Default values are used |
| Ghosts |
Array |
Yes |
Array of ghost GPX definitions |
- |
Settings Element
Specification
Settings is an Object.
| Item |
Type |
Required |
Description |
If omitted |
| UseRawStart |
Boolean |
- |
Treat the first point of the ghost GPX as the start
reference |
false |
| InterpolateCrossing |
Boolean |
- |
Use line crossing interpolation |
false |
| Hud |
Object |
- |
Ghost HUD settings |
No HUD items |
| StartLine |
Object |
- |
Start line settings |
Disabled |
| EndLine |
Object |
- |
End line settings |
Disabled |
Hud Element Specification
Hud is defined inside Settings.
| Item |
Type |
Required |
Description |
If omitted |
| Position |
String / Integer |
- |
Display position of Ghost HUD |
Current UI setting is kept |
| Items |
Array |
- |
Items to display in Ghost HUD |
No displayed items |
Position
| Value |
Description |
"TopLeft" |
Top left |
"BottomLeft" |
Bottom left |
"TopRight" |
Top right |
"BottomRight" |
Bottom right |
Items
| Item |
Description |
LATI |
Ghost latitude |
LONG |
Ghost longitude |
ELEV |
Ghost elevation |
SPED |
Ghost speed |
DIST |
Ghost distance |
HEAD |
Ghost heading |
TYPE |
Data type |
EDIF |
Elevation difference |
SDIF |
Speed difference |
TDIF |
Time difference |
DDIF |
Distance difference |
PDIF |
Position difference |
DST |
Remaining distance |
DSTB |
Base GPX remaining distance |
DSTG |
Ghost GPX remaining distance |
DSTB/G |
Base GPX / Ghost GPX remaining distance |
TIM |
Remaining time |
TIMB |
Base GPX remaining time |
TIMG |
Ghost GPX remaining time |
TIMB/G |
Base GPX / Ghost GPX remaining time |
Hud Notes
- Unknown items in
Items are ignored
- If
Items is omitted, Ghost HUD has no display
items
- For multi-ghost, only the first selected HUD item is displayed
in multi display
StartLine /
EndLine Element Specification
StartLine and EndLine are defined
inside Settings.
| Item |
Type |
Required |
Description |
If omitted |
| Enabled |
Boolean |
- |
Enable the line |
false |
| P1 |
Object |
Required when Enabled=true |
Line start point |
- |
| P2 |
Object |
Required when Enabled=true |
Line end point |
- |
P1 / P2 Element
Specification
P1 and P2 are Objects.
| Item |
Type |
Required |
Description |
| Lat |
Number |
Yes |
Latitude |
| Lon |
Number |
Yes |
Longitude |
StartLine / EndLine Notes
- If
Enabled is false, the line is
disabled
- If
Enabled is omitted, the line is disabled
- If
Enabled is true, P1
and P2 are required
P1.Lat, P1.Lon, P2.Lat,
and P2.Lon are required
EndLine is treated as the finish line in Turbo
GPX
Ghosts Element
Specification
Each element in Ghosts is an Object.
| Item |
Type |
Required |
Description |
If omitted |
| Enabled |
Boolean |
- |
Use this ghost |
true |
| GpxFileName |
String |
Required when Enabled=true |
Absolute path of the ghost GPX file |
Empty string |
| CursorFolder |
String |
- |
Ghost marker image folder |
Empty string |
| CursorOpacity |
Integer |
- |
Ghost marker opacity |
128 |
| ShowCursor |
Boolean |
- |
Show ghost marker |
false |
| ShowTrack |
Boolean |
- |
Show ghost track |
false |
GpxFileName
Specify the GPX file to use as the ghost in
GpxFileName.
| Condition |
Description |
| Path format |
Absolute path only |
| Relative path |
Not supported |
| File name only |
Not supported |
| File existence check |
Checked during loading |
In Windows paths, write \ as \\.
Example:
"C:\\Users\\user\\Documents\\ghost_01.gpx"
Sample
{
"FileType": "TurboGPX.Ghost",
"Version": 1,
"Settings": {
"UseRawStart": false,
"InterpolateCrossing": false,
"Hud": {
"Position": "RightTop",
"Items": [
"PDIF",
"DDIF",
"TDIF"
]
},
"StartLine": {
"Enabled": true,
"P1": {
"Lat": 35.681236,
"Lon": 139.767125
},
"P2": {
"Lat": 35.681500,
"Lon": 139.767500
}
},
"EndLine": {
"Enabled": true,
"P1": {
"Lat": 35.682000,
"Lon": 139.768000
},
"P2": {
"Lat": 35.682300,
"Lon": 139.768300
}
}
},
"Ghosts": [
{
"Enabled": true,
"GpxFileName": "C:\\Users\\wgs\\gpx\\ghost_01.gpx",
"CursorFolder": "C:\\Users\\wgs\\gpx\\pins\\ghost_blue",
"CursorOpacity": 128,
"ShowCursor": true,
"ShowTrack": true
},
{
"Enabled": true,
"GpxFileName": "C:\\Users\\wgs\\gpx\\ghost_02.gpx",
"CursorFolder": "C:\\Users\\wgs\\gpx\\pins\\ghost_red",
"CursorOpacity": 128,
"ShowCursor": true,
"ShowTrack": true
}
]
}