Rpanion-server icon indicating copy to clipboard operation
Rpanion-server copied to clipboard

Add KMZ as a log file

Open brunoolivieri opened this issue 3 years ago • 11 comments

This PR adds a KMZ downloadable file for each .Tlog generated the file by running a script on OS boot.

~~note: That is a WIP, I tested on Ubuntu and found some issues on RPiOS.~~

Edit: passed locally on a RPi & ubuntu.

brunoolivieri avatar May 24 '22 17:05 brunoolivieri

@stephendade What do think about the approach?

If you liked it anyway, I would ask you to wait a bit for the merge so I can do some new installs to test it better.

brunoolivieri avatar May 24 '22 19:05 brunoolivieri

Thanks for proposing this feature, it'll be quite useful.

A few notes:

  1. I'd rather have the processing controlled within Rpanion-server, rather than an external systemd service. Take a look at the ./server/cloudUpload.js for an example
  2. The user should be able to enable/disable the kml processing from a checkbox in the flight logs page
  3. I note that pymavlink has a tlog->kml converter (https://github.com/ArduPilot/pymavlink/blob/master/tools/mavkml.py). Any reason you're using tlog->gpx->kmz instead of the mavkml tool?

stephendade avatar Jun 04 '22 05:06 stephendade

Regarding items 1 and 2, I will try, but being JS, maybe something will come out based on monkey see monkey do.

Regarding item 3: It was on purpose because there is a desire to make some other formats available in the future. For example, Gpsbabel already handles Geojson. Geojson, it would be simple to quickly plot the flight log in the browser.

What do you think?

brunoolivieri avatar Jun 07 '22 17:06 brunoolivieri

@stephendade I guess I did it as you requested.

Please, let us maintain as WIP until I use it in a quad for some extra tests...

brunoolivieri avatar Jul 12 '22 16:07 brunoolivieri

This is good to go. I did some flyghts and work well.

@stephendade Would you merge? Should I rebase?

PS: Lessons learned: The RPi clock can cause a race condition on lognames...

brunoolivieri avatar Jul 28 '22 16:07 brunoolivieri

Great! I'll do a review, but generally looks OK.

stephendade avatar Jul 30 '22 05:07 stephendade

Hi @brunoolivieri - I can't see the changes you made. Did you push them to your branch?

stephendade avatar Oct 03 '22 03:10 stephendade

Hi @stephendade, I think I pushed correctly now. I guess I addressed your requests.

Please, could you review that?

brunoolivieri avatar Oct 03 '22 09:10 brunoolivieri

I kinda failed in rebase that

brunoolivieri avatar Oct 06 '22 00:10 brunoolivieri

Ok, I've had a look through it and it almost looks good to go. You'll need to remove the "merge commit" and then do a rebase - so that your branch is synced up with the latest changes in master.

Happy to help with this if needed.

stephendade avatar Oct 16 '22 04:10 stephendade

OK, to fix up the merge commit do:

git reset --soft HEAD~8
git commit -a
git pull --rebase upstream master

Fix up any merge conflicts, then re-commit

stephendade avatar Oct 26 '22 01:10 stephendade

Rebased! Tks! :)

brunoolivieri avatar Nov 22 '22 19:11 brunoolivieri

Merged!

stephendade avatar Nov 22 '22 21:11 stephendade