public-transport/friendly-public-transport-format

add vehicle type

juliuste opened this issue · 2 comments

As far as I can tell, the only major type of public transformation information we are currently completely unable to express in FPTF is vehicles and their location. I therefore propose adding a vehicle type to FPTF@2 which could look as follows:

{
    type: 'vehicle', // required
    id: '123456', // required
    location: { // optional
        type: 'location',
        longitude: 52.5,
        latitude: 13.2
    },
    accessible: true, // barrier-free (e.g. for wheelchair users), optional
    model: '485' // model information, e.g. "Deutsche Bahn, Baureihe 485", optional
}

Note that this makes much more sense if we actually implement #43 in FPTF@2 because updating vehicle location could then be done by simply publishing more recent vehicle objects sharing the same id, indicating changed position information.

Opinions? 😄