ZephyrCab: Plans for Fall

trains Programming Open Source ZephyrCab

It's been a while since I posted about ZephyrCab, and for good reason. I've been busy with various other projects, like my Arduino Turntable Controller. But with the fall approaching and me having limited time for hobbies, I intend to focus more on ZephyrCab's development. Read on to see what's in store!

What is ZephyrCab?

For those just finding the project, ZephyrCab is a software that aims to give model trains the same realistic control and behavior as the prototype. It's essentially a software equivalent of Bruce Kingsley's spectacular "Ultimate DCC Throttle" project.


I've been working on ZephyrCab since May of 2015, which at the time of this writing is about 18 months of development. Unfortunately, a very large portion of this time has been spent not on programming, but on the physics behind locomotion. I started this project with nothing more than an 8th grade science class of physics knowledge. (Literally, that's it.) Over time, I've not only been improving my JavaScript skills, but with the invaluable help of Bruce Kingsley and other kind individuals, I have been learning the science behind the spectacular machines we all know and love. I've been building the software as I learned, and as such there have been many revisions. Additionally, I have very limited time to work during the school year. However, this fall, I intend to focus more on ZephyrCab and I want to have a test release by next spring.

Current State of the Project

So where are we now? Glad you asked. Currently, the low level functionality of ZephyrCab is pretty stable. Interacting with JMRI is straightforward thanks to some improvements on that code. The decoder abstraction layer is basically done, and the structure for the train object is in place. The low-level "building blocks" that the physics engine will use are fairly stable.

But the physics engine is still a work in progress.

What's done?

I have the math for acceleration/throttle figured out, aside from wheel slip. Thanks to a handy equation I found, I can easily estimate the tractive effort for various speeds and throttle positions for any locomotive given only basic data like the weight and horsepower. This, I believe, will be far superior to a table-based approach since it allows easy expandability to other locomotives.

First Priority?

The feature I am currently focusing on is braking. For those that don't know, the brake system of a train is extremely complex, especially from a programming point of view. While I have a decent conceptual understanding of its operation, it is still a challenge to program, particularly due to the timing it requires. I have some parts of the brake system working, but it is largely unfinished, and it certainly is not ready for production use. I plan on finishing the brakes before moving on to any other major features.

Then what?

After I get the brake system to a decent state, I have several things in mind.

Right now, I'm thinking my first priority after further development of the brakes is better publicizing the software. Getting other people involved and contributions from the model railroad community has been a goal of mine for a while. I'm not writing this just for me, but for all of us, because I think it's a need that no one has met. I think demonstration/explanatory videos, as well as some sort of development vlog, will help with this.

So, to summarize, my goals this fall:

  1. Finish the brake system. This is a big deal and is top priority for me at the moment.

  2. Get the community involved. Having help on this project would be awesome. It's a big undertaking for me to balance this with the many other things I do, and I'd love some additional insight and ideas from others in the model railroad community.

  3. Improve documentation with video and written content. I understand the frustration of poorly documented software, and I think video is an excellent way to remedy this while publicizing the software at the same time.

I also plan to post more regularly about the status of the project. I'm using Ghost for this blog now, and I'm really loving it so far. I intend to post more frequently about the project's status, both in writing and on video. I think that these and other improvements I'm planning for the project will build it into the useful software I want it to be.

Thanks for reading. Let me know what you think on GitHub, I'm excited to see where the future takes me!