Mapping a lake with ArduPilot

@PauG: If the transducer cable has two cords, lookup the Elite TI manual (chapter 5 - Wiring).

@ktrussell: That solution works. It is built into my carp fishing “bait boat” (60 cm trimaran with 3x 4S 6600mah Li-Ion batteries) - it is a mini cargo ship :wink: I guess the cost for the DST is high because it is a niche product with no fierce competition between vendors).

@rmackay9: I find reading off the logs from my Pixhawk to be ultra slow. I’m currently building in a RPi in my boat to run UAVCast and get rid of my radios for telemetry (4G coverage is without issues most places in Norway). If I could read off the log in a matter of seconds from the RPi instead I would be happy.
To produce the map (I use Reefmaster), only the lat, lon and depth are needed. The additional parameters could perhaps reveal that the transducer is not in level with the water line (“deadrise” when motors are speeded up)? To be used to re-calculate the position before the data is imported into the mapping software? It would require a high precision (RTK) GPS to make any sense, I think.
I got into serious problems to read off the logs late autumn last year (MP and QGC both failed). Will look further into this in a couple of weeks - perhaps some bad soldering in some modifications I did causes telemetry instability. When it did work I found the requirement for the boat to be disarmed in order to read off logs to be challenging as well. I really struggled to disarm it, and went through a series of settings trying to solve this. A simple disarm command from the ground control station would be great (it is there, but somehow not supported by the rover). Now I have to arm my boat before I can use it - and I truly dislike that since the boat often is run in manual mode and since arm/disarm of a boat does not make a lot of sense anyway.
My main focus right now is however the maps - I’ve spent some efforts on bathymetric maps because I need them when I “fly”. I’ve created a MapBox account and “styled” all of my depth maps onto the “satellite” map. Result is excellent. And by workarounds I have a slightly buggy working solution utilizing the retired “Tower” app. What’s remaining is for QGC or MP to use my styled rather than the MapBox’ default “satellite” version: I need to “see” what I have mapped so far when I continue mapping in several steps, and I need the maps themselves to make “educated” decisions when I edit a mission on a fishing trip. Probably slightly off topic, but likely something most folks in this thread would be interested in. Anyway: Really grateful for your efforts!!!

2 Likes

Thanks, @oaamaas, I ordered the transducer and digitizer last night. Do you have a picture of your boat? I’d love to see it!

Good, you are up for the challenge!!! Not that difficult, of course :grinning:

And sure, my boat is… A self build set from German “Carplounge” (model “RT4”). Heavily modified. Ardurover for one - even bought me some stickers. Backup battery switched from the Tx and other features resulted in purchase of a 12-channel Rx/Tx. Transducer and DST-200 built in last autumn. Alternative fishfinder and mapping solution fully working by means of a “Deeper”, an extra cell phone and high performance Velcro. And on…
By the way - this is a great advice for rock solid semi fixed installation of everything: Use “Double Click” velcro (3M I think). Incredibly reliable, all electronics but my motors are mounted using this. That velcro is expensive - and I love it!!!

Here’s my “pride” all dressed up with new stickers…

DST-200 made ready for plug and play:

First test with Mission Planner in the kitchen - the transducer needs water, you will not see readings if it is dry!

When I experienced instability retrieving logs, alternatives were needed. A Deeper, the flexible part of the boat mount, an extra cell phone and of course my beloved velcro: It’s not my target solution, but it works very well:

A Samsung with Tower (in mission edit mode) with depth map as background map & split screen with Deeper live depth reading. I map waters because I want to use these maps actively in my GCS!!! Only works during mission edit, but better than nothing. Not sure if I’m able to write the needed code changes in QGC my self, but I am going to try :roll_eyes:
This mapping was first performed with by Lowrance transducer and my DST. When home I failed to retrieve the logs. So I drove back and ran the boat for another 90 minutes with the Deeper. Post processing in Reefmaster. Imported as a tileset in MapBox. Despite complaining error messages, the map is visible when I add the Map Id for the imported tileset as Map Id in Tower (integration in Tower made for a previous version of MapBox APIs) The correct integration now is to use the Map URL and another API. New challenge…

@ktrussell: Best of luck with your integration

1 Like

Olav,

