How is the position of a train modeled in a computer control system?

I can think of two basic approaches but I am not sure which (if any) are used in the real world.

Lat, Long

Ex: (-42, 23)

The position of the train is modeled by its real world position. The only issue I could see with this is extra work would have to be done at some stage to determine what track the train is on.

Distance, Track

Ex: (20m, Track 34-B)

The position of the train would be modeled by its distance from the start of the track, and the track it was on. This isn't exactly as intuitive right off the bat but I think it makes more sense.

I only ask because earlier I was reading some about PTC and as I was reading this popped into my head.


As brought up by ratchet freak it most likely depends on the sensors on a track.

I was wondering if there is anyone out there who is or currently was part of the development of such a PTC system who could speak to which method is used.

Or if there is a link to a detailed specification of a PTC system (May exist because the conversion of railways is partially managed by the government).

My guess is probably something similar to (Distance, Track) for data gathered by on track sensors and then GPS is used as a fallback which can be converted into (Distance, Track).

  • 1
    $\begingroup$ Depends on how the trains report their position I think, If through GPS then latlong if through sensors on the track then the distances track. $\endgroup$ Commented Apr 27, 2016 at 9:47
  • 2
    $\begingroup$ I don't know the definitive answer. I'm willing to bet that train companies use both systems, but that railroad workers 'think' in terms of the second system (distance, track). $\endgroup$ Commented Apr 27, 2016 at 12:34
  • $\begingroup$ @ratchet freak You are probably right, see edit to my question $\endgroup$ Commented Apr 27, 2016 at 12:35
  • $\begingroup$ Per your edit, are you only considering PTC? Also, are you sure that there is a difference between your two methods? if you know where the actual tracks are, it is pretty easy to convert between track position and GPS coordinates. $\endgroup$
    – hazzey
    Commented Apr 27, 2016 at 15:09
  • $\begingroup$ @hazzey I am not only interested in PTC systems, I have just only done research on such systems. If you know of any other similar types systems I would be fascinated to hear about them. $\endgroup$ Commented Apr 28, 2016 at 0:16

2 Answers 2


Speaking personally (as someone who deals with this sort of thing for a US Class I on a regular basis) -- operational and maintenance personnel find railroad locations the same way you and I find highway locations -- milepost + track name, and named locations called "stations" in US railroad parlance.

The former are not far off in usage from their highway counterparts -- albeit not always one mile apart due to changes in the track alignment. In areas where more than one track is present, the various tracks are named as well -- this may be something like "Track Two" for a mainline track in a multiple main territory or something more obscure like "50" or "Piglet Lead" for tracks in yards and industrial areas.

The latter may be akin to a named/signed highway junction, or simply a named point along the tracks marked by a sign. These are more commonly used by higher-level people, such as folks in Customer Service, as they don't care as much about what precisely the train is doing at a given station.

Communication Based Train Control (CBTC) systems may either use GPS lat/long and then convert it to a track name and milepost based on an internal database of the railroad's layout (this is what Positive Train Control or PTC does), or use beacons set in the track that act as "electronic mileposts" (the European Rail Traffic Management System/ERTMS approach, at least at Level 1).

Of course, along with this all, you need to know what route (subdivision) you are on to begin with -- that's akin to the highway number on a road. It doesn't do you any good at all to know you're at milepost 100.000000 on the main track if you don't have the foggiest clue what subdivision you're in!

  • $\begingroup$ Thank you so much for answering my question. Its pretty cool to get an answer from someone who works with this kind of stuff on a daily basis. $\endgroup$ Commented Jun 30, 2016 at 22:41

In most cases a position on the track will be most useful as GPS probably won't have high enough resolution to indicate which line it is on if there are several tracks in parallel.

Also many signalling systems work by sectors where only one train is allowed to enter a given stretch of track at any given time.

Similarly the precise location doesn't really matter that much as you know that it is on a track so its is much more useful to know which track, which direction and how far along.

Similarly it is a lot easier to convert from relative track position to absolute position than the other way around.

Something else to consider is that, in the UK at least the motorways have location marking system based on marker posts every 100 metres (or yards ?) which gives the number and distance to the next junction. This means it is very easy for anybody to give the emergency services or breakdown assistance a very accurate location for any incident and similarly emergency vehicles can tell exactly where they are relative to it.

I would be astonished if most railway networks don't use a similar system.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.