A method for calculating, substantially in real time, an interval within which at least a reference part of a railway vehicle which is travelling along a railway line is located, the railway vehicle comprising a controller positioned in the railway vehicle, the method, via the controller, comprising:
- calculating, at predefined and successive instants of time:
- a maximum position and a minimum position reached by the railway vehicle both calculated as points on a digital map and based on first signals which are provided by a receiver mounted onboard the railway vehicle and are indicative of a current absolute position of the railway vehicle;
- and
- a maximum distance and a minimum distance travelled by the railway vehicle with respect to a reference position, the maximum distance and the minimum distance being calculated based on second signals provided by an onboard odometry system of the railway vehicle;
- at a selected instant of time of the predefined and successive instants of time, adding:
- to the maximum position calculated at an instant of time earlier than the selected instant of time, a difference between a value of the maximum distance calculated at the selected instant of time and a value of the maximum distance calculated at the instant of time earlier than the selected instant of time, thereby determining on the digital map a first reference maximum position;
- and
- to the minimum position calculated at the instant of time earlier than the selected instant of time, a difference between a value of the minimum distance calculated at the selected instant of time and a value of the minimum distance calculated at the instant of time earlier than the selected instant of time, thereby determining on the digital map a second reference minimum position;
- and
- calculating the interval within which at least the reference part of the railway vehicle is located, by assigning:
- as its most advanced end or upper end, a most forward position between a position calculated for the first reference maximum position and a value of the maximum position calculated at the selected instant of time;
- and
- as its rearmost end or lower end, a most rearward position between a position calculated for the second reference minimum position and a value of the minimum position calculated at the selected instant of time.