Thanks guys. Don't worry, I had to step through the math in a Word document because it started to. Do my head in. I've been thinking about how I can make it more sustainable/usable and I think it may be possible to connect bits of track by changing how the positions are defined.
First problem I had was how do I place the centre of a circle 500m out of camera and place the track where I wanted it in the frame.
My initial model defines the position of the track from the centre of curvature or the centre of the straight, but if I change to calculate the centre from a position and compass bearing for one end of the track I can calculate the position and bearing of the other end of the segment and pass that on to the next piece of track. In theory it should be possible to construct a string of straights and curves in such a way that modifying the length of any piece will readjust the position of all adjoining pieces. that would be sweet.
A little trickier is what to do with the terrain around the track. This will take a bit of fiddling outside of TG but I'm thinking an orthogonal render of the track mask with the terrain disabled to provide a base image for defining the altitude. Load this into photoshop and add linear gradients along the track to match the changes in altitude. Blur it a bit and then use this image map to create a second terrain masked by the track area (additional mask to be added to the track model). Merge the 2 terrains and you should have a nice flat surface for the tracks to sit on with realistic gentle slopes as well as producing cuttings and embankments. If it works as well as it does in my head it will be awesome.
At least with thumbs crossed I can still type