Scale Speedometer

Started by MalcolmInN, June 29, 2015, 07:13:57 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MalcolmInN

In Train Surgery we have been discussing gearing and scale speeds,
and I cobbled together a small program to measure what our little trains are doing.
For those who dont do surgery and gears etc. I thought I'd talk about it here with an improved cleaned up Mk2 version.

What you do is choose two markers 120mm apart (60ft in real life ~= 1 mk1 coach lengh) on the layout,
and go to my web page (link below) where there is a little calculator with appropriate buttons.
there just press the green button once when the front of the loco passes the first marker and then again at the second.

And prepare to be surprised :) !
once over your surprise press the red reset button and go again to check it , simples :)

I dont know how accurate we need to be with this sort of thing, not very I suspect, however it would be more accurate and perhaps easier to use if I made the measure twice as big ?
Anyway, try it out if you wish and let me know ( useless or otherwise :)  all comments welcome :) ) what you think.

Go here to my web page in my Dropbox to try it out.

sparky

Hi malc.... Good bit of work!    When I use the trainspeed program my markers are on my longest straight section of track which is about 13ft....this gives better accuracy as you suggest as with a very short distance you have to be lightning quick on the start and stop buttons !

MalcolmInN

Quote from: sparky on June 29, 2015, 07:27:52 PM
lightning quick on the start and stop buttons !
Thanks Sparky.
Indeed !
That is where the surprise comes in - when one finds that one's dearly beloved shunter has been doing 90mph for too long lol!

I think a Mk3 version is needed where a selection of marker distances can be chosen first, I see some 'radio' buttons in the offing,
or even a Mk4 in which any ol distance one fancies can be input,

then of course there is the Mk5, a real circular dial mit zee traditional Morris Minor pointer - I have seen some java code on the interwebby for a graphic like that, dont understand all the code yet tho'. This could, as Cpt Oats once said, take some time !!

Thanks for looking and your input, very interesting.




austinbob

Quote from: MalcolmAL on June 29, 2015, 07:13:57 PM
In Train Surgery we have been discussing gearing and scale speeds,
and I cobbled together a small program to measure what our little trains are doing.
For those who dont do surgery and gears etc. I thought I'd talk about it here with an improved cleaned up Mk2 version.

What you do is choose two markers 120mm apart (60ft in real life ~= 1 mk1 coach lengh) on the layout,
and go to my web page (link below) where there is a little calculator with appropriate buttons.
there just press the green button once when the front of the loco passes the first marker and then again at the second.

And prepare to be surprised :) !
once over your surprise press the red reset button and go again to check it , simples :)

I dont know how accurate we need to be with this sort of thing, not very I suspect, however it would be more accurate and perhaps easier to use if I made the measure twice as big ?
Anyway, try it out if you wish and let me know ( useless or otherwise :)  all comments welcome :) ) what you think.

Go here to my web page in my Dropbox to try it out.
I'm gonna give that  a try just out of curiosity. You're full of surprises Malcolm!!
:beers:
Size matters - especially if you don't have a lot of space - and N gauge is the answer!

Bob Austin

MalcolmInN

Quote from: austinbob on June 29, 2015, 08:02:37 PMYou're full of surprises Malcolm!!
:beers:
:laugh:
as the actress said ;)

Those of a nervous technical phobia disposition look away now : - -
I did have a bit of bother with a div by 0 as it started its run throwing up an infinity, seem to have got over that now,
but there is still an oddity that if the speed calculation happens to be dead-on a whole number then the decimal '.0' is not being shown, no great deal but a bit odd.

I wonder if it is a "feature" of the Math.round() library function ?
Hmmm, this is going to bother me !!

austinbob

Quote from: MalcolmAL on June 29, 2015, 08:21:45 PM
Quote from: austinbob on June 29, 2015, 08:02:37 PMYou're full of surprises Malcolm!!
:beers:
:laugh:
as the actress said ;)

Those of a nervous technical phobia disposition look away now : - -
I did have a bit of bother with a div by 0 as it started its run throwing up an infinity, seem to have got over that now,
but there is still an oddity that if the speed calculation happens to be dead-on a whole number then the decimal '.0' is not being shown, no great deal but a bit odd.

I wonder if it is a "feature" of the Math.round() library function ?
Hmmm, this is going to bother me !!
You mean you didn't do a proper QC on your product release before you sent it out to us poor non-tech users. - I am sooo! disappointed.
:angel:
Size matters - especially if you don't have a lot of space - and N gauge is the answer!

Bob Austin

MalcolmInN

