Tomacco

Docs Operation reference gpx operations

gpx operations#

3 operations. Generated from assets/operations.json; all areas.

On this page (3)

gpx.inspect#

Read a GPX route

Read a GPX file and say what is in it before playing it: the points (track points, else route points, else waypoints), counts, bounds, distance, duration and average speed where the points carry times, how untimed points are played (document order at a fixed interval), and which devices playback reaches. A DOCTYPE or entity declaration is refused, files over 16 MiB and routes over 200,000 points too. With device it says whether that device takes a route.

Annotations: read-only, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
pathstringyesnon-empty; Absolute path of the .gpx file
devicestringnon-empty; A device to check playback support for
tomaccoctl call gpx.inspect '{"path":"<path>"}'

gpx.play#

Play a GPX route

Play a route on an Android emulator's location as a durable job: each point goes to the emulator console as a geo fix, timed points wait the recorded time between them divided by speed, untimed points wait interval_ms divided by speed, loop starts again at the end. job.send with pause and resume holds and continues playback, job.send stop ends it keeping the last fix, job.cancel ends it too; gpx.status reads where it is. The emulator does not report its fix, so the location before playback is unknown and is not restored (baseline.known false). A physical Android device or an iPhone answers gpx_unsupported: nothing is wired to set their location.

Annotations: writes, not idempotent, open world.

ArgumentTypeRequiredDefaultDetails
devicestringyesnon-empty; Emulator serial from device.list, such as emulator-5554
pathstringyesnon-empty; Absolute path of the .gpx file
speednumber10.1 to 100; Playback speed multiplier
interval_msinteger1000100 to 60000; Time between untimed points before speed
loopbooleanfalseStart again at the end until stopped
start_indexinteger00 to 200000; The point to start at
tomaccoctl call gpx.play '{"device":"<device>","path":"<path>"}'

gpx.status#

Route playback status

Where a playback started by gpx.play is: the job's state and the last fix sent (index, total, lap, latitude, longitude), or paused, stopped or finished.

Annotations: read-only, idempotent, closed world.

ArgumentTypeRequiredDefaultDetails
job_idstringyesmatching ^[0-9a-f]{32}$; The job gpx.play answered
tomaccoctl call gpx.status '{"job_id":"<job_id>"}'

View this page as Markdown on GitHub