Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments for Creating Smooth Flight Paths in Google Earth with Kamelopard and Math #788

Open
phinjensen opened this issue Nov 11, 2017 · 12 comments

Comments

@phinjensen
Copy link
Contributor

phinjensen commented Nov 11, 2017

Comments for https://www.endpointdev.com/blog/2013/04/creating-smooth-flight-paths-in-google/
By Josh Tolley

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
@phinjensen
Copy link
Contributor Author

original author: Andrew Leahy
date: 2013-08-21T06:38:28-04:00

hi josh, neat stuff. have you got an example of a fly-path generated with this method?

@phinjensen
Copy link
Contributor Author

original author: Joshua Tolley
date: 2013-08-21T10:32:49-04:00

The code in the post generates not only the placemarks, but a flight path as well. For an example use of splines, you can look in the test suite, here.

@phinjensen
Copy link
Contributor Author

original author: Rozza Jullie
date: 2016-02-01T11:04:28-05:00

If interested in a free tool that can convert gpx to kml files and the other way around and generate waypoints of routes, you can check out this online tool: http://gpx2kml.com/. No installation needed.

@phinjensen
Copy link
Contributor Author

original author: Joshua Tolley
date: 2016-02-01T11:12:34-05:00

Thanks for that!

@DMACL30
Copy link

DMACL30 commented Nov 18, 2017

I apologize for the layman's lack of knowledge of coding but I desperately need to know to know how to graph a parabolic curve on Google Earth (or similar) with 3 geocoordinates. The Parabolic feature I found shows a parabolic curve between a starting and end point with height, but I need to follow the trajectory of the curve without a known end point (I am; however, expecting my curve path to intersect New Zealand or Australia). I have found online conversions to obtain a parabolic equation but graphing the curve with Latitude/Longitude is messing with my mind. Example points:P1 =(41.8794N, 87.6238W), P2=(39.8259N, 86.1858W), P3= (46.7988N, 71.2247W).
Points 1 and 3 are confirmed points but I am making an educated guess on Point 2, so information on tutorial links or tools for later use with a created a corrected parabolic curve would be helpful. I am willing to apply more work to solve this if you can give me practical advice. Be my hero, please!

@eggyknap
Copy link
Member

I don't know that I can offer loads of wonderful advice, but I'll do what I can. I think you're talking about your parabola traveling through free space, rather than being confined to the surface of the Earth, demonstrating the path of a projectile, for instance. I imagine, further, that this path you'd like to draw is big enough that you can't just assume the Earth is flat across the length of the parabola. It sounds like calculating the parabola is fairly easy for you, though if not, sites like this one might help; the hard part seems to be converting coordinates on that plane to latitude, longitude, and altitude. If I were stuck with the job, I'd probably start by assuming the Earth was a sphere in a 3-D space with the origin at the Earth's center. I'd then figure out what plane I wanted my parabola to lie on, and put its origin in a convenient place -- at the Earth's center if possible, and if not, then on one of the axes. Given that information and a bit of trigonometry (or a lot of trigonometry) it should be possible to find equations that will map the parabola on the 2-D plane into polar coordinates in the 3-D space. Those polar coordinates should correspond to latitude, longitude, and altitude values you'll use in Google Earth.

If you are trying to keep the parabola confined to the surface of the Earth, it's different. A parabola is a a plane curve, meaning it lies entirely on a plane. If you insist on that being a Euclidean plane, you probably won't ever get the parabola to lie comfortably on an Earth-shaped object. You could instead construct a projective plane that would project a Euclidean plane onto the Earth, which sounds like essentially the same sort of mathematics used here. implicit in such a project is an element of distortion. With those projection equations selected, it would presumably be a simple matter to project your latitude and longitude coordinates onto a plane, derive a parabola from them, and project the result back onto the Earth.

@DMACL30
Copy link

DMACL30 commented Nov 24, 2017 via email

@Jim-Dow
Copy link

Jim-Dow commented Dec 12, 2018

ak open-pit mine curved flight lines
Take a look at the attached file which depicts curved drone flight paths. Can this be converted into a Google Earth fly-thru?

@eggyknap
Copy link
Member

Sure.It looks like your data set is comprised of a series of points in space. If you were doing this in Kamelopard, you'd read through all the points in order, and create a KML to each one in turn, and if you really wanted to get fancy, you'd adjust the duration of each FlyTo based on the distance between points. Or you could use these points as control points over a Kamelopard spline, and it might do some of the duration magic for you. There are a few caveats, which apply no matter what you're using to make the tour, and the biggest is to use "Smooth" fly-to mode, so the camera flies directly from point to point, rather than arcing up and back down again, as Google Earth does by default when you click on some new destination.

@Jim-Dow
Copy link

Jim-Dow commented Dec 12, 2018 via email

@Jim-Dow
Copy link

Jim-Dow commented Dec 12, 2018 via email

@eggyknap
Copy link
Member

Kamelopard's main contribution in this instance would involve mostly boilerplate code anyway. I suspect you could easily create something that would do the same thing in whatever language you like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants