Commit 6ea91770 authored by Gus Grubba's avatar Gus Grubba

Merge branch 'master' of https://github.com/mavlink/qgroundcontrol into Airmap

parents 0698e9e7 acf0e76c
Subproject commit f5c0ba684659fbc6c6c5f8777bd30e0b3c32fdef
Subproject commit 193557c61b67acf38efda8dc62acacf7d3726760
......@@ -387,6 +387,22 @@
<type>Simulation</type>
</airframe>
</airframe_group>
<airframe_group image="AirframeUnknown" name="Tilt-Quad">
<airframe id="4100" maintainer="Ricardo Marques &lt;marques.ricardo17@gmail.com&gt;" name="Tilt-Quadrotor">
<class>Copter</class>
<maintainer>Ricardo Marques &lt;marques.ricardo17@gmail.com&gt;</maintainer>
<type>Tilt-Quad</type>
<url>http://www.alivaero.com/the-project.html</url>
<output name="MAIN1">motor 1</output>
<output name="MAIN2">motor 2</output>
<output name="MAIN3">motor 3</output>
<output name="MAIN4">motor 4</output>
<output name="AUX1">Outer servo motor for rotor 2 arm</output>
<output name="AUX2">Outer servo motor for rotor 4 arm</output>
<output name="AUX3">Inner servo motor for rotor 2 arm</output>
<output name="AUX4">Inner servo motor for rotor 4 arm</output>
</airframe>
</airframe_group>
<airframe_group image="YPlus" name="Tricopter Y+">
<airframe id="14001" maintainer="Trent Lukaczyk &lt;aerialhedgehog@gmail.com&gt;" name="Generic Tricopter Y+ Geometry">
<class>Copter</class>
......@@ -419,7 +435,6 @@
<class>Plane</class>
<maintainer>Simon Wilks &lt;simon@uaventure.com&gt;</maintainer>
<type>Flying Wing</type>
<url>https://pixhawk.org/platforms/planes/bormatec_camflyer_q</url>
<output name="MAIN1">left aileron</output>
<output name="MAIN2">right aileron</output>
<output name="MAIN4">throttle</output>
......@@ -431,7 +446,7 @@
<class>Plane</class>
<maintainer>Simon Wilks &lt;simon@uaventure.com&gt;</maintainer>
<type>Flying Wing</type>
<url>https://pixhawk.org/platforms/planes/z-84_wing_wing</url>
<url>https://docs.px4.io/en/frames_plane/wing_wing_z84.html</url>
<output name="MAIN1">left aileron</output>
<output name="MAIN2">right aileron</output>
<output name="MAIN4">throttle</output>
......@@ -443,7 +458,6 @@
<class>Plane</class>
<maintainer>Julian Oes &lt;julian@px4.io&gt;</maintainer>
<type>Flying Wing</type>
<url>https://pixhawk.org/platforms/planes/skywalker_x5</url>
<output name="MAIN1">left aileron</output>
<output name="MAIN2">right aileron</output>
<output name="MAIN4">throttle</output>
......@@ -595,6 +609,11 @@
</airframe>
</airframe_group>
<airframe_group image="VTOLPlane" name="Standard VTOL">
<airframe id="1002" maintainer="Roman Bapst &lt;roman@auterion.com&gt;" name="HIL Standard VTOL QuadPlane">
<class>VTOL</class>
<maintainer>Roman Bapst &lt;roman@auterion.com&gt;</maintainer>
<type>Standard VTOL</type>
</airframe>
<airframe id="13000" maintainer="" name="Generic Quadplane VTOL">
<class>VTOL</class>
<maintainer />
......@@ -650,7 +669,7 @@
<maintainer>Andreas Antener &lt;andreas@uaventure.com&gt;</maintainer>
<type>Standard VTOL</type>
</airframe>
<airframe id="13013" maintainer="Sander Smeets &lt;sander@droneslab.com&gt;" name="DeltaQuad">
<airframe id="13013" maintainer="Sander Smeets &lt;sander@droneslab.com&gt;" name="Vertical Technologies DeltaQuad">
<class>VTOL</class>
<maintainer>Sander Smeets &lt;sander@droneslab.com&gt;</maintainer>
<type>Standard VTOL</type>
......
......@@ -16,6 +16,8 @@ QGCTextField {
showUnits: true
showHelp: true
signal updated()
property Fact fact: null
property string _validateString
......@@ -29,6 +31,7 @@ QGCTextField {
var errorString = fact.validate(text, false /* convertOnly */)
if (errorString === "") {
fact.value = text
_textField.updated()
} else {
_validateString = text
qgcView.showDialog(validationErrorDialogComponent, qsTr("Invalid Value"), qgcView.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel)
......@@ -36,6 +39,7 @@ QGCTextField {
} else {
fact.value = text
fact.valueChanged(fact.value)
_textField.updated()
}
}
......
......@@ -146,12 +146,26 @@ Item {
visible: removeVertexItem.visible
}
MenuItem {
text: qsTr("Edit position..." )
onTriggered: qgcView.showDialog(editPositionDialog, qsTr("Edit Position"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
}
MenuItem {
text: qsTr("Load KML...")
onTriggered: kmlLoadDialog.openForLoad()
}
}
Component {
id: editPositionDialog
EditPositionDialog {
Component.onCompleted: coordinate = mapPolyline.path[menu._removeVertexIndex]
onCoordinateChanged: mapPolyline.adjustVertex(menu._removeVertexIndex,coordinate)
}
}
Component {
id: polylineComponent
......
......@@ -90,6 +90,20 @@ Rectangle {
FactTextField {
fact: missionItem.gridAngle
Layout.fillWidth: true
onUpdated: angleSlider.value = missionItem.gridAngle.value
}
QGCSlider {
id: angleSlider
minimumValue: 0
maximumValue: 359
stepSize: 1
tickmarksEnabled: false
Layout.fillWidth: true
Layout.columnSpan: 2
Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5
onValueChanged: missionItem.gridAngle.value = value
Component.onCompleted: value = missionItem.gridAngle.value
updateValueWhileDragging: true
}
QGCLabel { text: qsTr("Turnaround dist") }
......
......@@ -55,7 +55,11 @@ stQGeoTileCacheQGCMapTypes kMapTypes[] = {
{"Bing Satellite Map", UrlFactory::BingSatellite},
{"Bing Hybrid Map", UrlFactory::BingHybrid},
{"Statkart Terrain Map", UrlFactory::StatkartTopo},
{"ENIRO Terrain Map", UrlFactory::EniroTopo}
{"ENIRO Terrain Map", UrlFactory::EniroTopo},
{"VWorld Satellite Map", UrlFactory::VWorldSatellite},
{"VWorld Street Map", UrlFactory::VWorldStreet}
/*
{"MapQuest Street Map", UrlFactory::MapQuestMap},
{"MapQuest Satellite Map", UrlFactory::MapQuestSat}
......@@ -508,6 +512,9 @@ QGCMapEngine::concurrentDownloads(UrlFactory::MapType type)
case UrlFactory::EsriWorldSatellite:
case UrlFactory::EsriTerrain:
case UrlFactory::AirmapElevation:
case UrlFactory::VWorldMap:
case UrlFactory::VWorldSatellite:
case UrlFactory::VWorldStreet:
return 12;
/*
case UrlFactory::MapQuestMap:
......
......@@ -125,6 +125,12 @@ UrlFactory::getImageFormat(MapType type, const QByteArray& image)
case AirmapElevation:
format = "bin";
break;
case VWorldStreet :
format = "png";
break;
case VWorldSatellite :
format = "jpg";
break;
default:
qWarning("UrlFactory::getImageFormat() Unknown map id %d", type);
break;
......@@ -141,8 +147,9 @@ UrlFactory::getTileURL(MapType type, int x, int y, int zoom, QNetworkAccessManag
//-- Build URL
QNetworkRequest request;
QString url = _getURL(type, x, y, zoom, networkManager);
if(url.isEmpty())
if(url.isEmpty()) {
return request;
}
request.setUrl(QUrl(url));
request.setRawHeader("Accept", "*/*");
switch (type) {
......@@ -419,6 +426,49 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
}
break;
case VWorldStreet :
{
int gap = zoom - 6;
int x_min = 53 * pow(2, gap);
int x_max = 55 * pow(2, gap) + (2*gap - 1);
int y_min = 22 * pow(2, gap);
int y_max = 26 * pow(2, gap) + (2*gap - 1);
if ( zoom > 19 ) {
return QString("");
}
else if ( zoom > 5 && x >= x_min && x <= x_max && y >= y_min && y <= y_max ) {
return QString("http://xdworld.vworld.kr:8080/2d/Base/service/%1/%2/%3.png").arg(zoom).arg(x).arg(y);
}
else {
QString key = _tileXYToQuadKey(x, y, zoom);
return QString("http://ecn.t%1.tiles.virtualearth.net/tiles/r%2.png?g=%3&mkt=%4").arg(_getServerNum(x, y, 4)).arg(key).arg(_versionBingMaps).arg(_language);
}
}
break;
case VWorldSatellite :
{
int gap = zoom - 6;
int x_min = 53 * pow(2, gap);
int x_max = 55 * pow(2, gap) + (2*gap - 1);
int y_min = 22 * pow(2, gap);
int y_max = 26 * pow(2, gap) + (2*gap - 1);
if ( zoom > 19 ) {
return QString("");
}
else if ( zoom > 5 && x >= x_min && x <= x_max && y >= y_min && y <= y_max ) {
return QString("http://xdworld.vworld.kr:8080/2d/Satellite/service/%1/%2/%3.jpeg").arg(zoom).arg(x).arg(y);
}
else {
QString key = _tileXYToQuadKey(x, y, zoom);
return QString("http://ecn.t%1.tiles.virtualearth.net/tiles/a%2.jpeg?g=%3&mkt=%4").arg(_getServerNum(x, y, 4)).arg(key).arg(_versionBingMaps).arg(_language);
}
}
break;
default:
qWarning("Unknown map id %d\n", type);
break;
......
......@@ -56,6 +56,10 @@ public:
MapQuestSat = 701,
*/
VWorldMap = 800,
VWorldSatellite = 801,
VWorldStreet = 802,
MapboxStreets = 6000,
MapboxLight = 6001,
MapboxDark = 6002,
......
......@@ -75,7 +75,12 @@ QGeoTileFetcherQGC::getTileImage(const QGeoTileSpec &spec)
{
//-- Build URL
QNetworkRequest request = getQGCMapEngine()->urlFactory()->getTileURL((UrlFactory::MapType)spec.mapId(), spec.x(), spec.y(), spec.zoom(), _networkManager);
return new QGeoTiledMapReplyQGC(_networkManager, request, spec);
if ( ! request.url().isEmpty() ) {
return new QGeoTiledMapReplyQGC(_networkManager, request, spec);
}
else {
return NULL;
}
}
//-----------------------------------------------------------------------------
......
......@@ -133,6 +133,10 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Esri Satellite Map", "ArcGIS Online World Imagery", true, false, UrlFactory::EsriWorldSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Esri Terrain Map", "World Terrain Base", false, false, UrlFactory::EsriTerrain);
// VWorld
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "VWorld Satellite Map", "VWorld Satellite Map", false, false, UrlFactory::VWorldSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "VWorld Street Map", "VWorld Street Map", false, false, UrlFactory::VWorldStreet);
/* See: https://wiki.openstreetmap.org/wiki/Tile_usage_policy
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Open Street Map", "Open Street map", false, false, UrlFactory::OpenStreetMap);
*/
......
......@@ -3,8 +3,8 @@
"name": "MapProvider",
"shortDescription": "Currently selected map provider for flight maps",
"type": "uint32",
"enumStrings": "Bing,Google,Statkart,Mapbox,Esri,Eniro",
"enumValues": "0,1,2,3,4,5",
"enumStrings": "Bing,Google,Statkart,Mapbox,Esri,Eniro,VWorld",
"enumValues": "0,1,2,3,4,5,6",
"defaultValue": 0
},
{
......
......@@ -119,6 +119,9 @@ void FlightMapSettings::_newMapProvider(QVariant value)
case mapProviderEsri:
_removeEnumValue(mapTypeHybrid, enumStrings, enumValues);
break;
case mapProviderVWorld:
_removeEnumValue(mapTypeHybrid, enumStrings, enumValues);
_removeEnumValue(mapTypeTerrain, enumStrings, enumValues);
}
metaData->setEnumInfo(enumStrings, enumValues);
emit mapTypeChanged();
......
......@@ -26,7 +26,8 @@ public:
mapProviderStarkart,
mapProviderMapbox,
mapProviderEsri,
mapProviderEniro
mapProviderEniro,
mapProviderVWorld
} MapProvider_t;
// This enum must match the json meta data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment