Dan Barcay out there? Figuring out following moving points with gxFlyTo

77 views
Skip to first unread message

EGuru

unread,
Oct 19, 2010, 4:14:49 PM10/19/10
to KML Developer Support - Advanced Support for KML
So I'm working to virtually ride behind my plane while I gx:Track up
the street.

Dan Barcay had a great demo of his first solo, and in it he had a
camera tour that followed the moving point. I'm trying to figure out
how he derived the moving camera point, and even some of the tags..

I was originally figuring that like gx:track, I could set a series of
points and times for the camera, and it would handle the transition
and the time it takes to get to the next point. But it looks like you
need to set duration. So if I'm setting duration, why do I need
timeSpan?

Anyway, posted here hoping he might be able to dump a note or even
some code on how he derived the flyTo points based on the time and
space of the object he wanted to watch..

thanks!

<gx:FlyTo>
<gx:duration>0.5174950000000536</gx:duration>
<gx:flyToMode>smooth</gx:flyToMode>
<Camera>
<gx:TimeSpan>
<begin>2010-06-05T17:49:34Z</begin>
<end>2010-06-05T18:10:19.076740918Z</end>
</gx:TimeSpan>
<longitude>-122.2466954954097</longitude>
<latitude>37.50943972425119</latitude>
<altitude>10.15492116840818</altitude>
<heading>-52.05384466489867</heading>
<tilt>79.39939534065584</tilt>
<roll>-1.873559756837349e-06</roll>
<altitudeMode>absolute</altitudeMode>
</Camera>
</gx:FlyTo>

GTrek

unread,
Oct 20, 2010, 4:37:54 AM10/20/10
to KML Developer Support - Advanced Support for KML
Hi EGuru,

Do you mean like this http://www.youtube.com/watch?v=4afVevRz88Q or
this http://www.youtube.com/watch?v=S_UGTZo2Aag ?

I notice in your code fragment that you set the altitude to 10.15....
and the altitude mode to absolute. If this is below the surface of the
ground at this point it won't be displayed.

Maybe this demo will help
http://kml-samples.googlecode.com/svn/trunk/interactive/index.html#./Touring/Touring.Complete_Demo.kml.

Regards

John
www.gtrek.co.uk

Dan Barcay

unread,
Oct 22, 2010, 2:09:42 AM10/22/10
to kml-suppor...@googlegroups.com
Hi EGuru,

I am out here ;-)...

So, you can create tours from your tracks the easy way or the hard way...

The easy way (and the way that I did it in the blog post), is to use the automatic tour generation feature. To use it, simply set the appropriate tilt, speed, camera range, etc preferences in the "touring" pane of the preferences dialog. Next, highlight the track in the left-panel and click on the "generate tour" button which is just underneath the left panel, and looks like three connected dots. (See the blog post for a picture of the button: http://google-latlong.blogspot.com/2010/06/relive-your-hiking-biking-and-other.html).

Once you highlight the tour and click the button, the tour generation code will auto-magically figure out where the camera should be in order to maintain those parameters, with a bit of smoothing for cinematic effect.

The video you saw shows a splice of two different camera settings: one roughly 20 meters behind the plane, with an 85 degree tilt, running at about 4x real-time. The overhead view is roughly 20x real-time, with a range of a few thousand meters, and a tilt of nearly zero.

The hard way to make a tour like this is to try to figure out all of those keyframes manually, and to construct the tour yourself. You can do this, but it's generally overkill and will require a fair amount of mathematics on your part. Luckily for you, I've gone through that pain so that you don't have to :-).

Let me know if you have any more questions.

Best,
Dan

---
Daniel Barcay
Software Engineer, Google Earth

Amanda Powell

unread,
Jul 2, 2013, 4:18:40 PM7/2/13
to kml-suppor...@googlegroups.com
Dan-

I was hoping to contact you for some help creating a tour like the one he exampled here: http://google-latlong.blogspot.com/2010/06/relive-your-hiking-biking-and-other.html. I am most interested in how you created the "Inflight-good" tour in your GE example.

I work for a non-profit, Avian Research & Conservation Institute, and we map migration routes of a few migratory bird species. I have a large amount of data (about a year's worth of GPS points) to map from Brazil to Florida. I am very interested in having part of the tour include flying over the landscape following a 3D image (like your airplane) for at least part of the migratory route. I am hoping to eventually use this tour as a teaching tool to demonstrate the long distances these birds travel.

SO! My questions are:

How do I create a tour that flies along the line behind an image? Do I need to write script for this or can I just adjust the Touring settings? I have already downloaded my track into GE.

What are some possible easy ways for me to show large amounts of data, such as half the yearly migratory route, in a short (5 min) video? I would still like to travel along the line and not just show the entire route at a distance.

I am not computer illiterate, but I am not well versed in code writing as well- but am more than willing to try whatever you suggest! Any sort of walkthrough would be great, too.

Thanks
Reply all
Reply to author
Forward
Message has been deleted
0 new messages