Scale Length Conversions

Includes workshop practice, painting and weathering, model photography etc.
User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 1:55 pm

In my professional life, I've been a software developer for over 20 years working on developing applications for Windows. As the future is 'cloud' I figured it was about time I learnt how to develop web based applications and figured, if I was going to learn, I may as well produce something useful so I've developed a scale length calculator for railway modellers which can be accessed here:

www.leyburnsolutions.com/scale.php

At the moment, it has the following functionality:

1. Convert actual lengths in to their scale equivalent. So, for example, you can select to enter length of 12 feet, select output in mm and you will get the scale length equivalents in mm.

2. Convert a scale length in to it's actual equivalent. As above but the opposite way round, enter, for example, a mm value, select the scale, select the output measurement and you'll get the actual length.

3. Convert a scale length to it's equivalent in another scale. Enter, for example, a length of 10mm in 4mm scale and you'll get the equivalent in other scales.

4. Convert a curve radius (in chains) to it's scale equivalent. Enter an actual radius, select the measurement you want and get the relevant scale radius.

The program currently supports 2mm, 3mm, 3.5mm, 4mm and 7mm scales.

I appreciate most of us on here can probably do this manually in their sleep but it has been a worthwhile learning exercise for me.

John

User avatar
Guy Rixon
Posts: 803
Joined: Sun Mar 27, 2011 6:40 pm

Re: Scale Length Conversions

Postby Guy Rixon » Tue Nov 10, 2020 4:22 pm

Thanks John, that's nice and neat and saves some mental arithmetic. It's traditional at this stage of the software life-cycle to respond with suggestions for extra features, so if I may?

1. It would be nice to distinguish 2FS (1:152.3) from British N, and possibly to add European/American N. Working out what wheelbase a Kato chassis gives in British N or 2FS is a traditional sport.

2. The use-case I find a lot, and where I'm more likely to press the wrong buttons on the calculator, is deriving mm at 4mm scale from a printed drawing that is not at 4mm scale. I.e. "known length x is printed at y mm in the book, so if I measure an unknown length at z mm in the book what should that be in 4mm scale?" Yes, "don't scale from drawing mutter mutter", but often there's no alternative.

Feel free to ignore these if you don't feel like more coding.

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 4:26 pm

Thanks Guy, the suggestions are most welcome. The scale one is easy enough and I'll take a look at the second.

John

User avatar
Noel
Posts: 1452
Joined: Wed Jun 23, 2010 1:04 pm

Re: Scale Length Conversions

Postby Noel » Tue Nov 10, 2020 5:56 pm

Since I sometimes write software myself [not much and not often], I know some of the problems which can arise. I played with the curve radius calculator a bit and found that putting in negative numbers got a negative answer [not unreasonable, but...] I also saw that the 4mm answer was not twice the 2mm answer. I know why, and the reason is clearly visible if you look at the ratios, but it looks potentially to be a bit ambiguous to me. Incidentally, why not just let users input the scale that they are working to? Similar comments arise with the length conversions, and I note you can have feet, or inches, but not feet and inches unless you convert to decimal feet or multiply out to give inches, and vice versa, while converting from feet to metres produces an awful lot of digits after the decimal point.

I hope that this is helpful; it is meant that way, honest...
Regards
Noel

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 6:47 pm

Thanks Noel,

I hadn't considered anyone would enter a negative number but that's what testing is for so thanks for that.

My thinking with the current entry was that, if this was available to the 'masses' I wonder how many would know what the actual scale of N gauge, for example, was...

I guess, ideally, the user should be able to enter a scale as now or enter the scale ratio.

I had considered being able to enter feet and inches and figured that users should be able to multiply by 12 but I may reconsider.

Thanks again.

John

User avatar
grovenor-2685
Forum Team
Posts: 3451
Joined: Sun Jun 29, 2008 8:02 pm

Re: Scale Length Conversions

