Latitude / Longitude Drone flight recording to Node / flight path & more

Hi guys, my first post on the new Forum, and to be honest I never really did much in the old! I have very limited knowledge of Grasshopper however I’m pretty decent in Rhino. I am by trade an architectural visualiser, and recently have been working with a Drone company that specialise in aerial video footage.

Recently i was given the flight data from the drone, which captures huge amounts of info regarding it’s location, about the gimbals for the camera, etc…

My end game is to generate a flight path accurate to that of the drone it self in 3d, I will end up exporting to 3dmax where I can add my camera to a spline and then camera match up with 3D geometry to superimpose over footage. I tried to reverse engineer and just track footage in after effects and export that to Max however it felt very inaccurate, even it’s best guess is still a guess!

SOOO to cut long story short I have managed to work out how to extract data from an excel sheet, and convert Lat / Lon into meters thanks to some great references ( Tricky1 - Latitude & longitudinal co-ordinate points into points & lines - Grasshopper for instance by [Danny Boyes]).

considering i haven’t really done much with Grasshopper I impressed my self that I could get it to work this far!

So right now I have plenty of points following the path of this drone, before I continue I wanted to know if I was doing this the right way and most efficient way, as there are over 10k worth of data points and it takes some time to process!

Originally I had the Multiply plugged right in to the Eval, however I wasn’t sure if each time i was updating the whole thing it also ran the full number of info fields through the Eval too just for a * equation. so I pulled the top number and used this instead. my question is would this help performance or keep it the same?

This is just one of many questions I will probably end up asking however I thought it would be useful for anyone to reference me on this fact finding journey!

Once I get this done I aim to also get a gimbal path also set up so I could potentially set up a “target” for my camera to also follow… then who knows maybe even get the whole thing to run off of time it self!!!

Other quesitons:

  1. Mmmmm giving the path a quick measure it’s also not right, generally the path looks similarish to a googlemaps .KML format given to me however it’s warped slightly and longer! so something in terms of formula perhaps is not right for me? mmm what have I done wrong :S

  2. How do i get gimbal information and turn it into an animated moving object based on the flight info? I have time as a recording also so that means I could accurately show the gimbal at different positions to the exact time!..

Hi fire,
Can you please upload … “something”?
You talked about some excel data or kml data, share that and your gh definition (with internalized useful data).
Help yourself getting help!

(have you seen this? How to ask effective questions )

Hi Riccardo, unfortunately I can’t uploaded the lat/long yet as it is confidential info, I will have an excel sheet I can share with you next week however!

the problem I am having at the moment is that I do not think I am getting accurate results, it is a tough one, I have a google-maps version and it appears very different to the rhino /grasshopper version, it’s about 140meters difference! so one is wrong ha!

So I am assuming there is something in the way I have wired it up or the math I am using is not exact?

Unfortunately nobody can help you without seeing what you have done. Just upload your gh script with a few coordinates internalized.

Tim, I might be being dim here but is the screenshot of the GH script not showing up? might expalin a few things!

Ok, was just my phone not showing it, but out of experience, it‘s unlikely people will recreate your script from a screenshot.

1 Like

Ok cool got you, i’ll uploaded it next week then once i have data that isn’t confidential I can post, cheers Tim.

1 Like

@tim.stark @maje90 @danny_boyes Ok. so I now have data I can share, the info is from the drone recording software, as I’ve mentioned it records much more info than I have uploaded, and have limited to the relevant pieces I think we need to work with right now.

For some reason I can’t upload the Excel file, so to give you an idea of how it’s formatted I’ve taken a screenshot…

here is the KMZ file that also exports out of the drone software, it’s great for getting a visual representation, it also shows me why my grasshopper is going wrong somewhere! as you can see, the drone did an orbit, on a very nice circle… the GH definition is squashing it and i am getting warped results, I must of missed something… If anyone can spot it out for me or tell me how I could fix this that would be amazing! I’ve had very little knowledge of grasshopper up till now, so I’ve just been piecing info together from different topics posted.

The circle orbit path on google earth is 600 meter diameter, where the biggest side of ghd is more like 877m!

Word of warning, compiling the full excel sheet takes 2-3 minutes, i usually lower this to 1000 lines for testing!


