# Dexter: Radius calculations in your developer document

## Dexter: Radius calculations in your developer document

Dexter wrote:If you go into the simulator and try to drive through the switch, you will find out the train does not

actually follow any curve at all, it does simply change the direction sharply exactly at where the turn

command is applied. This is not very realistic and precise, as you can see the train straying off the rails.

That is why the method with usage of curve command is better. To use the method correctly, we need

to know the correct radius of the curve, of course. For my track horizontal distance, 3.8 meters, the

correct curve radius will be around 165 meters.

Dexter,

Could you talk a bit about the calculations for this?

If you know the distance around the curve, and the angle you want the track to diverge, there should be a formula to arrive at the radius.

For instance, in Google Earth, if I see tht the track diverges ten degrees to the right, over a distance of 100 meters, what would be the radius, not considering a spiral entry or exit.

Thanks,

Ed

**edgreenberg**- Posts : 26

Join date : 2017-04-13

## Re: Dexter: Radius calculations in your developer document

Not Dexter, but still

First, let's consider the pertinent points:

Essentially what you need here to solve your given problem is a little basic algebra.

You've got two parts of a Pythagorean triangle- The

The Tangent of your angle is thus equal to (Opposite / Adjacent)

Getting out the calculator, (Tan 10) is

Reverse out our equation, by multiplying this by the opposite.

This gives us a final result of

However, I think you're a little confused.

I think you're actually after 10

For this, the total divergence of a curve is equal to:

The square root of: (The Radius to the power of two, minus the Distance to the power of two)

All we need to do to solve this one, is to re-arrange our equation.

Radius = Square root (Distance to the power of two plus divergence to the power of two)

This gives us a curve radius of 100.498756211m to give us 10m divergence after 100m traveled along a straight track

First, let's consider the pertinent points:

- openBVE works in 'blocks' - Each block has a fixed curve radius.
- For the minute, I'll assume that you have one straight rail, and one diverging rail **
*Note: The calculations below assume that Rail 0 is straight*** - We also know that after 100m, our divergence angle is 10 degrees.

Essentially what you need here to solve your given problem is a little basic algebra.

You've got two parts of a Pythagorean triangle- The

**adjacent side**, and the**angle**, and you want the**opposite side**.The Tangent of your angle is thus equal to (Opposite / Adjacent)

Getting out the calculator, (Tan 10) is

**0.17632698070846497347109038686862**Reverse out our equation, by multiplying this by the opposite.

This gives us a final result of

**17.632698070846497347109038686862**, so ~17.6m divergence with the measured 10 degree angleHowever, I think you're a little confused.

I think you're actually after 10

**meters**divergence!For this, the total divergence of a curve is equal to:

The square root of: (The Radius to the power of two, minus the Distance to the power of two)

All we need to do to solve this one, is to re-arrange our equation.

Radius = Square root (Distance to the power of two plus divergence to the power of two)

This gives us a curve radius of 100.498756211m to give us 10m divergence after 100m traveled along a straight track

Last edited by leezer3 on Mon May 29, 2017 11:36 pm; edited 1 time in total

## Re: Dexter: Radius calculations in your developer document

To confuse all of you a little more: Mind railways very seldomly use circular curves, apart from most points and sometimes sidings. Clothoides are used, which are nasty to calculate and have a slow, soft degression and progression of the radius at the start and end of the curve.

**Quork**- Posts : 1132

Join date : 2012-05-05

Age : 26

Location : Hofheim a.T., Hessen (Hesse), European Union

## Re: Dexter: Radius calculations in your developer document

It looks like there is plenty of confusion to go around.

Both of leezer3's calculations are correct, but neither answer the implied question, What do I put for radius (R) in Track.Curve?

The tangent formula is the correct approximation to use for "small enough" angles. Small enough will mean that two things are approximately true: 1) the arc length of the curve (S) is roughly the same as the run length of the train in a straight line (L), and 2) the divergence angle (D) is roughly the same as the angle that the arc of the curve makes in the center of the curve's radius (A).

We get two formulas, tan(A) ~ S/R, tan(D) = d / L, where d is the divergence length.

Assuming the angle is small enough, we can assume S=L and D=A. Then the tan() are equal and we get L/R = d/L, or R = L*L / d

Dexter's example was using a track section run length, L=25m, and had a divergence, d=3.8m. R= (25 * 25) / 3.8 = 164.47...

Ed's example was L=100m, and D=10 deg. We can actually just use the first tan() equation with S=L and A=D: tan(D) = L/R, or R = L / tan(D) = 100 / tan(10deg) = 100/ 0.176... = 567.128...