Postby grovenor-2685 » Tue Nov 10, 2020 7:03 pm

Noel wrote:I also saw that the 4mm answer was not twice the 2mm answer. I know why, and the reason is clearly visible if you look at the ratios, but it looks potentially to be a bit ambiguous to me.

This is a problem started by Peco!, 2mm scale should not be 1:148 but 1:152.4.
1:148 was created by Peco (IIRC) for "British N" while N elsewhere is 1:160. And I believe the Japanese use 1:160 for modelling standard gauge and 1:150 for modelling 1067 mm gauge when it should really be 1:119 :)
Regards
Keith
Grovenor Sidings

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 7:17 pm

An update: 2mmFS is now an option and entering a negative will produce an error.

John

Philip Hall
Posts: 1582
Joined: Mon Aug 10, 2009 7:49 pm

Re: Scale Length Conversions

Postby Philip Hall » Tue Nov 10, 2020 8:05 pm

John,

Thank you for producing what will surely become a useful tool for us. For years I have used the MRJ conversion tables for 4mm and 7mm when I need to establish drill sizes and dimensions but now being able to swap things around at the click of a mouse is great.

Philip

User avatar
Paul Willis
Forum Team
Posts: 2548
Joined: Sun Jul 20, 2008 6:00 pm

Re: Scale Length Conversions

Postby Paul Willis » Tue Nov 10, 2020 8:36 pm

Nice one John!

Being a real PITA (a genuine ETLA), could I ask for the <home> button to be at the top of the page, and not the bottom?

Saves an awful lot of mousing...

Cheers
Paul
Beware of Trains - occasional modelling in progress!
www.5522models.co.uk

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 10:31 pm

Thanks Philip and Paul, much appreciated, working on a change to the Home button now...

John

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Tue Nov 10, 2020 11:42 pm

New version is up with improved navigation meaning you can get from one page to another without having to go back to the Home page.

John

Alan Turner
Posts: 576
Joined: Sun Jul 20, 2008 4:24 pm

Re: Scale Length Conversions

Postby Alan Turner » Wed Nov 11, 2020 9:01 am

Also continental TT is 1:120

regards

Alan

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Wed Nov 11, 2020 9:54 am

Thanks Alan.

This morning's update adds support for US/EU N at 1:160 and clarifies the current TT selection is British, I'll look to add Continental TT.

andrewnummelin
Posts: 288
Joined: Mon Jul 21, 2008 9:43 am

Re: Scale Length Conversions

Postby andrewnummelin » Wed Nov 11, 2020 10:54 am

May I make a few suggestions that may cause some coding "fun"?
The two projects I've been working on of late have involved the use of old general arrangement drawings that are dimensioned in good old fashioned units so I ended up with a spreadsheet to take things in feet, inches and fractions of an inch to speed the calculations to mm.

With the small items it was then a case of looking for the nearest appropriate size material (typically sheet or wire) so I added columns to give the output also in thou, as materials are often so dimensioned.

Then a next step might be to add look-up tables to convert to things like SWG, number drill size, screw size, ...

Then the real fun can start by thinking of our friends who still use imperial measures in their modelling work, and indicate the calculated model sizes in fractions (of an inch).

There's a lot to be said for going back the use of slide rules!
Regards,

Andrew Nummelin

User avatar
Neil Smith
Posts: 100
Joined: Tue Dec 03, 2019 12:53 pm

Re: Scale Length Conversions

Postby Neil Smith » Wed Nov 11, 2020 12:06 pm

Well done with putting this together John, I can see myself using it a lot!

In which case, one other (very easy) calculation that might be worth adding in a simple converter between thou <=> mm.

My thinking here is that whilst your site can not only do real <=> scale, but also take something in on set of units and spew out an answer in a different set of units, sometimes what we know is that something is a scale x thou, but could do with that in mm, or vice versa. Yes it's easy enough to run a Google search (other searches available, etc!) but adding in another button would bring this all under one roof?

