motis-project / motis

Intermodal Mobility Information System
https://motis-project.de
MIT License
209 stars 47 forks source link

Differences in documentation and code for `clasz` field #219

Closed luckyhandler closed 2 years ago

luckyhandler commented 2 years ago

Looking at the source code for the mapping of the clasz field I see a different mapping then in the documentation. The source code:

enum class service_class : service_class_t {
  AIR = 0,
  ICE = 1,
  IC = 2,
  COACH = 3,
  N = 4,
  RE = 5,
  RB = 6,
  S = 7,
  U = 8,
  STR = 9,
  BUS = 10,
  SHIP = 11,
  OTHER = 12,
  NUM_CLASSES
};

the documentation

0: long distance high speed trains (e.g. TGV)
1: long distance inter city trains
2: long distance night trains
3: regional express trains
4: regional trains
5: metro trains
6: subway trains
7: trams
8: buses
9: other (flights, ferries, taxis, etc.)

Could you clarify what the correct mapping is?

felixguendling commented 2 years ago

Thanks for noticing!

Fixed: https://github.com/motis-project/motis-page/commit/a97236314dc9719e786b682c9eb587b55bc58c90

The code is correct, the documentation was out-of-date.