diff --git a/api/.gitkeep b/api/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docs/spec.md b/docs/spec.md index b70db44..3f9f309 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -13,7 +13,7 @@ Aspirationally, it should be able to track multiple trains at any one time, with ## Data sources The Project will source data from multiple Network Rail Open Data Feeds: -* [Train Movements](https://wiki.openraildata.com/index.php?title=Train_Movements) or [TD](https://wiki.openraildata.com/index.php?title=TD) feed (which one is TBC) will be used to retrieve the real-time location of trains on the Network Rail network. +* [Train Movements](https://wiki.openraildata.com/index.php?title=Train_Movements) will be used to retrieve the real-time location of trains on the Network Rail network. * [SCHEDULE](https://wiki.openraildata.com/index.php?title=SCHEDULE) will be used to retrieve train scheduling information. Additionally, the project will make use of the [OpenStreeMap Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) to source data about track layout. It may also be used to find station locations. @@ -25,3 +25,31 @@ In addition to a Redis database, there are three main components to the project: * A Python API server that powers the frontend application * The frontend JavaScript application +## Redis Database + +The Redis database will store: +* Real-time train location by train ID +* Schedule information +* TIPLOC information (see below) + +## Data sources + +### SCHEDULE + +Authoritatitve scheduling information can be retrieved from Network Rail by downloading a single file. This will be parsed and loaded into the Redis database. + +The downloads contain information about schedules and TIPLOCs, where a TIPLOC is an identifier for a physical location on the rail network. Every schedule contains timings for when a given service will pass through a given set of TIPLOCs. + +Each schedule is identified with a so-called "headcode". + +### Train Movements + +The Train Movements (herein referred to as TM) feed provides real-time updates as to where a train is. It emits messages of different types, documented below: + +![](https://wiki.openraildata.com/images/f/fb/Trust_fsm.png) + +`Activation` messages link a train ID to a headcode. No other messages types do this, so if the activation message is missed we will be unable to adequately understand any other messages relating to that train. + +### TIPLOC Information + +TIPLOCs can be mapped to real-world Northings and Eastings and hence then used as \ No newline at end of file diff --git a/feedprocessor/.gitkeep b/feedprocessor/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/web/.gitkeep b/web/.gitkeep new file mode 100644 index 0000000..e69de29