• Our new ticketing site is now live! Using either this or the original site (both 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!

Gradient Calculation Using Distance and Arc Length

Status
Not open for further replies.

Legolash2o

Member
Joined
27 Sep 2018
Messages
687
A previous thread shared the gradients of HS1 in a PDF document.

I've noticed that between each gradient value there is an R value (which I believe is an arc length) and the distance in metres showing the transition length.

If I divide the arc length by 360, that provides the circumference.

181m: R = 12000m (33.33)
122m: R = 10000m (27.78)
101m: R = 36000m (100)
180m: R = 14000m (38.89)

How would I approach getting in 1inX value for every 10m? My alternative approach is two continue ignore the R sections and divide that distance with the two gradients either side of it.

1642455382563.png
 
Last edited:
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

edwin_m

Veteran Member
Joined
21 Apr 2013
Messages
28,637
Location
Nottingham
The R is a vertical circular curve of the given radius and length. Working out the relationship between elevation and chainage is a matter of trigonometry, but I can't immediately think how.
 

DynamicSpirit

Established Member
Joined
12 Apr 2012
Messages
9,212
Location
SE London
How would I approach getting in 1inX value for every 10m? My alternative approach is two continue ignore the R sections and divide that distance with the two gradients either side of it.

So you mean - basically do linear interpolation between the gradients either side of each arc?

I'd do that but with one change to make your approximation more accurate: Rather than directly linearly interpolating the 1 in X values, work out the angle that the gradient makes with the horizontal on each side of each ark. (For a 1 in X gradient, angle = arctan(1/X) ). Then linearly interpolate the angles with horizontal distance along each arc. That's still an approximation - it's not quite exact, but the errors are going to insignificant (less than 1 in 10 000) [*]

[*] If you're wondering, I'm saying less than 1 in 10 000 because the gradients in the diagram you showed are all well below 1 in 100, and the errors in the approximation I'm suggesting will be at most of the order of 1 in X-squared.
 
Last edited:

Legolash2o

Member
Joined
27 Sep 2018
Messages
687
So you mean - basically do linear interpolation between the gradients either side of each arc?

I'd do that but with one change to make your approximation more accurate: Rather than directly linearly interpolating the 1 in X values, work out the angle that the gradient makes with the horizontal on each side of each ark. (For a 1 in X gradient, angle = arctan(1/X) ). The linearly interpolate the angles with horizontal distance along each arc. That's still an approximation - it's not quite exact, but the errors are going to insignificant (less than 1 in 10 000) [*]

[*] If you're wondering, I'm saying less than 1 in 10 000 because the gradients in the diagram you showed are all well below 1 in 100, and the errors in the approximation I'm suggesting will be at most of the order of 1 in X-squared.
Thanks, I'll have a stab at it.
 

AndyPJG

Member
Joined
29 Jun 2012
Messages
543
A previous thread shared the gradients of HS1 in a PDF document.

I've noticed that between each gradient value there is an R value (which I believe is an arc length) and the distance in metres showing the transition length.

If I divide the arc length by 360, that provides the circumference.

181m: R = 12000m (33.33)
122m: R = 10000m (27.78)
101m: R = 36000m (100)
180m: R = 14000m (38.89)

How would I approach getting in 1inX value for every 10m? My alternative approach is two continue ignore the R sections and divide that distance with the two gradients either side of it.
R is the radius of a (vertical) circular curve, and as it's so large in relation to the length of the arc it will be reasonably accurate to simply interpolate the changing gradient ie (entry grade minus final grade) divided by length times distance from start (remembering to watch the +/-ve values).

[I actually had a spreadsheet of this exact data from my time in the design office at CTRL (as it was called at the time), but that was about 25 years and at least 5 computers ago. If I get a chance I'll dig in the old desktop to see if it's still there.]
 

CEN60

Member
Joined
17 Dec 2018
Messages
299
DOn't like to further complicate thing - but theoretically the gradient on the 2 rails of a track are both different from the gradient calculated along a centreline - as the lengths of the rail are different depending on curvature (unless its completely level track). However in practice the track gradients are currently calculated using the cl. of the individual track.
 

edwin_m

Veteran Member
Joined
21 Apr 2013
Messages
28,637
Location
Nottingham
DOn't like to further complicate thing - but theoretically the gradient on the 2 rails of a track are both different from the gradient calculated along a centreline - as the lengths of the rail are different depending on curvature (unless its completely level track). However in practice the track gradients are currently calculated using the cl. of the individual track.
This effect is tiny. On a 500m radius curve (fairly tight) the differences between the length of two rails, and therefore in gradient, is only about 0.3%. That's the actual gradient multiplied by 0.003, not 0.3% to be added to or subtracted from the actual gradient. Transitions to and from canted curves will also produce differences in gradient between the rails, which I think would be more significant.
 

CEN60

Member
Joined
17 Dec 2018
Messages
299
This effect is tiny. On a 500m radius curve (fairly tight) the differences between the length of two rails, and therefore in gradient, is only about 0.3%. That's the actual gradient multiplied by 0.003, not 0.3% to be added to or subtracted from the actual gradient. Transitions to and from canted curves will also produce differences in gradient between the rails, which I think would be more significant.
You do know that the NR Track Design Handbook has a section on "compensated gradient" on tight curves? Section B 2.2 I think
 

edwin_m

Veteran Member
Joined
21 Apr 2013
Messages
28,637
Location
Nottingham
You do know that the NR Track Design Handbook has a section on "compensated gradient" on tight curves? Section B 2.2 I think
I don't know the Track Design Handbook, but I do know that rolling resistance increases on curves for other reasons, and I'd guess it was more to do with that.
 

biko

Member
Joined
8 Mar 2020
Messages
512
Location
Overijssel, the Netherlands
My way of solving this with more precision than the previous posts would be the following:

I would start by trying to find which part of the circle with radius R is 'used' for the transition. Looking at my bad sketch, the angle of the steady gradient (in purple) equals the angle (let's call it phi) between the vertical axis through the centre of the circle and the line between centre and 'starting point' of the transition. This works because that line is by definition at a 90 degree angle with the tangent of the circle which should be the same as the steady gradient. I should note that my circle is not correctly drawn in the sketch, it is difficult on a touchscreen!

The horizontal distance between the vertical line through the centre of the circle and the transition point is sin(phi) * R. The vertical change of the circle between the transition point and the vertical line is R - R * cos(phi).

Using these distances, you know how far the lowest point of the circle is from the end of the straight gradient, both horizontally and vertically.

Then, you could calculate the coordinates of intermediate points. If you'd do every 10 m, you could calculate the coordinates at angles reducing with steps corresponding to a change in arc length of 10 m. That would be a change in angle of 10/R radians. Then re-do what I did here above and you'd find the coordinates of the point and thus the average gradient of the section.

Instead of this last step, you could also use the equation for a circle, but that would mean a step size of every 10 horizontal metres. It is mathematically different, but will be very close. So then you'd use x^2 + y^2 = R^2.

Probably, it can be done in an easier way, but this is what came up in my mind.

Y.png
 

Legolash2o

Member
Joined
27 Sep 2018
Messages
687
Thanks for the reply everyone, I'm certainly taking notes and will have a attempt at it on the weekend. It's going to be tough but fun. The current approach I've used is to take the gradient values and metres and then took half of the R distances either side of it whilst using the distance Ch markers. This can be seen on the map below.

https://railmap.azurewebsites.net/Public/GradientsMap

Thames Tunnel is quite steep! I'm trying to find gradient profile for the part after Dollands Moor Yard into the Channel Tunnel itself but turning out to be a challenge itself!
 

DynamicSpirit

Established Member
Joined
12 Apr 2012
Messages
9,212
Location
SE London
Thanks for the reply everyone, I'm certainly taking notes and will have a attempt at it on the weekend. It's going to be tough but fun. The current approach I've used is to take the gradient values and metres and then took half of the R distances either side of it whilst using the distance Ch markers. This can be seen on the map below.

https://railmap.azurewebsites.net/Public/GradientsMap

Thames Tunnel is quite steep! I'm trying to find gradient profile for the part after Dollands Moor Yard into the Channel Tunnel itself but turning out to be a challenge itself!

Do you mean you've done that map yourself? If so - it looks impressive. I'm curious though - if it is your map - how does the map determine what is an incline and what is a decline - it shows them in different colours but which any given section is would depend on which direction you're travelling! Also (and sorry to hijack this thread) but I looked at one area I know - Greenwich station - and the map doesn't seem to make sense there. The very steep climb out of the tunnel just east of the station is shown as a very slight (> 600) incline (I'm assuming > 600 means 1 in X where X>600), but the tracks West of the station - where from my experience as a passenger there doesn't seem to be any discernible slope - is shown as a much steeper 1-100 incline. And the bit marked as level looks a lot shorter than the platforms would be.
 

snowball

Established Member
Joined
4 Mar 2013
Messages
8,144
Location
Leeds
Do you mean you've done that map yourself? If so - it looks impressive. I'm curious though - if it is your map - how does the map determine what is an incline and what is a decline - it shows them in different colours but which any given section is would depend on which direction you're travelling!
I think an "incline" means uphill in the direction the railway calls up, and a "decline" means downhill in the direction the railway calls up.

Or possibly the direction of increasing mileposts is what determines it (usually equivalent to down, but not always).
 

swt_passenger

Veteran Member
Joined
7 Apr 2010
Messages
34,269
Do you mean you've done that map yourself? If so - it looks impressive. I'm curious though - if it is your map - how does the map determine what is an incline and what is a decline - it shows them in different colours but which any given section is would depend on which direction you're travelling!
I think I remember this from a previous discussion - if you zoom into a multi track area of the map separate colours for each track are visible, so the direction question only applies to single tracks.
 
Last edited:

Legolash2o

Member
Joined
27 Sep 2018
Messages
687
Yeah, it took about two or so months to map Great Britain to allow having tools like the link at the bottom.

Incline is anything > 0 i.e. 1 in 47, 1 in 200, 1 in 20000 along the direction of the edge/way/track.
Decline is anything < 0 i.e. 1 in -47, 1 in -200, 1 in -20000.

The routing algorithm knows which direction is it as well. For example, if a track is bi-directional it'll know to * -1 the gradient if travelling in the opposite direction.

Thanks for mentioning Greenwich, as it's highlighted a bug with the pink decline west of the station (should be dark green).


https://railmap.azurewebsites.net/Public/Route

I think I remember this from a previous discussion - if you zoom into a multi track area of the map separate colours for each track are visible, so the direction question only applies to single tracks.

I need to update the arrows to have different colours arrows if the track is bi-directional.
 
Last edited:

DynamicSpirit

Established Member
Joined
12 Apr 2012
Messages
9,212
Location
SE London
I think I remember this from a previous discussion - if you zoom into a multi track area of the map separate colours for each track are visible, so the direction question only applies to single tracks.

Ah yes, that explains it. when I asked the question, I hadn't zoomed in far enough to be able to see that each track is shown separately. I'm guessing that at lower zooms, the map is still trying to draw both tracks of a multi-track line separately, but whichever one is drawn last ends up hiding all the others, hence my puzzlement.
 
Status
Not open for further replies.

Top