Quote from: austinbob on June 29, 2015, 08:26:11 PM
You mean you didn't do a proper QC on your product release before you sent it out to us poor non-tech users. - I am sooo! disappointed.
:angel:
Oh sorry :(
Did you not get my tweet in which I promoted you to Chief of my QC dept. ?

Tut, Twitter is geting to be a waste of time

:laugh:

austinbob

Quote from: MalcolmAL on June 29, 2015, 08:30:58 PM
Quote from: austinbob on June 29, 2015, 08:26:11 PM
You mean you didn't do a proper QC on your product release before you sent it out to us poor non-tech users. - I am sooo! disappointed.
:angel:
Oh sorry :(
Did you not get my tweet in which I promoted you to Chief of my QC dept. ?

Tut, Twitter is geting to be a waste of time

:laugh:
How much does it pay??? Malcolm?
:D
Size matters - especially if you don't have a lot of space - and N gauge is the answer!

Bob Austin

PostModN66

A slightly lower tech idea....

See how far your train goes in 8 seconds.  The distance it has covered in inches = the scale speed in MPH.

(Or in metric, time 3 sec and the distance it has gone in cm is the scale speed in MPH).  Rough and ready, but maybe good enough for government work.  And the beauty of this is that you can use it when you are a punter at exhibitions to estimate the speed of trains on other people's layouts and give them helpful advice!  :worried:

Cheers  Jon  :)
"We must conduct research and then accept the results. If they don't stand up to experimentation, Buddha's own words must be rejected." ― Dalai Lama XIV

My Postmodern Image Layouts

Lofthole http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14792.msg147178#msg147178

Deansmoor http://www.ngaugeforum.co.uk/SMFN/index.php?topic=14741.msg146381#msg146381

MalcolmInN

#9
QuoteHow much does it pay???
I dunno, youngsters these days , ,  :doh:

you pay me for the privileged position it gives in society  >:D

Quoteand give them helpful advice!
:laughabovepost:
Yep, we done the coach lenght magic rope trick and other methods in Surgery, but they wuz arksin for 'proper' electronic methods, so I did this as a stocking filler till someone made with the Arduinos uc ;)


Sprintex

Quote from: PostModN66 on June 29, 2015, 08:39:59 PM
See how far your train goes in 8 seconds.  The distance it has covered in inches = the scale speed in MPH.

Very handy :thankyousign:


Paul

NeMo

Hmm... interesting approach. I tried an alternate way of solving the problem, making a downloadable (Mac & Windows) application instead of a web app.

I pretty much left the user to do the timing aspect (something you implement quite nicely in the web app). On the other hand, I think letting users select the scale they're using provides some extra utility. One challenge is that not all users want to use miles per hour, so I fiddled the output a bit to provide km/h as well as mph.

Cheers, NeMo

(Former NGS Journal Editor)

scotsoft

Quote from: MalcolmAL on June 29, 2015, 08:21:45 PM

I did have a bit of bother with a div by 0 as it started its run throwing up an infinity, seem to have got over that now,
but there is still an oddity that if the speed calculation happens to be dead-on a whole number then the decimal '.0' is not being shown, no great deal but a bit odd.

I wonder if it is a "feature" of the Math.round() library function ?
Hmmm, this is going to bother me !!



I presume you have used Excel to make this speedometer?

If you change the format of the cell to a "General Number" it will show two decimal places  :thumbsup:

cheers John.

MalcolmInN

#13
Quote from: NeMo on June 29, 2015, 08:59:53 PM
I pretty much left the user to do the timing aspect
,
,
so I fiddled the output a bit to provide km/h as well as mph.
Thanks NeMo, interesting, downloaded will look later.
Is the Windows freestanding ie.portable .exe or does it mess with my registry, I not used Realbasic, just many of the others Yabasic Liberty etc. but moved on to 'C'.

It was the timing that they wanted to be done for them in Surgery with trackside gizmos etc :) I thought pushing a button was next best worsest :) !

You are telepathic, I toyed with kph and was going to make some remark about newfangled metrics lol !
Would be easy to do if there is a general wail   demand.

QuoteI presume you have used Excel
No Excel, just raw javascript in Notepad text ed. then stuffed into the HTML  webpage (which was also notepaded )





NeMo

Quote from: MalcolmAL on June 29, 2015, 09:28:08 PM
Thanks NeMo, interesting, downloaded will look later.
Is the Windows freestanding ie.portable .exe or does it mess with my registry, I not used Realbasic, just many of the others Yabasic Liberty etc. but moved on to 'C'.
Should be totally freestanding. Causes no problems on my Windows XP installation.

Quote from: MalcolmAL on June 29, 2015, 09:28:08 PM
You are telepathic, I toyed with kph and was going to make some remark about newfangled metrics lol!
But then you'd have to worry about European N scale, Japanese N scale... where do you draw the line???

Cheers, NeMo
(Former NGS Journal Editor)

Please Support Us!
April Goal: £100.00
Due Date: Apr 30
Total Receipts: £50.23
Below Goal: £49.77
Site Currency: GBP
50% 
April Donations