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

WIP: modify KML exporter to facilitate analysis of aerobatic maneuvers #1115

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kd0aij
Copy link
Contributor

@kd0aij kd0aij commented Apr 1, 2018

This PR automatically segments the flight path into "maneuvers" bounded by straight and level flight.
GE can animate this flightpath using a feature called "tours", and that might prove useful for log analysis.
Sample screencapture of the animation: https://youtu.be/yAhzkvxIJVs

Example KMZ file is here: https://drive.google.com/open?id=1DXqYigl2Eek_ZoIoXqK3eNfPJBOrbrEU

Download the file and open it in Google Earth, set the touring options as shown below:
touring_options

then select the "tour" named maneuvers (leave the checkboxes as they were) and click the "play tour" button at the bottom of the "Places" sidebar:
places_sidebar

Also, clicking on the flightpath will pop up info including RPY angles, AOA, and speeds (exported at 5Hz):
mdisplay

@Arne-W
Copy link
Contributor

Arne-W commented Apr 9, 2018

For me it sounds like a intresting feature - but usage should be explained somewhere cause I do not think someone would expect such a feature. Otherwise it could happen that nobody will use it cause nobody knows about?!

@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 9, 2018

@Arne-W Thanks for looking at this. I've always wondered whether anyone else is using the KML export feature... I'll post a question on discuss to see if there's any interest.

@lvale
Copy link
Member

lvale commented Apr 9, 2018

Please go ahead with this @kd0aij

And we need to have it on the wiki, and also a Blog post ;)

@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 9, 2018

@AndKe
Copy link
Contributor

AndKe commented Apr 9, 2018

I like it. :)
It would make it even easier to understand some events.

@AndKe
Copy link
Contributor

AndKe commented Apr 19, 2018

here is what I see .. https://youtu.be/2n0eM7CG85E

do you have any suggestions as to what may be wrong ?

@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 19, 2018

That's disappointing. Google Earth Pro doesn't even run properly on my Ubuntu 16.04 machine though. I used Google Earth 7.1.8.3036 (64-bit) with OpenGL. For some reason, you're seeing huge icons (they shouldn't overlap at 2 meter spacing). And the KML animation demos that I've tried recently don't work properly for me either, so I'm reluctant to invest a lot of effort in something that flaky.

Maybe it would be more worthwhile to switch to Cesium for this? The PX4 guys recently added Cesium animations to their log analyzer, and that is closer to what I wanted to achieve anyway: https://review.px4.io/3d?log=54f72ade-68f5-40b7-97e0-f51dcb95b7d2

Perhaps there is someone on the team who knows how to use Cesium?

@AndKe
Copy link
Contributor

AndKe commented Apr 19, 2018

@kd0aij Yes, Also - I have both Google Earth 7.1.x and this Pro one I just installed ...
Also: the plane icon fly sideways...

I agree, using Cesium would solve a lot of this weird things, not to mention Google's sloppy Linux compatibility (I know others that had to hop thru a lot of rings to make Google Earth run on Linus)
I guess you wish to integrate it to https://github.com/goodrobots/MAVCesium ? - or just use some Cesium and add it directly to apmplanner ? (that would be even more awesome.. ) :)

@kd0aij
Copy link
Contributor Author

kd0aij commented Apr 19, 2018

@AndKe Thanks, I had forgotten that there was a mavproxy module for Cesium. That looks like a better way to go, and it might be easy to add an export from apmplanner.

@Arne-W
Copy link
Contributor

Arne-W commented Apr 20, 2018

Cool - if you are convinced that Cesium is the better way to go we should do it. Adding a new log exporter should be easy (not taking into account the complexity of the exporter itself).
But for long term we should decide which format we will support and which format will not be maintained anymore. If we can support most of the KML features with cesium and add more cool features it would be perfect, but ending up in 2 export formats where none can substitute the other would be annoying.
Don't get me wrong - we do not have to make a perfect solution on first shot - it may take a while until we are able to remove, or at least stop maintainig one solution, but we should decide which way to go.

@billbonney As our chief mainatiner 😉 - what do you think?

@kd0aij If you want to start making a proof of concept be aware that the Logformat will support scaled data in the near future - don't know if it has an impact for such an exporter. If you need further information you should look here #1089. If you need further information let me know (implementation is nearly completed - exporter do not support it until now)

@AndKe
Copy link
Contributor

AndKe commented Apr 20, 2018

An idea;
What if AP2 did not export to mavcesium ? - not export a file or a static pile of data.
What if; mavcesium got a "slave mode", where it just accepted a data stream from AP2 and just displayed it, regardless of timestamps or other checks.

The data from AP2 could then be sent to mavcesium as a "playback" that could be started, stopped, , reversed , moved step by step... using controls in AP2

Think of it: one could "playback" the moment of a failure based on finding it in log, and step thru it, watching a graph cursor move as mavcesium would show it ... every moment would be visible in graph with lots more related data from the same moment as cesium dislpayed it.. THAT would be totally awesome ! :)

@Arne-W
Copy link
Contributor

Arne-W commented Apr 20, 2018

Nice Idea - BUT at the moment the log export works on dataflash logs not on Mavlink logs and there is no support in AP2 to convert dataflash to mavlink. Moreover it looks like a LOT of work and - to be honest - at the moment there are not enough developers supprting AP2 to implement such a cool big new feature....

But you are right - That would be awesome!

@AndKe
Copy link
Contributor

AndKe commented Apr 20, 2018 via email

@kd0aij
Copy link
Contributor Author

kd0aij commented Oct 30, 2018

@AndKe Lately I've been using GEpro on Win10 to analyze KML files generated in APM2, and the model scales are OK for me. Maybe you're seeing a bug in the Linux implementation?
Here's an image capture from GEpro:
outside_loop_apm2_kml
The KMZ file and image are available here:
https://drive.google.com/open?id=1Tf1z2o3WEpvyjXvtVmudd8SxZK3xxgzq

@AndKe
Copy link
Contributor

AndKe commented Oct 30, 2018

Yes, that is how it should work, the plane icon is HUGE on Linux version, I notified Google, but can't count on it being fixed anytime soon ...
I assume the plane symbol is a native part of Google Earth ? - not something that can be changed ?

@kd0aij
Copy link
Contributor Author

kd0aij commented Oct 30, 2018

No, the plane is a Collada model which is copied into the KMZ file from here:
https://github.com/ArduPilot/apm_planner/blob/262c6d2bdeb02d9ff9ad1d21260aff6eb64e3ccf/files/vehicles/block_plane/block_plane_0.dae
You could try changing the scaling factors in the KML, but I don't think that will fix the problem with GE.

@lvale
Copy link
Member

lvale commented Oct 31, 2018

seems ok on MacOS GGL Earth Pro
screenshot 2018-10-31 at 13 59 38

@Arne-W Arne-W force-pushed the master branch 2 times, most recently from 8e8ef6c to 6bd09e4 Compare July 3, 2023 18:36
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

Successfully merging this pull request may close these issues.

4 participants