Skip to content

derhuerst/record-tgv-movement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

record-tgv-movement

Record the movement of any TGV using the on-board WiFi.

npm version ISC-licensed chat with me on Gitter support me on Patreon

There is more than one kind of WiFi portal in TGV trains, and they have slightly different APIs:

record-tgv-movement tries to detect which portal you're connected to: It tries to connect to each portal using the respective client (see Related), and the first to succeed will be used from then on.

Installation

npm install -g record-tgv-movement

Or just use npx:

npx record-tgv-movement >file.ndjson

Usage

Usage:
    record-tgv-movement >file.ndjson

The JSON format matches record-ice-movement where possible:

{
	"ok": true,
	"speed": 36.486,
	"latitude": 47.743205,
	"longitude": 7.346025,
	"heading": 220.3,
	"precision": 10,
	"serverTime": 1568473509000,
	"clientTime": 1568473510187
}

Related

Contributing

If you have a question or have difficulties using record-tgv-movement, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.