But well done on a useful little tool!

All the best

Neil

User avatar
Noel
Posts: 1452
Joined: Wed Jun 23, 2010 1:04 pm

Re: Scale Length Conversions

Postby Noel » Wed Nov 11, 2020 12:44 pm

John Donnelly wrote:I had considered being able to enter feet and inches and figured that users should be able to multiply by 12 but I may reconsider.


It's not just input, the conversion should work both ways to be truly useful, so output is also relevant. If the output is, say, something like 38.84 inches or 0.766 inches, converting to non-decimal format is likely not to be straightforward. Like Andrew I'd probably use a spreadsheet, but that would miss the point of your calculator...
Regards
Noel

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Wed Nov 11, 2020 1:02 pm

Currently working on the ability to handle fraction of inches properly (i.e 1/2 rather than 0.5), it is proving interesting...

User avatar
Noel
Posts: 1452
Joined: Wed Jun 23, 2010 1:04 pm

Re: Scale Length Conversions

Postby Noel » Wed Nov 11, 2020 1:36 pm

:D
Regards
Noel

User avatar
Neil Smith
Posts: 100
Joined: Tue Dec 03, 2019 12:53 pm

Re: Scale Length Conversions

Postby Neil Smith » Wed Nov 11, 2020 1:54 pm

And just one other request, any chance of one of those little icons that appear to the left of the URL in the browser window and alongside the name of the website title on quick access bars in browsers like Chrome... I usually delete the text altogether on my quick access bar, so if there was an icon of say a little ruler, that would be helpful. Sorry I cannot remember what they are called...

Or, it may just be me that sees this as a benefit, in which case please ignore!

Neil

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Wed Nov 11, 2020 2:00 pm

I'll have a look, I believe they are called favicons...

User avatar
Neil Smith
Posts: 100
Joined: Tue Dec 03, 2019 12:53 pm

Re: Scale Length Conversions

Postby Neil Smith » Wed Nov 11, 2020 3:04 pm

That's the word, thanks John!

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Wed Nov 11, 2020 3:30 pm

Favicion now added 8-)

As a go at handling fractions of an inch, I've started with a simple imperial to metric converter so you enter a length in feet, inches and fractions of an inch and get it converted to millimetres or meters...

http://leyburnsolutions.com/scaleconver ... metric.php

Feedback and criticisms welcome, I've been doing this for a long time and I'm used to 'picky' clients :mrgreen:

John

garethashenden
Posts: 305
Joined: Tue Apr 07, 2015 9:41 pm

Re: Scale Length Conversions

Postby garethashenden » Wed Nov 11, 2020 5:27 pm

This text is red seems to be stuck at a certain position down the page. On the home page its at the bottom, but after the calculations when there is more information to display its higher up.

Image

User avatar
John Donnelly
Web Team
Posts: 798
Joined: Fri Mar 16, 2012 7:03 pm

Re: Scale Length Conversions

Postby John Donnelly » Wed Nov 11, 2020 5:47 pm

Thanks Gareth, it is supposed to be anchored to the bottom right of the page but clearly not...

andrewnummelin
Posts: 288
Joined: Mon Jul 21, 2008 9:43 am

Re: Scale Length Conversions

Postby andrewnummelin » Thu Nov 12, 2020 8:38 am

John Donnelly wrote:Favicion now added 8-)

As a go at handling fractions of an inch, I've started with a simple imperial to metric converter so you enter a length in feet, inches and fractions of an inch and get it converted to millimetres or meters...

http://leyburnsolutions.com/scaleconver ... metric.php

Feedback and criticisms welcome, I've been doing this for a long time and I'm used to 'picky' clients :mrgreen:

John

Very nice way of dealing with fractions.
Regards,

Andrew Nummelin


Return to “Tools and Techniques”

Who is online

Users browsing this forum: No registered users and 3 guests