Most of the posts have identified the important points. To measure speed accurately in the locomotive with DCC, the following have to occur:
-
the decoder must use a tach or cam on a drive axle, and have a time base. Or if using BEMF or a flywheel tach, must have a time base, and “know” the gear ratio.
-
the decoder has to have a way of transmitting the speed info through the rails back to the DCC system
-
the DCC system must be capable of understanding the speed data packets and displaying them appropriately
AFAIK, this would all be outside the NMRA DCC spec, and thus would be a proprietary extension. This means the chances of different brand decoders having speed read by any given DCC system is not high.
Without setting up a speed measuring section of track, or pulling a speed measuring car, you can estimate scale speed within 3-4 MPH by counting cars passing a point in 5 seconds. This works much better if you cars are fairly consistent in length and some reasonable divisor of 12" in actual length.
60 smph = 10 6" long cars in 5 seconds (HO 40ft box cars are 6" long)
9 cars in 5 seconds = 54 SMPH
7 cars in 5 seconds = 42 SMPH
5 cars in 5 seconds = 30 SMPH
4 cars in 5 seconds = 24 SMPH
3 cars in 5 seconds = 18 SMPH
2 cars in 5 seconds = 12 SMPH
1 car in 5 seconds = 6 SMPH
Note how slow a realistic switching speed is - one to two 40ft cars passing the turnout frog in 5 seconds.
A steam drag freight over a grade would be 2-4 40ft cars passing the summit marker post in 5 seconds. A train of 20 ore (4" long) cars should take at least 30 seconds to pass that summit marker.
A loop on a 4x8 typically has about 20ft of track. A train at 30 SMPH should take 40 seconds to go around the loop.
I dare say very few of us consistently run at realistic scale speeds. We tend to abuse the excessive acceleration and deceleration rates our models are capab