I made a post a while ago on the Google Earth Plugin forum, http://tinyurl.com/avy6pb, about an adaption of the Driving Simulator that allows you to tour a path in real-time - a Ferrari being driven by The Stig at Silverstone. I now posted a new version which can be found at http://www.thekmz.co.uk/GEPlugin/pathtour/v3/path_tour_v3.htm
This version loads the Path and Model as part of the page load, as opposed to entering them on the page, but there were no changes to the Tour_Simulator constructor itself. As well as changes to the initialisation I’ve added a GMap div that shows the position of the car as it progresses around the circuit and tidied some other bits up.
The core part of the simulation is that if a speed of 0 is passed in it reads the speed for each point along the path from the Altitude. A different approach will have to be taken if I wish to use a path that isn’t along the ground - but that’s for another day. As it is this works well and keeps the size of the KML required to a minimum.
The path itself was created using Bezier splines so it is smooth and on each Tick of the simulator the Model’s position (plus it’s orientation) and the AbstractView is moved as a percent of the distance covered in that Tick. An adjustment is then made to ensure the ground covered is in real-time - independent of the speed of the machine it’s running on.
Still some work to do on this to include all the circuits for the 2009 Season but the tricky stuff I hope is done.
All this maybe moot though as the recent release of Google Earth 5 now has a more flexible Touring engine
One Comment
Love Button. Love your codings. Just watched Dubai; will see yours too.