Sounds really good. Some ideas:

  • logs can be streamed to the companion computer (and stored there) if it’s running “dflogger” which is included by default in the RPI APSync image.
  • it might be good to set up an auxiliary switch to arm/disarm the vehicle. This is what I do and it’s very quick and easy to arm/disarm. arming/disarming is somewhat important in that it sets the home position used for RTL - with arming-not-required set it will just use it’s location at the moment the EKF achieves a good position estimate.

I’ve never seen UAVCast before but I might give that a try. I’ve been looking for an easy-to-use 3G/4G telemetry solution.

Adding the ability to update the GCS maps in real-time sounds like a great idea. It’s out of my area of expertise but I would think it’s possible.

Olav,
Thank you for the great pictures and explanation. That is a beauty! My first boat is going to be a boogie board very much like Randy’s but who knows where I will go from there. I have some parts on order. That “Deeper” looks very interesting as a way to log outside the ArduPilot system. I may try that eventually. Thanks so much! I will be back with questions for all I am sure!

Also consider building the same. Mapping time can be cut down by using more than one boat :wink:. The thrusters concern me, however. They stand unprotected off the bottom and will most certainly pick up debris that will cause issues. A front mesh to avoid stuff jamming into the propeller, perhaps…
I have two water jet engines, built into the outer keels with water intake at the bottom behind a mesh structure. Issues caused by debris are hardly likely. I have had to swim out and save it two times due to blown fuses, though :slightly_smiling_face:

1 Like

Great schematics Olav! I will take a look onto them and try-and-fail with my Totalscan 9-pin cable. As you said Lowrance doesn’t document this issue.

I prefer to use my Totalscan because is the transducer that I have installed with special support on my boat. Sometimes I use sidescan and sometimes Downscan. Other option is to add a new support for a HST-WSBL or even a ECT-400.

By the way, I use TBS crossfire for RC and bridged mavlink telemetry. Anyone else use this setup?
It seems to work well for the moment. Let’s see when adding depth from DST-2.

Olav, nice boat :wink:

Those are excellent suggestions for protecting the thrusters.

I’m clearly not a developer, but I installed Qt and set up an environment for QGC. Must say that it requires some reading to figure out how it all fits together. But after some thinking and searching I figured out that the code configuring the API call for MapBox is in the file “QGCMapUrlEnging.cpp”.

I battled with the API documentation and tested in a browser until it finally dawned on me that it was possible to use another API. Browser-tests finally succeeded when I read through the doc section “Retrieve raster tiles from styles”. I am not competent (yet, anyway) to add fields to enter MapBox username and style Id and then to alter the code to use these rather than default map alternatives IF so desired. So I simply hacked the UrlEngine code to try. And voila…

Proof of concept: Not just make maps, but be able to use them in the QGC as well! Now all that remains is to request someone far more competent than me to implement this in a quality manner so that we all may utilize our hard efforts in producing the maps :heart_eyes:

3 Likes

I have all parts ordered for my first mapping boat except the battery (just wanting to wait to see if I need to order another thing or two from vendor before I order) and the flight controller. Any recommendations for the flight controller? I will want it to reliably log the sonar data to an SD card. I have had good success with the old Pixhawk 2.4.8 (I think that’s the right model - basically a Pixhawk 1, maybe?) but was thinking about trying either a Cube or the Kakute F7. Thoughts?

Hi Olav! Great achievment for mapping and fishing with Qgc. I have the same carplounge rt4 with pixhawk and lowrance elite 4 with nmea out and bt gps. Curently i am using MP. Mapping with Reefmater and laptop not a problem, but fishing is unhandy. Android tablet and qgc looks much comfortable. I made my bathymetric mapbox maps but stuck in qgc modification to load proper map layers. Can you please share you experience.ardu

2 Likes

I have not been able to figure out how to overlay my maps in MP. Yours is cool.

I use a cube in my boogie board boats but I’ve been tempted to try out a lower cost KakuteF7 because it has (simple) imu isolation.

Having these depths appearing on the map (in real-time I guess?) is very impressive. I’d really like to see this added to the ground stations by default. Not sure if @Plastic or @oaamaas is comfortable raising a PR against QGC/MP but it might be a good start no matter whether it gets merged or not.