leezer3 calculated Ed's divergence, d = 17.6. If we use R = L*L / d = 100*100/17.6 = 568 with some rounding, which is close enough to the one above.

For completeness, leezer3 suggested that Ed might have meant d=10 in L=100. R= 100*100/10 = 1000

What is the definition of "small enough" angle? Do a quick Google search on "small angle approximation" and after reading through some more math, you'll find that the tan() function can be used this way with about 1% error at 10 degrees. I probably wouldn't use this approximation if the angle is greater than 10 degrees.

Was Dexter OK using this approximation? tan(D) = d / L = 3.8 /25 = 0.152. Calculate the inverse tan gives us D= 8.64... degrees, so Dexter was fine using it.

Both of leezer3's calculations are correct, but neither answer the implied question, What do I put for radius (R) in Track.Curve?

The tangent formula is the correct approximation to use for "small enough" angles. Small enough will mean that two things are approximately true: 1) the arc length of the curve (S) is roughly the same as the run length of the train in a straight line (L), and 2) the divergence angle (D) is roughly the same as the angle that the arc of the curve makes in the center of the curve's radius (A).

We get two formulas, tan(A) ~ S/R, tan(D) = d / L, where d is the divergence length.

Assuming the angle is small enough, we can assume S=L and D=A. Then the tan() are equal and we get L/R = d/L, or R = L*L / d

Dexter's example was using a track section run length, L=25m, and had a divergence, d=3.8m. R= (25 * 25) / 3.8 = 164.47...

Ed's example was L=100m, and D=10 deg. We can actually just use the first tan() equation with S=L and A=D: tan(D) = L/R, or R = L / tan(D) = 100 / tan(10deg) = 100/ 0.176... = 567.128...

leezer3 calculated Ed's divergence, d = 17.6. If we use R = L*L / d = 100*100/17.6 = 568 with some rounding, which is close enough to the one above.

For completeness, leezer3 suggested that Ed might have meant d=10 in L=100. R= 100*100/10 = 1000

What is the definition of "small enough" angle? Do a quick Google search on "small angle approximation" and after reading through some more math, you'll find that the tan() function can be used this way with about 1% error at 10 degrees. I probably wouldn't use this approximation if the angle is greater than 10 degrees.

Was Dexter OK using this approximation? tan(D) = d / L = 3.8 /25 = 0.152. Calculate the inverse tan gives us D= 8.64... degrees, so Dexter was fine using it.

**MadMartian**- Posts : 3

Join date : 2015-05-19

## Re: Dexter: Radius calculations in your developer document

I've been working with these formulae, but also happened on some engineering documents from the 30s that are applicable:

Please see: http://www.norgrove.me.uk/permanent_way_notes.htm and specifically the link entitled: Offsets (1) 141' - 190' radius and it's followups, parenthetical numbers 2-6.

I've been able to make this work with Google Earth as follows:

Draw a tangent line, between the two ends of the curve (ignore the fact that railroad curves do not transition directly to circular).

Draw a line, T, that extends from one of the straight section

Erect a perpendicular (eyeball is sufficient) from line T that intersects the other end of the tangent line where it meets the circle. Call the length of that line 'O'.

The formula is R=(T^2+O^2)/(O*2)

I used this to measure a curve out of the Staten Island Railway terminal at St. George, onto it's initial heading south. I was able to get all the linear measurements using the Google Earth measure and line drawing tools.

I also found a very nice overlay for Gooble Earth that shows a compass rose. I don;'t have the URL here, but I'll send the .KML to if requested, as an attachment.

Please see: http://www.norgrove.me.uk/permanent_way_notes.htm and specifically the link entitled: Offsets (1) 141' - 190' radius and it's followups, parenthetical numbers 2-6.

I've been able to make this work with Google Earth as follows:

Draw a tangent line, between the two ends of the curve (ignore the fact that railroad curves do not transition directly to circular).

Draw a line, T, that extends from one of the straight section

Erect a perpendicular (eyeball is sufficient) from line T that intersects the other end of the tangent line where it meets the circle. Call the length of that line 'O'.

The formula is R=(T^2+O^2)/(O*2)

I used this to measure a curve out of the Staten Island Railway terminal at St. George, onto it's initial heading south. I was able to get all the linear measurements using the Google Earth measure and line drawing tools.

I also found a very nice overlay for Gooble Earth that shows a compass rose. I don;'t have the URL here, but I'll send the .KML to if requested, as an attachment.

**edgreenberg**- Posts : 26

Join date : 2017-04-13

Page

**1**of**1****Permissions in this forum:**

**cannot**reply to topics in this forum