Showing posts with label cab view. Show all posts
Showing posts with label cab view. Show all posts

2021-11-27

Android Cab control

At times I seem to get fixated on making a cab view control and to date I have made five such cab controls, each time with different technology, and each time it gets a bit better.


My first effort was built into the train control software.


Then I got an HP PDA device that had a wifi connection so I wrote a program that ran on that.


Then I made one that would display in a browser. In this version, I managed to superimpose signals showing the current signal aspect into the image.


Then I made one that would run on a phone using Blynk technology. It did not allow the flexibility to position the signal in the image so I displayed signals to the side, but at least it was now on my phone.


And now, I have made one that runs on a phone (and Windows) using AppGameKit

This version has a better speed display, in addition to the track speed limit and current desired speed of the train, speeds above the speed limit of the (lead) locomotive are shown in red. The speedometer scale also changes dynamically according to the maximum speed of the current locomotive.

As before, all available digital functions can be invoked by buttons, but now the buttons also make a realistic click sound. It also superimposes signals onto the track image. When one touches any control in the cab, the image outside the window goes out of focus for half a second to simulate the depth of field of the driver's vision.

It now also features a cab window frame with windscreen wiper.

The Locomotive name and current odometer is also displayed. The odometer changes as the train travels about and is an actual distance covered by that model, accumulated over the years.


When the signal changes it shows immediately.


A new feature is the ambient light of the track image can also be simulated from bright and sunny to pitch dark. The locomotive headlights light up the image too! Here it is getting somewhat dark and the loco lights are on.


In total darkness and no headlamps!  The ambient light data comes from the layout control software which will relay the current ambient light of the layout room. So, as a sunset occurs, we see sunset colors in the cab control on the phone!

(I plan on perhaps not having the reflective stripes show up without the headlamps.)


When inside an underground station that has its own lighting, the image is of course not darkened.

Oh, and it can also announce destinations etc. in German. When the train being viewed is dispatched there is a voice announcement stating that the driver has permission to start and what the destination is. If a trip is cancelled, that is also announced. 

When the train has been dispatched, the desired speed is indicated with a yellow marker on the speedometer, and also presented (below the digital speed indicator) in yellow. 84Km/h in this example:

As before, it can also:

  • Turn layout track power on and off
  • Disable unexpected train alerts
  • Pick any train and dispatch it to any destination.


  • Trigger any event in the train control software
  • Set any accessory address to red/green
  • Monitor any sensor address

The track images are cached on the phone. If the software is directed to use an image it does not have, it fetches the image from the Bw software. It can also request all the images for all tracks and caches those for instant loading as needed.

It is based on the RemoteSign command set, communicating with my Bw train software over the network.

I might add the Buchfahrplan information display so the person driving the train sees the prototypical journey information as they progress along their trip.

Update

I have added a throttle so one can control the acceleration and braking of the train.

I have also added Indusi, Sifa and AFB features.

The Indusi system warns the locomotive driver about upcoming signals and they have to acknowledge these warning by pressing an acknowledgement within 30 seconds, and bring the train speed below a certain threshold within 20 seconds. If these conditions are not met the emergency brakes are applied. The allowable speed for the train after passing 1000Hz Indusi transponder is also indicated with the prototypical flashing. The system automatically sets the Indusi category (which in turn governs the speed limits allowed) based on the train definition in the main layout control software.

Here an ICE has passed a 1000Hz Indusi magnet and has 20 seconds to get below 85km/h (and is only doing 70)


Sifa is an additional driver attentiveness system that requires a button to be pressed periodically. If the button is not pressed, then a verbal warning is made in the cab and if the Sifa button is still not actuated, the emergency brakes are applied.

The AFB (Automatische Fahr- und Bremssteuerung) mode can be switched on and off. When it is on, the system controls the speed of the train itself. When it is off, you have to set the throttle/brake control manually to regulate the speed of the train.

Here an ICE is coasting along at 107km/h with AFB off.


A train with the lowest speed category in a hidden area awaiting a green signal


An S-Bahn train in the middle category:






2019-03-12

Mobile phone layout control app

I have always liked the idea of being able to control my layout from anywhere in the room. As technology has changed over the years I have implemented this capability in various forms.

First there was a PDA version (2005) that worked very well, but the hardware became redundant.
I then redid it using HTTP so it could be controlled from any browser. This works pretty well but I never got around to making the images update without doing a full screen refresh. I also added the capability to control things by voice, but that is not conducive to cab control.

Now that I have found ESP8266 and Blynk technology I have implemented a third system that runs on Android or iOS which I present here.

There are 6 tabs in the app and the most interesting tab is of course:

Cab control tab


2016-01-19

A trip around the layout

 Here is a video of a trip around the layout.
TIP: switch to HD mode if you can!

2011-01-23

Signal aspect display in cabview

Some years ago I added the functionality to display signals that the train is going past, to be displayed in the cab view. This is of course needed when driving a train manually using the cab view - for the same reason that the real train driver needs to see the signals... below are some examples of how signals are displayed...

Here the train sits at an Hp00 signal

2005-07-27

Cab views

I have implemented a new feature in my software - it provides the view of the track for any train on the layout and the view updates itself as the train travels about. As the train reaches each s88 detection point along the track, a corresponding image is displayed on the screen. Here is a sample: