EndPointCorp / end-point-blog

End Point Dev blog
https://www.endpointdev.com/blog/
17 stars 65 forks source link

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

Open phinjensen opened 7 years ago

phinjensen commented 7 years ago

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 commented 7 years ago
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 commented 7 years ago
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 commented 7 years ago
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 commented 7 years ago
original author: Joshua Tolley
date: 2016-02-01T11:12:34-05:00

Thanks for that!

DMACL30 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Thank you for taking the time to offer insight to this problem. It will take me some time/thought to wrap my head around the visualization and math. So you will know, I am participating in a treasure hunt for a buried object and the clues given to date suggest I will calculate a curve or parabola based on locations of 3 paintings (presumably the museum locations of which I only know 2 at this time) and a vague pair of “shoulders” to “frame” the treasure location. I had thought the parabola would follow the earth’s surface but, now, I can’t see that the solution to the treasure hunt would incorporate such complex math (for the layperson) to solve. I must be over-complicating how to use the information. More clues will be released 11/27/17 so maybe it will start to come together then. I did enjoy your video for graphing the parabola’s and the [1,3,5,7}a simplified it for practical use in my “research”. Happy Holidays!

On Nov 22, 2017, at 6:51 PM, Joshua Tolley notifications@github.com wrote:

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 https://www.desmos.com/calculator/lac2i0bgum 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 https://en.wikipedia.org/wiki/Projective_plane that would project a Euclidean plane onto the Earth, which sounds like essentially the same sort of mathematics used here https://en.wikipedia.org/wiki/Map_projection#Azimuthal_.28projections_onto_a_plane.29. 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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EndPointCorp/end-point-blog/issues/788#issuecomment-346503431, or mute the thread https://github.com/notifications/unsubscribe-auth/AgNU0SUPHGZn6tdgIWJhB6IhYZ4-oURdks5s5LNwgaJpZM4QaTZg.

Jim-Dow commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

Joshua: Thanks for the reply. I'll try to make it work. I'll take a look at Kamelopard. Jim Dow

On Wed, Dec 12, 2018 at 12:55 PM Joshua Tolley notifications@github.com wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EndPointCorp/end-point-blog/issues/788#issuecomment-446701795, or mute the thread https://github.com/notifications/unsubscribe-auth/Ars9E0r78-TT8iJSX1t2uHSnBP51fQeXks5u4VE-gaJpZM4QaTZg .

-- James W. Dow CEO Aerotec, LLC (205) 428-6444

Jim-Dow commented 5 years ago

Joshua: After searching Kamelopard on the internet, I don't think I have a chance of using it. I don't know a thing about Ruby. Jim Dow

On Wed, Dec 12, 2018 at 12:55 PM Joshua Tolley notifications@github.com wrote:

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.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/EndPointCorp/end-point-blog/issues/788#issuecomment-446701795, or mute the thread https://github.com/notifications/unsubscribe-auth/Ars9E0r78-TT8iJSX1t2uHSnBP51fQeXks5u4VE-gaJpZM4QaTZg .

-- James W. Dow CEO Aerotec, LLC (205) 428-6444

eggyknap commented 5 years ago

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.