David its not a big deal. You need to export map as image with calibration file. In case you use Reeefmaster !![reef|689x388](upload://dZcarrPn9r0goicjkwlwweZxBo6.jpeg) . But i found that Global Mapper cant open exported png file with kml calibration. So i`m using mapc2mapc (https://www.the-thorns.org.uk/mapping/) to to identify image file with klm and add some calibration files like .map There is a good instruction for custom maps in MP.
http://vps.oborne.me/gcs/CustomImages.htm

1 Like

Randy these depth appearing on map in real time only in Reefmaster or Dr.Depth as live data. I receve position data by 2.4 mhz radio modem and depth by this wireles sounder 868 mhz from https://www.carplounge.de/en/full-color-fishfinder-lowrance-hook-4x-wireless-chirp. I changed the head of the unit for 4 because 4x haven`t nmea out and connected it with ttl to usb adaptor.

So i receve data via diffent com ports: position sentences by bluetooth and depth by usb.

For real time mapping i have another setup. Android tablet with software: navionics Boating Hd and Bt gps provider. Harware: bt gps and wifi vexilar sonar phone sp100 with wifi reapeter . Configure to recive position by bt and running navionics . Logs are send to navionics and then available on map view but they look weird.

There is a lot video on Youtube with navionics mapping.

As of last evening I have implemented the solution in QGC (incl GUI changes). Solution is based utilizing a map from Mapbox studio (“style”) that may include one or more tilesets or datasets. To make it work, mapbox is selected as map provider and the user needs to enter account name and style Id (new fields added in the GUI).
I’m a freshman with Mapbox as well as with Qt. At the moment I can’t provide live updates. In my style I rely on imported tilesets. But mapbox has APIs for datasets as well, and I guess the key to get live updates in a GCS then would be: To be able to generate curves based on transducer data (I use Reefmaster) and then to input the result through a dataset API.
One thing I noticed though: QGC does cache tiles and is not very eager to update the tiles. Have not looked into the logic yet. But if I change the style Id, the displayed maps are not changed in QGC if you don’t move over to a new area (not yet cached). Something to look into if a live creation of depth maps are to be realized.

As for getting my code into a QGC release: I have absolutely no idea on how to proceed. It is briefly described in the dev docs. Probably easy to understand for someone with dev experience. But for me a steep learning curve. I can provide the changes I’ve done for each file easily though.

I also struggle to set up Qt to build for Android. I simply don’t get how to make a kit to use the required GCC 4.9 compiler in Qt. I will probably succeed at some point but it has taken a lot of my time so far (I do not give up that easily)…

1 Like

If I have understood it correctly, Mission Planner has the ability to port out NMEA-0183 to a serial port in real time. If there was a way to combine that with the rangefinder “down” value it would be possible to provide a input stream to Reefmaster and have Reefmaster capture the tracks live. Not sure if QGC has the same abilities. Reefmaster still needs to execute the calculations of the map of course. And you also need to export the result to display it in a map software.
I’ve looked into Navionics and Vexilar for some time ago. If I remember correctly, you are not able to export the captured data nor the resulting maps. I like the live creation of the maps, but being tied to their app it would prevent me from utilizing the map directly in the GCS. I might have misunderstood of course…

I have yet to conclude on how to submit a pull request. And still no success in being able to build for Android (yes - when I go out I bring phones and tablets. The PC stays at home). But if you like, here’s how I’ve implemented Mapbox styled maps in QGC:

BASICS

To use Mapbox you already need to enter the mapboxToken (available in Mapbox - Account). This is created once you create an account. There is no charge for mapbox accounts as long as you do not use maps on a large scale. In other words, do not share the mapbox token with others that may use your maps big time :wink:

I decided to introduce two attributes into QGC: mapboxAccount and mapboxStyle. Source for these attributes are Mapbox Studio. When you click “menu” for the desired style, the style URL appears at the bottom of the popup. The url is in form:
mapbox://styles/mapboxAccount/mapboxStyle

In QGC

End result looks like this when you click settings, then offline maps and finally options:

FIRST: I defined the new attributes and included two new fields to capture their values:

\src\Settings\AppSettings.cc
Declared the following:
DECLARE_SETTINGSFACT(AppSettings, mapboxAccount)
DECLARE_SETTINGSFACT(AppSettings, mapboxStyle)

\Settings\AppSettings.h
Defined the following;
DEFINE_SETTINGFACT(mapboxAccount)
DEFINE_SETTINGFACT(mapboxStyle)

\Settings\App.SettingsGroup.json
Defined these attributes:
{
“name”: “mapboxAccount”,
“shortDescription”: “User account for Mapbox maps”,
“longDescription”: “Your personal user account for Mapbox maps”,
“type”: “string”,
“defaultValue”: “”
},
{
“name”: “mapboxStyle”,
“shortDescription”: “Mapbox style identificator”,
“longDescription”: “Mapbox design style for Mapbox maps”,
“type”: “string”,
“defaultValue”: “”
},

\src\QtLocationPlugin\QMLControl\OfflineMap.qml
Defined in the property facts section:
property Fact _mapboxAccountFact: QGroundControl.settingsManager.appSettings.mapboxAccount
property Fact _mapboxStyleFact: QGroundControl.settingsManager.appSettings.mapboxStyle

Then in the same file in the UI section, I place entry of the two fields between the mapbox token and ersi access token. I added:

                Item { width: 1; height: 1; visible: _mapboxAccountFact ? _mapboxAccountFact.visible : false }
                QGCLabel { text: qsTr("Mapbox User Name"); visible: _mapboxAccountFact ? _mapboxAccountFact.visible : false }
                FactTextField {
                    fact:               _mapboxAccountFact
                    visible:            _mapboxAccountFact ? _mapboxAccountFact.visible : false
                    maximumLength:      256
                    width:              ScreenTools.defaultFontPixelWidth * 30
                }
                QGCLabel {
                    anchors.left:   parent.left
                    anchors.right:  parent.right
                    wrapMode:       Text.WordWrap
                    text:           qsTr("To enable styled Mapbox maps, enter your mapbox account name.")
                    visible:        _mapboxAccountFact ? _mapboxAccountFact.visible : false
                    font.pointSize: _adjustableFontPointSize
                }

                Item { width: 1; height: 1; visible: _mapboxStyleFact ? _mapboxStyleFact.visible : false }
                QGCLabel { text: qsTr("Mapbox Style ID"); visible: _mapboxStyleFact ? _mapboxStyleFact.visible : false }
                FactTextField {
                    fact:               _mapboxStyleFact
                    visible:            _mapboxStyleFact ? _mapboxStyleFact.visible : false
                    maximumLength:      256
                    width:              ScreenTools.defaultFontPixelWidth * 30
                }
                QGCLabel {
                    anchors.left:   parent.left
                    anchors.right:  parent.right
                    wrapMode:       Text.WordWrap
                    text:           qsTr("To enable styled Mapbox maps, enter your mapbox style ID.")
                    visible:        _mapboxStyleFact ? _mapboxStyleFact.visible : false
                    font.pointSize: _adjustableFontPointSize
                }

SECOND: Since I now have the attributes defined and captured, I can now use them to build the URL for styled maptiles download. These are minor changes. I collect the values of account and style, then IF the style has a value I override whatever maptype is selected for mapbox and retrieve styled maps with API V1instead. However, if there is no value for the style (“else”), the remaining code is not changed. QGC will then build the URL with its existing V4 API. We do want to break the existing functionality.

\src\QtLocationPlugin\QGCMapUrlEngine.cpp
In the section to build the URL for mapbox I added:
_* Retrieval of the values for mapboxAccount and mapboxStyle _
Right below the existing retrieval of mapboxToken
* Then below the condition to check if mapboxToken has a value:
Added build of URL if mapboxStyle has value with V1 API, else use the existing V4 API
{
QString mapBoxToken = qgcApp()->toolbox()->settingsManager()->appSettings()->mapboxToken()->rawValue().toString();
QString mapBoxAccount = qgcApp()->toolbox()->settingsManager()->appSettings()->mapboxAccount()->rawValue().toString();
QString mapBoxStyle = qgcApp()->toolbox()->settingsManager()->appSettings()->mapboxStyle()->rawValue().toString();

    if(!mapBoxToken.isEmpty()) {

        if(!mapBoxStyle.isEmpty()) {
            QString server = "https://api.mapbox.com/styles/v1";
            server += QString("/%1/%2/tiles/256").arg(mapBoxAccount).arg(mapBoxStyle);
            server += QString("/%1/%2/%3?access_token=%4").arg(zoom).arg(x).arg(y).arg(mapBoxToken);
            return server;
        }

        else {

        QString server = "https://api.mapbox.com/v4/";

THE END RESULT

Being an angler, I look forward to instruct my boat to drive out and drop bait and hooks on each side of the small plateau I’ve found and one on the top. I guess the fish will swim on each side of it. And maybe they also feed on the top. An educated guess, and user friendly to have this directly in QGC. The map is a shaded version with 50 % transparency set in Mapbox Studio.

3 Likes