My Google Map Blog

Animating a model aircraft along a spline curve

by Mickey Mellen on Jan.29, 2014, under 3D Models, Argentina, Australia, Brazil, California, Denmark, England, Germany, Google Earth News, Google Earth Tips, Google Sky, Google maps, Hawaii, Indonesia, Ireland, Italy, Japan, Kenya, Mexico, Natural Landmarks, Netherlands, Sightseeing, Street Views, USA

Around a year ago Paul van Dinther shared a cubic spline curve that identified a path through the Grand Canyon.

Colin Hazlehurst (who has created items such as Captain James Cook’s exploration of Australia) was working on software to animate model aircraft in Google Earth and thought it would be an interesting exercise to make his Spirit of St Louis model fly along Paul’s curve.

GrandCanyonThumbnail

This KMZ file shows this in action, and illustrates the following (in Colin’s words):

  • The model moves in turn to each set of coordinates (longitude, latitude, and altitude) defining the LineString. The duration of each AnimatedUpdate is determined by calculating the distance between points and dividing this by the pre-set speed of the model.
  • The roll and tilt of the model are calculated from the changes in heading and altitude respectively between successive pairs of coordinates.
  • A Camera ‘follows’ the model with a pre-determined offset, defined in terms of heading, range, and tilt relative to the model. These values identify the location of the Camera, but the Camera also has a tilt setting which varies according to the pitch of the model; if the model is climbing, the camera tilt is reduced; if the model is descending the camera tilt is increased. This has worked fairly well in this instance, but I notice that at one point the Camera bounces off the wall of the canyon. This might happen when you view the kmz, and I would suggest trying different aspect ratios (width to height) of the Google Earth window.

I thought at first it wouldn’t look right to fly a model aircraft along a spline curve; it didn’t seem to be the way that aircraft flew. I realise now that this was because my first experiments drew splines on too large a scale, with many miles between interpolation points. Paul’s curve is on a much smaller scale, making for correspondingly small adjustments to the flightpath.

Along with the file above, you can also watch this YouTube video to see it in action.  Nice work, Colin!

The post Animating a model aircraft along a spline curve appeared first on Google Earth Blog.

:, , , , ,

Comments are closed.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...