CS 452/652 Fall 2019 - Lecture 14
October 4, 2019
- train control assignments need velocity information
- preparatory measurements can be taken without full kernel
- start early before the tracks fill up!
- default turnout setting - use trap loops: small (left/right), medium, large
- middle turnouts: do not set to C/C! (can lead to derailment)
- location, distance
- millimetre granularity sufficient
- longest short path (without reverse): ~10.5m
⇒ 32-bit integer sufficient
- keep in mind: size of train, location of pickup!
- fastest clock: 508 kHz
- 32 bit can represent > 2 hours ⇒ sufficient
- no floating point!
- if necessary, use fixed-point integer instead
- if necessary, use 64-bit 'long long' integers to hold temporary results during computation
Speed / Velocity
- speed: train setting 0-14
- velocity: actual travel distance per time
- non-linear with speed
- different for different trains
- different for different parts of track?
- changes over time (wear and tear)
- handle at least 1. and 2. by measuring and storing velocity data
- offline experiments → start now!
- continuous online measurements?
- data import/export?
- assume ~70ms continuous sensor polling loop
- unknown (hopefully constant) measurement error
- train controller box
- signal latency
- variable measurement error: sensor trigger relative to polling loop → 0-70ms
- processing delays? later... (should be small with dedicated measurement program)
- velocity = distance / (stop - start)
- constant error in 'stop' and 'start' cancels out
- maximum variable error: up to 2x 70ms = 140ms
- at speed of 0.5m/sec, this corresponds 7cm
- use averaging (and deviations) or min/max boundaries to deal with uncertainty