This document is a public disclosure of the described method and architecture.
The purpose of publication is to document the existence and operation of the system as prior art.
No patent rights are claimed by this publication.
This document describes the design and operating principles of the parallel GPX trigger mechanism used in the T-Guide system.
Version: 1.0
System: T-Guide route-based guided audio compiler
Companion document: T-Guide Audio Stitcher — Method Description
A GPS-triggered audio playback system places trigger zones — fixed polyline segments on a route — each associated with exactly one audio file in the runtime manifest. This one-to-one relationship is insufficient when a single geographic position must select among multiple audio variants based on a condition that is only known at the moment of the passenger’s journey, such as the current ambient temperature, the calendar season, or the day of the year.
Compiling a separate trigger zone for each variant and activating the relevant one at runtime is not viable because:
(a) The device cannot know in advance which file will be selected, so it cannot pre-load or pre-position a specific trigger zone.
(b) Multiple overlapping trigger zones at the same position, each referencing a different file, create ambiguous dispatch: the device would fire all of them simultaneously.
The parallel GPX trigger mechanism resolves this by splitting compile-time and runtime responsibilities:
The primary manifest remains a simple sequential list. Conditional complexity is entirely contained within the parallel manifest and the runtime selection logic.
| Term | Definition |
|---|---|
| Trigger zone | A GPS polyline segment on the route. When the device’s GPS position enters the zone, playback is initiated. |
| Condition group | A set of audio files sharing a trigger position that are mutually exclusive at runtime. |
| Condition key | The dimension on which runtime selection is made: temp_c, season, or day_of_year. |
| Condition value | The specific value a candidate file matches (e.g. "14", "summer", "135_319"). |
| Sentinel key | The sound_file value written to the primary manifest for a condition group. Format: {theme}_mech. |
| Primary manifest | The guiding CSV consumed by the runtime device; one row per audio trigger. |
| Parallel manifest | Secondary CSV listing all conditional candidates with their selection metadata. |
| Branch A | Placement mode: the entire theme is a condition group — all files share one trigger position. |
| Branch B | Placement mode: a sequential theme where one sequence position contains a parallel mini-group of conditional variants, while other positions are unconditional. |
The compiler identifies conditional files by their filename pattern. Each filename is matched against a priority-ordered rule set (described fully in the companion document, §5.1). A matched file produces a classification record with four fields:
theme: normalised string identifierseq: integer sequence position within the themecondition_key: "temp_c" |
"season" |
"day_of_year" |
"" (empty = unconditional) |
condition_value: string representation of the matched condition valueCondition metadata is encoded entirely in the filename. No sidecar files are required.
Branch A — Full parallel theme
A theme is declared as a full parallel group via a condition configuration CSV. The entry specifies the theme identifier, condition key, and condition data source. During placement, all files in the theme are assigned to a single trigger position: all share the same trigger_start and trigger_end values on the route. Each file receives its own record in the parallel manifest; the group is identified by (theme, trigger_start).
Branch B — Sequential theme with conditional mini-group
The theme is not declared as a full parallel group. Files are placed in ascending sequence number order. When consecutive files share the same sequence number and all carry a non-empty condition key, they form a parallel mini-group:
This branch allows a theme to contain both a fixed unconditional component (an intro that always plays) and a conditional component (an outro selected at runtime by condition), placed at different positions on the route.
The manifest writer iterates placed blocks in trigger-position order. On encountering the first block from a condition group — identified by a non-empty condition key — it:
sound_file = "{theme}_mech".The trigger GPX reference in that row points to the shared trigger zone (since all variants in the group share the same zone, any is equivalent).
Unconditional blocks (empty condition key) are emitted as normal rows referencing their actual audio filename.
One trigger zone GPX file is written per placed block, including every variant in a condition group. For conditional blocks, the GPX file’s metadata description carries the condition key and condition value as structured annotations:
condition_key=temp_c|condition_value=14
For Branch A, all variant GPX files are geometrically identical (same polyline segment, same position on route). They differ only in filename and description metadata. The runtime device does not load per-variant GPX files directly; the primary manifest references only the sentinel, and the parallel manifest carries the candidate list.
The parallel manifest CSV is written after trigger zone generation. Every placed block with a non-empty condition key is included.
Schema:
| Column | Type | Description |
|---|---|---|
| group_id | integer | Shared by all files in the same condition group |
| section_name | string | Route segment identifier |
| mp3 | string | Audio filename (basename) |
| condition_key | string | temp_c | season | day_of_year |
| condition_value | string | Matched condition value |
| condition_source | string | Data source the device queries: weather_api | calendar |
| trigger_s | float | Route distance (metres) to trigger zone start |
| trigger_end_s | float | Route distance (metres) to trigger zone end |
| audio_end_s | float | Route distance (metres) where audio finishes playing |
| duration_s | float | Audio clip length in seconds |
| trigger_gpx | string | Filename of trigger zone GPX |
group_id is assigned by enumerating unique (theme, trigger_s) pairs in row-sorted order. Rows are sorted by trigger position, then theme, then condition value.
On session initialisation, the runtime device reads the primary manifest and partitions rows into two pools:
sound_file does not end with _mech. Loaded as standard trigger zones; playback is initiated unconditionally on zone entry.sound_file ends with _mech. The device loads the referenced trigger zone GPX and registers it with the conditional trigger handler.For each sentinel row, the device reads the parallel manifest and extracts all rows whose theme matches (derived by removing the _mech suffix from the sentinel key). This produces the candidate list for runtime selection.
Multiple sentinel polylines may be active simultaneously on the same route segment. Each is tracked independently.
The conditional trigger handler maintains a traversal window for each sentinel polyline: a sliding buffer of recent GPS fixes. A trigger fires when a sufficient number of consecutive fixes project onto the trigger polyline within a threshold approach distance. This windowed detection reduces false positives caused by GPS position jitter.
When a trigger fires, the index of the matching sentinel polyline is recorded so that the correct theme and candidate list are dispatched.
When a sentinel trigger fires, the handler dispatches based on the condition_key associated with the sentinel’s candidates:
temp_c — Ambient temperature
The candidate list is searched for the best match using the following rules:
|queried_temp − candidate_int|.sub_N) match when the queried temperature is below the boundary integer N.N_up) match when the queried temperature is above the integer N.season — Calendar season
summer, winter, spring, autumn, rainy, dry.condition_value.day_of_year — Day-of-year range
condition_value is parsed as "START_END" (two integers separated by _).[START, END) contains the current day is selected.If the parallel manifest lookup fails or returns no candidates for a sentinel (manifest absent, network failure, format mismatch), the implementation should log a diagnostic and suppress playback for that trigger. Playback of an incorrect or arbitrary file in place of a missing result is not acceptable behaviour.
The resolved audio filename is used to load the corresponding file from the device’s asset bundle. The file plays once. A reference to the active player is retained so that playback can be interrupted if a higher-priority event occurs (e.g. navigation instruction, route exit).
temp_c — Ambient temperatureg_THEME_N.mp3 — matches temperature value N (single-chunk themes)g_THEME_sub_N.mp3 — matches temperatures below Ng_THEME_N_up.mp3 — matches temperatures above Ng_THEME_SEQ_N.mp3 — seq=SEQ, matches N (multi-chunk themes)g_THEME_SEQ_sub_N.mp3 — seq=SEQ, matches below Ng_THEME_SEQ_N_up.mp3 — seq=SEQ, matches above N"14"), "sub_N", "N_up".season — Calendar seasonsummer, winter, spring, autumn, rainy, dry.g_THEME_SEASON.mp3day_of_year — Day-of-year rangeg_THEME_SEQ_START_END.mp3 — three trailing integers (sequence, range start, range end)."START_END" e.g. "135_319".Several filename patterns share structural similarity (trailing integers). The parser applies rules in strict priority order to avoid misclassification.
Key ambiguities and their resolution:
| Pattern A | Pattern B | Resolution |
|---|---|---|
g_THEME_SEQ_TEMPVAL.mp3 — 2 trailing integers |
g_THEME_SEQ_START_END.mp3 — 3 trailing integers |
The day-of-year rule (3 integers) is checked before the temperature-chunk rule (2 integers). |
g_THEME_SEQ_sub_N.mp3 — chunked boundary sub |
g_THEME_sub_N.mp3 — plain boundary sub (SEQ absorbed into theme name) |
Chunked boundary rules are checked before plain boundary rules. |
g_THEME_N.mp3 — single trailing integer, seq=N |
g_THEME_SEQ_TEMPVAL.mp3 — two trailing integers |
A file with a single trailing integer matches the plain numbered rule; two trailing integers match the temperature-chunk rule. These are structurally unambiguous. |
Complete priority order:
g_THEME_SEASON.mp3g_THEME_SEQ_sub_N.mp3g_THEME_SEQ_N_up.mp3g_THEME_sub_N.mp3g_THEME_N_up.mp3g_THEME_SEQ_START_END.mp3 (3 trailing integers)g_THEME_SEQ_TEMPVAL.mp3 (2 trailing integers)g_THEME_N.mp3 (1 trailing integer)g_THEME.mp3Scenario: Theme weather_commentary is declared in the condition group configuration with condition_key=temp_c. The audio library contains one file per integer degree Celsius across an expected temperature range, plus below-range and above-range boundary files — 22 files total.
Compile-time result:
..., t1_zone.gpx, weather_commentary_mech, ,
group_id=0, each with a distinct condition_value.Runtime at measured temperature 14 °C:
condition_value="14".Scenario: Theme contextual_commentary is not in the condition group configuration. The audio library contains:
g_contextual_commentary_1.mp3 seq=1, no condition
g_contextual_commentary_2_13.mp3 seq=2, condition_value="13"
g_contextual_commentary_2_14.mp3 seq=2, condition_value="14"
g_contextual_commentary_2_15.mp3 seq=2, condition_value="15"
g_contextual_commentary_2_16.mp3 seq=2, condition_value="16"
Compile-time result:
g_contextual_commentary_1.mp3 — placed as a standard sequential block.seq=2 variants as a parallel mini-group, all sharing T2 geometry...., t1_zone.gpx, g_contextual_commentary_1, ,
..., t2_zone.gpx, contextual_commentary_mech, ,
group_id=1, condition_key=temp_c.Runtime at 15 °C:
g_contextual_commentary_1.mp3 plays (unconditional).g_contextual_commentary_2_15.mp3 plays.The passenger hears the unconditional intro at T1, then the temperature-matched outro at T2.
condition_key. Compound conditions (e.g. temperature AND season simultaneously) are not supported by the current manifest schema.temp_c: When the queried temperature falls equidistant between two candidate values, the lower value is selected. This behaviour is fixed and not configurable per theme._mech suffix on the sound_file value. An audio file with a name ending in _mech would be incorrectly intercepted as a sentinel. The suffix is reserved for system use.START > END) is not handled. The range produces no match. Ranges must be expressed within a single calendar year.| Version | Description |
|---|---|
| 1.0 | Initial public disclosure |