The present invention relates to a method and apparatus for determining
the order of wagons in a train. The invention configures a plurality of
wagons of a train to sense at least one environmental condition that the
wagons are respectively exposed to when the train is moving. The
invention configures the wagons to generate a corresponding announcement
message in response to a change in state of the environmental condition.
The invention configures the first wagon of the train to listen for the
announcement message generated by any of the plurality of wagons. The
invention configures the first wagon to compute a sequence of the
announcement messages from an order in which the wagons have been heard.