diff --git a/images/earth.html b/images/earth.html
new file mode 100644
index 0000000000000000000000000000000000000000..afdcec85903127711b85d0d757b3a2a6ee2ce15c
--- /dev/null
+++ b/images/earth.html
@@ -0,0 +1,61 @@
+
+
+
+
+ QGroundControl Google Earth View
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mavground.qrc b/mavground.qrc
index 6bb41cfdb8a2b2deddc1c0820342ed9244724a98..a5d1940b1f0ba3325461f8fdc8d435b3006907d5 100644
--- a/mavground.qrc
+++ b/mavground.qrc
@@ -82,6 +82,7 @@
images/mapproviders/openstreetmap.png
images/mapproviders/google.png
images/mapproviders/yahoo.png
+ images/earth.html
images/Vera.ttf
diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri
index fe9e4d821000995281ab6bfb2784a10d7ef63f6c..970583dad22ac85902f1c8a78e31df6f2232aa56 100644
--- a/qgroundcontrol.pri
+++ b/qgroundcontrol.pri
@@ -1,381 +1,388 @@
-#-------------------------------------------------
-#
-# QGroundControl - Micro Air Vehicle Groundstation
-#
-# Please see our website at
-#
-# Author:
-# Lorenz Meier
-#
-# (c) 2009-2010 PIXHAWK Team
-#
-# This file is part of the mav groundstation 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 .
-#
-#-------------------------------------------------
-
-#$$BASEDIR/lib/qextserialport/include
-# $$BASEDIR/lib/openjaus/libjaus/include \
-# $$BASEDIR/lib/openjaus/libopenJaus/include
-
-message(Qt version $$[QT_VERSION])
-
-release {
-# DEFINES += QT_NO_DEBUG_OUTPUT
-# DEFINES += QT_NO_WARNING_OUTPUT
-}
-
-QMAKE_PRE_LINK += echo "Copying files"
-
-#QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
-#QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
-
-# MAC OS X
-macx {
-
- COMPILER_VERSION = $$system(gcc -v)
- message(Using compiler $$COMPILER_VERSION)
-
- HARDWARE_PLATFORM = $$system(uname -a)
- contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || contains( HARDWARE_PLATFORM, 9.9.0 ) {
- # x86 Mac OS X Leopard 10.5 and earlier
- CONFIG += x86 cocoa phonon
- message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
-
- # Enable function-profiling with the OS X saturn tool
- debug {
- #QMAKE_CXXFLAGS += -finstrument-functions
- #LIBS += -lSaturn
- }
- } else {
- # x64 Mac OS X Snow Leopard 10.6 and later
- CONFIG += x86_64 cocoa
- CONFIG -= x86 phonon
- message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
- }
-
- QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
-
- DESTDIR = $$BASEDIR/bin/mac
- INCLUDEPATH += -framework SDL
-
- LIBS += -framework IOKit \
- -framework SDL \
- -framework CoreFoundation \
- -framework ApplicationServices \
- -lm
-
- ICON = $$BASEDIR/images/icons/macx.icns
-
- # Copy audio files if needed
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$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
- message("Building support for OpenSceneGraph")
- DEPENDENCIES_PRESENT += osg
- DEFINES += QGC_OSG_ENABLED
- # Include OpenSceneGraph libraries
- INCLUDEPATH += -framework GLUT \
- -framework Carbon \
- -framework OpenThreads \
- -framework osg \
- -framework osgViewer \
- -framework osgGA \
- -framework osgDB \
- -framework osgText \
- -framework osgWidget
-
- LIBS += -framework GLUT \
- -framework Carbon \
- -framework OpenThreads \
- -framework osg \
- -framework osgViewer \
- -framework osgGA \
- -framework osgDB \
- -framework osgText \
- -framework osgWidget
- }
-
- exists(/usr/include/osgEarth) {
- message("Building support for osgEarth")
- DEPENDENCIES_PRESENT += osgearth
- # Include osgEarth libraries
- INCLUDEPATH += -framework GDAL \
- $$IN_PWD/lib/mac32-gcc/include \
- -framework GEOS \
- -framework SQLite3 \
- -framework osgFX \
- -framework osgTerrain
-
- LIBS += -framework GDAL \
- -framework GEOS \
- -framework SQLite3 \
- -framework osgFX \
- -framework osgTerrain \
- DEFINES += QGC_OSGEARTH_ENABLED
- }
-
- exists(/opt/local/include/libfreenect) {
- message("Building support for libfreenect")
- DEPENDENCIES_PRESENT += libfreenect
- # Include libfreenect libraries
- LIBS += -lfreenect
- DEFINES += QGC_LIBFREENECT_ENABLED
- }
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- #QMAKE_CXXFLAGS += -Wl,-E
-}
-
-# GNU/Linux
-linux-g++ {
-
- debug {
- DESTDIR = $$BUILDDIR/debug
- CONFIG += debug
- }
-
- release {
- DESTDIR = $$BUILDDIR/release
- }
-
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
-
- INCLUDEPATH += /usr/include \
- /usr/include/qt4/phonon
- # $$BASEDIR/lib/flite/include \
- # $$BASEDIR/lib/flite/lang
-
-
- message(Building for GNU/Linux 32bit/i386)
-
- LIBS += \
- -L/usr/lib \
- -lm \
- -lflite_cmu_us_kal \
- -lflite_usenglish \
- -lflite_cmulex \
- -lflite \
- -lSDL \
- -lSDLmain
-
- exists(/usr/include/osg) {
- message("Building support for OpenSceneGraph")
- DEPENDENCIES_PRESENT += osg
- # Include OpenSceneGraph libraries
- LIBS += -losg
- DEFINES += QGC_OSG_ENABLED
- }
-
- exists(/usr/include/osgEarth) | exists(/usr/local/include/osgEarth) {
- message("Building support for osgEarth")
- DEPENDENCIES_PRESENT += osgearth
- # Include osgEarth libraries
- LIBS += -losgViewer \
- -losgEarth \
- -losgEarthUtil
- DEFINES += QGC_OSGEARTH_ENABLED
- }
-
- exists(/usr/local/include/libfreenect/libfreenect.h) {
- message("Building support for libfreenect")
- DEPENDENCIES_PRESENT += libfreenect
- INCLUDEPATH += /usr/include/libusb-1.0
- # Include libfreenect libraries
- LIBS += -lfreenect
- DEFINES += QGC_LIBFREENECT_ENABLED
- }
-
- QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
- QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
- QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug/.
- QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release/.
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- QMAKE_CXXFLAGS += -Wl,-E
-}
-
-linux-g++-64 {
-
- debug {
- DESTDIR = $$BUILDDIR/debug
- CONFIG += debug
- }
-
- release {
- DESTDIR = $$BUILDDIR/release
- }
-
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
-
- INCLUDEPATH += /usr/include \
- /usr/include/qt4/phonon
- # $$BASEDIR/lib/flite/include \
- # $$BASEDIR/lib/flite/lang
-
-
- # 64-bit Linux
- message(Building for GNU/Linux 64bit/x64 (g++-64))
-
- LIBS += \
- -L/usr/lib \
- -lm \
- -lflite_cmu_us_kal \
- -lflite_usenglish \
- -lflite_cmulex \
- -lflite \
- -lSDL \
- -lSDLmain
-
- exists(/usr/include/osg) {
- message("Building support for OpenSceneGraph")
- DEPENDENCIES_PRESENT += osg
- # Include OpenSceneGraph libraries
- LIBS += -losg
- DEFINES += QGC_OSG_ENABLED
- }
-
- exists(/usr/include/osgEarth) {
- message("Building support for osgEarth")
- DEPENDENCIES_PRESENT += osgearth
- # Include osgEarth libraries
- LIBS += -losgViewer \
- -losgEarth \
- -losgEarthUtil
- DEFINES += QGC_OSGEARTH_ENABLED
- }
-
- exists(/usr/local/include/libfreenect) {
- message("Building support for libfreenect")
- DEPENDENCIES_PRESENT += libfreenect
- INCLUDEPATH += /usr/include/libusb-1.0
- # Include libfreenect libraries
- LIBS += -lfreenect
- DEFINES += QGC_LIBFREENECT_ENABLED
- }
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- QMAKE_CXXFLAGS += -Wl,-E
-}
-
-# Windows (32bit)
-win32-msvc2008 {
-
- message(Building for Windows Visual Studio 2008 (32bit))
-
- # Special settings for debug
- #CONFIG += CONSOLE
-
- INCLUDEPATH += $$BASEDIR/lib/sdl/msvc/include \
- $$BASEDIR/lib/opal/include \
- $$BASEDIR/lib/msinttypes
- #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
-
- LIBS += -L$$BASEDIR/lib/sdl/msvc/lib \
- -lSDLmain -lSDL
-
- RC_FILE = $$BASEDIR/qgroundcontrol.rc
-
- # Copy dependencies
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/. &&
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/debug/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/release/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/models $$TARGETDIR/debug/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/models $$TARGETDIR/release/.
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- QMAKE_CXXFLAGS += /Wl /E
-}
-
-# Windows (32bit)
-win32-g++ {
-
- message(Building for Windows Platform (32bit))
-
- # Special settings for debug
- #CONFIG += CONSOLE
-
- INCLUDEPATH += $$BASEDIR/lib/sdl/include \
- $$BASEDIR/lib/opal/include #\ #\
- #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
-
- LIBS += -L$$BASEDIR/lib/sdl/win32 \
- -lmingw32 -lSDLmain -lSDL -mwindows
-
-
-
- debug {
- DESTDIR = $$BUILDDIR/debug
- }
-
- release {
- DESTDIR = $$BUILDDIR/release
- }
-
- RC_FILE = $$BASEDIR/qgroundcontrol.rc
-
- # Copy dependencies
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/debug/. &&
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/release/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/debug/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$TARGETDIR/release/.
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/models $$TARGETDIR/debug/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/models $$TARGETDIR/release/.
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- QMAKE_CXXFLAGS += -Wl,-E
-}
-
-# Windows (64bit)
-win64-g++ {
-
- message(Building for Windows Platform (64bit))
-
- # Special settings for debug
- #CONFIG += CONSOLE
-
- INCLUDEPATH += $$BASEDIR\lib\sdl\include \
- $$BASEDIR\lib\opal\include #\ #\
- #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
-
- LIBS += -L$$BASEDIR\lib\sdl\win32 \
- -lmingw32 -lSDLmain -lSDL -mwindows
-
-
-
- debug {
- DESTDIR = $$BASEDIR/bin
- }
-
- release {
- DESTDIR = $$BASEDIR/bin
- }
-
- RC_FILE = $$BASEDIR/qgroundcontrol.rc
-
- # Copy dependencies
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/debug/. &&
- QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/release/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/debug/. &&
- QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$BUILDDIR/release/.
-
- # osg/osgEarth dynamic casts might fail without this compiler option.
- # see http://osgearth.org/wiki/FAQ for details.
- QMAKE_CXXFLAGS += -Wl,-E
-}
+#-------------------------------------------------
+#
+# QGroundControl - Micro Air Vehicle Groundstation
+#
+# Please see our website at
+#
+# Author:
+# Lorenz Meier
+#
+# (c) 2009-2010 PIXHAWK Team
+#
+# This file is part of the mav groundstation 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 .
+#
+#-------------------------------------------------
+
+#$$BASEDIR/lib/qextserialport/include
+# $$BASEDIR/lib/openjaus/libjaus/include \
+# $$BASEDIR/lib/openjaus/libopenJaus/include
+
+message(Qt version $$[QT_VERSION])
+
+release {
+# DEFINES += QT_NO_DEBUG_OUTPUT
+# DEFINES += QT_NO_WARNING_OUTPUT
+}
+
+QMAKE_PRE_LINK += echo "Copying files"
+
+#QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
+#QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
+
+# MAC OS X
+macx {
+
+ COMPILER_VERSION = system(gcc -v)
+ message(Using compiler $$COMPILER_VERSION)
+
+ HARDWARE_PLATFORM = $$system(uname -a)
+ contains( HARDWARE_PLATFORM, 9.6.0 ) || contains( HARDWARE_PLATFORM, 9.7.0 ) || contains( HARDWARE_PLATFORM, 9.8.0 ) || contains( HARDWARE_PLATFORM, 9.9.0 ) {
+ # x86 Mac OS X Leopard 10.5 and earlier
+ CONFIG += x86 cocoa phonon
+ message(Building for Mac OS X 32bit/Leopard 10.5 and earlier)
+
+ # Enable function-profiling with the OS X saturn tool
+ debug {
+ #QMAKE_CXXFLAGS += -finstrument-functions
+ #LIBS += -lSaturn
+ }
+ } else {
+ # x64 Mac OS X Snow Leopard 10.6 and later
+ CONFIG += x86_64 cocoa
+ CONFIG -= x86 phonon
+ message(Building for Mac OS X 64bit/Snow Leopard 10.6 and later)
+ }
+
+ QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
+
+ DESTDIR = $$BASEDIR/bin/mac
+ INCLUDEPATH += -framework SDL
+
+ LIBS += -framework IOKit \
+ -framework SDL \
+ -framework CoreFoundation \
+ -framework ApplicationServices \
+ -lm
+
+ ICON = $$BASEDIR/images/icons/macx.icns
+
+ # Copy audio files if needed
+ 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/.
+
+ exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) {
+ # No check for GLUT.framework since it's a MAC default
+ message("Building support for OpenSceneGraph")
+ DEPENDENCIES_PRESENT += osg
+ DEFINES += QGC_OSG_ENABLED
+ # Include OpenSceneGraph libraries
+ INCLUDEPATH += -framework GLUT \
+ -framework Carbon \
+ -framework OpenThreads \
+ -framework osg \
+ -framework osgViewer \
+ -framework osgGA \
+ -framework osgDB \
+ -framework osgText \
+ -framework osgWidget
+
+ LIBS += -framework GLUT \
+ -framework Carbon \
+ -framework OpenThreads \
+ -framework osg \
+ -framework osgViewer \
+ -framework osgGA \
+ -framework osgDB \
+ -framework osgText \
+ -framework osgWidget
+ }
+
+ exists(/usr/include/osgEarth) {
+ message("Building support for osgEarth")
+ DEPENDENCIES_PRESENT += osgearth
+ # Include osgEarth libraries
+ INCLUDEPATH += -framework GDAL \
+ $$IN_PWD/lib/mac32-gcc/include \
+ -framework GEOS \
+ -framework SQLite3 \
+ -framework osgFX \
+ -framework osgTerrain
+
+ LIBS += -framework GDAL \
+ -framework GEOS \
+ -framework SQLite3 \
+ -framework osgFX \
+ -framework osgTerrain \
+ DEFINES += QGC_OSGEARTH_ENABLED
+ }
+
+ exists(/opt/local/include/libfreenect) {
+ message("Building support for libfreenect")
+ DEPENDENCIES_PRESENT += libfreenect
+ # Include libfreenect libraries
+ LIBS += -lfreenect
+ DEFINES += QGC_LIBFREENECT_ENABLED
+ }
+
+ # osg/osgEarth dynamic casts might fail without this compiler option.
+ # see http://osgearth.org/wiki/FAQ for details.
+ #QMAKE_CXXFLAGS += -Wl,-E
+}
+
+# GNU/Linux
+linux-g++ {
+
+ debug {
+ DESTDIR = $$BUILDDIR/debug
+ CONFIG += debug
+ }
+
+ release {
+ DESTDIR = $$BUILDDIR/release
+ }
+
+ QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
+
+ INCLUDEPATH += /usr/include \
+ /usr/include/qt4/phonon
+ # $$BASEDIR/lib/flite/include \
+ # $$BASEDIR/lib/flite/lang
+
+
+ message(Building for GNU/Linux 32bit/i386)
+
+ LIBS += \
+ -L/usr/lib \
+ -lm \
+ -lflite_cmu_us_kal \
+ -lflite_usenglish \
+ -lflite_cmulex \
+ -lflite \
+ -lSDL \
+ -lSDLmain
+
+ exists(/usr/include/osg) {
+ message("Building support for OpenSceneGraph")
+ DEPENDENCIES_PRESENT += osg
+ # Include OpenSceneGraph libraries
+ LIBS += -losg
+ DEFINES += QGC_OSG_ENABLED
+ }
+
+ exists(/usr/include/osgEarth) | exists(/usr/local/include/osgEarth) {
+ message("Building support for osgEarth")
+ DEPENDENCIES_PRESENT += osgearth
+ # Include osgEarth libraries
+ LIBS += -losgViewer \
+ -losgEarth \
+ -losgEarthUtil
+ DEFINES += QGC_OSGEARTH_ENABLED
+ }
+
+ exists(/usr/local/include/libfreenect/libfreenect.h) {
+ message("Building support for libfreenect")
+ DEPENDENCIES_PRESENT += libfreenect
+ INCLUDEPATH += /usr/include/libusb-1.0
+ # Include libfreenect libraries
+ LIBS += -lfreenect
+ DEFINES += QGC_LIBFREENECT_ENABLED
+ }
+
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/data $$TARGETDIR/release/.
+
+ # osg/osgEarth dynamic casts might fail without this compiler option.
+ # see http://osgearth.org/wiki/FAQ for details.
+ QMAKE_CXXFLAGS += -Wl,-E
+}
+
+linux-g++-64 {
+
+ debug {
+ DESTDIR = $$BUILDDIR/debug
+ CONFIG += debug
+ }
+
+ release {
+ DESTDIR = $$BUILDDIR/release
+ }
+
+ QMAKE_PRE_LINK += cp -rf $$BASEDIR/audio $$DESTDIR/.
+
+ INCLUDEPATH += /usr/include \
+ /usr/include/qt4/phonon
+ # $$BASEDIR/lib/flite/include \
+ # $$BASEDIR/lib/flite/lang
+
+
+ # 64-bit Linux
+ message(Building for GNU/Linux 64bit/x64 (g++-64))
+
+ LIBS += \
+ -L/usr/lib \
+ -lm \
+ -lflite_cmu_us_kal \
+ -lflite_usenglish \
+ -lflite_cmulex \
+ -lflite \
+ -lSDL \
+ -lSDLmain
+
+ exists(/usr/include/osg) {
+ message("Building support for OpenSceneGraph")
+ DEPENDENCIES_PRESENT += osg
+ # Include OpenSceneGraph libraries
+ LIBS += -losg
+ DEFINES += QGC_OSG_ENABLED
+ }
+
+ exists(/usr/include/osgEarth) {
+ message("Building support for osgEarth")
+ DEPENDENCIES_PRESENT += osgearth
+ # Include osgEarth libraries
+ LIBS += -losgViewer \
+ -losgEarth \
+ -losgEarthUtil
+ DEFINES += QGC_OSGEARTH_ENABLED
+ }
+
+ exists(/usr/local/include/libfreenect) {
+ message("Building support for libfreenect")
+ DEPENDENCIES_PRESENT += libfreenect
+ INCLUDEPATH += /usr/include/libusb-1.0
+ # Include libfreenect libraries
+ LIBS += -lfreenect
+ DEFINES += QGC_LIBFREENECT_ENABLED
+ }
+
+ # osg/osgEarth dynamic casts might fail without this compiler option.
+ # see http://osgearth.org/wiki/FAQ for details.
+ QMAKE_CXXFLAGS += -Wl,-E
+}
+
+# Windows (32bit)
+win32-msvc2008 {
+
+ message(Building for Windows Visual Studio 2008 (32bit))
+
+ # Special settings for debug
+ #CONFIG += CONSOLE
+
+ INCLUDEPATH += $$BASEDIR/lib/sdl/msvc/include \
+ $$BASEDIR/lib/opal/include \
+ $$BASEDIR/lib/msinttypes
+ #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
+
+ LIBS += -L$$BASEDIR/lib/sdl/msvc/lib \
+ -lSDLmain -lSDL
+
+exists($$BASEDIR/lib/osg123) {
+message("Building support for OSG")
+DEPENDENCIES_PRESENT += osg
+
+# Include OpenSceneGraph and osgEarth libraries
+INCLUDEPATH += $$BASEDIR/lib/osgEarth/win32/include \
+ $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/include
+LIBS += -L$$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/lib \
+ -losg \
+ -losgViewer \
+ -losgGA \
+ -losgDB \
+ -losgText \
+ -lOpenThreads
+DEFINES += QGC_OSG_ENABLED
+exists($$BASEDIR/lib/osgEarth123) {
+ DEPENDENCIES_PRESENT += osgearth
+ message("Building support for osgEarth")
+ DEFINES += QGC_OSGEARTH_ENABLED
+ LIBS += -L$$BASEDIR/lib/osgEarth/win32/lib \
+ -losgEarth \
+ -losgEarthUtil
+}
+}
+
+ RC_FILE = $$BASEDIR/qgroundcontrol.rc
+
+ # Copy dependencies
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/debug/.
+
+
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/osg55-osg.dll $$TARGETDIR/release/. &&
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/osg55-osgViewer.dll $$TARGETDIR/release/. &&
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/osg55-osgGA.dll $$TARGETDIR/release/. &&
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/osg55-osgDB.dll $$TARGETDIR/release/. &&
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/osg55-osgText.dll $$TARGETDIR/release/. &&
+ #QMAKE_PRE_LINK += cp -f $$BASEDIR/lib/osgEarth_3rdparty/win32/OpenSceneGraph-2.8.2/bin/OpenThreads.dll $$TARGETDIR/release/. &&
+
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$TARGETDIR/release/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/release/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
+
+ # osg/osgEarth dynamic casts might fail without this compiler option.
+ # see http://osgearth.org/wiki/FAQ for details.
+
+ # Copy google earth starter file
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/release/
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/debug/
+
+}
+
+# Windows (32bit)
+win32-g++ {
+
+ message(Building for Windows Platform (32bit))
+
+ # Special settings for debug
+ #CONFIG += CONSOLE
+
+ INCLUDEPATH += $$BASEDIR/lib/sdl/include \
+ $$BASEDIR/lib/opal/include #\ #\
+ #"C:\Program Files\Microsoft SDKs\Windows\v7.0\Include"
+
+ LIBS += -L$$BASEDIR/lib/sdl/win32 \
+ -lmingw32 -lSDLmain -lSDL -mwindows
+
+
+
+ debug {
+ DESTDIR = $$BUILDDIR/debug
+ }
+
+ release {
+ DESTDIR = $$BUILDDIR/release
+ }
+
+ RC_FILE = $$BASEDIR/qgroundcontrol.rc
+
+ # Copy dependencies
+ debug {
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/debug/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/debug/.
+ }
+
+ release {
+ QMAKE_PRE_LINK += && cp -f $$BASEDIR/lib/sdl/win32/SDL.dll $$BUILDDIR/release/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/release/.
+ QMAKE_PRE_LINK += && cp -rf $$BASEDIR/models $$TARGETDIR/release/.
+ }
+
+ # osg/osgEarth dynamic casts might fail without this compiler option.
+ # see http://osgearth.org/wiki/FAQ for details.
+ QMAKE_CXXFLAGS += -Wl,-E
+}
diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro
index 339eceb236f579ac2e5eea6cdd074d1c78a9c548..d45f0c99f02d2c7df4f532b9ab3ab1b072971c9a 100644
--- a/qgroundcontrol.pro
+++ b/qgroundcontrol.pro
@@ -30,7 +30,8 @@ QT += network \
opengl \
svg \
xml \
- phonon
+ phonon \
+ webkit
TEMPLATE = app
TARGET = qgroundcontrol
BASEDIR = $$IN_PWD
@@ -138,7 +139,9 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCPxImuFirmwareUpdate.ui \
src/ui/QGCDataPlot2D.ui \
src/ui/QGCRemoteControlView.ui \
- src/ui/QMap3D.ui
+ src/ui/QMap3D.ui \
+ src/ui/QGCWebView.ui \
+ src/ui/map3D/QGCGoogleEarthView.ui
# src/ui/WaypointGlobalView.ui
INCLUDEPATH += src \
@@ -222,14 +225,18 @@ HEADERS += src/MG.h \
src/ui/linechart/IncrementalPlot.h \
src/ui/map/Waypoint2DIcon.h \
src/ui/map/MAV2DIcon.h \
- src/ui/QGCRemoteControlView.h \ # src/ui/WaypointGlobalView.h \
+ src/ui/QGCRemoteControlView.h \
src/ui/RadioCalibration/RadioCalibrationData.h \
src/ui/RadioCalibration/RadioCalibrationWindow.h \
src/ui/RadioCalibration/AirfoilServoCalibrator.h \
src/ui/RadioCalibration/SwitchCalibrator.h \
src/ui/RadioCalibration/CurveCalibrator.h \
src/ui/RadioCalibration/AbstractCalibrator.h \
- src/comm/QGCMAVLink.h
+ src/comm/QGCMAVLink.h \
+ src/ui/QGCWebView.h \
+ src/ui/map3D/QGCGoogleEarthView.h
+
+
contains(DEPENDENCIES_PRESENT, osg) {
message("Including headers for OpenSceneGraph")
@@ -327,7 +334,9 @@ SOURCES += src/main.cc \
src/ui/RadioCalibration/SwitchCalibrator.cc \
src/ui/RadioCalibration/CurveCalibrator.cc \
src/ui/RadioCalibration/AbstractCalibrator.cc \
- src/ui/RadioCalibration/RadioCalibrationData.cc
+ src/ui/RadioCalibration/RadioCalibrationData.cc \
+ src/ui/QGCWebView.cc \
+ src/ui/map3D/QGCGoogleEarthView.cc
contains(DEPENDENCIES_PRESENT, osg) {
message("Including sources for OpenSceneGraph")
diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc
index b2c3858da4996b4b640f055f7910202fe7971a99..2bdf16ab834b9bcde71f85724278b6440b76bfaf 100644
--- a/src/GAudioOutput.cc
+++ b/src/GAudioOutput.cc
@@ -41,7 +41,7 @@ This file is part of the QGROUNDCONTROL project
#endif
// Speech synthesis is only supported with MSVC compiler
-#if _MSC_VER
+#if _MSC_VER2
// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx
#define _ATL_APARTMENT_THREADED
@@ -93,7 +93,7 @@ emergency(false)
flite_init();
#endif
- #if _MSC_VER
+ #if _MSC_VER2
ISpVoice * pVoice = NULL;
if (FAILED(::CoInitialize(NULL)))
@@ -134,7 +134,7 @@ emergency(false)
GAudioOutput::~GAudioOutput()
{
-#ifdef _MSC_VER
+#ifdef _MSC_VER2
::CoUninitialize();
#endif
}
diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc
index 87f7b5a987d5827dbc268f6d1decf4c4fa523ea8..4af4fcf50cca0f862fc1f138333e57820642043b 100644
--- a/src/ui/MainWindow.cc
+++ b/src/ui/MainWindow.cc
@@ -142,6 +142,7 @@ void MainWindow::buildWidgets()
#ifdef QGC_OSGEARTH_ENABLED
_3DMapWidget = Q3DWidgetFactory::get("MAP3D");
#endif
+ gEarthWidget = new QGCGoogleEarthView(this);
// Dock widgets
controlDockWidget = new QDockWidget(tr("Control"), this);
@@ -239,6 +240,7 @@ void MainWindow::arrangeCenterStack()
#ifdef QGC_OSGEARTH_ENABLED
if (_3DMapWidget) centerStack->addWidget(_3DMapWidget);
#endif
+ if (gEarthWidget) centerStack->addWidget(gEarthWidget);
if (hudWidget) centerStack->addWidget(hudWidget);
if (dataplotWidget) centerStack->addWidget(dataplotWidget);
@@ -388,6 +390,7 @@ 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()));
+ connect(ui.actionGoogleEarthView, SIGNAL(triggered()), this, SLOT(loadGoogleEarthView()));
// Joystick configuration
connect(ui.actionJoystickSettings, SIGNAL(triggered()), this, SLOT(configure()));
@@ -1017,6 +1020,55 @@ void MainWindow::load3DMapView()
}
#endif
this->show();
+ }
+
+void MainWindow::loadGoogleEarthView()
+{
+ clearView();
+
+ // 3D map
+ if (gEarthWidget)
+ {
+ QStackedWidget *centerStack = dynamic_cast(centralWidget());
+ if (centerStack)
+ {
+ centerStack->setCurrentWidget(gEarthWidget);
+ }
+ }
+
+ // UAS CONTROL
+ if (controlDockWidget)
+ {
+ addDockWidget(Qt::LeftDockWidgetArea, controlDockWidget);
+ controlDockWidget->show();
+ }
+
+ // UAS LIST
+ if (listDockWidget)
+ {
+ addDockWidget(Qt::BottomDockWidgetArea, listDockWidget);
+ listDockWidget->show();
+ }
+
+ // WAYPOINT LIST
+ if (waypointsDockWidget)
+ {
+ addDockWidget(Qt::BottomDockWidgetArea, waypointsDockWidget);
+ waypointsDockWidget->show();
+ }
+
+ // HORIZONTAL SITUATION INDICATOR
+ if (hsiDockWidget)
+ {
+ HSIDisplay* hsi = dynamic_cast( hsiDockWidget->widget() );
+ if (hsi)
+ {
+ hsi->start();
+ addDockWidget(Qt::LeftDockWidgetArea, hsiDockWidget);
+ hsiDockWidget->show();
+ }
+ }
+ this->show();
}
diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h
index 31bb449b21f77e3e77731aba72aa6c5acca68eb3..38db7929181b952c0693c75267a607b5b92c3c4d 100644
--- a/src/ui/MainWindow.h
+++ b/src/ui/MainWindow.h
@@ -63,7 +63,7 @@ This file is part of the QGROUNDCONTROL project
#include "HSIDisplay.h"
#include "QGCDataPlot2D.h"
#include "QGCRemoteControlView.h"
-
+#include "QGCGoogleEarthView.h"
#include "LogCompressor.h"
@@ -113,6 +113,8 @@ public slots:
void loadOperatorView();
/** @brief Load 3D view */
void load3DView();
+ /** @brief Load 3D Google Earth view */
+ void loadGoogleEarthView();
/** @brief Load 3D map view */
void load3DMapView();
/** @brief Load view with all widgets */
@@ -170,6 +172,7 @@ protected:
#ifdef QGC_OSGEARTH_ENABLED
QPointer _3DMapWidget;
#endif
+ QPointer gEarthWidget;
// Dock widgets
QPointer controlDockWidget;
QPointer infoDockWidget;
diff --git a/src/ui/MainWindow.ui b/src/ui/MainWindow.ui
index ed91679edcafa0bf811a97f6a1e6cc2509a5b520..cf7a13f8febe6e8193e36aca7faa74db9dc70e7e 100644
--- a/src/ui/MainWindow.ui
+++ b/src/ui/MainWindow.ui
@@ -38,7 +38,7 @@
0
0
1000
- 25
+ 22
diff --git a/src/ui/QGCWebView.cc b/src/ui/QGCWebView.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7de964b90022f7e51bd191e1ec2b0d72dfa035f6
--- /dev/null
+++ b/src/ui/QGCWebView.cc
@@ -0,0 +1,28 @@
+#include "QGCWebView.h"
+#include "ui_QGCWebView.h"
+
+QGCWebView::QGCWebView(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::QGCWebView)
+{
+ ui->setupUi(this);
+ ui->webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ ui->webView->load(QUrl("http://qgroundcontrol.org"));
+}
+
+QGCWebView::~QGCWebView()
+{
+ delete ui;
+}
+
+void QGCWebView::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
diff --git a/src/ui/QGCWebView.h b/src/ui/QGCWebView.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c85ff08f16f5325b242738db4bc78e6e3f1af97
--- /dev/null
+++ b/src/ui/QGCWebView.h
@@ -0,0 +1,25 @@
+#ifndef QGCWEBVIEW_H
+#define QGCWEBVIEW_H
+
+#include
+
+namespace Ui {
+ class QGCWebView;
+}
+
+class QGCWebView : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit QGCWebView(QWidget *parent = 0);
+ ~QGCWebView();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::QGCWebView *ui;
+};
+
+#endif // QGCWEBVIEW_H
diff --git a/src/ui/QGCWebView.ui b/src/ui/QGCWebView.ui
new file mode 100644
index 0000000000000000000000000000000000000000..d7f8a87a33dcb1767e00004ff8790d2f6e8f49f6
--- /dev/null
+++ b/src/ui/QGCWebView.ui
@@ -0,0 +1,37 @@
+
+
+ QGCWebView
+
+
+
+ 0
+ 0
+ 400
+ 300
+
+
+
+ Form
+
+
+ -
+
+
+
+ about:blank
+
+
+
+
+
+
+
+
+ QWebView
+ QWidget
+
+
+
+
+
+
diff --git a/src/ui/map3D/Pixhawk3DWidget.cc b/src/ui/map3D/Pixhawk3DWidget.cc
index a43f64bb6ab01d1632e195f06bcd374e0e97ba3f..df0f641f3832b93fd0c9d5bd597b2b906c9b32df 100644
--- a/src/ui/map3D/Pixhawk3DWidget.cc
+++ b/src/ui/map3D/Pixhawk3DWidget.cc
@@ -488,7 +488,7 @@ Pixhawk3DWidget::createGrid(void)
// draw a 20m x 20m grid with 0.25m resolution
for (float i = -radius; i <= radius; i += resolution)
{
- if (fabsf(i - roundf(i)) < 0.01f)
+ if (fabsf(i - floor(i + 0.5f)) < 0.01f)
{
coarseCoords->push_back(osg::Vec3(i, -radius, 0.0f));
coarseCoords->push_back(osg::Vec3(i, radius, 0.0f));
diff --git a/src/ui/map3D/Q3DWidget.h b/src/ui/map3D/Q3DWidget.h
index a8a0b368aeb1187fc7ded88c69545b9414fc1bed..62639508b94ad9eb2ccce225ef2a535f61bdfbe7 100644
--- a/src/ui/map3D/Q3DWidget.h
+++ b/src/ui/map3D/Q3DWidget.h
@@ -33,7 +33,7 @@ This file is part of the QGROUNDCONTROL project
#define Q3DWIDGET_H
#include
-
+#include
#include
#include
diff --git a/src/ui/map3D/QGCGoogleEarthView.cc b/src/ui/map3D/QGCGoogleEarthView.cc
new file mode 100644
index 0000000000000000000000000000000000000000..9f3beb303e67e6d792b4ef4afa359d57eaaaf368
--- /dev/null
+++ b/src/ui/map3D/QGCGoogleEarthView.cc
@@ -0,0 +1,28 @@
+#include "QGCGoogleEarthView.h"
+#include "ui_QGCGoogleEarthView.h"
+
+QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::QGCGoogleEarthView)
+{
+ ui->setupUi(this);
+ ui->webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);
+ ui->webView->load(QUrl("earth.html"));
+}
+
+QGCGoogleEarthView::~QGCGoogleEarthView()
+{
+ delete ui;
+}
+
+void QGCGoogleEarthView::changeEvent(QEvent *e)
+{
+ QWidget::changeEvent(e);
+ switch (e->type()) {
+ case QEvent::LanguageChange:
+ ui->retranslateUi(this);
+ break;
+ default:
+ break;
+ }
+}
diff --git a/src/ui/map3D/QGCGoogleEarthView.h b/src/ui/map3D/QGCGoogleEarthView.h
new file mode 100644
index 0000000000000000000000000000000000000000..47f17c1fb819b62803c81ae84450a5157b2743b2
--- /dev/null
+++ b/src/ui/map3D/QGCGoogleEarthView.h
@@ -0,0 +1,25 @@
+#ifndef QGCGOOGLEEARTHVIEW_H
+#define QGCGOOGLEEARTHVIEW_H
+
+#include
+
+namespace Ui {
+ class QGCGoogleEarthView;
+}
+
+class QGCGoogleEarthView : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit QGCGoogleEarthView(QWidget *parent = 0);
+ ~QGCGoogleEarthView();
+
+protected:
+ void changeEvent(QEvent *e);
+
+private:
+ Ui::QGCGoogleEarthView *ui;
+};
+
+#endif // QGCGOOGLEEARTHVIEW_H
diff --git a/src/ui/map3D/QGCGoogleEarthView.ui b/src/ui/map3D/QGCGoogleEarthView.ui
new file mode 100644
index 0000000000000000000000000000000000000000..a720d9a59ada593d183e553d2c3813664787dd07
--- /dev/null
+++ b/src/ui/map3D/QGCGoogleEarthView.ui
@@ -0,0 +1,40 @@
+
+
+ QGCGoogleEarthView
+
+
+
+ 0
+ 0
+ 400
+ 300
+
+
+
+ Form
+
+
+
+ 0
+
+ -
+
+
+
+ about:blank
+
+
+
+
+
+
+
+
+ QWebView
+ QWidget
+
+
+
+
+
+