The location of trains within a railway system is derived
in
a number of ways and for multiple purposes.
One use of this data is for train prediction - in the UK,
these are the dot-matrix displays on the platforms and
concourse which show you the expected
arrival/departure
of your train.
Or sometimes Delayed or Cancelled.
This data is usually derived from track circuit or axle
counter block data - which tells the passenger
information
system the approximate location of the train. The
system
calculates the predicted arrival time from the current
location and expected delay.
The resolution of this system is pretty low - signalling
blocks can be very long.
However, given that your train is carrying many
passengers
with GPS enabled phones...
A system which collects GPS data from multiple
passenger
phones could interpolate train position to a higher
resolution, allowing more accurate train arrival
predictions.
GPS is not considered accurate enough (generally) for
railway signalling (as it may have to distinguish between
trains located on adjacent tracks) - but it may be that
filtering across a large-enough set of data provides
enough
accuracy for railway signalling also.