• Our booking engine at tickets.railforums.co.uk (powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

Working out average gradient for a route

Status
Not open for further replies.

Legolash2o

Member
Joined
27 Sep 2018
Messages
601
Hello, I've seem to be struggling to best approach working on the average gradient on a route.

Let's say I have a train going on 100miles and I have data the following gradient data.

0-100m: Unknown.
100-104.5m (4.5m): 1 in 47
104.5 - 350m (345.5m): 1 in 800.
350 - 373.4m (23.4m): 1 in -600
...

A basic average/mean would be to 1 in 82.33r, which would be wrong.

Any suggestions please?

A link below is for context:
https://railmap.azurewebsites.net/Public/Route
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

Domh245

Established Member
Joined
6 Apr 2013
Messages
8,426
Location
nowhere
You'd have to include the length of each gradient to get an accurate average, rather than just summing them all, just taking a single average assumes that each gradient contributes equally which they clearly don't!

I don't know if they way you've got the data set up would allow this, but if you've got gradient data for the whole route, you could calculate the height change over each gradient, and then sum all of those to get a "route height change" and the travelled length to determine the average gradient.


Having quickly done some maths (with no guarantee I've actually picked the right equations!) the two options come out as:

1614513804750.png

My gut instinct is that option 2 may be easier in the long run and could also let you do some more interesting things with the data (particularly the gradient profile you plot - an actual elevation would be far more useful than what you've put on that page!), but would require extra bits in whatever database you're using
 

etr221

Member
Joined
10 Mar 2018
Messages
1,037
For an average gradient, I would take the overall change in altitude (height above OD) and distance - for Trimley to Crewe (from link), 20m to 55m (rough figures off OS maps), so 35m in 340km, 1 in 9715.
The maths are simpler if you have the elevations!

But looking at what you are trying to do, is this what you want? And looking at your gradient profile diagram, would showing gradients in per cent (or per mille) be better, to have 0% (level) in the middle (rather than vertical!)?
 

Legolash2o

Member
Joined
27 Sep 2018
Messages
601
Thanks for the replies!

I don't have the elevation data but from the looks of it, I could try and calculate it. The database is something I've built myself and require a lot of manual mapping of gradient data.

And looking at your gradient profile diagram, would showing gradients in per cent (or per mille) be better, to have 0% (level) in the middle (rather than vertical!)?
I do need to change the gradient diagram to look more like in 5 mile diagrams but need to figure out how to best do that.

In regards to what I'm trying to show, it's pretty much anything people would like to see. So far it's from a few discussions I've had but I'm open to adding more visualisations/tables/info.

Ultimately, I want anybody to put in an origin/destination or schedule to see the gradient profile, electrification gaps and emissions.
 

Domh245

Established Member
Joined
6 Apr 2013
Messages
8,426
Location
nowhere
Elevation is calculable from gradients as you note, and being a network you should then only need to have a single datum to then be able to calculate heights everywhere, but that assumes all of the junctions map correctly and there's no weird mileage discrepancies happening

Having the elevation calculated from the gradients also then allows you to fairly easily produce neat diagrams by just plotting the height against the distance as a line graph, although you would still need to decide if you want to show these relative to the starting height (easier, but not as useful!) or 'correct' height. As an example, this was produced using only the gradient data from railwaydata and a datum at Bedford in google earth to get a starting height!

1614518362644.png
 

Legolash2o

Member
Joined
27 Sep 2018
Messages
601
The elevation diagram like the one you posted is something I'd like to add and something similar to the diagrams on the link you posted.

I don't have datum information but I could assume the start is 0. Hopefully that'll work but currently can't see why it wouldn't.
 

MotCO

Established Member
Joined
25 Aug 2014
Messages
4,086
If you are just trying to identify the change in height from the start point to the finish point to give the average gradient, you can try Google maps. If you identify the start and finish points, and if you select the 'walk' function, it will show the change in altitude in graph form. Take the difference in height and divide by te distance to provide average gradient.
 

Domh245

Established Member
Joined
6 Apr 2013
Messages
8,426
Location
nowhere
The elevation diagram like the one you posted is something I'd like to add and something similar to the diagrams on the link you posted.

I don't have datum information but I could assume the start is 0. Hopefully that'll work but currently can't see why it wouldn't.

For doing the journey-type queries you describe in post 4 (and the original post about the average gradient), a zero datum at the input start point would work fine so long as it's clear that it's a "relative to starting location" - making it so that it shows "height above sea level" gets trickier as you then need to pick one (or multiple) datums for the network and work off that, but as I mentioned above you need to be careful making sure that things match up at junctions where there's different routes. I did a similar thing for the Wimbledon/Sutton loops, and had the line from Wimbledon arriving about 3 meters too high at Sutton compared to the line via Mitcham Jn, so you'd need to have a way to double check that heights match up within reason at boundaries between lines!
 

Legolash2o

Member
Joined
27 Sep 2018
Messages
601
Thanks for the info and I've made note of that. I've mapped the gradient data in quite some detail so hopefully that's enough (see attached).

I've updating the link to include the elevation profile.

Managed to do the gradient average using distance travelled / end elevation (route height change).

Thanks for the help everyone!
 

Attachments

  • GradientMapping.png
    GradientMapping.png
    83.3 KB · Views: 11
Last edited:
Status
Not open for further replies.

Top