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

Allow one-step upload of .bin files to droneshare #1335

Open
rmackay9 opened this issue Dec 23, 2014 · 4 comments
Open

Allow one-step upload of .bin files to droneshare #1335

rmackay9 opened this issue Dec 23, 2014 · 4 comments
Milestone

Comments

@rmackay9
Copy link

The opensource dev team (Randy, Tridge, etc) would like to improve the quality of the log files uploaded to droneshare to allow better datamining so that we can proactively catch hardware and software issues.

One part of that would be to make it easier for users to upload binary log files to droneshare by making it a one-step process, perhaps as part of downloading the binary log file. Maybe have a checkbox, "Upload to droneshare" on the download screen.

Here is the related droneshare issue. dronekit/droneshare#141

@m4gr3d
Copy link
Member

m4gr3d commented Dec 23, 2014

@rmackay9 where can I find some info on the process used to initiate the bin log files download over mavlink?

@rmackay9
Copy link
Author

Freddy,
There's some info on the log messages used on the MAVlink page: http://mavlink.org/messages/common#LOG_REQUEST_LIST.

I think the flow is something like:

  1. GCS requests the full list of logs from ardupilot using LOG_REQUEST_LIST
  2. ardupilot responds with a LOG_ENTRY message for each log it has. I think the GCS builds up a list of Log numbers (i.e. LOG_ENTRY message's "id") and their sizes (i.e. LOG_ENTRY msg's count). The GCS knows it's received the full list when the LOG_ENTRY msg's "id" = "last_log_num".
  3. the GCS displays the list of possible logs (possibly along side the "time_utc" and "size") for the user to choose which to download.
  4. the GCS requests the log data from ardupilot by sending it a LOG_REQUEST_DATA message with the id (taken from the user). I think it would start with the "ofs" = 0 and "count" = number of bytes to retrieve and can't be larger than 90. It might be possible to send more than one of these at a time (I'm not sure).
  5. ardupilot responds with a LOG_DATA message which should match the "id", "ofs" and "count" from step 4 (above).
  6. GCS & ardupilot repeat steps 4 and 5 until the log is completely downloaded.
    If the GCS notices that it didn't get a reply to a LOG_REQUEST_DATA message it should resend.

In the ardupilot code I can see the definitions of the methods that handle these log related mavlink messages:
https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/GCS.h#L255
https://github.com/diydrones/ardupilot/blob/master/libraries/GCS_MAVLink/GCS_Logs.cpp#L31

Mission planner and APPlanner2 implement the GCS side of this already but I'm very unsure of where the code would be.

Hope this helps some.

@phmagic
Copy link

phmagic commented Jan 6, 2015

How long would the bin files take to download over 3DR Radio?

Would this be a function that only works with a USB / Wi-Fi connection?

@m4gr3d m4gr3d added this to the Droidplanner 3 milestone Jan 6, 2015
@rmackay9
Copy link
Author

rmackay9 commented Jan 7, 2015

I think they would be extremely slow over a 3dr radio. Many minutes for a normal log would be my guess.

@m4gr3d m4gr3d modified the milestones: v 3.1, Droidplanner 3 Jan 23, 2015
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

3 participants