Terrain data loading on SD card via MAVftp is slow

@tridge @rmackay9 I was trying to load the terrain data which downloaded from Ardupilot terrain generator https://terrain.ardupilot.org/

File size was around 30MB and using mission planner MAV Ftp tried to upload the file to the SD card terrain folder.
Transfer file is taking too long time probably 25minutes time.is this normal or how can we achieve more speed data transfer to the SD card.

How good is that SDcard? USB connection to FC or telemetry over the air?

Its SD card which come with flight controller itself i think its SanDisk 16gb class 10 card.
Its through USB cable only i have tried.

I’ve been away (and still am actually) so I’ve been unable to investigate this but I have added it to the 4.4 issues list.

Based solely on past experience (e.g. not on any investigation) this could be caused by issues in either the flight code or (more likey) MP’s implementation of MAVFTP. We should try to reproduce this issue (using MP) and then repeat using latest MAVProxy to see if the problem only occurs with MP.

1 Like

I’ve confirmed that attempting to upload Terrain files using MP’s MAVFTP screen is extremely slow. I was also unable to do it using MAVProxy.

MP Issue: MAVFTP extremely slow · Issue #3229 · ArduPilot/MissionPlanner · GitHub
MAVProxy issue: MAV FTP not working on Windows · Issue #1270 · ArduPilot/MAVProxy · GitHub

I’m afraid that I won’t personally be able to fix either of these issues, it is really up to the GCS maintainers. All I can suggest for now is to do the copy directly on a PC after having removed the SD card from the autopilot. Sorry about that.

@Michael_Oborne your thought on this?

Hi @kalai1219,

I put an update in the MP issue but here it is again for better visibility.

On the Nov 14th dev call we discussed with Tridge and discovered that MAVFTP’s implementation (both within the GCSs and the flight code) has been optimised for downloading (e.g. from the autopilot->GCS) but not for uploading (e.g. GCS->autopilot).

There were two suggestions for improving peformance:

  • send multiple MAVFTP messages from the GCS to the autopilot without waiting for a response.
  • create a new MAVLink message to send longer messages just like we do for downloading. Currently it seems the MAVFTP messages are only 80bytes long

With ethernet available in 4.5 we can next add a couple of new methods to upload/download files to the autopilot including via the small webserver and we could also implement regular FTP on the autopilot.