Commit a9d7bb16 authored by lm's avatar lm
Browse files

Merge branch 'dev' of github.com:pixhawk/qgroundcontrol into dev

parents ff9a7a77 958bd1de
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<!--
Copyright 2008 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- QGroundControl -->
<title>QGroundControl Google Earth View</title>
<!-- *** Replace the key below below with your own API key, available at http://code.google.com/apis/maps/signup.html *** -->
<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawTo7L1FE1-amhuQxIlXw"></script>
<script type="text/javascript">
google.load("earth", "1");
google.load("earth", "1", { 'language': 'en'});
var ge = null;
var initialized = false;
var aircraft = new Array();
var currAircraft = 220;
var followAircraft = false;
var currLat = 47.3769;
var currLon = 8.549444;
var currAlt = 470;
var homeLat = 0;
var homeLon = 0;
var homeAlt = 0;
var homeViewRange = 500;
var homeLocation = null;
var homeGroundLevel = 0;
var currViewRange = 3.0; ///<< The current viewing range from this position (in meters)
var currTilt = 40.0; ///<< The tilt angle (in degrees)
var currFollowTilt = 40.0;
var currView = null;
var planeOrient;
var planeLoc;
// Aircraft class
function isInitialized()
{
return initialized;
}
function init() {
google.earth.createInstance("map3d", initCallback, failureCallback);
google.earth.createInstance("map3d", initCallback, failureCallback);
}
function setGCSHome(lat, lon, alt)
{
homeLat = lat;
homeLon = lon;
homeAlt = alt;
var placemark = ge.createPlacemark('');
var icon = ge.createIcon('');
icon.setHref('http://google-maps-icons.googlecode.com/files/blackH.png');
var style = ge.createStyle('');
style.getIconStyle().setIcon(icon);
//style.getIconStyle().setScale(0.5);
placemark.setStyleSelector(style);
// Set the placemark's location.
homeLocation = ge.createPoint('');
homeLocation.setLatitude(lat);
homeLocation.setLongitude(lon);
homeLocation.setAltitude(alt);
placemark.setGeometry(homeLocation);
// Add the placemark to Earth.
ge.getFeatures().appendChild(placemark);
homeGroundLevel = ge.getGlobe().getGroundAltitude(lat,lon);
if (homeGroundLevel == 0)
{
homeGroundLevel = alt;
}
goHome();
}
function initCallback(object) {
function initCallback(object)
{
ge = object;
ge.getWindow().setVisibility(true);
ge.getOptions().setStatusBarVisibility(true);
......@@ -40,11 +107,104 @@ function initCallback(object) {
ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS, true);
ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
ge.getLayerRoot().enableLayerById(ge.LAYER_TREES, true);
// Now after the Google Earth initialization, initialize the GCS view
setGCSHome(currLat, currLon, currAlt);
// Create the first aircraft model
// Load 3D model
var planePlacemark = ge.createPlacemark('');
planePlacemark.setName('aircraft');
planeModel = ge.createModel('');
ge.getFeatures().appendChild(planePlacemark);
planeLoc = ge.createLocation('');
planeModel.setLocation(planeLoc);
planeLink = ge.createLink('');
planeOrient = ge.createOrientation('');
planeModel.setOrientation(planeOrient);
planeLink.setHref('http://qgroundcontrol.org/_media/users/models/multiplex-twinstar.dae');
planeModel.setLink(planeLink);
planeModel.setAltitudeMode (ge.ALTITUDE_ABSOLUTE);
planeLoc.setLatitude(currLat);
planeLoc.setLongitude(currLon);
planeLoc.setAltitude(currAlt);
planePlacemark.setGeometry(planeModel);
setAircraftPositionAttitude(220, 47.3772, currLon, currAlt+50, 20, 15, 50);
enableFollowing(true);
updateFollowAircraft();
initialized = true;
}
function setAircraftPositionAttitude(id, lat, lon, alt, roll, pitch, yaw)
{
if (id == currAircraft)
{
currLat = lat;
currLon = lon;
currAlt = alt;
}
planeOrient.setRoll(roll);
planeOrient.setTilt(pitch);
planeOrient.setHeading(yaw);
planeLoc.setLatitude(lat);
planeLoc.setLongitude(lon);
planeLoc.setAltitude(alt);
}
function failureCallback(object) {
function goHome()
{
var currView = ge.getView().copyAsLookAt(ge.ALTITUDE_ABSOLUTE);
currView.setLatitude(homeLat);
currView.setLongitude(homeLon);
currView.setAltitude(homeAlt);
currView.setRange(homeViewRange);
currView.setTilt(currTilt);
ge.getView().setAbstractView(currView);
}
</script>
function setCurrentAircraft(id)
{
currAircraft = id;
}
function enableFollowing(follow)
{
followEnabled = follow;
}
function updateFollowAircraft()
{
if (followEnabled)
{
currView = ge.getView().copyAsLookAt(ge.ALTITUDE_ABSOLUTE);
currView.setLatitude(currLat);
currView.setLongitude(currLon);
currView.setAltitude(currAlt);
currView.setRange(currViewRange);
currView.setTilt(currFollowTilt);
ge.getView().setAbstractView(currView);
}
}
function failureCallback(object)
{
}
</script>
<style type="text/css">
html, body {
margin: 0;
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://web.resource.org/cc/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="48"
height="48"
id="svg3209"
sodipodi:version="0.32"
inkscape:version="0.45"
sodipodi:docbase="/home/bertrand/thèmes/icons"
sodipodi:docname="googleearth.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.0"
inkscape:export-filename="/home/bertrand/thèmes/icons/googleearth.png"
inkscape:export-xdpi="960"
inkscape:export-ydpi="960"
sodipodi:modified="TRUE">
<defs
id="defs3211">
<linearGradient
id="linearGradient4471">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4473" />
<stop
id="stop4544"
offset="0.5"
style="stop-color:#f6f6f6;stop-opacity:1;" />
<stop
style="stop-color:#e1e1e1;stop-opacity:1;"
offset="1"
id="stop4475" />
</linearGradient>
<linearGradient
id="linearGradient4463">
<stop
id="stop4465"
offset="0"
style="stop-color:#000000;stop-opacity:0;" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="0.91000003"
id="stop4467" />
<stop
id="stop4469"
offset="1"
style="stop-color:#000000;stop-opacity:1;" />
</linearGradient>
<linearGradient
id="linearGradient4326">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop4328" />
<stop
id="stop4334"
offset="0.91000003"
style="stop-color:#000000;stop-opacity:1;" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop4330" />
</linearGradient>
<linearGradient
id="linearGradient4224">
<stop
style="stop-color:#95d2f8;stop-opacity:1;"
offset="0"
id="stop4226" />
<stop
id="stop4240"
offset="0.41"
style="stop-color:#357bb5;stop-opacity:1;" />
<stop
style="stop-color:#13324e;stop-opacity:1;"
offset="1"
id="stop4228" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4305"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.164251,0,0,1.1066309,-7.7152118,3.6172807)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4326"
id="radialGradient4337"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.9068628,0,-5.2669822)"
cx="-54.952297"
cy="-56.550789"
fx="-54.952297"
fy="-56.550789"
r="20.607111" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4388"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.164251,0,0,1.1066309,-7.7152118,3.6172807)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4390"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.1125941,0,0,-2.0080394,19.606479,22.674501)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4463"
id="radialGradient4461"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1373136,0,0,1.1082148,-5.9284,3.6296571)"
cx="65.260735"
cy="-19.960367"
fx="65.260735"
fy="-19.960367"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4477"
cx="148.67188"
cy="23.953125"
fx="148.67188"
fy="23.953125"
r="49.921875"
gradientTransform="matrix(1,0,0,0.3452269,0,15.683862)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4479"
cx="150.32812"
cy="-27.078125"
fx="150.32812"
fy="-27.078125"
r="56.234375"
gradientTransform="matrix(1,0,0,0.5665463,0,-11.737114)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4481"
cx="167.20312"
cy="-47.105568"
fx="167.20312"
fy="-47.105568"
r="37.546875"
gradientTransform="matrix(1,0,0,0.5964393,0,-19.009954)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4525"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,-1.1010138,78.50486,39.534321)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4528"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,1.1010138,78.50486,8.465679)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4531"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,-1.1010138,78.50486,39.534321)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4534"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,-1.1010138,-59.769574,38.849794)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4542"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.164251,0,0,1.1066309,-7.7152118,3.6172807)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4551"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,-1.1010138,78.504862,39.534322)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4555"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,-1.1010138,78.50486,39.534321)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4558"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,1.1010138,78.50486,8.465679)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4326"
id="radialGradient4591"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,0,0,0.9068628,0,-5.2669822)"
cx="-54.952297"
cy="-56.550789"
fx="-54.952297"
fy="-56.550789"
r="20.607111" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4224"
id="radialGradient4593"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.164251,0,0,1.1066309,-7.7152118,3.6172807)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4463"
id="radialGradient4595"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1373136,0,0,1.1082148,-5.9284,3.6296571)"
cx="65.260735"
cy="-19.960367"
fx="65.260735"
fy="-19.960367"
r="60.306107" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient4471"
id="radialGradient4597"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.1583414,0,0,1.1010138,78.50486,8.465679)"
cx="46.972088"
cy="-33.92337"
fx="46.972088"
fy="-33.92337"
r="60.306107" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.1912945"
inkscape:cx="90.556983"
inkscape:cy="62.870696"
inkscape:current-layer="layer2"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1280"
inkscape:window-height="971"
inkscape:window-x="1280"
inkscape:window-y="53" />
<metadata
id="metadata3214">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Layer 1"
style="display:inline">
<g
id="g4585"
transform="matrix(0.375,0,0,0.375,-32.250002,28.499999)">
<path
transform="matrix(3.105724,0,0,3.4246901,320.66667,181.66893)"
d="M -34.345186 -56.550789 A 20.607111 18.687822 0 1 1 -75.559408,-56.550789 A 20.607111 18.687822 0 1 1 -34.345186 -56.550789 z"
sodipodi:ry="18.687822"
sodipodi:rx="20.607111"
sodipodi:cy="-56.550789"
sodipodi:cx="-54.952297"
id="path4307"
style="opacity:0.54828659;color:#000000;fill:url(#radialGradient4591);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42105264;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
transform="matrix(0.9949241,0,0,0.9949241,86.18091,4.8667588)"
d="M 124.45079 -16.952808 A 60.306107 60.306107 0 1 1 3.8385773,-16.952808 A 60.306107 60.306107 0 1 1 124.45079 -16.952808 z"
sodipodi:ry="60.306107"
sodipodi:rx="60.306107"
sodipodi:cy="-16.952808"
sodipodi:cx="64.144684"
id="path3253"
style="opacity:1;color:#000000;fill:url(#radialGradient4593);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42105264;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
transform="matrix(0.9949241,0,0,0.9949241,86.18091,4.8667588)"
d="M 124.45079 -16.952808 A 60.306107 60.306107 0 1 1 3.8385773,-16.952808 A 60.306107 60.306107 0 1 1 124.45079 -16.952808 z"
sodipodi:ry="60.306107"
sodipodi:rx="60.306107"
sodipodi:cy="-16.952808"
sodipodi:cx="64.144684"
id="path4449"
style="opacity:1;color:#000000;fill:url(#radialGradient4595);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42105264;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
sodipodi:type="arc" />
<path
id="path4540"
d="M 150,-69.5 C 142.83037,-69.5 135.98765,-68.150808 129.65625,-65.75 C 147.08483,-65.444227 156.92068,-63.634228 165.84375,-58.75 C 166.58734,-58.342981 167.32795,-57.919334 168.0625,-57.46875 C 170.26616,-56.116999 172.45785,-54.557678 174.71875,-52.78125 C 184.46361,-45.124541 185.31647,-35.806865 193.59375,-28.6875 C 198.63301,-24.35318 197.95095,-24.718751 200.28125,-24.71875 C 202.83164,-24.71875 204.12996,-27.024001 204.75,-29.53125 C 197.32889,-52.702654 175.62459,-69.500002 150,-69.5 z M 126.9375,-58.9375 C 125.71891,-58.9375 124.50452,-58.806172 123.3125,-58.5625 C 122.91516,-58.481276 122.51852,-58.386673 122.125,-58.28125 C 111.10642,-55.329397 101.67793,-43.173927 98.59375,-37.59375 C 98.397564,-37.238793 98.175214,-36.821586 97.96875,-36.4375 C 96.33105,-32.960142 95.012359,-29.315516 94.09375,-25.5 C 94.975993,-26.628774 95.834585,-27.688244 96.6875,-28.6875 C 102.65791,-35.682293 108.12167,-39.468749 115.96875,-39.46875 C 129.97043,-39.468751 131.74931,-33.230672 157.40625,-16.5 C 170.03357,-8.2658364 189.19518,3.0892866 205,4.78125 C 205.64834,2.6554377 206.16192,0.47219546 206.5625,-1.75 C 200.64939,-2.1768904 195.32265,-4.4309275 189.5625,-8.25 C 188.73962,-8.7955818 187.90585,-9.3595061 187.0625,-9.96875 C 180.31573,-14.842701 172.81758,-21.73368 163.0625,-30.28125 C 155.6349,-36.789448 136.95382,-58.937499 126.9375,-58.9375 z M 106.875,6.71875 C 102.43548,6.71875 99.122712,8.9689884 98.75,14.03125 C 104.97372,26.249869 115.42634,35.94422 128.1875,41.1875 C 128.01834,40.950836 127.85777,40.701503 127.6875,40.4375 C 126.49562,38.589481 125.34375,36.090037 125.34375,33.21875 C 125.34375,29.878317 127.504,28.5625 129.9375,28.5625 C 133.17844,28.5625 143.8763,33.65625 161.78125,33.65625 C 170.73699,33.65625 181.91007,32.344387 190.09375,29.1875 C 193.32597,26.040414 196.17002,22.51695 198.59375,18.6875 C 193.36291,20.808098 183.69005,23.874999 171.09375,23.875 C 146.75952,23.875 124.56774,13.488267 118.15625,10.15625 C 116.45557,9.272415 112.09631,6.7187499 106.875,6.71875 z "
style="opacity:1;color:#000000;fill:url(#radialGradient4597);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.42105264;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</g>
</svg>
......@@ -95,7 +95,9 @@ namespace qmapcontrol
}
else
{
qDebug() << "NETWORK_PIXMAP_ERROR: " << ax;
// QGC FIXME Error is currently undetected
// TODO Error is currently undetected
//qDebug() << "NETWORK_PIXMAP_ERROR: " << ax;
}
}
......
......@@ -83,6 +83,7 @@
<file>images/mapproviders/google.png</file>
<file>images/mapproviders/yahoo.png</file>
<file>images/earth.html</file>
<file>images/mapproviders/googleearth.svg</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">images/Vera.ttf</file>
......
B໿SketchUp Model૿{8.0.3161}䪯鷘Hᭇ亾胳튪弣ÿ璆䳺￿ 噃牥楳湯慍ー￾䌉䄀爀挀䌀甀爀瘀攀Ā＀￾䌊䄀琀琀爀椀戀甀琀攀＀￾䌓䄀琀琀爀椀戀甀琀攀䌀漀渀琀愀椀渀攀爀＀￾䌏䄀琀琀爀椀戀甀琀攀一愀洀攀搀Ā＀￾䌐䈀愀挀欀最爀漀甀渀搀䤀洀愀最攀਀＀￾䌇䌀愀洀攀爀愀Ԁ＀￾䌊䌀漀洀瀀漀渀攀渀琀଀＀￾䌒䌀漀洀瀀漀渀攀渀琀䈀攀栀愀瘀椀漀爀Ԁ＀￾䌔䌀漀洀瀀漀渀攀渀琀䐀攀昀椀渀椀琀椀漀渀਀＀￾䌒䌀漀洀瀀漀渀攀渀琀䤀渀猀琀愀渀挀攀Ѐ＀￾䌕䌀漀渀猀琀爀甀挀琀椀漀渀䜀攀漀洀攀琀爀礀＀￾䌑䌀漀渀猀琀爀甀挀琀椀漀渀䰀椀渀攀Ā＀￾䌒䌀漀渀猀琀爀甀挀琀椀漀渀倀漀椀渀琀＀￾䌆䌀甀爀瘀攀Ѐ＀￾䌏䐀攀昀椀渀椀琀椀漀渀䰀椀猀琀＀￾䌄䐀椀戀̀＀￾䌊䐀椀洀攀渀猀椀漀渀Ā＀￾䌐䐀椀洀攀渀猀椀漀渀䰀椀渀攀愀爀؀＀￾䌐䐀椀洀攀渀猀椀漀渀刀愀搀椀愀氀Ȁ＀￾䌏䐀椀洀攀渀猀椀漀渀匀琀礀氀攀Ѐ＀￾䌏䐀爀愀眀椀渀最䔀氀攀洀攀渀琀ऀ＀￾䌅䔀搀最攀Ȁ＀￾䌈䔀搀最攀唀猀攀Ā＀￾䌇䔀渀琀椀琀礀̀＀￾䌅䘀愀挀攀̀＀￾䌒䘀愀挀攀吀攀砀琀甀爀攀䌀漀漀爀搀猀Ѐ＀￾䌌䘀漀渀琀䴀愀渀愀最攀爀＀￾䌆䜀爀漀甀瀀Ā＀￾䌆䤀洀愀最攀Ā＀￾䌆䰀愀礀攀爀Ȁ＀￾䌍䰀愀礀攀爀䴀愀渀愀最攀爀Ѐ＀￾䌅䰀漀漀瀀Ā＀￾䌉䴀愀琀攀爀椀愀氀ఀ＀￾䌐䴀愀琀攀爀椀愀氀䴀愀渀愀最攀爀Ѐ＀￾䌉倀愀最攀䰀椀猀琀Ā＀￾䌋倀漀氀礀氀椀渀攀㌀搀＀￾䌍刀攀氀愀琀椀漀渀猀栀椀瀀＀￾䌐刀攀氀愀琀椀漀渀猀栀椀瀀䴀愀瀀＀￾䌑刀攀渀搀攀爀椀渀最伀瀀琀椀漀渀猀␀＀￾䌍匀攀挀琀椀漀渀倀氀愀渀攀Ȁ＀￾䌋匀栀愀搀漀眀䤀渀昀漀܀＀￾䌇匀欀䘀漀渀琀Ā＀￾䌉匀欀攀琀挀栀䌀匀＀￾䌎匀欀攀琀挀栀唀瀀䴀漀搀攀氀ᘀ＀￾䌍匀欀攀琀挀栀唀瀀倀愀最攀Ā＀￾䌉匀欀瀀匀琀礀氀攀Ā＀￾䌐匀欀瀀匀琀礀氀攀䴀愀渀愀最攀爀Ȁ＀￾䌅吀攀砀琀ऀ＀￾䌊吀攀砀琀匀琀礀氀攀Ԁ＀￾䌈吀攀砀琀甀爀攀؀＀￾䌊吀栀甀洀戀渀愀椀氀Ā＀￾䌇嘀攀爀琀攀砀＀￾䌉嘀椀攀眀倀愀最攀ఀ＀￾䌊圀愀琀攀爀洀愀爀欀Ā＀￾䌑圀愀琀攀爀洀愀爀欀䴀愀渀愀最攀爀Ȁ＀￾䔒渀搀ⴀ伀昀ⴀ嘀攀爀猀椀漀渀ⴀ䴀愀瀀Ȁ뀀Ā＀ϿЀ䌀楄Ѣ阀 褀乐േᨊ
B໿SketchUp Model૿{8.0.3161}脔뗇밖㍆溃轧Ⳍÿ碐䳺￿ 噃牥楳湯慍ー￾䌉䄀爀挀䌀甀爀瘀攀Ā＀￾䌊䄀琀琀爀椀戀甀琀攀＀￾䌓䄀琀琀爀椀戀甀琀攀䌀漀渀琀愀椀渀攀爀＀￾䌏䄀琀琀爀椀戀甀琀攀一愀洀攀搀Ā＀￾䌐䈀愀挀欀最爀漀甀渀搀䤀洀愀最攀਀＀￾䌇䌀愀洀攀爀愀Ԁ＀￾䌊䌀漀洀瀀漀渀攀渀琀଀＀￾䌒䌀漀洀瀀漀渀攀渀琀䈀攀栀愀瘀椀漀爀Ԁ＀￾䌔䌀漀洀瀀漀渀攀渀琀䐀攀昀椀渀椀琀椀漀渀਀＀￾䌒䌀漀洀瀀漀渀攀渀琀䤀渀猀琀愀渀挀攀Ѐ＀￾䌕䌀漀渀猀琀爀甀挀琀椀漀渀䜀攀漀洀攀琀爀礀＀￾䌑䌀漀渀猀琀爀甀挀琀椀漀渀䰀椀渀攀Ā＀￾䌒䌀漀渀猀琀爀甀挀琀椀漀渀倀漀椀渀琀＀￾䌆䌀甀爀瘀攀Ѐ＀￾䌏䐀攀昀椀渀椀琀椀漀渀䰀椀猀琀＀￾䌄䐀椀戀̀＀￾䌊䐀椀洀攀渀猀椀漀渀Ā＀￾䌐䐀椀洀攀渀猀椀漀渀䰀椀渀攀愀爀؀＀￾䌐䐀椀洀攀渀猀椀漀渀刀愀搀椀愀氀Ȁ＀￾䌏䐀椀洀攀渀猀椀漀渀匀琀礀氀攀Ѐ＀￾䌏䐀爀愀眀椀渀最䔀氀攀洀攀渀琀ऀ＀￾䌅䔀搀最攀Ȁ＀￾䌈䔀搀最攀唀猀攀Ā＀￾䌇䔀渀琀椀琀礀̀＀￾䌅䘀愀挀攀̀＀￾䌒䘀愀挀攀吀攀砀琀甀爀攀䌀漀漀爀搀猀Ѐ＀￾䌌䘀漀渀琀䴀愀渀愀最攀爀＀￾䌆䜀爀漀甀瀀Ā＀￾䌆䤀洀愀最攀Ā＀￾䌆䰀愀礀攀爀Ȁ＀￾䌍䰀愀礀攀爀䴀愀渀愀最攀爀Ѐ＀￾䌅䰀漀漀瀀Ā＀￾䌉䴀愀琀攀爀椀愀氀ఀ＀￾䌐䴀愀琀攀爀椀愀氀䴀愀渀愀最攀爀Ѐ＀￾䌉倀愀最攀䰀椀猀琀Ā＀￾䌋倀漀氀礀氀椀渀攀㌀搀＀￾䌍刀攀氀愀琀椀漀渀猀栀椀瀀＀￾䌐刀攀氀愀琀椀漀渀猀栀椀瀀䴀愀瀀＀￾䌑刀攀渀搀攀爀椀渀最伀瀀琀椀漀渀猀␀＀￾䌍匀攀挀琀椀漀渀倀氀愀渀攀Ȁ＀￾䌋匀栀愀搀漀眀䤀渀昀漀܀＀￾䌇匀欀䘀漀渀琀Ā＀￾䌉匀欀攀琀挀栀䌀匀＀￾䌎匀欀攀琀挀栀唀瀀䴀漀搀攀氀ᘀ＀￾䌍匀欀攀琀挀栀唀瀀倀愀最攀Ā＀￾䌉匀欀瀀匀琀礀氀攀Ā＀￾䌐匀欀瀀匀琀礀氀攀䴀愀渀愀最攀爀Ȁ＀￾䌅吀攀砀琀ऀ＀￾䌊吀攀砀琀匀琀礀氀攀Ԁ＀￾䌈吀攀砀琀甀爀攀؀＀￾䌊吀栀甀洀戀渀愀椀氀Ā＀￾䌇嘀攀爀琀攀砀＀￾䌉嘀椀攀眀倀愀最攀ఀ＀￾䌊圀愀琀攀爀洀愀爀欀Ā＀￾䌑圀愀琀攀爀洀愀爀欀䴀愀渀愀最攀爀Ȁ＀￾䔒渀搀ⴀ伀昀ⴀ嘀攀爀猀椀漀渀ⴀ䴀愀瀀Ȁ뀀Ā＀ϿЀ䌀楄Ѣ쌀褀乐േᨊ
Binary files /dev/null and b/models/multiplex-twinstar.skp differ
Binary files /dev/null and b/models/walkera-4g6.skp differ
......@@ -80,6 +80,8 @@ macx {
QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy google earth starter file
QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.
# Copy model files
QMAKE_PRE_LINK += && cp -f $$BASEDIR/models/*.skp $$DESTDIR/qgroundcontrol.app/Contents/MacOs/.
exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
# No check for GLUT.framework since it's a MAC default
......@@ -278,6 +280,8 @@ win32-msvc2008 {
message(Building for Windows Visual Studio 2008 (32bit))
CONFIG += qaxcontainer
# Special settings for debug
#CONFIG += CONSOLE
......
......@@ -141,7 +141,9 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCRemoteControlView.ui \
src/ui/QMap3D.ui \
src/ui/QGCWebView.ui \
src/ui/map3D/QGCGoogleEarthView.ui
src/ui/map3D/QGCGoogleEarthView.ui \
src/ui/map3D/QGCGoogleEarthViewWin.ui \
src/ui/map3D/QGCGoogleEarthControls.ui
# src/ui/WaypointGlobalView.ui
INCLUDEPATH += src \
......@@ -234,8 +236,8 @@ HEADERS += src/MG.h \
src/ui/RadioCalibration/AbstractCalibrator.h \
src/comm/QGCMAVLink.h \
src/ui/QGCWebView.h \
src/ui/map3D/QGCGoogleEarthView.h
src/ui/map3D/QGCGoogleEarthView.h \
src/ui/map3D/QGCWebPage.h
contains(DEPENDENCIES_PRESENT, osg) {
message("Including headers for OpenSceneGraph")
......@@ -252,7 +254,8 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/WebImage.h \
src/ui/map3D/TextureCache.h \
src/ui/map3D/Texture.h \
src/ui/map3D/Imagery.h
src/ui/map3D/Imagery.h \
src/ui/map3D/HUDScaleGeode.h
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including headers for OSGEARTH")
......@@ -336,7 +339,8 @@ SOURCES += src/main.cc \
src/ui/RadioCalibration/AbstractCalibrator.cc \
src/ui/RadioCalibration/RadioCalibrationData.cc \
src/ui/QGCWebView.cc \
src/ui/map3D/QGCGoogleEarthView.cc
src/ui/map3D/QGCGoogleEarthView.cc \
src/ui/map3D/QGCWebPage.cc
contains(DEPENDENCIES_PRESENT, osg) {
message("Including sources for OpenSceneGraph")
......@@ -352,7 +356,8 @@ contains(DEPENDENCIES_PRESENT, osg) {
src/ui/map3D/WebImage.cc \
src/ui/map3D/TextureCache.cc \
src/ui/map3D/Texture.cc \
src/ui/map3D/Imagery.cc
src/ui/map3D/Imagery.cc \
src/ui/map3D/HUDScaleGeode.cc
contains(DEPENDENCIES_PRESENT, osgearth) {
message("Including sources for osgEarth")
......
......@@ -99,12 +99,6 @@ MAVLinkSimulationLink::MAVLinkSimulationLink(QString readFile, QString writeFile
// Open packet log
mavlinkLogFile = new QFile(MAVLinkProtocol::getLogfileName());
mavlinkLogFile->open(QIODevice::ReadOnly);
// position at Pixhawk lab @ ETHZ
x = 5247273.0f;
y = 465955.0f;
z = -0.2f;
yaw = 0;
}
MAVLinkSimulationLink::~MAVLinkSimulationLink()
......@@ -383,15 +377,14 @@ void MAVLinkSimulationLink::mainloop()
x = x*0.93f + 0.07f*(x+sin(static_cast<float>(QGC::groundTimeUsecs()) * 0.08f));
y = y*0.93f + 0.07f*(y+sin(static_cast<float>(QGC::groundTimeUsecs()) * 0.5f));
z = z*0.93f + 0.07f*(z+sin(static_cast<float>(QGC::groundTimeUsecs()*0.001f)) * 0.1f);
x = 5247273.0f;
y = 465955.0f;
// x = (x > 5.0f) ? 5.0f : x;
// y = (y > 5.0f) ? 5.0f : y;
// z = (z > 3.0f) ? 3.0f : z;
//
// x = (x < -5.0f) ? -5.0f : x;
// y = (y < -5.0f) ? -5.0f : y;
// z = (z < -3.0f) ? -3.0f : z;
x = (x > 5.0f) ? 5.0f : x;
y = (y > 5.0f) ? 5.0f : y;
z = (z > 3.0f) ? 3.0f : z;
x = (x < -5.0f) ? -5.0f : x;
y = (y < -5.0f) ? -5.0f : y;
z = (z < -3.0f) ? -3.0f : z;
// Send back new setpoint
mavlink_message_t ret;
......@@ -409,14 +402,14 @@ void MAVLinkSimulationLink::mainloop()
streampointer += bufferlength;
// GPS RAW
mavlink_msg_gps_raw_pack(systemId, componentId, &ret, 0, 3, 47.376417+(x*0.001), 8.548103+(y*0.001), z, 0, 0, 2.5f, 0.1f);
mavlink_msg_gps_raw_pack(systemId, componentId, &ret, 0, 3, 47.376417+(x*0.00001), 8.548103+(y*0.00001), z, 0, 0, 2.5f, 0.1f);
bufferlength = mavlink_msg_to_send_buffer(buffer, &ret);
//add data into datastream
memcpy(stream+streampointer,buffer, bufferlength);
streampointer += bufferlength;
// GLOBAL POSITION
mavlink_msg_global_position_pack(systemId, componentId, &ret, 0, 3, 47.376417+(x*0.001), 8.548103+(y*0.001), z, 0, 0);
mavlink_msg_global_position_pack(systemId, componentId, &ret, 0, 47.378028137103+(x*0.00001), 8.54899892510421+(y*0.00001), z, 0, 0, 0);
bufferlength = mavlink_msg_to_send_buffer(buffer, &ret);
//add data into datastream
memcpy(stream+streampointer,buffer, bufferlength);
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Definition of the class Freenect.
*
* @author Lionel Heng <hengli@student.ethz.ch>
*
*/
#include "Freenect.h"
#include <cmath>
......@@ -197,7 +228,7 @@ Freenect::get3DPointCloudData(void)
unsigned short* data = reinterpret_cast<unsigned short*>(depth);
for (int i = 0; i < FREENECT_FRAME_PIX; ++i)
{
if (data[i] <= 2048)
if (data[i] > 0 && data[i] <= 2048)
{
// see www.ros.org/wiki/kinect_node for details
double range = 1.0f / (-0.00307f * static_cast<float>(data[i]) + 3.33f);
......@@ -226,9 +257,9 @@ Freenect::get6DPointCloudData(void)
{
Vector6D point;
point.x = rawPointCloud[i].x();
point.y = rawPointCloud[i].y();
point.z = rawPointCloud[i].z();
point.x = rawPointCloud.at(i).x();
point.y = rawPointCloud.at(i).y();
point.z = rawPointCloud.at(i).z();
QVector4D transformedPoint = transformMatrix * QVector4D(point.x, point.y, point.z, 1.0);
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief Definition of the class Freenect.
*
* @author Lionel Heng <hengli@student.ethz.ch>
*
*/
#ifndef FREENECT_H
#define FREENECT_H
......
......@@ -73,12 +73,15 @@ UAS::UAS(MAVLinkProtocol* protocol, int id) : UASInterface(),
sendDropRate(0),
lowBattAlarm(false),
positionLock(false),
localX(0),
localY(0),
localZ(0),
roll(0),
pitch(0),
yaw(0),
localX(0.0),
localY(0.0),
localZ(0.0),
latitude(0.0),
longitude(0.0),
altitude(0.0),
roll(0.0),
pitch(0.0),
yaw(0.0),
statusTimeout(new QTimer(this))
{
color = UASInterface::getNextColor();
......@@ -342,6 +345,9 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_global_position_t pos;
mavlink_msg_global_position_decode(&message, &pos);
quint64 time = getUnixTime(pos.usec);
latitude = pos.lat;
longitude = pos.lon;
altitude = pos.alt;
emit valueChanged(uasId, "lat", pos.lat, time);
emit valueChanged(uasId, "lon", pos.lon, time);
emit valueChanged(uasId, "alt", pos.alt, time);
......@@ -776,6 +782,7 @@ void UAS::sendMessage(LinkInterface* link, mavlink_message_t message)
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
// Write message into buffer, prepending start sign
int len = mavlink_msg_to_send_buffer(buffer, &message);
mavlink_finalize_message_chan(&message, mavlink->getSystemId(), mavlink->getComponentId(), link->getId(), message.len);
// If link is connected
if (link->isConnected())
{
......
......@@ -82,6 +82,9 @@ public:
double getLocalX() const { return localX; };
double getLocalY() const { return localY; };
double getLocalZ() const { return localZ; };
double getLatitude() const { return latitude; };
double getLongitude() const { return longitude; };
double getAltitude() const { return altitude; };
double getRoll() const { return roll; };
double getPitch() const { return pitch; };
......@@ -139,6 +142,9 @@ protected:
double localX;
double localY;
double localZ;
double latitude;
double longitude;
double altitude;
double roll;
double pitch;
double yaw;
......
......@@ -70,6 +70,10 @@ public:
virtual double getLocalY() const = 0;
virtual double getLocalZ() const = 0;
virtual double getLatitude() const = 0;
virtual double getLongitude() const = 0;
virtual double getAltitude() const = 0;
virtual double getRoll() const = 0;
virtual double getPitch() const = 0;
virtual double getYaw() const = 0;
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2010 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
/*===================================================================
======================================================================*/
/**
......@@ -135,14 +115,16 @@ void MainWindow::buildWidgets()
mapWidget = new MapWidget(this);
protocolWidget = new XMLCommProtocolWidget(this);
dataplotWidget = new QGCDataPlot2D(this);
#ifdef QGC_OSG_ENABLED
#ifdef QGC_OSG_ENABLED
_3DWidget = Q3DWidgetFactory::get("PIXHAWK");
#endif
#endif
#ifdef QGC_OSGEARTH_ENABLED
_3DMapWidget = Q3DWidgetFactory::get("MAP3D");
#endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
gEarthWidget = new QGCGoogleEarthView(this);
#endif
// Dock widgets
controlDockWidget = new QDockWidget(tr("Control"), this);
......@@ -234,13 +216,15 @@ void MainWindow::arrangeCenterStack()
if (linechartWidget) centerStack->addWidget(linechartWidget);
if (protocolWidget) centerStack->addWidget(protocolWidget);
if (mapWidget) centerStack->addWidget(mapWidget);
#ifdef QGC_OSG_ENABLED
#ifdef QGC_OSG_ENABLED
if (_3DWidget) centerStack->addWidget(_3DWidget);
#endif
#ifdef QGC_OSGEARTH_ENABLED
#ifdef QGC_OSGEARTH_ENABLED
if (_3DMapWidget) centerStack->addWidget(_3DMapWidget);
#endif
#endif
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
if (gEarthWidget) centerStack->addWidget(gEarthWidget);
#endif
if (hudWidget) centerStack->addWidget(hudWidget);
if (dataplotWidget) centerStack->addWidget(dataplotWidget);
......@@ -380,8 +364,17 @@ void MainWindow::connectActions()
connect(ui.actionPilotView, SIGNAL(triggered()), this, SLOT(loadPilotView()));
connect(ui.actionEngineerView, SIGNAL(triggered()), this, SLOT(loadEngineerView()));
connect(ui.actionOperatorView, SIGNAL(triggered()), this, SLOT(loadOperatorView()));
#ifdef QGC_OSG_ENABLED
connect(ui.action3DView, SIGNAL(triggered()), this, SLOT(load3DView()));
#else
ui.menuWindow->removeAction(ui.action3DView);
#endif
#ifdef QGC_OSGEARTH_ENABLED
connect(ui.action3DMapView, SIGNAL(triggered()), this, SLOT(load3DMapView()));
#else
ui.menuWindow->removeAction(ui.action3DMapView);
#endif
connect(ui.actionShow_full_view, SIGNAL(triggered()), this, SLOT(loadAllView()));
connect(ui.actionShow_MAVLink_view, SIGNAL(triggered()), this, SLOT(loadMAVLinkView()));
connect(ui.actionShow_data_analysis_view, SIGNAL(triggered()), this, SLOT(loadDataView()));
......@@ -390,7 +383,11 @@ void MainWindow::connectActions()
connect(ui.actionOnline_documentation, SIGNAL(triggered()), this, SLOT(showHelp()));
connect(ui.actionCredits_Developers, SIGNAL(triggered()), this, SLOT(showCredits()));
connect(ui.actionProject_Roadmap, SIGNAL(triggered()), this, SLOT(showRoadMap()));
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
connect(ui.actionGoogleEarthView, SIGNAL(triggered()), this, SLOT(loadGoogleEarthView()));
#else
ui.menuWindow->removeAction(ui.actionGoogleEarthView);
#endif
// Joystick configuration
connect(ui.actionJoystickSettings, SIGNAL(triggered()), this, SLOT(configure()));
......@@ -935,17 +932,17 @@ void MainWindow::loadGlobalOperatorView()
waypointsDockWidget->show();
}
// // HORIZONTAL SITUATION INDICATOR
// if (hsiDockWidget)
// {
// HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
// if (hsi)
// {
// addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget);
// hsiDockWidget->show();
// hsi->start();
// }
// }
// // HORIZONTAL SITUATION INDICATOR
// if (hsiDockWidget)
// {
// HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
// if (hsi)
// {
// addDockWidget(Qt::BottomDockWidgetArea, hsiDockWidget);
// hsiDockWidget->show();
// hsi->start();
// }
// }
// PROCESS CONTROL
if (watchdogControlDockWidget)
......@@ -972,159 +969,161 @@ void MainWindow::loadGlobalOperatorView()
void MainWindow::load3DMapView()
{
#ifdef QGC_OSGEARTH_ENABLED
clearView();
#ifdef QGC_OSGEARTH_ENABLED
clearView();
// 3D map
if (_3DMapWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
//map3DWidget->setActive(true);
centerStack->setCurrentWidget(_3DMapWidget);
}
}
// 3D map
if (_3DMapWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
//map3DWidget->setActive(true);
centerStack->setCurrentWidget(_3DMapWidget);
}
}
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
#endif
this->show();
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
#endif
this->show();
}
void MainWindow::loadGoogleEarthView()
{
clearView();
// 3D map
if (gEarthWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
centerStack->setCurrentWidget(gEarthWidget);
}
}
#if (defined Q_OS_WIN) | (defined Q_OS_MAC)
clearView();
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// 3D map
if (gEarthWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
centerStack->setCurrentWidget(gEarthWidget);
}
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
this->show();
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
this->show();
#endif
}
void MainWindow::load3DView()
{
#ifdef QGC_OSG_ENABLED
clearView();
#ifdef QGC_OSG_ENABLED
clearView();
// 3D map
if (_3DWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
//map3DWidget->setActive(true);
centerStack->setCurrentWidget(_3DWidget);
}
}
// 3D map
if (_3DWidget)
{
QStackedWidget *centerStack = dynamic_cast<QStackedWidget*>(centralWidget());
if (centerStack)
{
//map3DWidget->setActive(true);
centerStack->setCurrentWidget(_3DWidget);
}
}
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// UAS CONTROL
if (controlDockWidget)
{
addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
controlDockWidget->show();
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// UAS LIST
if (listDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
listDockWidget->show();
}
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// WAYPOINT LIST
if (waypointsDockWidget)
{
addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
waypointsDockWidget->show();
}
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
// HORIZONTAL SITUATION INDICATOR
if (hsiDockWidget)
{
HSIDisplay* hsi = dynamic_cast<HSIDisplay*>( hsiDockWidget->widget() );
if (hsi)
{
hsi->start();
addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
hsiDockWidget->show();
}
}
#endif
this->show();
this->show();
}
}
void MainWindow::loadEngineerView()
{
......
......@@ -332,7 +332,7 @@
<action name="actionGoogleEarthView">
<property name="icon">
<iconset resource="../../mavground.qrc">
<normaloff>:/images/mapproviders/google.png</normaloff>:/images/mapproviders/google.png</iconset>
<normaloff>:/images/mapproviders/googleearth.svg</normaloff>:/images/mapproviders/googleearth.svg</iconset>
</property>
<property name="text">
<string>Google Earth View</string>
......
......@@ -199,10 +199,9 @@ void WaypointList::add()
}
else
{
//isLocalWP = true;
Waypoint *wp = new Waypoint(0, 1.1, 1.1, -0.8, 0.0, true, true, 0.15, 2000);
Waypoint *wp = new Waypoint(0, uas->getLongitude(), uas->getLatitude(), uas->getAltitude(),
0.0, true, true, 0.15, 2000);
uas->getWaypointManager().addWaypoint(wp);
......
......@@ -33,21 +33,21 @@ This file is part of the QGROUNDCONTROL project
GCManipulator::GCManipulator()
{
_moveSensitivity = 0.05f;
_zoomSensitivity = 1.0f;
_minZoomRange = 2.0f;
_moveSensitivity = 0.05;
_zoomSensitivity = 1.0;
_minZoomRange = 2.0;
}
void
GCManipulator::setMinZoomRange(float minZoomRange)
GCManipulator::setMinZoomRange(double minZoomRange)
{
_minZoomRange = minZoomRange;
}
void
GCManipulator::move(float dx, float dy, float dz)
GCManipulator::move(double dx, double dy, double dz)
{
_center += osg::Vec3(dx, dy, dz);
_center += osg::Vec3d(dx, dy, dz);
}
bool
......@@ -126,15 +126,15 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
case GUIEventAdapter::SCROLL:
{
// zoom model
float scale = 1.0f;
double scale = 1.0;
if (ea.getScrollingMotion() == GUIEventAdapter::SCROLL_UP)
{
scale -= _zoomSensitivity * 0.1f;
scale -= _zoomSensitivity * 0.1;
}
else
{
scale += _zoomSensitivity * 0.1f;
scale += _zoomSensitivity * 0.1;
}
if (_distance * scale > _minZoomRange)
{
......@@ -161,12 +161,12 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
}
case GUIEventAdapter::KEY_Left:
{
float scale = -_moveSensitivity * _distance;
double scale = -_moveSensitivity * _distance;
osg::Matrix rotation_matrix;
rotation_matrix.makeRotate(_rotation);
osg::Vec3 dv(scale, 0.0f, 0.0f);
osg::Vec3d dv(scale, 0.0, 0.0);
_center += dv * rotation_matrix;
......@@ -174,12 +174,12 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
}
case GUIEventAdapter::KEY_Right:
{
float scale = _moveSensitivity * _distance;
double scale = _moveSensitivity * _distance;
osg::Matrix rotation_matrix;
rotation_matrix.makeRotate(_rotation);
osg::Vec3 dv(scale, 0.0f, 0.0f);
osg::Vec3d dv(scale, 0.0, 0.0);
_center += dv * rotation_matrix;
......@@ -187,12 +187,12 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
}
case GUIEventAdapter::KEY_Up:
{
float scale = _moveSensitivity * _distance;
double scale = _moveSensitivity * _distance;
osg::Matrix rotation_matrix;
rotation_matrix.makeRotate(_rotation);
osg::Vec3 dv(0.0f, scale, 0.0f);
osg::Vec3d dv(0.0, scale, 0.0);
_center += dv * rotation_matrix;
......@@ -200,12 +200,12 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
}
case GUIEventAdapter::KEY_Down:
{
float scale = -_moveSensitivity * _distance;
double scale = -_moveSensitivity * _distance;
osg::Matrix rotation_matrix;
rotation_matrix.makeRotate(_rotation);
osg::Vec3 dv(0.0f, scale, 0.0f);
osg::Vec3d dv(0.0, scale, 0.0);
_center += dv * rotation_matrix;
......@@ -231,7 +231,7 @@ GCManipulator::handle(const osgGA::GUIEventAdapter& ea,
bool
GCManipulator::calcMovement()
GCManipulator::calcMovement(void)
{
using namespace osgGA;
......@@ -241,11 +241,11 @@ GCManipulator::calcMovement()
return false;
}
float dx = _ga_t0->getXnormalized() - _ga_t1->getXnormalized();
float dy = _ga_t0->getYnormalized() - _ga_t1->getYnormalized();
double dx = _ga_t0->getXnormalized() - _ga_t1->getXnormalized();
double dy = _ga_t0->getYnormalized() - _ga_t1->getYnormalized();
// return if there is no movement.
if (dx == 0.0f && dy == 0.0f)
if (dx == 0.0 && dy == 0.0)
{
return false;
}
......@@ -282,12 +282,12 @@ GCManipulator::calcMovement()
GUIEventAdapter::RIGHT_MOUSE_BUTTON))
{
// pan model
float scale = -_moveSensitivity * _distance;
double scale = -_moveSensitivity * _distance;
osg::Matrix rotation_matrix;
rotation_matrix.makeRotate(_rotation);
osg::Vec3 dv(dx * scale, dy * scale, 0.0f);
osg::Vec3d dv(dx * scale, dy * scale, 0.0);
_center += dv * rotation_matrix;
......@@ -297,7 +297,7 @@ GCManipulator::calcMovement()
else if (buttonMask == GUIEventAdapter::RIGHT_MOUSE_BUTTON)
{
// zoom model
float scale = 1.0f + dy * _zoomSensitivity;
double scale = 1.0 + dy * _zoomSensitivity;
if (_distance * scale > _minZoomRange)
{
......
Supports Markdown
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