Mapping a lake with ArduPilot

By the way, Andrei: Can you please share how you made the maps available in Mission Planner?

I’ve also chatted a bit with Michael Oborne and he seems interested in getting this functionality into MP. He asked me for tlogs and a .bin file so he might implement it.

3 Likes

I think MP would benefit greatly by a simple way to use custom maps. Just add a few attributes from a mapbox account and be good to go! The API reference I linked earlier, and the working code using the API for QGC demonstrates a working sample.

I have a question for you or anyone else here familiar with MP: To be user friendly, I’d like to avoid dependency of the time consuming log download. Since time/lat/lon/depth are already available in MP GUI real time, a simple python script to build a CSV would be very handy. One that would create a new file each time, and close/save the file once done. File name built from a time stamp perhaps. I tried a while back, so I know it is doable. My python abilities are however far below par, so I’m going to struggle without some advice. A built in function in MP would be even better, of course. With a choice to pipe the info to a port (for use with Reefmaster for real time mapping) or into a file.

And - one last thing, something I asked for a while back: Could it be possible to provide the temperature attribute from the NMEA data as well? Making it possible to select the temperature as an attribute in the “quick” section would be great :grinning:

Olav im not a developer at all and cant change the code like you. Just installed Qt and reading the documantation. My solution is very simple. It is not related with online maps in Mapbox. I am using Sasplanet (http://www.sasgis.org). Program allow to make image file with georefencing of different map providers google, yandex etc.

need to choose map, layer and select area. download + select zoom level selection manager Stich and georeferencing file Now we have .jpg and .kml file. We can add file as background in RM. RM - images- add new-open kml- add image to map project- edit map project- layers- select image-select clip image map polygon layer- choose land RM -export map project- select image file. Now we have .kmz and .png files. mapc2mapc (https://www.the-thorns.org.uk/mapping/) - load calibrated file - open .kml file - identify image associated with .klm - select .png- image nreds to be saved(write/crope)- ok-save with new file name or existing. Now in map folder we have georeferencing files we need .map. Global Mapper -open .png-file-export-export web format-Google map tiles -tile image format jpg.
http://vps.oborne.me/gcs/CustomImages.htm
MP- ctr+f - inject GE - select folder with tiles

2 Likes

Thanks :slightly_smiling_face: I’ll look into this later. Your process would become far easier as soon as we get mapbox support in QGC and MP: Reefmaster does not need the map picture input at all. Just draw a polygon for shoreline and islands (use GE), import as shoreline/islands in RM, then import tracks or CSV captured depth info. Export result to KMZ and import as tileset in mapbox studio. The finally add the layer to a mapbox style of your choice. I use a plain satellite style with no added info to ensure that my style does not get cluttered :wink:

Well Olav in my place Map box satellite view is very poor. So adding sat pic in Reefmaster is a necessity. Check this out https://api.mapbox.com/styles/v1/plastic11/cjs1tc96a00uf1fo3s4bqcnpi.html?fresh=true&title=true&access_token=pk.eyJ1IjoicGxhc3RpYzExIiwiYSI6ImNqczQ2cDRlMzAxcHo0M3BmbWNxemQ3ZHIifQ.f8VqUsBLnI4qVAr2Nj0cXg#16.42/52.894853/35.752481

OMG! Was not aware that images could be that lousy, understand why you need to do the extra work.
You could of course base the style on a terrain or street map. I have that as well. I don’t like it that much since the shorelines of waters typically are inaccurate. But I have it ready anyway, never wrong to have alternatives :slightly_smiling_face:

Actually, I tested QGC with that alternative (swapped the style Id). That’s how I noticed that QGC was not very keen to download tiles but rather use the cache.

It might be a better solution to define styled Mapbox Maps as a new map provider, and to retrieve the available styles with an API (it is there, I’ve tested it) and then to populate the map type drop down with the available styles. That should trigger QGC to download new styles (QGC does that when you change from sattelite to streets for the same map provider, so this is probably the ultimate solution…). But I think what I’ve done now is a good start…

I`ve changed to street view https://api.mapbox.com/styles/v1/plastic11/cjs7ptz9n3n791fqbgj77j2yd.html?fresh=true&title=true&access_token=pk.eyJ1IjoicGxhc3RpYzExIiwiYSI6ImNqczQ2cDRlMzAxcHo0M3BmbWNxemQ3ZHIifQ.f8VqUsBLnI4qVAr2Nj0cXg#15.22/52.893523/35.745533

1 Like

Ha ha :rofl: Sorry, but that is probably the worst I’ve seen. Totally useless. Your solution to utilize images is an absolute necessity. Compared with your situation, complaints when a waterline is misplaced by 5-10 meters in a corner seems downright silly…

Hi Andrei,

I see you have a similar setup for lowrance nmea output as I’m trying to do.
Maybe you can take a look into my last post PixHawk3 and echosounder with NMEA output

Your comments will be very valuable. Thank youvery much.

Finally: I have a modified QGC as an APK app running on a tablet and a phone. I usually love Windows. But building for Android in QT on Windows was nothing less than a nightmare. After a long day of work I have dual boot with Ubuntu. I hated the setup of QT etc in a totally alien OS. But once finally achieved it, the Android build was easy.

Now to upcoming ambitions:

@rmackay9 @Plastic I will try to make a pull request to start the process for getting styled mapbox map into mainstream QGC. Not exactly sure of the detailed process, but I’ll figure it out.
However: I think the solution should be altered so that styled maps are a new “map provider”, where you only enter the mapbox account name. Then retrieve names and IDs of the defined styles and populate the map type drop down with the result. I’ve testet the API for that. Solution will be much better. Ran through a C++ tutorial during my winter vacation now, it’s achievable :slightly_smiling_face: Not sure if the main architects behind QGC agrees, though…

Also as a secondary effort: For QGC I would like to add a simple graph to view the depth profile in the GUI. The typical HUD is not particularly useful for boats IMO. QGC supports QT Charts, I guess a line chart could be used to visually draw the bottom contour (ambition does not include scatter data, just the depth profile in m/ft displayed as a line).

@rmackay9 I’d love to view the transducer’s reported temperature in the GUI as well. Possible to adjust the ardurover firmware to supply this?

1 Like

Congratulation Olav. You`re simply the best.:smiley:Can you share the apk?

That’s too kind. But thanks :slightly_smiling_face:
Of course I can share the current version: You may find the APK here. Do share experiences and opinions - I still have not come around to make a pull request and I am happy to make adjustments before I do.

A note: I built the APK for SDK 19 (Android 4.4 KitKat). Installed successfully on a Huawei tablet (MediaPad M5 10’’) and a Samsung Galaxy S9. An installation on a Samsung Galaxy S7 failed for unknown reasons. I do not guarantee that you will get this to work.

Also: APK file named “android-build-release-signed”. But it is still QGC app with QGC icons. Maybe it makes a mess if you have release and/or daily build of QGC already installed. I removed my existing apps upfront to avoid issues.

And one usability thing that you may have noticed already: Mapbox is not available as map provider until you enter the Mapbox token. And even then Mapbox is not available before you close the app and restarts it.

@oaamaas, nicely done!

I’ll try and add the temperature to the NMEA sonar driver (for ECT400, etc). I can’t promise exactly when but I’ll try…

1 Like

Thank you Olav. Just tested on Samsung Tab s3, everything works just fine. I removed existing apps too. Was a little bit confused about map box style, but after some tests i figured out that it must be something like this _cjs7ptz9n3n791fqbgj77j2yd_but not the way i named it in mapstudio. Wish there was a way to change Map box style ID and have some styles at the same time. For example one for classic depth map, another for side imaging map, bottom hardness map etc. It`s a great improvement for lake mapping.

1 Like

The solution is not perfect. Style has a name and an ID (and some additional attributes as well). The ID is the latter part of the mapbox style url (everything after the last forward slash).
Better solution:

  • add mapbox custom (or something) as a new “map provider”
  • in settings, add just the account name and button to retrieve styles
  • when button pressed, all styles are retrieved (API for that exists, I have successfully tested it)
  • the result is an array of all styles for the user, including both name and ID of each style.
  • this result then used to populate drop down for “map type” for this new “map provider”

This would provide a much better user experience. But when I started to look into the code concerning selection of map provider and the map types: I realized that the current code is well thought out, and that maps are critical to the use of QGC. So this is something that you do not want to mess up. I like to do this, but being inexperienced and not yet fully understand the current code: This is going to take some time. And the core developers are likely to have strong opinions on changes.

Now: In mapbox studio, you can only have one visible tileset for a given area (water). I would suggest to create multiple styles and have one for sidescans, one for depth curves and so on. Give the styles a descriptive name. Then switch the style in QGC to provide different views. Now you see, my ambition to populate the drop down with the style names make perfect sense. The name you can alter, the ID is however generated by Mapbox and is not editable.

I’ve almost figured out how to make a pull request (the changes are already pushed to my personal branch in GIT). I could complete it in 5 minutes. Now I must decide if I should suggest my simple solution, or wait till I’ve coded the perfect one…
5 minutes may be optimistic. Now I read a rule that I should execute all tests in debug mode and some other stuff before I make the request. More reading to do… :thinking:

My first ever pull request created :crossed_fingers:

3 Likes

Randy i found that nmea out in MP not work in Reefmaster for live mapping. Meanwhile DrDepth works only if ignore nmea sum is checked.

*
I would appreciate your advice*

1 Like

So for the same price which one is better :

  • Lowrance HST WSBL 83/200 + DST200
  • Ping Sonar echosounder

Do you read temperature on your Lowrance ?

Do you have a picture on how you mount the echosounder Lowrance ?

@Plastic, re MP’s nmea out not working with ReefMaster, I’m not sure what to do really… if it’s an issue with MP itself then we could raise an issue in the issues list with details of the setup and see if Michael Oborne is available to look at it. I’m not familiar with DrDepth but I guess it’s a ReefMaster alternative… perhaps the “Ingore NMEA checksum” is a clue - perhaps MP’s NMEA output isn’t providing a correct checksum. I didn’t realise there was a checksum in NMEA…