and this is the obviously the not so orbit looking GHD

Ha spotted something already, think I had X & Y wrong way round!!

Can you upload the KMZ or XML file separately? (zip it if you have problems uploading it)
I don’t have your plugin installed.

@maje90 applogies not sure why i thought not including the XMl would have been fine ha! I installed the lunchbox plugin which reads the XML - can be found here - 2018-10-18_10-03-03_Standard - (281.8 KB)

also updated GHD a little, can’t get my head around what is causing the problem ahh! XLM TO NODE TO FLIGHT PATH LATT LONG (204.8 KB)

2018-10-18_10-03-03_Standard.txt (1.8 MB)

I actually rotated the point in position (actual earth size in meters) and then moved back into XY plane using the average point as center. In this way there isn’t any projection occurring.
Done interpolation for earth radius, polar-equatorial (probably completely unneeded).

I “packed” transformation data and used it just at the very last where i actually create-moved the points (it’s faster and rhino “zoom extents” won’t go mad in this way).

To me the circle is 514 meters, interpolating curve works.

Descriptions inside.

1 Like

Riccardo, I will spend the next couple of hours trying to understand how you did this but on first glance this looks correct!!!

I just want to say thank you very much for spending the time on this. I spent hours yesterday looking at different formulas and equations for doing this and I just couldn’t get my head round it.

You’re welcome.

Again, this is no formula at all, it is almost a “dumb” method.
Draw a sphere (the earth) centered in rhino world XY, the X axis will intersect with the sphere where it would be 0° lat - 0° long (equator-Greenwich).
Just drawed the point using your coordinates directly, then moved to 0-0 , and re-oriented to XY plane.

hope people dont mind a bit of a jump into 3dmax but i think the context is useful…So the next part of the journey is bringing the flight path in to 3dmax, aligning it to a point of reference that is both in my digital model of a site and on google maps. I came across this script " import KML files in 3ds max" which can be found here - it exports drawn polygons from google earth and exports them into 3dmax, this gives me a strong reference point for me to align my cad info to, I also can do the same for the flight path as part of the flight data exports the flight path in google earth form so I know exactly where it landed and took off, so drawing that, along with other references points I get a good alignment of all data (all close to 0,0,0).

screenshot below shows the yellow flight path as a kmz file that automatically exports from drone but can’t be used for anything useful besides reference, the white is a flattened path that was originally generated with teh grashopper script that was basically put together by @maje90, exported into 3dmax where i used the import KML script to align googleearth with max and then exported again to google earth to check how close a match the grasshopper path is with the original drone path kmz file. i’ve checked several areas and looks like a really good match!!!

The next thing I would like to see is possible is using the Time info, the compass heading, the pitch and the degree to generate either/or/both a target for the camera,. Can you even animate objects in grasshopper? does anyone have any insight on how I would go about doing this?

breaking it down I would need an object representing camera, following path constraint. going along the path relative to time in file. then a second reference object for the cameras target, generated by the pitch / yaw/ roll.

I’m very interested in this topic thread for architecture visualizations. I’ve been doing grasshopper, rhino, Revit and actively practicing architecture for the past 5 years and looking to step up my story-telling ability with an animation workflow as the one you are after. Could you direct-message me? I would be interested in collaborating on this to refine the workflow. Cheers!

Hi Tim, happy to hear you found this useful - I have since investigated this method changed my approach. the theory worked fine and i’m sure there are plenty of applications to use the flight path however the motion is just to jerky to use, including I would also need to generate a target for the camera which I guess I could extract from the other Drone flight data. I ended up using a tracking software called SynthEyes, it took a few days to get my head around however now it’s really easy to generate a 3d camera and flight path that import / exports into several pieces of software. I highly recommend it if you are going to be recreating flightpaths from footage!

Great resource tip on SynthEyes I will definitely give it a look! Yes I am hoping to get an efficient workflow down that connects design work in Rhino/Grasshopper through to be visualized in a more robust way augmented into existing conditions. For now until AR gets to be more robust I’m happy doing this visualizations pieced together in After Effects or Premiere. If you have any other resources that help connect the dots* I would love to learn more. Cheers!