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

[DRAFT] Include support for Ardupilot terrain servers as elevation data source #10715

Commits on Jun 9, 2023

  1. DO_SET_HOME command support:

    This commit adds support for setting home clicking on map.
    It is shown as another action in the submenu when we click
    over the map with an active vehicle online.
    
    As per mavlink specs, this command must use AMSL altitude,
    so we need to first query terrain altitude, and when received
    send the command.
    
    Several checks have been implemented, and in case terrain
    altitude is not shown at the selected location a popup will
    appear indicating there are no terrain data for the specified location
    Davidsastresas committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    added25 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2023

  1. Configuration menu
    Copy the full SHA
    6b1817c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ed2dff4 View commit details
    Browse the repository at this point in the history
  3. ElevationMapProvider: unlink Airmap referrer from ElevationProvider b…

    …aseclass:
    
    in order to make ElevationMapProvider be able to be base class
    of anything besides Airmap. referrer was hardcoded to the base
    class
    Davidsastresas committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    9ccf349 View commit details
    Browse the repository at this point in the history
  4. FlightMap.SettingsGroup.json: provisionally require reboot for change…

    … in elevation map provider:
    
    This is to be on the safe side in case we have something
    in the qeue for downloading, and the responses are somehow
    messed up if we change provider, in case we are basing the
    parsing of the response on terrain provider settings.
    
    Maybe it is all right and it can be done correctly or even it
    is already fine, but until super sure of that this is safer
    Davidsastresas committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    28797a8 View commit details
    Browse the repository at this point in the history
  5. QGCMapEngineManager: decouple elevation from Airmap:

    We needed to decuple here in 2 scenarios:
    
    1 - on updateForCurrentView: when _fetchElevation true, we use retrieve
        the elevation map provider selected from settingsManager->flightMapSettings->
        elevationMapProvider()
    
    2 - on startDownload: We need to check here if the set selected corresponds
        to a terrain map provider, in case the fetch terrain data box is ticked,
        so we don't download twice. It used to be hardcoded to airmap elevation
        string
    Davidsastresas committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    749ede8 View commit details
    Browse the repository at this point in the history
  6. TerrainQuery: remove use of Airmap Elevation string, prepare for othe…

    …r providers:
    
    - getAltitudesForCoordinates: we get the name of the provider from settings for making
      the query, so the QGeoTileSpec of the query uses whatever map provider is set on settings.
    
    - _terrainDone: this is the response to what we did above. Here we get the string for the
      map provider from the QGeoTileSpec itself, this way we are sure we are handling it with the
      proper hash, corresponding to the proper elevation provider.
    
    - _getTileHash: we use here the map provider string from settings. This is what is called when
      getAltitudesForCoordinates is called. So this way we make sure it uses the provider indicated
      in settings.
    
    NOTE: there is still work to do to make all this TerrainQuery file provider agnostic, this only
    addresses the parts where we were hardcoding the string Airmap Elevation.
    Davidsastresas committed Jun 18, 2023
    Configuration menu
    Copy the full SHA
    fe3433a View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. Move serializeFromAirMapJson to map providers, from QGCMapTileSet:

    We used to have in QGCMapTileSet::_networkReplyFinished() this
    serializeFromAirMapJson hardcoded to the airmap elevation string.
    
    Instead we added functions in urlFactory and map providers so we
    can understand from the map provider hash if such map provider
    needs its tiles to be serialized, and if so, we call the same
    provider to perform such serialization.
    
    This way the base MapProvider class returns by default that no
    serialization is needed, and the method to serialize just returns
    the same QByteArray ( we should never use this, it is just a sanity check )
    
    Then in Airmap elevation map provider we override this, and we
    implement our own serialization method, which calls the
    TerrainTile method that was originally called from
    QGCMapTileSet.
    
    This way it is also more obvious when developing support for new
    elevation map providers, as the relevant methods are contained
    within the elevation map providers definition files
    Davidsastresas committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    43a7098 View commit details
    Browse the repository at this point in the history
  2. ElevationMapProvider, QGCMapUrlEngine: WIP commit, provisionally incl…

    …ude srtm1 ardupilot terrain servers
    Davidsastresas committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    5f4cb31 View commit details
    Browse the repository at this point in the history
  3. Manage map providers fetching zipped files:

    We implement again a method on QGCMapUrlEngine,
    mapProvider and overriden in AP ElevationMapProvider
    to check if tiles received need to be unzipped, and
    also a method to unzip them
    Davidsastresas committed Jun 19, 2023
    Configuration menu
    Copy the full SHA
    cdf746b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e556c45 View commit details
    Browse the repository at this point in the history