Preliminaries
Administrative stuff
Get all administrative things out of the way. Set up your working environment. Do this carefully! You do not want to waste time with this kind of stuff later on.
To get yourself running create a stash account and check out the git repository of the railway project (summer term 2019). Remember that you need a valid ssh key to work with stash. Add your public key to your stash/confluence account.
If you have trouble using git ask a supervisor for help!
Railway layout
Get familiar with the railway. Read the technical documentation and understand the track layout scheme.
- Technical Documentation: http://www.informatik.uni-kiel.de/~railway/
- Kickoff Talk (2014): Slides
Tasks
T1A1: Important Thoughts
Make sure you know why the railway installation is a) a real-time system, b) an embedded system, and c) a safety-critical system.
T1A2: C Interface
Since you have already checked out the project's repository, you also downloaded the c interface of the railway installation. Look inside the railway folder inside your local repository clone. You will find example controller. Use this stub to create your own railway controller.
Write a .c program that implements a simple railway controler. Use the interface for the simulation and start your control with the modelGUI. The controler should work as follows:
- The train stationed at KH_ST_1 should travel to IC_ST_1 with a speed of 60 and against the main travel direction.
- Upon entering the IC station the speed should be reduced to 20.
- Once the train reached its target platform, stop it (with brakes) and wait for 5 seconds.
- Subsequently, the train should return to its home platform at KH_ST_1 (without changing its direction) with a speed of 60.
- Equivalent to the IC station the train should reduce its speed when entering the KH station and wait for 5 seconds when its platform is reached.
- Eventually, the cycle starts again.
Before writing the c code make a plan how to achieve the task. Which tracks and point switches must be set when. Eventually, test your controller with the simulation environment and the modelGUI.
IMPORTANT: In order to run the controller properly (with its configuration file) you must execute it from its parent directory, i.e., ./Executables/SampleController!
T1A3: Reality vs. Simulation
Subsequent to fixing superfluous bugs (in A2), what can you observe? Additionally list all differences that you expect to exist between the simulation and the real model railway. Therefore inspect the railway documentation and experiment with the simulation (sources).