In Froggy World, the amusement park for adventurous frogs, we have catapulted, booted and seesawed Froggy. Upon departing the seesaw https://www.instructables.com/id/Froggy-World-3-The-Seesaw/ Froggy must land in a waiting train ...
The train must be large enough to carry frogs (O scale) and must stop at precisely the right spot to receive passengers. Stopping the train at a precise spot (not give or take an inch) is somewhat challenging. Voltage from the supply varies throughout the day. Voltage dips when heavy loads start in the house. Voltage at the train engine depends upon track connections and wheel connections. The train engine is an imprecise electromechanical device.
The method of control I settled on requires detecting the position of the train with a magnetic switch (relay actually), then shutting the motor off and "crashing" the train into a stop sign.
Let's start with something that didn't work too well. I set up a photocell and photoresistor--and they reliably detected the train--but I had 3 to 4 inches of variance in where the train actually stopped after detection.