I mounted a GoPro to a locomotive once and ran it around my test track. Not very exciting and I have no idea what happened to the video.
i used a key fob type mounted with reuseable stickum on a freight car ... this was maybe six years ago ... they are on youtube , do a search for squirrel creek