From bf03570eb87520ceaa44ce25ee4391bc6aa2d88b Mon Sep 17 00:00:00 2001 From: dgodin Date: Tue, 31 Aug 2010 10:14:24 +0000 Subject: [PATCH] [OP-95] Combine both HITL plugins in to a single plugin. First release git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1480 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/Makefile | 186 +++++ ground/src/plugins/Makefile.Debug | 642 +++++++++++++++++ ground/src/plugins/Makefile.Release | 652 ++++++++++++++++++ ground/src/plugins/fgoptionspage.ui | 106 +++ ground/src/plugins/fgsimulator.cpp | 224 ++++++ ground/src/plugins/fgsimulator.h | 70 ++ ground/src/plugins/hitlconfiguration.cpp | 83 +++ ground/src/plugins/hitlconfiguration.h | 61 ++ ground/src/plugins/hitlfactory.cpp | 61 ++ ground/src/plugins/hitlfactory.h | 52 ++ ground/src/plugins/hitlgadget.cpp | 67 ++ ground/src/plugins/hitlgadget.h | 60 ++ ground/src/plugins/hitlnew.pluginspec | 12 + ground/src/plugins/hitlnew.pro | 27 + ground/src/plugins/hitlnew_dependencies.pri | 4 + ground/src/plugins/hitloptionspage.cpp | 112 +++ ground/src/plugins/hitloptionspage.h | 65 ++ ground/src/plugins/hitloptionspage.ui | 173 +++++ ground/src/plugins/hitlplugin.cpp | 71 ++ ground/src/plugins/hitlplugin.h | 71 ++ ground/src/plugins/hitlresources.qrc | 11 + ground/src/plugins/hitlwidget.cpp | 218 ++++++ ground/src/plugins/hitlwidget.h | 71 ++ ground/src/plugins/hitlwidget.ui | 471 +++++++++++++ ground/src/plugins/il2simulator.cpp | 251 +++++++ ground/src/plugins/il2simulator.h | 83 +++ ground/src/plugins/images/arrow-down.png | Bin 0 -> 2932 bytes ground/src/plugins/images/arrow-down2.png | Bin 0 -> 2964 bytes ground/src/plugins/images/arrow-right.png | Bin 0 -> 304 bytes ground/src/plugins/images/arrow-up.png | Bin 0 -> 2932 bytes ground/src/plugins/images/arrow-up2.png | Bin 0 -> 2955 bytes .../src/plugins/images/bullet_arrow_down.png | Bin 0 -> 2967 bytes ground/src/plugins/images/bullet_arrow_up.png | Bin 0 -> 2973 bytes .../src/plugins/images/list_bullet_arrow.png | Bin 0 -> 280 bytes .../images/scrollbarvertical_down_arrow.png | Bin 0 -> 2990 bytes .../images/scrollbarvertical_up_arrow.png | Bin 0 -> 2968 bytes ground/src/plugins/isimulator.h | 72 ++ .../src/plugins/object_script.HITLNEW.Release | 20 + .../src/plugins/object_script.HITLNEWd.Debug | 20 + ground/src/plugins/opfgprotocol.xml | 201 ++++++ ground/src/plugins/simulator.cpp | 270 ++++++++ ground/src/plugins/simulator.h | 194 ++++++ ground/src/plugins/ui_fgoptionspage.h | 119 ++++ ground/src/plugins/ui_hitloptionspage.h | 208 ++++++ ground/src/plugins/ui_hitlwidget.h | 353 ++++++++++ 45 files changed, 5361 insertions(+) create mode 100644 ground/src/plugins/Makefile create mode 100644 ground/src/plugins/Makefile.Debug create mode 100644 ground/src/plugins/Makefile.Release create mode 100644 ground/src/plugins/fgoptionspage.ui create mode 100644 ground/src/plugins/fgsimulator.cpp create mode 100644 ground/src/plugins/fgsimulator.h create mode 100644 ground/src/plugins/hitlconfiguration.cpp create mode 100644 ground/src/plugins/hitlconfiguration.h create mode 100644 ground/src/plugins/hitlfactory.cpp create mode 100644 ground/src/plugins/hitlfactory.h create mode 100644 ground/src/plugins/hitlgadget.cpp create mode 100644 ground/src/plugins/hitlgadget.h create mode 100644 ground/src/plugins/hitlnew.pluginspec create mode 100644 ground/src/plugins/hitlnew.pro create mode 100644 ground/src/plugins/hitlnew_dependencies.pri create mode 100644 ground/src/plugins/hitloptionspage.cpp create mode 100644 ground/src/plugins/hitloptionspage.h create mode 100644 ground/src/plugins/hitloptionspage.ui create mode 100644 ground/src/plugins/hitlplugin.cpp create mode 100644 ground/src/plugins/hitlplugin.h create mode 100644 ground/src/plugins/hitlresources.qrc create mode 100644 ground/src/plugins/hitlwidget.cpp create mode 100644 ground/src/plugins/hitlwidget.h create mode 100644 ground/src/plugins/hitlwidget.ui create mode 100644 ground/src/plugins/il2simulator.cpp create mode 100644 ground/src/plugins/il2simulator.h create mode 100644 ground/src/plugins/images/arrow-down.png create mode 100644 ground/src/plugins/images/arrow-down2.png create mode 100644 ground/src/plugins/images/arrow-right.png create mode 100644 ground/src/plugins/images/arrow-up.png create mode 100644 ground/src/plugins/images/arrow-up2.png create mode 100644 ground/src/plugins/images/bullet_arrow_down.png create mode 100644 ground/src/plugins/images/bullet_arrow_up.png create mode 100644 ground/src/plugins/images/list_bullet_arrow.png create mode 100644 ground/src/plugins/images/scrollbarvertical_down_arrow.png create mode 100644 ground/src/plugins/images/scrollbarvertical_up_arrow.png create mode 100644 ground/src/plugins/isimulator.h create mode 100644 ground/src/plugins/object_script.HITLNEW.Release create mode 100644 ground/src/plugins/object_script.HITLNEWd.Debug create mode 100644 ground/src/plugins/opfgprotocol.xml create mode 100644 ground/src/plugins/simulator.cpp create mode 100644 ground/src/plugins/simulator.h create mode 100644 ground/src/plugins/ui_fgoptionspage.h create mode 100644 ground/src/plugins/ui_hitloptionspage.h create mode 100644 ground/src/plugins/ui_hitlwidget.h diff --git a/ground/src/plugins/Makefile b/ground/src/plugins/Makefile new file mode 100644 index 000000000..3b4f78e92 --- /dev/null +++ b/ground/src/plugins/Makefile @@ -0,0 +1,186 @@ +############################################################################# +# Makefile for building: HITLNEW +# Generated by qmake (2.01a) (Qt 4.6.2) on: ?? 28. ??? 19:28:31 2010 +# Project: hitlnew.pro +# Template: lib +# Command: d:\qt\2010.02.1\qt\bin\qmake.exe -spec d:/Qt/2010.02.1/qt/mkspecs/win32-g++ -win32 -o Makefile hitlnew.pro +############################################################################# + +first: debug +install: debug-install +uninstall: debug-uninstall +MAKEFILE = Makefile +QMAKE = d:/qt/2010.02.1/qt/bin/qmake.exe +DEL_FILE = rm +CHK_DIR_EXISTS= test -d +MKDIR = mkdir +COPY = cp +COPY_FILE = $(COPY) +COPY_DIR = xcopy /s /q /y /i +INSTALL_FILE = $(COPY_FILE) +INSTALL_PROGRAM = $(COPY_FILE) +INSTALL_DIR = $(COPY_DIR) +DEL_FILE = rm +SYMLINK = +DEL_DIR = rmdir +MOVE = mv +CHK_DIR_EXISTS= test -d +MKDIR = mkdir +SUBTARGETS = \ + debug \ + release + +debug: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug +debug-make_default: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug +debug-make_first: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug first +debug-all: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug all +debug-clean: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug clean +debug-distclean: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug distclean +debug-install: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug install +debug-uninstall: $(MAKEFILE).Debug FORCE + $(MAKE) -f $(MAKEFILE).Debug uninstall +release: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release +release-make_default: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release +release-make_first: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release first +release-all: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release all +release-clean: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release clean +release-distclean: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release distclean +release-install: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release install +release-uninstall: $(MAKEFILE).Release FORCE + $(MAKE) -f $(MAKEFILE).Release uninstall + +Makefile: hitlnew.pro d:/Qt/2010.02.1/qt/mkspecs/win32-g++/qmake.conf d:/Qt/2010.02.1/qt/mkspecs/qconfig.pri \ + d:/Qt/2010.02.1/qt/mkspecs/features/qt_functions.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/qt_config.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/exclusive_builds.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/default_pre.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_pre.prf \ + ../../../openpilotgcs.pri \ + ../../openpilotgcsplugin.pri \ + ../../libs/aggregation/aggregation.pri \ + ../../libs/extensionsystem/extensionsystem_dependencies.pri \ + ../../libs/extensionsystem/extensionsystem.pri \ + ../../libs/utils/utils.pri \ + ../../libs/libqxt/libqxt.pri \ + ../../libs/qextserialport/qextserialport.pri \ + ../coreplugin/coreplugin_dependencies.pri \ + ../coreplugin/coreplugin.pri \ + ../../libs/utils/utils.pri \ + ../uavobjects/uavobjects_dependencies.pri \ + ../uavobjects/uavobjects.pri \ + ../uavobjects/uavobjects.pri \ + ../coreplugin/coreplugin.pri \ + ../../libs/utils/utils.pri \ + ../uavtalk/uavtalk_dependencies.pri \ + ../uavtalk/uavtalk.pri \ + ../coreplugin/coreplugin.pri \ + ../../libs/utils/utils.pri \ + hitlnew_dependencies.pri \ + d:/Qt/2010.02.1/qt/mkspecs/features/debug.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/debug_and_release.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/default_post.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_post.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/rtti.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/exceptions.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/stl.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/shared.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/dll.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/warn_on.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/qt.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/thread.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/moc.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/win32/windows.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/resources.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/uic.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/yacc.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/lex.prf \ + d:/Qt/2010.02.1/qt/mkspecs/features/include_source_dir.prf + $(QMAKE) -spec d:/Qt/2010.02.1/qt/mkspecs/win32-g++ -win32 -o Makefile hitlnew.pro +d:/Qt/2010.02.1/qt/mkspecs/qconfig.pri: +d:/Qt/2010.02.1/qt/mkspecs/features/qt_functions.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/qt_config.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/exclusive_builds.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/default_pre.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_pre.prf: +../../../openpilotgcs.pri: +../../openpilotgcsplugin.pri: +../../libs/aggregation/aggregation.pri: +../../libs/extensionsystem/extensionsystem_dependencies.pri: +../../libs/extensionsystem/extensionsystem.pri: +../../libs/utils/utils.pri: +../../libs/libqxt/libqxt.pri: +../../libs/qextserialport/qextserialport.pri: +../coreplugin/coreplugin_dependencies.pri: +../coreplugin/coreplugin.pri: +../../libs/utils/utils.pri: +../uavobjects/uavobjects_dependencies.pri: +../uavobjects/uavobjects.pri: +../uavobjects/uavobjects.pri: +../coreplugin/coreplugin.pri: +../../libs/utils/utils.pri: +../uavtalk/uavtalk_dependencies.pri: +../uavtalk/uavtalk.pri: +../coreplugin/coreplugin.pri: +../../libs/utils/utils.pri: +hitlnew_dependencies.pri: +d:/Qt/2010.02.1/qt/mkspecs/features/debug.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/debug_and_release.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/default_post.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_post.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/rtti.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/exceptions.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/stl.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/shared.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/dll.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/warn_on.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/qt.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/thread.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/moc.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/win32/windows.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/resources.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/uic.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/yacc.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/lex.prf: +d:/Qt/2010.02.1/qt/mkspecs/features/include_source_dir.prf: +qmake: qmake_all FORCE + @$(QMAKE) -spec d:/Qt/2010.02.1/qt/mkspecs/win32-g++ -win32 -o Makefile hitlnew.pro + +qmake_all: FORCE + +make_default: debug-make_default release-make_default FORCE +make_first: debug-make_first release-make_first FORCE +all: debug-all release-all FORCE +clean: debug-clean release-clean FORCE + -$(DEL_FILE) d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot/libHITLNEW.a +distclean: debug-distclean release-distclean FORCE + -$(DEL_FILE) Makefile + +debug-mocclean: $(MAKEFILE).Debug + $(MAKE) -f $(MAKEFILE).Debug mocclean +release-mocclean: $(MAKEFILE).Release + $(MAKE) -f $(MAKEFILE).Release mocclean +mocclean: debug-mocclean release-mocclean + +debug-mocables: $(MAKEFILE).Debug + $(MAKE) -f $(MAKEFILE).Debug mocables +release-mocables: $(MAKEFILE).Release + $(MAKE) -f $(MAKEFILE).Release mocables +mocables: debug-mocables release-mocables +FORCE: + +$(MAKEFILE).Debug: Makefile +$(MAKEFILE).Release: Makefile diff --git a/ground/src/plugins/Makefile.Debug b/ground/src/plugins/Makefile.Debug new file mode 100644 index 000000000..4c54864b2 --- /dev/null +++ b/ground/src/plugins/Makefile.Debug @@ -0,0 +1,642 @@ +############################################################################# +# Makefile for building: HITLNEWd +# Generated by qmake (2.01a) (Qt 4.6.2) on: ?? 28. ??? 19:28:31 2010 +# Project: hitlnew.pro +# Template: lib +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DUNICODE -DQT_LARGEFILE_SUPPORT -DGCS_LIBRARY_BASENAME=\"lib\" -DWITH_TESTS -DQT_NO_CAST_TO_ASCII -DQT_DLL -DQT_PLUGIN -DQT_TESTLIB_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT +CFLAGS = -g -Wall $(DEFINES) +CXXFLAGS = -g -frtti -fexceptions -mthreads -Wall $(DEFINES) +INCPATH = -I'd:/Qt/2010.02.1/qt/include/QtCore' -I'd:/Qt/2010.02.1/qt/include/QtNetwork' -I'd:/Qt/2010.02.1/qt/include/QtGui' -I'd:/Qt/2010.02.1/qt/include/QtTest' -I'd:/Qt/2010.02.1/qt/include' -I'../../libs' -I'../../plugins' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'd:/Qt/2010.02.1/qt/include/ActiveQt' -I'debug' -I'.' -I'd:/Qt/2010.02.1/qt/mkspecs/win32-g++' +LINK = g++ +LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -mthreads -Wl -shared -Wl,--out-implib,d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot/libHITLNEWd.a +LIBS = -L'd:/Qt/2010.02.1/qt/lib' -LD:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs -LD:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot -lAggregationd -lExtensionSystemd -lUtilsd -lQxtCored -lQExtSerialPortd -lCored -lUAVObjectsd -lQxtCored -lQExtSerialPortd -lQxtCored -lQExtSerialPortd -lUAVTalkd -lQxtCored -lQExtSerialPortd -lQtTestd4 -lQtGuid4 -lQtNetworkd4 -lQtCored4 +QMAKE = d:/qt/2010.02.1/qt/bin/qmake.exe +IDC = d:/Qt/2010.02.1/qt/bin/idc.exe +IDL = midl +ZIP = zip -r -9 +DEF_FILE = +RES_FILE = +COPY = cp +COPY_FILE = $(COPY) +COPY_DIR = xcopy /s /q /y /i +DEL_FILE = rm +DEL_DIR = rmdir +MOVE = mv +CHK_DIR_EXISTS= test -d +MKDIR = mkdir +INSTALL_FILE = $(COPY_FILE) +INSTALL_PROGRAM = $(COPY_FILE) +INSTALL_DIR = $(COPY_DIR) + +####### Output directory + +OBJECTS_DIR = debug/ + +####### Files + +SOURCES = hitlplugin.cpp \ + hitlwidget.cpp \ + hitloptionspage.cpp \ + hitlfactory.cpp \ + hitlconfiguration.cpp \ + hitlgadget.cpp \ + simulator.cpp \ + il2simulator.cpp \ + fgsimulator.cpp debug/moc_hitlwidget.cpp \ + debug/moc_hitloptionspage.cpp \ + debug/moc_hitlfactory.cpp \ + debug/moc_hitlconfiguration.cpp \ + debug/moc_hitlgadget.cpp \ + debug/moc_simulator.cpp \ + debug/moc_fgsimulator.cpp \ + debug/moc_il2simulator.cpp \ + debug/qrc_hitlresources.cpp +OBJECTS = debug/hitlplugin.o \ + debug/hitlwidget.o \ + debug/hitloptionspage.o \ + debug/hitlfactory.o \ + debug/hitlconfiguration.o \ + debug/hitlgadget.o \ + debug/simulator.o \ + debug/il2simulator.o \ + debug/fgsimulator.o \ + debug/moc_hitlwidget.o \ + debug/moc_hitloptionspage.o \ + debug/moc_hitlfactory.o \ + debug/moc_hitlconfiguration.o \ + debug/moc_hitlgadget.o \ + debug/moc_simulator.o \ + debug/moc_fgsimulator.o \ + debug/moc_il2simulator.o \ + debug/qrc_hitlresources.o +DIST = +QMAKE_TARGET = HITLNEWd +DESTDIR = ../../../lib/openpilotgcs/plugins/OpenPilot/ #avoid trailing-slash linebreak +TARGET = HITLNEWd.dll +DESTDIR_TARGET = ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEWd.dll + +####### Implicit rules + +.SUFFIXES: .cpp .cc .cxx .c + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +first: all +all: Makefile.Debug $(DESTDIR_TARGET) + +$(DESTDIR_TARGET): ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec ui_hitloptionspage.h ui_hitlwidget.h $(OBJECTS) + $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) object_script.HITLNEWd.Debug $(LIBS) + + +qmake: FORCE + @$(QMAKE) -spec d:/Qt/2010.02.1/qt/mkspecs/win32-g++ -win32 -o Makefile.Debug hitlnew.pro + +dist: + $(ZIP) HITLNEWd.zip $(SOURCES) $(DIST) hitlnew.pro d:/Qt/2010.02.1/qt/mkspecs/qconfig.pri d:/Qt/2010.02.1/qt/mkspecs/features/qt_functions.prf d:/Qt/2010.02.1/qt/mkspecs/features/qt_config.prf d:/Qt/2010.02.1/qt/mkspecs/features/exclusive_builds.prf d:/Qt/2010.02.1/qt/mkspecs/features/default_pre.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_pre.prf ../../../openpilotgcs.pri ../../openpilotgcsplugin.pri ../../libs/aggregation/aggregation.pri ../../libs/extensionsystem/extensionsystem_dependencies.pri ../../libs/extensionsystem/extensionsystem.pri ../../libs/utils/utils.pri ../../libs/libqxt/libqxt.pri ../../libs/qextserialport/qextserialport.pri ../coreplugin/coreplugin_dependencies.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri ../uavobjects/uavobjects_dependencies.pri ../uavobjects/uavobjects.pri ../uavobjects/uavobjects.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri ../uavtalk/uavtalk_dependencies.pri ../uavtalk/uavtalk.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri hitlnew_dependencies.pri d:/Qt/2010.02.1/qt/mkspecs/features/debug.prf d:/Qt/2010.02.1/qt/mkspecs/features/debug_and_release.prf d:/Qt/2010.02.1/qt/mkspecs/features/default_post.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_post.prf d:/Qt/2010.02.1/qt/mkspecs/features/build_pass.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/rtti.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/exceptions.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/stl.prf d:/Qt/2010.02.1/qt/mkspecs/features/shared.prf d:/Qt/2010.02.1/qt/mkspecs/features/dll.prf d:/Qt/2010.02.1/qt/mkspecs/features/warn_on.prf d:/Qt/2010.02.1/qt/mkspecs/features/qt.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/console.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/thread.prf d:/Qt/2010.02.1/qt/mkspecs/features/moc.prf d:/Qt/2010.02.1/qt/mkspecs/features/resources.prf d:/Qt/2010.02.1/qt/mkspecs/features/uic.prf d:/Qt/2010.02.1/qt/mkspecs/features/yacc.prf d:/Qt/2010.02.1/qt/mkspecs/features/lex.prf d:/Qt/2010.02.1/qt/mkspecs/features/include_source_dir.prf PLUGINSPECS HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES + +clean: compiler_clean + -$(DEL_FILE) debug/hitlplugin.o debug/hitlwidget.o debug/hitloptionspage.o debug/hitlfactory.o debug/hitlconfiguration.o debug/hitlgadget.o debug/simulator.o debug/il2simulator.o debug/fgsimulator.o debug/moc_hitlwidget.o debug/moc_hitloptionspage.o debug/moc_hitlfactory.o debug/moc_hitlconfiguration.o debug/moc_hitlgadget.o debug/moc_simulator.o debug/moc_fgsimulator.o debug/moc_il2simulator.o debug/qrc_hitlresources.o + -$(DEL_FILE) d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot/libHITLNEWd.a + +distclean: clean + -$(DEL_FILE) $(DESTDIR_TARGET) + -$(DEL_FILE) Makefile.Debug + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_copy2build_make_all: ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec +compiler_copy2build_clean: + -$(DEL_FILE) ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec +../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec: HITLNEW.pluginspec + cp HITLNEW.pluginspec ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec + +compiler_moc_header_make_all: debug/moc_hitlwidget.cpp debug/moc_hitloptionspage.cpp debug/moc_hitlfactory.cpp debug/moc_hitlconfiguration.cpp debug/moc_hitlgadget.cpp debug/moc_simulator.cpp debug/moc_fgsimulator.cpp debug/moc_il2simulator.cpp +compiler_moc_header_clean: + -$(DEL_FILE) debug/moc_hitlwidget.cpp debug/moc_hitloptionspage.cpp debug/moc_hitlfactory.cpp debug/moc_hitlconfiguration.cpp debug/moc_hitlgadget.cpp debug/moc_simulator.cpp debug/moc_fgsimulator.cpp debug/moc_il2simulator.cpp +debug/moc_hitlwidget.cpp: simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlwidget.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlwidget.h -o debug/moc_hitlwidget.cpp + +debug/moc_hitloptionspage.cpp: ../coreplugin/dialogs/ioptionspage.h \ + ../coreplugin/core_global.h \ + hitloptionspage.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitloptionspage.h -o debug/moc_hitloptionspage.cpp + +debug/moc_hitlfactory.cpp: ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + hitlfactory.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlfactory.h -o debug/moc_hitlfactory.cpp + +debug/moc_hitlconfiguration.cpp: ../coreplugin/iuavgadgetconfiguration.h \ + ../coreplugin/core_global.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlconfiguration.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlconfiguration.h -o debug/moc_hitlconfiguration.cpp + +debug/moc_hitlgadget.cpp: ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlgadget.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlgadget.h -o debug/moc_hitlgadget.cpp + +debug/moc_simulator.cpp: ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + simulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 simulator.h -o debug/moc_simulator.cpp + +debug/moc_fgsimulator.cpp: Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + fgsimulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 fgsimulator.h -o debug/moc_fgsimulator.cpp + +debug/moc_il2simulator.cpp: simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + il2simulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 il2simulator.h -o debug/moc_il2simulator.cpp + +compiler_rcc_make_all: debug/qrc_hitlresources.cpp +compiler_rcc_clean: + -$(DEL_FILE) debug/qrc_hitlresources.cpp +debug/qrc_hitlresources.cpp: hitlresources.qrc \ + opfgprotocol.xml \ + images/arrow-down.png \ + images/arrow-up.png \ + images/scrollbarvertical_down_arrow.png \ + images/scrollbarvertical_up_arrow.png \ + images/arrow-up2.png \ + images/arrow-down2.png + d:/Qt/2010.02.1/qt/bin/rcc.exe -name hitlresources hitlresources.qrc -o debug/qrc_hitlresources.cpp + +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: ui_hitloptionspage.h ui_hitlwidget.h +compiler_uic_clean: + -$(DEL_FILE) ui_hitloptionspage.h ui_hitlwidget.h +ui_hitloptionspage.h: hitloptionspage.ui \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h + d:/Qt/2010.02.1/qt/bin/uic.exe hitloptionspage.ui -o ui_hitloptionspage.h + +ui_hitlwidget.h: hitlwidget.ui + d:/Qt/2010.02.1/qt/bin/uic.exe hitlwidget.ui -o ui_hitlwidget.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_copy2build_clean compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean + + + +####### Compile + +debug/hitlplugin.o: hitlplugin.cpp hitlplugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlfactory.h \ + ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + fgsimulator.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + il2simulator.h \ + simulator.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitlplugin.o hitlplugin.cpp + +debug/hitlwidget.o: hitlwidget.cpp hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_hitlwidget.h \ + HITLPlugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitlwidget.o hitlwidget.cpp + +debug/hitloptionspage.o: hitloptionspage.cpp hitloptionspage.h \ + ../coreplugin/dialogs/ioptionspage.h \ + ../coreplugin/core_global.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_hitloptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + hitlplugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitloptionspage.o hitloptionspage.cpp + +debug/hitlfactory.o: hitlfactory.cpp hitlfactory.h \ + ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlgadget.h \ + ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + hitloptionspage.h \ + ../coreplugin/dialogs/ioptionspage.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitlfactory.o hitlfactory.cpp + +debug/hitlconfiguration.o: hitlconfiguration.cpp hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + ../coreplugin/core_global.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitlconfiguration.o hitlconfiguration.cpp + +debug/hitlgadget.o: hitlgadget.cpp hitlgadget.h \ + ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/hitlgadget.o hitlgadget.cpp + +debug/simulator.o: simulator.cpp simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/simulator.o simulator.cpp + +debug/il2simulator.o: il2simulator.cpp il2simulator.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/il2simulator.o il2simulator.cpp + +debug/fgsimulator.o: fgsimulator.cpp fgsimulator.h \ + Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/fgsimulator.o fgsimulator.cpp + +debug/moc_hitlwidget.o: debug/moc_hitlwidget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_hitlwidget.o debug/moc_hitlwidget.cpp + +debug/moc_hitloptionspage.o: debug/moc_hitloptionspage.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_hitloptionspage.o debug/moc_hitloptionspage.cpp + +debug/moc_hitlfactory.o: debug/moc_hitlfactory.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_hitlfactory.o debug/moc_hitlfactory.cpp + +debug/moc_hitlconfiguration.o: debug/moc_hitlconfiguration.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_hitlconfiguration.o debug/moc_hitlconfiguration.cpp + +debug/moc_hitlgadget.o: debug/moc_hitlgadget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_hitlgadget.o debug/moc_hitlgadget.cpp + +debug/moc_simulator.o: debug/moc_simulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_simulator.o debug/moc_simulator.cpp + +debug/moc_fgsimulator.o: debug/moc_fgsimulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_fgsimulator.o debug/moc_fgsimulator.cpp + +debug/moc_il2simulator.o: debug/moc_il2simulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_il2simulator.o debug/moc_il2simulator.cpp + +debug/qrc_hitlresources.o: debug/qrc_hitlresources.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/qrc_hitlresources.o debug/qrc_hitlresources.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ || $(MKDIR) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ + -$(INSTALL_FILE) "$(DESTDIR_TARGET)" "$(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/$(TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/$(TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ + + +install: install_target FORCE + +uninstall: uninstall_target FORCE + +FORCE: + diff --git a/ground/src/plugins/Makefile.Release b/ground/src/plugins/Makefile.Release new file mode 100644 index 000000000..202608ade --- /dev/null +++ b/ground/src/plugins/Makefile.Release @@ -0,0 +1,652 @@ +############################################################################# +# Makefile for building: HITLNEW +# Generated by qmake (2.01a) (Qt 4.6.2) on: ?? 28. ??? 19:28:31 2010 +# Project: hitlnew.pro +# Template: lib +############################################################################# + +####### Compiler, tools and options + +CC = gcc +CXX = g++ +DEFINES = -DUNICODE -DQT_LARGEFILE_SUPPORT -DGCS_LIBRARY_BASENAME=\"lib\" -DQT_NO_CAST_TO_ASCII -DQT_DLL -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT +CFLAGS = -O2 -Wall $(DEFINES) +CXXFLAGS = -O2 -frtti -fexceptions -mthreads -Wall $(DEFINES) +INCPATH = -I'd:/Qt/2010.02.1/qt/include/QtCore' -I'd:/Qt/2010.02.1/qt/include/QtNetwork' -I'd:/Qt/2010.02.1/qt/include/QtGui' -I'd:/Qt/2010.02.1/qt/include' -I'../../libs' -I'../../plugins' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'../../libs/libqxt/src/core' -I'../../libs/libqxt/src/core/logengines' -I'd:/Qt/2010.02.1/qt/include/ActiveQt' -I'release' -I'.' -I'd:/Qt/2010.02.1/qt/mkspecs/win32-g++' +LINK = g++ +LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -mthreads -Wl -shared -Wl,--out-implib,d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot/libHITLNEW.a +LIBS = -L'd:/Qt/2010.02.1/qt/lib' -LD:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs -LD:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot -lAggregation -lExtensionSystem -lUtils -lQxtCore -lQExtSerialPort -lCore -lUAVObjects -lQxtCore -lQExtSerialPort -lQxtCore -lQExtSerialPort -lUAVTalk -lQxtCore -lQExtSerialPort -lQtGui4 -lQtNetwork4 -lQtCore4 +QMAKE = d:/qt/2010.02.1/qt/bin/qmake.exe +IDC = d:/Qt/2010.02.1/qt/bin/idc.exe +IDL = midl +ZIP = zip -r -9 +DEF_FILE = +RES_FILE = +COPY = cp +COPY_FILE = $(COPY) +COPY_DIR = xcopy /s /q /y /i +DEL_FILE = rm +DEL_DIR = rmdir +MOVE = mv +CHK_DIR_EXISTS= test -d +MKDIR = mkdir +INSTALL_FILE = $(COPY_FILE) +INSTALL_PROGRAM = $(COPY_FILE) +INSTALL_DIR = $(COPY_DIR) + +####### Output directory + +OBJECTS_DIR = release/ + +####### Files + +SOURCES = hitlplugin.cpp \ + hitlwidget.cpp \ + hitloptionspage.cpp \ + hitlfactory.cpp \ + hitlconfiguration.cpp \ + hitlgadget.cpp \ + simulator.cpp \ + il2simulator.cpp \ + fgsimulator.cpp release/moc_hitlwidget.cpp \ + release/moc_hitloptionspage.cpp \ + release/moc_hitlfactory.cpp \ + release/moc_hitlconfiguration.cpp \ + release/moc_hitlgadget.cpp \ + release/moc_simulator.cpp \ + release/moc_fgsimulator.cpp \ + release/moc_il2simulator.cpp \ + release/qrc_hitlresources.cpp +OBJECTS = release/hitlplugin.o \ + release/hitlwidget.o \ + release/hitloptionspage.o \ + release/hitlfactory.o \ + release/hitlconfiguration.o \ + release/hitlgadget.o \ + release/simulator.o \ + release/il2simulator.o \ + release/fgsimulator.o \ + release/moc_hitlwidget.o \ + release/moc_hitloptionspage.o \ + release/moc_hitlfactory.o \ + release/moc_hitlconfiguration.o \ + release/moc_hitlgadget.o \ + release/moc_simulator.o \ + release/moc_fgsimulator.o \ + release/moc_il2simulator.o \ + release/qrc_hitlresources.o +DIST = +QMAKE_TARGET = HITLNEW +DESTDIR = ../../../lib/openpilotgcs/plugins/OpenPilot/ #avoid trailing-slash linebreak +TARGET = HITLNEW.dll +DESTDIR_TARGET = ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.dll + +####### Implicit rules + +.SUFFIXES: .cpp .cc .cxx .c + +.cpp.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cc.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.cxx.o: + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< + +.c.o: + $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< + +####### Build rules + +first: all +all: Makefile.Release $(DESTDIR_TARGET) + +$(DESTDIR_TARGET): ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec ui_hitloptionspage.h ui_hitlwidget.h $(OBJECTS) + $(LINK) $(LFLAGS) -o $(DESTDIR_TARGET) object_script.HITLNEW.Release $(LIBS) + + +qmake: FORCE + @$(QMAKE) -spec d:/Qt/2010.02.1/qt/mkspecs/win32-g++ -win32 -o Makefile.Release hitlnew.pro + +dist: + $(ZIP) HITLNEW.zip $(SOURCES) $(DIST) hitlnew.pro d:/Qt/2010.02.1/qt/mkspecs/qconfig.pri d:/Qt/2010.02.1/qt/mkspecs/features/qt_functions.prf d:/Qt/2010.02.1/qt/mkspecs/features/qt_config.prf d:/Qt/2010.02.1/qt/mkspecs/features/exclusive_builds.prf d:/Qt/2010.02.1/qt/mkspecs/features/default_pre.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_pre.prf ../../../openpilotgcs.pri ../../openpilotgcsplugin.pri ../../libs/aggregation/aggregation.pri ../../libs/extensionsystem/extensionsystem_dependencies.pri ../../libs/extensionsystem/extensionsystem.pri ../../libs/utils/utils.pri ../../libs/libqxt/libqxt.pri ../../libs/qextserialport/qextserialport.pri ../coreplugin/coreplugin_dependencies.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri ../uavobjects/uavobjects_dependencies.pri ../uavobjects/uavobjects.pri ../uavobjects/uavobjects.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri ../uavtalk/uavtalk_dependencies.pri ../uavtalk/uavtalk.pri ../coreplugin/coreplugin.pri ../../libs/utils/utils.pri hitlnew_dependencies.pri d:/Qt/2010.02.1/qt/mkspecs/features/release.prf d:/Qt/2010.02.1/qt/mkspecs/features/debug_and_release.prf d:/Qt/2010.02.1/qt/mkspecs/features/default_post.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/default_post.prf d:/Qt/2010.02.1/qt/mkspecs/features/build_pass.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/rtti.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/exceptions.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/stl.prf d:/Qt/2010.02.1/qt/mkspecs/features/shared.prf d:/Qt/2010.02.1/qt/mkspecs/features/dll.prf d:/Qt/2010.02.1/qt/mkspecs/features/warn_on.prf d:/Qt/2010.02.1/qt/mkspecs/features/qt.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/thread.prf d:/Qt/2010.02.1/qt/mkspecs/features/moc.prf d:/Qt/2010.02.1/qt/mkspecs/features/win32/windows.prf d:/Qt/2010.02.1/qt/mkspecs/features/resources.prf d:/Qt/2010.02.1/qt/mkspecs/features/uic.prf d:/Qt/2010.02.1/qt/mkspecs/features/yacc.prf d:/Qt/2010.02.1/qt/mkspecs/features/lex.prf d:/Qt/2010.02.1/qt/mkspecs/features/include_source_dir.prf PLUGINSPECS HEADERS RESOURCES IMAGES SOURCES OBJECTIVE_SOURCES FORMS YACCSOURCES YACCSOURCES LEXSOURCES + +clean: compiler_clean + -$(DEL_FILE) release/hitlplugin.o release/hitlwidget.o release/hitloptionspage.o release/hitlfactory.o release/hitlconfiguration.o release/hitlgadget.o release/simulator.o release/il2simulator.o release/fgsimulator.o release/moc_hitlwidget.o release/moc_hitloptionspage.o release/moc_hitlfactory.o release/moc_hitlconfiguration.o release/moc_hitlgadget.o release/moc_simulator.o release/moc_fgsimulator.o release/moc_il2simulator.o release/qrc_hitlresources.o + -$(DEL_FILE) d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/lib/openpilotgcs/plugins/OpenPilot/libHITLNEW.a + +distclean: clean + -$(DEL_FILE) $(DESTDIR_TARGET) + -$(DEL_FILE) Makefile.Release + +mocclean: compiler_moc_header_clean compiler_moc_source_clean + +mocables: compiler_moc_header_make_all compiler_moc_source_make_all + +compiler_copy2build_make_all: ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec +compiler_copy2build_clean: + -$(DEL_FILE) ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec +../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec: HITLNEW.pluginspec + cp HITLNEW.pluginspec ../../../lib/openpilotgcs/plugins/OpenPilot/HITLNEW.pluginspec + +compiler_moc_header_make_all: release/moc_hitlwidget.cpp release/moc_hitloptionspage.cpp release/moc_hitlfactory.cpp release/moc_hitlconfiguration.cpp release/moc_hitlgadget.cpp release/moc_simulator.cpp release/moc_fgsimulator.cpp release/moc_il2simulator.cpp +compiler_moc_header_clean: + -$(DEL_FILE) release/moc_hitlwidget.cpp release/moc_hitloptionspage.cpp release/moc_hitlfactory.cpp release/moc_hitlconfiguration.cpp release/moc_hitlgadget.cpp release/moc_simulator.cpp release/moc_fgsimulator.cpp release/moc_il2simulator.cpp +release/moc_hitlwidget.cpp: simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlwidget.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlwidget.h -o release/moc_hitlwidget.cpp + +release/moc_hitloptionspage.cpp: ../coreplugin/dialogs/ioptionspage.h \ + ../coreplugin/core_global.h \ + hitloptionspage.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitloptionspage.h -o release/moc_hitloptionspage.cpp + +release/moc_hitlfactory.cpp: ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + hitlfactory.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlfactory.h -o release/moc_hitlfactory.cpp + +release/moc_hitlconfiguration.cpp: ../coreplugin/iuavgadgetconfiguration.h \ + ../coreplugin/core_global.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlconfiguration.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlconfiguration.h -o release/moc_hitlconfiguration.cpp + +release/moc_hitlgadget.cpp: ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlgadget.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 hitlgadget.h -o release/moc_hitlgadget.cpp + +release/moc_simulator.cpp: ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + simulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 simulator.h -o release/moc_simulator.cpp + +release/moc_fgsimulator.cpp: Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + fgsimulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 fgsimulator.h -o release/moc_fgsimulator.cpp + +release/moc_il2simulator.cpp: simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + il2simulator.h + d:/Qt/2010.02.1/qt/bin/moc.exe $(DEFINES) $(INCPATH) -D__GNUC__ -DWIN32 il2simulator.h -o release/moc_il2simulator.cpp + +compiler_rcc_make_all: release/qrc_hitlresources.cpp +compiler_rcc_clean: + -$(DEL_FILE) release/qrc_hitlresources.cpp +release/qrc_hitlresources.cpp: hitlresources.qrc \ + opfgprotocol.xml \ + images/arrow-down.png \ + images/arrow-up.png \ + images/scrollbarvertical_down_arrow.png \ + images/scrollbarvertical_up_arrow.png \ + images/arrow-up2.png \ + images/arrow-down2.png + d:/Qt/2010.02.1/qt/bin/rcc.exe -name hitlresources hitlresources.qrc -o release/qrc_hitlresources.cpp + +compiler_image_collection_make_all: qmake_image_collection.cpp +compiler_image_collection_clean: + -$(DEL_FILE) qmake_image_collection.cpp +compiler_moc_source_make_all: +compiler_moc_source_clean: +compiler_uic_make_all: ui_hitloptionspage.h ui_hitlwidget.h +compiler_uic_clean: + -$(DEL_FILE) ui_hitloptionspage.h ui_hitlwidget.h +ui_hitloptionspage.h: hitloptionspage.ui \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h + d:/Qt/2010.02.1/qt/bin/uic.exe hitloptionspage.ui -o ui_hitloptionspage.h + +ui_hitlwidget.h: hitlwidget.ui + d:/Qt/2010.02.1/qt/bin/uic.exe hitlwidget.ui -o ui_hitlwidget.h + +compiler_yacc_decl_make_all: +compiler_yacc_decl_clean: +compiler_yacc_impl_make_all: +compiler_yacc_impl_clean: +compiler_lex_make_all: +compiler_lex_clean: +compiler_clean: compiler_copy2build_clean compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean + + + +####### Compile + +release/hitlplugin.o: hitlplugin.cpp hitlplugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlfactory.h \ + ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + fgsimulator.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + il2simulator.h \ + simulator.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitlplugin.o hitlplugin.cpp + +release/hitlwidget.o: hitlwidget.cpp hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_hitlwidget.h \ + HITLPlugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitlwidget.o hitlwidget.cpp + +release/hitloptionspage.o: hitloptionspage.cpp hitloptionspage.h \ + ../coreplugin/dialogs/ioptionspage.h \ + ../coreplugin/core_global.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_hitloptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + hitlplugin.h \ + ../../libs/extensionsystem/iplugin.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + Simulator.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitloptionspage.o hitloptionspage.cpp + +release/hitlfactory.o: hitlfactory.cpp hitlfactory.h \ + ../coreplugin/iuavgadgetfactory.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlgadget.h \ + ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + hitloptionspage.h \ + ../coreplugin/dialogs/ioptionspage.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitlfactory.o hitlfactory.cpp + +release/hitlconfiguration.o: hitlconfiguration.cpp hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h \ + ../coreplugin/core_global.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitlconfiguration.o hitlconfiguration.cpp + +release/hitlgadget.o: hitlgadget.cpp hitlgadget.h \ + ../coreplugin/iuavgadget.h \ + ../coreplugin/icontext.h \ + ../coreplugin/core_global.h \ + hitlwidget.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + hitlconfiguration.h \ + ../coreplugin/iuavgadgetconfiguration.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/hitlgadget.o hitlgadget.cpp + +release/simulator.o: simulator.cpp simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/simulator.o simulator.cpp + +release/il2simulator.o: il2simulator.cpp il2simulator.h \ + simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/il2simulator.o il2simulator.cpp + +release/fgsimulator.o: fgsimulator.cpp fgsimulator.h \ + Simulator.h \ + ../uavtalk/telemetrymanager.h \ + ../uavtalk/uavtalk_global.h \ + ../uavtalk/telemetrymonitor.h \ + ../uavobjects/uavobjectmanager.h \ + ../uavobjects/uavobjects_global.h \ + ../uavobjects/uavobject.h \ + ../uavobjects/uavobjectfield.h \ + ../uavobjects/uavdataobject.h \ + ../uavobjects/uavmetaobject.h \ + ../uavobjects/gcstelemetrystats.h \ + ../uavobjects/flighttelemetrystats.h \ + ../uavobjects/systemstats.h \ + ../uavtalk/telemetry.h \ + ../uavtalk/uavtalk.h \ + ../uavobjects/actuatordesired.h \ + ../uavobjects/altitudeactual.h \ + ../uavobjects/attitudeactual.h \ + ../uavobjects/positionactual.h \ + ui_fgoptionspage.h \ + ../../libs/utils/pathchooser.h \ + ../../libs/utils/utils_global.h \ + ../../libs/extensionsystem/pluginmanager.h \ + ../../libs/extensionsystem/extensionsystem_global.h \ + ../../libs/aggregation/aggregate.h \ + ../../libs/aggregation/aggregation_global.h \ + ../coreplugin/icore.h \ + ../coreplugin/core_global.h \ + ../coreplugin/threadmanager.h + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/fgsimulator.o fgsimulator.cpp + +release/moc_hitlwidget.o: release/moc_hitlwidget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_hitlwidget.o release/moc_hitlwidget.cpp + +release/moc_hitloptionspage.o: release/moc_hitloptionspage.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_hitloptionspage.o release/moc_hitloptionspage.cpp + +release/moc_hitlfactory.o: release/moc_hitlfactory.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_hitlfactory.o release/moc_hitlfactory.cpp + +release/moc_hitlconfiguration.o: release/moc_hitlconfiguration.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_hitlconfiguration.o release/moc_hitlconfiguration.cpp + +release/moc_hitlgadget.o: release/moc_hitlgadget.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_hitlgadget.o release/moc_hitlgadget.cpp + +release/moc_simulator.o: release/moc_simulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_simulator.o release/moc_simulator.cpp + +release/moc_fgsimulator.o: release/moc_fgsimulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_fgsimulator.o release/moc_fgsimulator.cpp + +release/moc_il2simulator.o: release/moc_il2simulator.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_il2simulator.o release/moc_il2simulator.cpp + +release/qrc_hitlresources.o: release/qrc_hitlresources.cpp + $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/qrc_hitlresources.o release/qrc_hitlresources.cpp + +####### Install + +install_target: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ || $(MKDIR) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ + -$(INSTALL_FILE) "$(DESTDIR_TARGET)" "$(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/$(TARGET)" + +uninstall_target: FORCE + -$(DEL_FILE) "$(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/$(TARGET)" + -$(DEL_DIR) $(INSTALL_ROOT)/lib/opnepilotgcs/plugins/OpenPilot/ + + +install_pluginspec: first FORCE + @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/lib/openpilotgcs/plugins/OpenPilot/ || $(MKDIR) $(INSTALL_ROOT)/lib/openpilotgcs/plugins/OpenPilot/ + -$(INSTALL_FILE) d:\Qt\QtProjects\OpenPilot\OpenPilot\trunk\ground\src\plugins\hitlnew\HITLNEW.pluginspec $(INSTALL_ROOT)/lib/openpilotgcs/plugins/OpenPilot/ + + +uninstall_pluginspec: FORCE + -$(DEL_FILE) -r $(INSTALL_ROOT)/lib/openpilotgcs/plugins/OpenPilot/d:/Qt/QtProjects/OpenPilot/OpenPilot/trunk/ground/src/plugins/hitlnew/HITLNEW.pluginspec + -$(DEL_DIR) $(INSTALL_ROOT)/lib/openpilotgcs/plugins/OpenPilot/ + + +install: install_target install_pluginspec FORCE + +uninstall: uninstall_target uninstall_pluginspec FORCE + +FORCE: + diff --git a/ground/src/plugins/fgoptionspage.ui b/ground/src/plugins/fgoptionspage.ui new file mode 100644 index 000000000..82b8abfce --- /dev/null +++ b/ground/src/plugins/fgoptionspage.ui @@ -0,0 +1,106 @@ + + + FGOptionsPage + + + + 0 + 0 + 400 + 320 + + + + + 0 + 0 + + + + Form + + + + 0 + + + + + + 0 + 0 + + + + FlightGear executable: + + + + + + + + 0 + 0 + + + + FlightGear data directory: + + + + + + + + 1 + 0 + + + + + + + + + + + + 0 + 0 + + + + Manual aircraft control (can be used when hardware is not available) + + + Manual aircraft control (can be used when hardware is not available) + + + + + + + Qt::Vertical + + + + 20 + 182 + + + + + + + + + Utils::PathChooser + QWidget +
utils/pathchooser.h
+ 1 +
+
+ + +
diff --git a/ground/src/plugins/fgsimulator.cpp b/ground/src/plugins/fgsimulator.cpp new file mode 100644 index 000000000..fcc31a7d0 --- /dev/null +++ b/ground/src/plugins/fgsimulator.cpp @@ -0,0 +1,224 @@ +/** + ****************************************************************************** + * + * @file flightgearbridge.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "fgsimulator.h" +#include "extensionsystem/pluginmanager.h" +#include "coreplugin/icore.h" +#include "coreplugin/threadmanager.h" + +const float FGSimulator::FT2M = 0.3048; +const float FGSimulator::KT2MPS = 0.514444444; +const float FGSimulator::INHG2KPA = 3.386; + +//FGSimulator::FGSimulator(QString hostAddr, int outPort, int inPort, bool manual, QString binPath, QString dataPath) : +// Simulator(hostAddr, outPort, inPort, manual, binPath, dataPath), +// fgProcess(NULL) +//{ +// // Note: Only tested on windows 7 +//#if defined(Q_WS_WIN) +// cmdShell = QString("c:/windows/system32/cmd.exe"); +//#else +// cmdShell = QString("bash"); +//#endif +//} + +FGSimulator::FGSimulator(const SimulatorSettings& params) : + Simulator(params) +{ +} + +FGSimulator::~FGSimulator() +{ + disconnect(simProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(processReadyRead())); +} + +void FGSimulator::setupUdpPorts(const QString& host, int inPort, int outPort) +{ + inSocket->bind(QHostAddress(host), inPort); +} + +bool FGSimulator::setupProcess() +{ + QMutexLocker locker(&lock); + + // Copy FlightGear generic protocol configuration file to the FG protocol directory + // NOTE: Not working on Windows 7, if FG is installed in the "Program Files", + // likelly due to permissions. The file should be manually copied to data/Protocol/opfgprotocol.xml +// QFile xmlFile(":/flightgear/genericprotocol/opfgprotocol.xml"); +// xmlFile.open(QIODevice::ReadOnly | QIODevice::Text); +// QString xml = xmlFile.readAll(); +// xmlFile.close(); +// QFile xmlFileOut(pathData + "/Protocol/opfgprotocol.xml"); +// xmlFileOut.open(QIODevice::WriteOnly | QIODevice::Text); +// xmlFileOut.write(xml.toAscii()); +// xmlFileOut.close(); + + Qt::HANDLE mainThread = QThread::currentThreadId(); + qDebug() << "setupProcess Thread: "<< mainThread; + + simProcess = new QProcess(); + simProcess->setReadChannelMode(QProcess::MergedChannels); + connect(simProcess, SIGNAL(readyReadStandardOutput()), this, SLOT(processReadyRead())); + // Note: Only tested on windows 7 +#if defined(Q_WS_WIN) + QString cmdShell("c:/windows/system32/cmd.exe"); +#else + QString cmdShell("bash"); +#endif + + // Start shell (Note: Could not start FG directly on Windows, only through terminal!) + simProcess->start(cmdShell); + if (simProcess->waitForStarted() == false) + { + emit processOutput("Error:" + simProcess->errorString()); + return false; + } + + // Setup arguments + // Note: The input generic protocol is set to update at a much higher rate than the actual updates are sent by the GCS. + // If this is not done then a lag will be introduced by FlightGear, likelly because the receive socket buffer builds up during startup. + QString args("--fg-root=\"" + settings.dataPath + "\" --timeofday=dusk --httpd=5400 --enable-hud --in-air --altitude=2000 --vc=100 --generic=socket,out,50,localhost,5500,udp,opfgprotocol"); + if(!settings.manual) + { + args.append(" --generic=socket,in,400,localhost,5501,udp,opfgprotocol"); + } + + // Start FlightGear + QString cmd("\"" + settings.binPath + "\" " + args + "\n"); + simProcess->write(cmd.toAscii()); + + return true; +} + +void FGSimulator::processReadyRead() +{ + QByteArray bytes = simProcess->readAllStandardOutput(); + QString str(bytes); + if ( !str.contains("Error reading data") ) // ignore error + { + emit processOutput(str); + } +} + +void FGSimulator::transmitUpdate() +{ + // Read ActuatorDesired from autopilot + ActuatorDesired::DataFields actData = actDesired->getData(); + float ailerons = actData.Roll; + float elevator = -actData.Pitch; + float rudder = actData.Yaw; + float throttle = actData.Throttle; + + // Send update to FlightGear + QString cmd; + cmd = QString("%1,%2,%3,%4\n") + .arg(ailerons) + .arg(elevator) + .arg(rudder) + .arg(throttle); + QByteArray data = cmd.toAscii(); + outSocket->writeDatagram(data, QHostAddress(settings.hostAddress), settings.outPort); +} + + +void FGSimulator::processUpdate(QString& data) +{ + // Split + QStringList fields = data.split(","); + // Get xRate (deg/s) +// float xRate = fields[0].toFloat() * 180.0/M_PI; + // Get yRate (deg/s) +// float yRate = fields[1].toFloat() * 180.0/M_PI; + // Get zRate (deg/s) +// float zRate = fields[2].toFloat() * 180.0/M_PI; + // Get xAccel (m/s^2) +// float xAccel = fields[3].toFloat() * FT2M; + // Get yAccel (m/s^2) +// float yAccel = fields[4].toFloat() * FT2M; + // Get xAccel (m/s^2) +// float zAccel = fields[5].toFloat() * FT2M; + // Get pitch (deg) + float pitch = fields[6].toFloat(); + // Get pitchRate (deg/s) +// float pitchRate = fields[7].toFloat(); + // Get roll (deg) + float roll = fields[8].toFloat(); + // Get rollRate (deg/s) +// float rollRate = fields[9].toFloat(); + // Get yaw (deg) + float yaw = fields[10].toFloat(); + // Get yawRate (deg/s) +// float yawRate = fields[11].toFloat(); + // Get latitude (deg) + float latitude = fields[12].toFloat(); + // Get longitude (deg) + float longitude = fields[13].toFloat(); + // Get heading (deg) + float heading = fields[14].toFloat(); + // Get altitude (m) + float altitude = fields[15].toFloat() * FT2M; + // Get altitudeAGL (m) + float altitudeAGL = fields[16].toFloat() * FT2M; + // Get groundspeed (m/s) + float groundspeed = fields[17].toFloat() * KT2MPS; + // Get airspeed (m/s) +// float airspeed = fields[18].toFloat() * KT2MPS; + // Get temperature (degC) + float temperature = fields[19].toFloat(); + // Get pressure (kpa) + float pressure = fields[20].toFloat() * INHG2KPA; + + // Update AltitudeActual object + AltitudeActual::DataFields altActualData; + altActualData.Altitude = altitudeAGL; + altActualData.Temperature = temperature; + altActualData.Pressure = pressure; + altActual->setData(altActualData); + + // Update attActual object + AttitudeActual::DataFields attActualData; + attActualData.Roll = roll; + attActualData.Pitch = pitch; + attActualData.Yaw = yaw; + attActualData.q1 = 0; + attActualData.q2 = 0; + attActualData.q3 = 0; + attActualData.q4 = 0; + attActual->setData(attActualData); + + // Update gps objects + PositionActual::DataFields gpsData; + gpsData.Altitude = altitude; + gpsData.Heading = heading; + gpsData.Groundspeed = groundspeed; + gpsData.Latitude = latitude; + gpsData.Longitude = longitude; + gpsData.Satellites = 10; + gpsData.Status = PositionActual::STATUS_FIX3D; + posActual->setData(gpsData); +} + diff --git a/ground/src/plugins/fgsimulator.h b/ground/src/plugins/fgsimulator.h new file mode 100644 index 000000000..75dcb37bc --- /dev/null +++ b/ground/src/plugins/fgsimulator.h @@ -0,0 +1,70 @@ +/** + ****************************************************************************** + * + * @file flightgearbridge.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef FGSIMULATOR_H +#define FGSIMULATOR_H_H + +#include +#include "Simulator.h" + +class FGSimulator: public Simulator +{ + Q_OBJECT + +public: + FGSimulator(const SimulatorSettings& params); + ~FGSimulator(); + + bool setupProcess(); + void setupUdpPorts(const QString& host, int inPort, int outPort); + +private slots: + void transmitUpdate(); + void processReadyRead(); + +private: + static const float FT2M; + static const float KT2MPS; + static const float INHG2KPA; + + void processUpdate(QString& data); +}; + +class FGSimulatorCreator : public SimulatorCreator +{ +public: + FGSimulatorCreator(const QString& classId, const QString& description) + : SimulatorCreator (classId,description) + {} + + Simulator* createSimulator(const SimulatorSettings& params) + { + return new FGSimulator(params); + } + +}; +#endif // FGSIMULATOR_H diff --git a/ground/src/plugins/hitlconfiguration.cpp b/ground/src/plugins/hitlconfiguration.cpp new file mode 100644 index 000000000..42b8b987e --- /dev/null +++ b/ground/src/plugins/hitlconfiguration.cpp @@ -0,0 +1,83 @@ +/** + ****************************************************************************** + * + * @file hitlconfiguration.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "hitlconfiguration.h" +#include + +HITLConfiguration::HITLConfiguration(QString classId, const QByteArray &state, QObject *parent) : + IUAVGadgetConfiguration(classId, parent) +{ + settings.simulatorId = ""; + settings.binPath = ""; + settings.dataPath = ""; + settings.manual = false; + settings.hostAddress = "127.0.0.1"; + settings.outPort = 0; + settings.inPort = 0; + settings.latitude = ""; + settings.longitude = ""; + + if (state.count() > 0) { + QDataStream stream(state); + + stream >> settings.simulatorId; + stream >> settings.binPath; + stream >> settings.dataPath; + stream >> settings.manual; + stream >> settings.hostAddress; + stream >> settings.outPort; + stream >> settings.inPort; + stream >> settings.latitude; + stream >> settings.longitude; + } +} + +IUAVGadgetConfiguration *HITLConfiguration::clone() +{ + HITLConfiguration *m = new HITLConfiguration(this->classId()); + + m->settings = settings; + return m; +} + +QByteArray HITLConfiguration::saveState() const +{ + QByteArray bytes; + QDataStream stream(&bytes, QIODevice::WriteOnly); + + stream << settings.simulatorId; + stream << settings.binPath; + stream << settings.dataPath; + stream << settings.manual; + stream << settings.hostAddress; + stream << settings.outPort; + stream << settings.inPort; + stream << settings.latitude; + stream << settings.longitude; + return bytes; +} + diff --git a/ground/src/plugins/hitlconfiguration.h b/ground/src/plugins/hitlconfiguration.h new file mode 100644 index 000000000..15ec2d38a --- /dev/null +++ b/ground/src/plugins/hitlconfiguration.h @@ -0,0 +1,61 @@ +/** + ****************************************************************************** + * + * @file hitlconfiguration.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITLCONFIGURATION_H +#define HITLCONFIGURATION_H + +#include +#include +#include + +#include + +using namespace Core; + +class HITLConfiguration : public IUAVGadgetConfiguration +{ + + Q_OBJECT + + Q_PROPERTY(SimulatorSettings settings READ Settings WRITE setSimulatorSettings) + +public: + explicit HITLConfiguration(QString classId, const QByteArray &state = 0, QObject *parent = 0); + QByteArray saveState() const; + IUAVGadgetConfiguration *clone(); + + SimulatorSettings Settings() const { return settings; } + +public slots: + void setSimulatorSettings (const SimulatorSettings& params ) { settings = params; } + + +private: + SimulatorSettings settings; +}; + +#endif // HITLCONFIGURATION_H diff --git a/ground/src/plugins/hitlfactory.cpp b/ground/src/plugins/hitlfactory.cpp new file mode 100644 index 000000000..94af029e3 --- /dev/null +++ b/ground/src/plugins/hitlfactory.cpp @@ -0,0 +1,61 @@ +/** + ****************************************************************************** + * + * @file hitlfactory.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "hitlfactory.h" +#include "hitlwidget.h" +#include "hitlgadget.h" +#include "hitlconfiguration.h" +#include "hitloptionspage.h" +#include + +HITLFactory::HITLFactory(QObject *parent) + : IUAVGadgetFactory(QString("HITL"), tr("HITL Simulation"), parent) +{ + +} + +HITLFactory::~HITLFactory() +{ +} + +Core::IUAVGadget* HITLFactory::createGadget(QWidget *parent) +{ + + + HITLWidget* gadgetWidget = new HITLWidget(parent); + return new HITLGadget(QString("HITL"), gadgetWidget, parent); +} + +IUAVGadgetConfiguration *HITLFactory::createConfiguration(const QByteArray &state) +{ + return new HITLConfiguration(QString("HITL"), state); +} + +IOptionsPage *HITLFactory::createOptionsPage(IUAVGadgetConfiguration *config) +{ + return new HITLOptionsPage(qobject_cast(config)); +} + diff --git a/ground/src/plugins/hitlfactory.h b/ground/src/plugins/hitlfactory.h new file mode 100644 index 000000000..5b44e8480 --- /dev/null +++ b/ground/src/plugins/hitlfactory.h @@ -0,0 +1,52 @@ +/** + ****************************************************************************** + * + * @file hitlfactory.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITLFACTORY_H +#define HITLFACTORY_H + +#include + +namespace Core { +class IUAVGadget; +class IUAVGadgetFactory; +} + +using namespace Core; + +class HITLFactory : public Core::IUAVGadgetFactory +{ + Q_OBJECT +public: + HITLFactory(QObject *parent = 0); + ~HITLFactory(); + + IUAVGadget *createGadget(QWidget *parent); + IUAVGadgetConfiguration *createConfiguration(const QByteArray &state); + IOptionsPage *createOptionsPage(IUAVGadgetConfiguration *config); +}; + +#endif // HITLFACTORY_H diff --git a/ground/src/plugins/hitlgadget.cpp b/ground/src/plugins/hitlgadget.cpp new file mode 100644 index 000000000..27e16aa06 --- /dev/null +++ b/ground/src/plugins/hitlgadget.cpp @@ -0,0 +1,67 @@ +/** + ****************************************************************************** + * + * @file hitl.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "hitlgadget.h" +#include "hitlwidget.h" +#include "hitlconfiguration.h" +#include "simulator.h" + +HITLGadget::HITLGadget(QString classId, HITLWidget *widget, QWidget *parent) : + IUAVGadget(classId, parent), + m_widget(widget) +{ + connect(this,SIGNAL(changeConfiguration(void)),m_widget,SLOT(stopButtonClicked(void))); +} + +HITLGadget::~HITLGadget() +{ + +} + +void HITLGadget::loadConfiguration(IUAVGadgetConfiguration* config) +{ + HITLConfiguration *m = qobject_cast(config); + // FG +// simulator->setFGPathBin( m->fgPathBin() ); +// simulator->setFGPathData( m->fgPathData() ); +// simulator->setFGManualControl( m->fgManualControl() ); +// // IL2 + emit changeConfiguration(); + m_widget->setSettingParameters(m->Settings()); + +// m_widget->setSimulatorId(m->SimulatorId()); +// m_widget->setPathBin(m->PathBin()); +// m_widget->setPathData(m->PathData()); +// m_widget->setHostName(m->HostName()); +// m_widget->setLatitude(m->Latitude()); +// m_widget->setLongitude(m->Longitude()); +// m_widget->setOutPort(m->OutPort()); +// m_widget->setInPort(m->InPort()); +// m_widget->setManualControl(m->ManualControl()); + + +} + diff --git a/ground/src/plugins/hitlgadget.h b/ground/src/plugins/hitlgadget.h new file mode 100644 index 000000000..636f30d8d --- /dev/null +++ b/ground/src/plugins/hitlgadget.h @@ -0,0 +1,60 @@ +/** + ****************************************************************************** + * + * @file hitl.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITL_H +#define HITL_H + +#include +#include "hitlwidget.h" + +class IUAVGadget; +class QWidget; +class QString; +class Simulator; + +using namespace Core; + +class HITLGadget : public Core::IUAVGadget +{ + Q_OBJECT +public: + HITLGadget(QString classId, HITLWidget *widget, QWidget *parent = 0); + ~HITLGadget(); + + QWidget *widget() { return m_widget; } + void loadConfiguration(IUAVGadgetConfiguration* config); + +signals: + void changeConfiguration(); + +private: + HITLWidget* m_widget; + Simulator* simulator; +}; + + +#endif // HITL_H diff --git a/ground/src/plugins/hitlnew.pluginspec b/ground/src/plugins/hitlnew.pluginspec new file mode 100644 index 000000000..a52539fdc --- /dev/null +++ b/ground/src/plugins/hitlnew.pluginspec @@ -0,0 +1,12 @@ + + The OpenPilot Project + (C) 2010 OpenPilot Project + The GNU Public License (GPL) Version 3 + Hardware In The Loop Simulation + http://www.openpilot.org + + + + + + diff --git a/ground/src/plugins/hitlnew.pro b/ground/src/plugins/hitlnew.pro new file mode 100644 index 000000000..5b2331d24 --- /dev/null +++ b/ground/src/plugins/hitlnew.pro @@ -0,0 +1,27 @@ +TEMPLATE = lib +TARGET = HITLNEW +QT += network +include(../../openpilotgcsplugin.pri) +include(hitlnew_dependencies.pri) +HEADERS += hitlplugin.h \ + hitlwidget.h \ + hitloptionspage.h \ + hitlfactory.h \ + hitlconfiguration.h \ + hitlgadget.h \ + simulator.h \ + fgsimulator.h \ + il2simulator.h +SOURCES += hitlplugin.cpp \ + hitlwidget.cpp \ + hitloptionspage.cpp \ + hitlfactory.cpp \ + hitlconfiguration.cpp \ + hitlgadget.cpp \ + simulator.cpp \ + il2simulator.cpp \ + fgsimulator.cpp +OTHER_FILES += HITLNEW.pluginspec +FORMS += hitloptionspage.ui \ + hitlwidget.ui +RESOURCES += hitlresources.qrc diff --git a/ground/src/plugins/hitlnew_dependencies.pri b/ground/src/plugins/hitlnew_dependencies.pri new file mode 100644 index 000000000..303773902 --- /dev/null +++ b/ground/src/plugins/hitlnew_dependencies.pri @@ -0,0 +1,4 @@ +include(../../plugins/uavobjects/uavobjects.pri) +include(../../plugins/uavtalk/uavtalk.pri) +include(../../plugins/coreplugin/coreplugin.pri) +include(../../libs/utils/utils.pri) diff --git a/ground/src/plugins/hitloptionspage.cpp b/ground/src/plugins/hitloptionspage.cpp new file mode 100644 index 000000000..d0186fba1 --- /dev/null +++ b/ground/src/plugins/hitloptionspage.cpp @@ -0,0 +1,112 @@ +/** + ****************************************************************************** + * + * @file hitloptionspage.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "hitloptionspage.h" +#include "hitlconfiguration.h" +#include "ui_hitloptionspage.h" +#include + +#include +#include +#include +#include + + + +HITLOptionsPage::HITLOptionsPage(HITLConfiguration *conf, QObject *parent) : + IOptionsPage(parent), + config(conf) +{ +} + +QWidget *HITLOptionsPage::createPage(QWidget *parent) +{ + // Create page + m_optionsPage = new Ui::HITLOptionsPage(); + QWidget* optionsPageWidget = new QWidget; + m_optionsPage->setupUi(optionsPageWidget); + int index = 0; + foreach(SimulatorCreator* creator, HITLPlugin::typeSimulators) + { + m_optionsPage->chooseFlightSimulator->insertItem(index++, creator->Description(),creator->ClassId()); + } + + //QString classId = widget->listSimulators->itemData(0).toString(); + //SimulatorCreator* creator = HITLPlugin::getSimulatorCreator(classId); + + //QWidget* embedPage = creator->createOptionsPage(); + //m_optionsPage->verticalLayout->addWidget(embedPage); + + m_optionsPage->executablePath->setExpectedKind(Utils::PathChooser::File); + m_optionsPage->executablePath->setPromptDialogTitle(tr("Choose flight simulator executable")); + m_optionsPage->dataPath->setExpectedKind(Utils::PathChooser::Directory); + m_optionsPage->dataPath->setPromptDialogTitle(tr("Choose flight simulator data directory")); + + // Restore the contents from the settings: + foreach(SimulatorCreator* creator, HITLPlugin::typeSimulators) + { + QString id = config->Settings().simulatorId; + if(creator->ClassId() == id) + m_optionsPage->chooseFlightSimulator->setCurrentIndex(HITLPlugin::typeSimulators.indexOf(creator)); + } + + m_optionsPage->executablePath->setPath(config->Settings().binPath); + m_optionsPage->dataPath->setPath(config->Settings().dataPath); + m_optionsPage->manualControl->setChecked(config->Settings().manual); + + m_optionsPage->hostAddress->setText(config->Settings().hostAddress); + m_optionsPage->outputPort->setText(QString::number(config->Settings().outPort)); + m_optionsPage->inputPort->setText(QString::number(config->Settings().inPort)); + m_optionsPage->latitude->setText(config->Settings().latitude); + m_optionsPage->longitude->setText(config->Settings().longitude); + + return optionsPageWidget; +} + +void HITLOptionsPage::apply() +{ + SimulatorSettings settings; + int i = m_optionsPage->chooseFlightSimulator->currentIndex(); + + settings.simulatorId = m_optionsPage->chooseFlightSimulator->itemData(i).toString(); + settings.binPath = m_optionsPage->executablePath->path(); + settings.dataPath = m_optionsPage->dataPath->path(); + settings.manual = m_optionsPage->manualControl->isChecked(); + settings.hostAddress = m_optionsPage->hostAddress->text(); + + settings.inPort = m_optionsPage->inputPort->text().toInt(); + settings.outPort = m_optionsPage->outputPort->text().toInt(); + settings.longitude = m_optionsPage->longitude->text(); + settings.latitude = m_optionsPage->latitude->text(); + + config->setSimulatorSettings(settings); +} + +void HITLOptionsPage::finish() +{ + delete m_optionsPage; +} diff --git a/ground/src/plugins/hitloptionspage.h b/ground/src/plugins/hitloptionspage.h new file mode 100644 index 000000000..c2aa9af75 --- /dev/null +++ b/ground/src/plugins/hitloptionspage.h @@ -0,0 +1,65 @@ +/** + ****************************************************************************** + * + * @file hitloptionspage.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITLOPTIONSPAGE_H +#define HITLOPTIONSPAGE_H + +#include "coreplugin/dialogs/ioptionspage.h" + +namespace Core { +class IUAVGadgetConfiguration; +} + +class HITLConfiguration; + +using namespace Core; + +namespace Ui { + class HITLOptionsPage; +} + +class HITLOptionsPage : public IOptionsPage +{ +Q_OBJECT +public: + explicit HITLOptionsPage(HITLConfiguration *conf, QObject *parent = 0); + + QWidget *createPage(QWidget *parent); + void apply(); + void finish(); + bool isDecorated() const { return true;} +signals: + +private slots: + +private: + HITLConfiguration* config; + Ui::HITLOptionsPage* m_optionsPage; + +}; + +#endif // HITLOPTIONSPAGE_H diff --git a/ground/src/plugins/hitloptionspage.ui b/ground/src/plugins/hitloptionspage.ui new file mode 100644 index 000000000..892325eaa --- /dev/null +++ b/ground/src/plugins/hitloptionspage.ui @@ -0,0 +1,173 @@ + + + HITLOptionsPage + + + + 0 + 0 + 400 + 320 + + + + + 0 + 0 + + + + Form + + + + 0 + + + + + Choose flight simulator: + + + + + + + + + + Qt::Horizontal + + + + + + + Latitude in degrees: + + + + + + + + + + Longitude in degrees: + + + + + + + + + + + 0 + 0 + + + + Path executable: + + + + + + + + 1 + 0 + + + + + + + + + 0 + 0 + + + + Data directory: + + + + + + + + + + + 0 + 0 + + + + Manual aircraft control (can be used when hardware is not available) + + + Manual aircraft control (can be used when hardware is not available) + + + + + + + Qt::Vertical + + + + 20 + 182 + + + + + + + + Host Address: + + + + + + + + + + + + + Output Port: + + + + + + + + + + Input Port: + + + + + + + + Utils::PathChooser + QWidget +
utils/pathchooser.h
+ 1 +
+
+ + +
diff --git a/ground/src/plugins/hitlplugin.cpp b/ground/src/plugins/hitlplugin.cpp new file mode 100644 index 000000000..70f6a0e26 --- /dev/null +++ b/ground/src/plugins/hitlplugin.cpp @@ -0,0 +1,71 @@ +/** + ****************************************************************************** + * + * @file mapplugin.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "hitlplugin.h" +#include "hitlfactory.h" +#include +#include +#include +#include "fgsimulator.h" +#include "il2simulator.h" + +QList HITLPlugin::typeSimulators; + +HITLPlugin::HITLPlugin() +{ + // Do nothing +} + +HITLPlugin::~HITLPlugin() +{ + // Do nothing +} + +bool HITLPlugin::initialize(const QStringList& args, QString *errMsg) +{ + Q_UNUSED(args); + Q_UNUSED(errMsg); + mf = new HITLFactory(this); + + addAutoReleasedObject(mf); + + addSimulator(new FGSimulatorCreator("FG","FlightGear")); + addSimulator(new IL2SimulatorCreator("IL2","IL2")); + + return true; +} + +void HITLPlugin::extensionsInitialized() +{ + // Do nothing +} + +void HITLPlugin::shutdown() +{ + // Do nothing +} +Q_EXPORT_PLUGIN(HITLPlugin) + diff --git a/ground/src/plugins/hitlplugin.h b/ground/src/plugins/hitlplugin.h new file mode 100644 index 000000000..f5ea2158b --- /dev/null +++ b/ground/src/plugins/hitlplugin.h @@ -0,0 +1,71 @@ +/** + ****************************************************************************** + * + * @file browserplugin.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITLPLUGIN_H +#define HITLPLUGIN_H + +#include +#include + +#include + +class HITLFactory; + +class HITLPlugin : public ExtensionSystem::IPlugin +{ +public: + HITLPlugin(); + ~HITLPlugin(); + + void extensionsInitialized(); + bool initialize(const QStringList & arguments, QString * errorString); + void shutdown(); + + + static void addSimulator(SimulatorCreator* creator) + { + HITLPlugin::typeSimulators.append(creator); + } + + static SimulatorCreator* getSimulatorCreator(const QString classId) + { + foreach(SimulatorCreator* creator, HITLPlugin::typeSimulators) + { + if(classId == creator->ClassId()) + return creator; + } + return 0; + } + + static QList typeSimulators; + +private: + HITLFactory *mf; + + +}; +#endif /* HITLPLUGIN_H */ diff --git a/ground/src/plugins/hitlresources.qrc b/ground/src/plugins/hitlresources.qrc new file mode 100644 index 000000000..4ea83c60a --- /dev/null +++ b/ground/src/plugins/hitlresources.qrc @@ -0,0 +1,11 @@ + + + opfgprotocol.xml + images/scrollbarvertical_down_arrow.png + images/scrollbarvertical_up_arrow.png + images/arrow-up.png + images/arrow-down.png + images/arrow-up2.png + images/arrow-down2.png + + diff --git a/ground/src/plugins/hitlwidget.cpp b/ground/src/plugins/hitlwidget.cpp new file mode 100644 index 000000000..726f3b412 --- /dev/null +++ b/ground/src/plugins/hitlwidget.cpp @@ -0,0 +1,218 @@ +/** + ****************************************************************************** + * + * @file hitlwidget.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "hitlwidget.h" +#include "ui_hitlwidget.h" +#include "qxtlogger.h" +#include +#include +#include +#include +#include + +#include +#include +#include "uavobjects/uavobjectmanager.h" +#include "coreplugin/icore.h" +#include "coreplugin/threadmanager.h" + + +QStringList Simulator::instances; + +HITLWidget::HITLWidget(QWidget *parent) + : QWidget(parent), + simulator(0) +{ + widget = new Ui_HITLWidget(); + widget->setupUi(this); + widget->startButton->setEnabled(true); + widget->stopButton->setEnabled(false); + + greenColor = "rgb(35, 221, 35)"; + + strAutopilotDisconnected = " Autopilot disconnected "; + strSimulatorDisconnected = " Simulator disconnected "; + strAutopilotConnected = " Autopilot connected "; + strSimulatorConnected = " Simulator connected "; + + widget->apLabel->setText(strAutopilotDisconnected); + widget->simLabel->setText(strSimulatorDisconnected); + + connect(widget->startButton, SIGNAL(clicked()), this, SLOT(startButtonClicked())); + connect(widget->stopButton, SIGNAL(clicked()), this, SLOT(stopButtonClicked())); + connect(widget->buttonClearLog, SIGNAL(clicked()), this, SLOT(buttonClearLogClicked())); + +} + +HITLWidget::~HITLWidget() +{ + delete widget; +} + +void HITLWidget::startButtonClicked() +{ + Qt::HANDLE mainThread = QThread::currentThread(); + qDebug() << "Main Thread: "<< mainThread; + + // [1] +// if(Simulator::IsStarted()) +// { +// widget->textBrowser->append("HITL alreary started!"); +// return; +// } +// Simulator::setStarted(true); + + // [2] allow only one instance per simulator + if(Simulator::Instances().indexOf(settings.simulatorId) != -1) + { + widget->textBrowser->append(settings.simulatorId + " alreary started!"); + return; + } + + if(!HITLPlugin::typeSimulators.size()) + { + qxtLog->info("There is no registered simulators, add through HITLPlugin::addSimulator"); + return; + } + + // Stop running process if one is active + if(simulator) + { + QMetaObject::invokeMethod(simulator, "onDeleteSimulator",Qt::QueuedConnection); + simulator = NULL; + } + //fgBridge = new FlightGearBridge(); + //simulator = new Simulator(); + if(settings.hostAddress == "" || settings.inPort == 0) + { + widget->textBrowser->append("Before start, set UDP parameters in options page!"); + return; + } + + SimulatorCreator* creator = HITLPlugin::getSimulatorCreator(settings.simulatorId); + simulator = creator->createSimulator(settings);//hostName, outPort, inPort, manualControl, pathBin, pathData); + // move to thread + simulator->setName(creator->Description()); + simulator->setSimulatorId(creator->ClassId()); + // Setup process + widget->textBrowser->append(QString("[%1] Starting %2... ").arg(QTime::currentTime().toString("hh:mm:ss")).arg(creator->Description())); + qxtLog->info("HITL: Starting " + creator->Description()); + + // Start bridge + //bool ret = simulator->setupProcess(); + bool ret = QMetaObject::invokeMethod(simulator, "setupProcess",Qt::QueuedConnection); + if(ret) + { + Simulator::setInstance(settings.simulatorId); + + connect(this,SIGNAL(deleteSimulator()),simulator, SLOT(onDeleteSimulator()),Qt::QueuedConnection); + + widget->startButton->setEnabled(false); + widget->stopButton->setEnabled(true); + qxtLog->info("HITL: Starting bridge, initializing flight simulator and Autopilot connections"); + + connect(simulator, SIGNAL(processOutput(QString)), widget->textBrowser, SLOT(append(QString))); + connect(simulator, SIGNAL(autopilotConnected()), this, SLOT(onAutopilotConnect()),Qt::QueuedConnection); + connect(simulator, SIGNAL(autopilotDisconnected()), this, SLOT(onAutopilotDisconnect()),Qt::QueuedConnection); + connect(simulator, SIGNAL(simulatorConnected()), this, SLOT(onSimulatorConnect()),Qt::QueuedConnection); + connect(simulator, SIGNAL(simulatorDisconnected()), this, SLOT(onSimulatorDisconnect()),Qt::QueuedConnection); + + // Initialize connection status + if ( simulator->isAutopilotConnected() ) + { + onAutopilotConnect(); + } + else + { + onAutopilotDisconnect(); + } + + if ( simulator->isSimulatorConnected() ) + { + onSimulatorConnect(); + } + else + { + onSimulatorDisconnect(); + } + } +} + + +void HITLWidget::stopButtonClicked() +{ + if(simulator) + widget->textBrowser->append(QString("[%1] Terminate %2 ").arg(QTime::currentTime().toString("hh:mm:ss")).arg(simulator->Name())); + + widget->startButton->setEnabled(true); + widget->stopButton->setEnabled(false); + widget->apLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: transparent; color: white}")); + widget->simLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: transparent; color: white}")); + widget->apLabel->setText(strAutopilotDisconnected); + widget->simLabel->setText(strSimulatorDisconnected); + if(simulator) + { + QMetaObject::invokeMethod(simulator, "onDeleteSimulator",Qt::QueuedConnection); + simulator = NULL; + } +} + +void HITLWidget::buttonClearLogClicked() +{ + widget->textBrowser->clear(); +} + + +void HITLWidget::onAutopilotConnect() +{ + widget->simLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: %1; color: white}").arg(greenColor)); + + widget->apLabel->setText(strAutopilotConnected); + qxtLog->info("HITL: Autopilot connected, initializing for HITL simulation"); +} + +void HITLWidget::onAutopilotDisconnect() +{ + widget->apLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: red; color: white}")); + widget->apLabel->setText(strAutopilotDisconnected); + qxtLog->info(strAutopilotDisconnected); +} + +void HITLWidget::onSimulatorConnect() +{ + widget->simLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: %1; color: white}").arg(greenColor)); + widget->simLabel->setText(" " + simulator->Name() +" connected "); + qxtLog->info(QString("HITL: %1 connected").arg(simulator->Name())); +} + +void HITLWidget::onSimulatorDisconnect() +{ + widget->simLabel->setStyleSheet(QString::fromUtf8("QFrame{\n""background-color: red; color: white}")); + widget->simLabel->setText(" " + simulator->Name() +" disconnected "); + qxtLog->info(QString("HITL: %1 disconnected").arg(simulator->Name())); +} + + diff --git a/ground/src/plugins/hitlwidget.h b/ground/src/plugins/hitlwidget.h new file mode 100644 index 000000000..b5865a842 --- /dev/null +++ b/ground/src/plugins/hitlwidget.h @@ -0,0 +1,71 @@ +/** + ****************************************************************************** + * + * @file hitlwidget.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef HITLWIDGET_H +#define HITLWIDGET_H + +#include +#include +#include "simulator.h" + +class Ui_HITLWidget; + +class HITLWidget : public QWidget +{ + Q_OBJECT + +public: + HITLWidget(QWidget *parent = 0); + ~HITLWidget(); + + void setSettingParameters(const SimulatorSettings& params) {settings = params;} +signals: + void deleteSimulator(); + +private slots: + void startButtonClicked(); + void stopButtonClicked(); + void buttonClearLogClicked(); + void onAutopilotConnect(); + void onAutopilotDisconnect(); + void onSimulatorConnect(); + void onSimulatorDisconnect(); + +private: + Ui_HITLWidget* widget; + Simulator* simulator; + SimulatorSettings settings; + + QString greenColor; + QString strAutopilotDisconnected; + QString strSimulatorDisconnected; + QString strAutopilotConnected; + QString strSimulatorConnected; + +}; + +#endif /* HITLWIDGET_H */ diff --git a/ground/src/plugins/hitlwidget.ui b/ground/src/plugins/hitlwidget.ui new file mode 100644 index 000000000..8f41eb53e --- /dev/null +++ b/ground/src/plugins/hitlwidget.ui @@ -0,0 +1,471 @@ + + + HITLWidget + + + + 0 + 0 + 786 + 300 + + + + + 0 + 0 + + + + Form + + + + +QScrollBar:vertical { + border: 1px solid grey; + background: grey; + margin: 22px 0 22px 0; + } + +QScrollBar:vertical:disabled { + border: 1px solid grey; + + background-color: grey; + margin: 22px 0 22px 0; + } + + QScrollBar::handle:vertical { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(120, 120, 255, 255), stop:1 rgba(80, 80, 160, 255)); + min-height: 20px; + } + +QScrollBar::handle:vertical:disabled{ +background-color: grey; + min-height: 20px; + } + + + QScrollBar::handle:vertical:pressed { + + background-color: rgb(85, 85, 255); +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(170, 170, 255, 255), stop:1 rgba(80, 80, 160, 255)); + + min-height: 20px; + } + + QScrollBar::add-line:vertical { + border: 1px solid black; +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255)); + height: 20px; + subcontrol-position: bottom; + subcontrol-origin: margin; + } + + QScrollBar::add-line:vertical:disabled { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(100, 100, 100, 255)); + border: 1px solid grey; + + } + + QScrollBar::sub-line:vertical:disabled { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(100, 100, 100, 255)); + border: 1px solid grey; + + } + + QScrollBar::add-line:vertical:pressed { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200)); + } + + QScrollBar::sub-line:vertical:pressed { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200)); + } + + QScrollBar::sub-line:vertical { + border: 1px solid black; +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255)); + height: 20px; + subcontrol-position: top; + subcontrol-origin: margin; + } + QScrollBar::down-arrow:vertical { + + image: url(:/hitlnew/images/arrow-down2.png); + } + + QScrollBar::up-arrow:vertical { + image: url(:/hitlnew/images/arrow-up2.png); + } + + QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { + background: none; + } + + +QPushButton { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(110, 110, 110, 255), stop:1 rgba(71, 71, 71, 255)); + + color: rgb(255, 255, 255); +border: 1px solid black; +width: 66px; +height: 20px; +} + +QPushButton:disabled { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(120, 120, 120, 255)); + color: rgb(194, 194, 194); +border: 1px solid gray; +width: 66px; +height: 20px; +} + +QPushButton:hover { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200)); +color: rgb(255, 255, 255); +border: 0px; +} +QPushButton:pressed { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255)); +color: rgb(255, 255, 255); +border: 0px; +} + +QPushButton:checked { +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255)); +color: rgb(255, 255, 255); +border: 0px; +} + + + + 0 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + +QFrame{ +background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(110, 110, 110, 255), stop:1 rgba(71, 71, 71, 255)); +color: rgba(0, 0, 0, 128); +} + + + + QFrame::StyledPanel + + + QFrame::Raised + + + + QLayout::SetMaximumSize + + + + + QLayout::SetDefaultConstraint + + + + + Request update + + + + + + Start + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 10 + 20 + + + + + + + + false + + + Send update + + + Stop + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 5 + 20 + + + + + + + + QFrame::Plain + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 5 + 20 + + + + + + + + + 0 + 0 + + + + + 140 + 0 + + + + + 50 + false + + + + Qt::LeftToRight + + + false + + + color: rgb(255, 255, 255); + + + AutoPilot disconnected + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 10 + 20 + + + + + + + + + 0 + 0 + + + + + 140 + 0 + + + + color: rgb(255, 255, 255); + + + Simulator disconnected + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 10 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 5 + 20 + + + + + + + + QFrame::Plain + + + Qt::Vertical + + + + + + + Qt::Horizontal + + + QSizePolicy::Preferred + + + + 5 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Clear Log + + + + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + false + + + QTextEdit { + background-color: white; + color: rgb(0, 0, 0); +} + + + QFrame::NoFrame + + + QFrame::Plain + + + Qt::ScrollBarAlwaysOn + + + + + + + + + + + diff --git a/ground/src/plugins/il2simulator.cpp b/ground/src/plugins/il2simulator.cpp new file mode 100644 index 000000000..3d13c4dde --- /dev/null +++ b/ground/src/plugins/il2simulator.cpp @@ -0,0 +1,251 @@ +/** + ****************************************************************************** + * + * @file il2simulator.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @brief + * @see The GNU Public License (GPL) Version 3 + * @defgroup hitlplugin + * @{ + * + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* + * Description of DeviceLink Protocol: + * A Request is initiated with R/ followed by id's of to be requested settings + * even id's indicate read only values, odd are write only + * (usually id =get value id+1= set - for same setting) + * id's are separated by / + * requests can contain values to set, or to select a subsystem + * values are separated by \ + * example: R/30/48/64\0/64\1/ + * request read only settings 30,48 and 64 with parameters 0 and 1 + * the answer consists of an A followed by id value pairs in the same format + * example: A/30\0/48\0/64\0\22/64\1\102/ + * + * A full protocol description as well as a list of ID's and their meanings + * can be found shipped with IL2 in the file DeviceLink.txt + * + * id's used in this file: + * 30: IAS in km/h (float) + * 32: vario in m/s (float) + * 38: angular speed °/s (float) (which direction? azimuth?) + * 40: barometric alt in m (float) + * 42: flight course in ° (0-360) (float) + * 46: roll angle in ° (-180 - 180) (floatniguration) + * 48: pitch angle in ° (-90 - 90) (float) + * 80/81: engine power (-1.0 (0%) - 1.0 (100%)) (float) + * 84/85: aileron servo (-1.0 - 1.0) (float) + * 86/87: elevator servo (-1.0 - 1.0) (float) + * 88/89: rudder servo (-1.0 - 1.0) (float) + * + * IL2 currently offers no useful way of providing GPS data + * therefore fake GPS data will be calculated using IMS + * + * unfortunately angular acceleration provided is very limited, too + */ +#include "il2simulator.h" +#include "extensionsystem/pluginmanager.h" +#include +#include +#include +#include + +const float IL2Simulator::FT2M = 0.3048; +const float IL2Simulator::KT2MPS = 0.514444444; +const float IL2Simulator::MPS2KMH = 3.6; +const float IL2Simulator::KMH2MPS = (1.0/3.6); +const float IL2Simulator::INHG2KPA = 3.386; +const float IL2Simulator::RAD2DEG = (180.0/M_PI); +const float IL2Simulator::DEG2RAD = (M_PI/180.0); +const float IL2Simulator::M2DEG = 60.*1852.; // 60 miles per degree times 1852 meters per mile +const float IL2Simulator::DEG2M = (1.0/(60.*1852.)); +const float IL2Simulator::AIR_CONST = 287.058; // J/(kg*K) +const float IL2Simulator::GROUNDDENSITY = 1.225; // kg/m³ ;) +const float IL2Simulator::TEMP_GROUND = (15.0 + 273.0); // 15°C in Kelvin +const float IL2Simulator::TEMP_LAPSE_RATE = -0.0065; //degrees per meter +const float IL2Simulator::AIR_CONST_FACTOR = -0.0341631947363104; //several nature constants calculated into one + +IL2Simulator::IL2Simulator(const SimulatorSettings& params) : + Simulator(params) +{ + +} + + +IL2Simulator::~IL2Simulator() +{ +} + +void IL2Simulator::setupUdpPorts(const QString& host, int inPort, int outPort) +{ + inSocket->connectToHost(host,inPort); // IL2 + if(!inSocket->waitForConnected()) + qxtLog->error(Name() + " cann't connect to UDP Port: " + QString::number(inPort)); + +} + +void IL2Simulator::transmitUpdate() +{ + // Read ActuatorDesired from autopilot + ActuatorDesired::DataFields actData = actDesired->getData(); + float ailerons = actData.Roll; + float elevator = actData.Pitch; + float rudder = actData.Yaw; + float throttle = actData.Throttle*2-1.0; + + // Send update to Il2 + QString cmd; + cmd=QString("R/30/32/40/42/46/48/81\\%1/85\\%2/87\\%3/89\\%4/") + .arg(throttle) + .arg(ailerons) + .arg(elevator) + .arg(rudder); + QByteArray data = cmd.toAscii(); + //outSocket->write(data); + inSocket->write(data); // for IL2 must send to the same port as input!!!!!!!!!!!!! +} + + +/** + * calculate air density from altitude + */ +float IL2Simulator::DENSITY(float alt) { + return (GROUNDDENSITY * pow( + ((TEMP_GROUND+(TEMP_LAPSE_RATE*alt))/TEMP_GROUND), + ((AIR_CONST_FACTOR/TEMP_LAPSE_RATE)-1) ) + ); +} + +/** + * calculate air pressure from altitude + */ +float IL2Simulator::PRESSURE(float alt) { + return DENSITY(alt)*(TEMP_GROUND+(alt*TEMP_LAPSE_RATE))*AIR_CONST; + +} + +/** + * calculate TAS from IAS and altitude + */ +float IL2Simulator::TAS(float IAS, float alt) { + return (IAS*sqrt(GROUNDDENSITY/DENSITY(alt))); +} + +/** + * process data string from flight simulator + */ +void IL2Simulator::processUpdate(QString& data) +{ + // save old flight data to calculate delta's later + old=current; + + // Split + QStringList fields = data.split("/"); + + // split up response string + int t; + for (t=0; t=2) { + int id = values[0].toInt(); + float value = values[1].toFloat(); + switch (id) { + case 30: + current.ias=value * KMH2MPS; + break; + case 32: + current.dZ=value; + break; + case 40: + current.Z=value; + break; + case 42: + current.azimuth=value; + break; + case 46: + current.roll=-value; + break; + case 48: + current.pitch=value; + break; + } + } + } + + // measure time + current.dT = ((float)time->restart()) / 1000.0; + current.T = old.T+current.dT; + + // calculate TAS from alt and IAS + current.tas = TAS(current.ias,current.Z); + + // assume the plane actually flies straight and no wind + // groundspeed is horizontal vector of TAS + current.groundspeed = current.tas*cos(current.pitch*DEG2RAD); + // x and y vector components + current.dX = current.groundspeed*sin(current.azimuth*DEG2RAD); + current.dY = current.groundspeed*cos(current.azimuth*DEG2RAD); + + // simple IMS - integration over time the easy way... + current.X = old.X + (current.dX*current.dT); + current.Y = old.Y + (current.dY*current.dT); + + // Update AltitudeActual object + AltitudeActual::DataFields altActualData; + altActualData.Altitude = current.Z; + altActualData.Temperature = TEMP_GROUND + (current.Z * TEMP_LAPSE_RATE) - 273.0; + altActualData.Pressure = PRESSURE(current.Z)/1000.0; // kpa + altActual->setData(altActualData); + + // Update attActual object + AttitudeActual::DataFields attActualData; + attActualData.Roll = current.roll; + attActualData.Pitch = current.pitch; + attActualData.Yaw = current.azimuth; + attActualData.q1 = 0; + attActualData.q2 = 0; + attActualData.q3 = 0; + attActualData.q4 = 0; + attActual->setData(attActualData); + + // Update gps objects + PositionActual::DataFields gpsData; + gpsData.Altitude = current.Z; + gpsData.Heading = current.azimuth; + gpsData.Groundspeed = current.groundspeed; + gpsData.Latitude = settings.latitude.toFloat() + current.Y * DEG2M; + if (gpsData.Latitude<-89.0 or gpsData.Latitude>89.0) { + // oops - this is rare enough to just prevent overflow here... + // IL2 has no north pole map anyway + gpsData.Latitude=0.0; + } + gpsData.Longitude = settings.longitude.toFloat() + current.X * (1.0/cos(gpsData.Latitude*DEG2RAD)) * DEG2M; + while (gpsData.Longitude<-180.0) gpsData.Longitude+=360.0; + while (gpsData.Longitude>180.0) gpsData.Longitude-=360.0; + gpsData.Satellites = 7; + gpsData.Status = PositionActual::STATUS_FIX3D; + posActual->setData(gpsData); + + // issue manual update + attActual->updated(); + altActual->updated(); + posActual->updated(); +} + diff --git a/ground/src/plugins/il2simulator.h b/ground/src/plugins/il2simulator.h new file mode 100644 index 000000000..725fdefa1 --- /dev/null +++ b/ground/src/plugins/il2simulator.h @@ -0,0 +1,83 @@ +/** + ****************************************************************************** + * + * @file il2simulator.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @brief + * @see The GNU Public License (GPL) Version 3 + * @defgroup hitlplugin + * @{ + * + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef IL2SIMULATOR_H +#define IL2SIMULATOR_H + +#include +#include + +class IL2Simulator: public Simulator +{ + Q_OBJECT +public: + IL2Simulator(const SimulatorSettings& params); + ~IL2Simulator(); + + void setupUdpPorts(const QString& host, int inPort, int outPort); + +private slots: + void transmitUpdate(); + +private: + static const float FT2M; + static const float KT2MPS; + static const float MPS2KMH; + static const float KMH2MPS; + static const float INHG2KPA; + static const float RAD2DEG; + static const float DEG2RAD; + static const float M2DEG; + static const float DEG2M; + static const float AIR_CONST; + static const float GROUNDDENSITY; + static const float TEMP_GROUND; + static const float TEMP_LAPSE_RATE; + static const float AIR_CONST_FACTOR; + + + float DENSITY(float pressure); + float PRESSURE(float alt); + float TAS(float ias,float alt); + void processUpdate(QString& data); + +}; + +class IL2SimulatorCreator : public SimulatorCreator +{ +public: + IL2SimulatorCreator(const QString& classId, const QString& description) + : SimulatorCreator (classId,description) + {} + + Simulator* createSimulator(const SimulatorSettings& params) + { + return new IL2Simulator(params); + } +}; + +#endif // IL2SIMULATOR_H diff --git a/ground/src/plugins/images/arrow-down.png b/ground/src/plugins/images/arrow-down.png new file mode 100644 index 0000000000000000000000000000000000000000..a8f65c44d8044e25f3f575f000dd347a61e8de77 GIT binary patch literal 2932 zcmV-)3ybuLP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c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004C`008P>0026e000+nl3&F} z0002LNkluB6v0#Kvh-e@tCzL?S1d>oy?f0#HK9E*$6;{Q{VGr#xw$n zAd4U~<0U12Mfe=ds?_d8N_<@|d=~|;X4Jq!gf~?V18hd9(sUgX!G{?;U@5{X&pAer z1{lDdPL;+TfGzNz=Ny6V;h-ubAlz|P_SY-zWWt~O&8Uh1{0{)%E>EyfXTD_s0000< KMNUMnLSTYplY&D4 literal 0 HcmV?d00001 diff --git a/ground/src/plugins/images/arrow-right.png b/ground/src/plugins/images/arrow-right.png new file mode 100644 index 0000000000000000000000000000000000000000..207f7fcf2168ade1edf307102541eae3a6df1ca9 GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)T!3HEZPnf;}NHG=%xjQkeJ16rJ$YD$Jc6VX; z4}uH!E}sk(;VkfoECy;324O~qS#ufAky-%U;BY+07KH9 z_N^O>OgCxt?%r4+eC?Z-K&1{uO)wE@fvD6c$jv%vA|=7K5j&pUXO@geCxNN^3y? literal 0 HcmV?d00001 diff --git a/ground/src/plugins/images/arrow-up.png b/ground/src/plugins/images/arrow-up.png new file mode 100644 index 0000000000000000000000000000000000000000..96aba8222f3e0757856b90a921b4dbec43063121 GIT binary patch literal 2932 zcmV-)3ybuLP)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUx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} z0002ONklW6b0~~UoJu5OSC!!f#BLAxH?3S&{%umSdie-H`Qt&~lB-pFd&;zTuv8&%NKdjr+;0kA?rCUogkrfrcXtF)u+3V?b+w*qui9Epz9^*}Mob+dOn%LqJpLmD^z)j`5 zKe)xXnsI~+Y-%!YLL29d8Lv3UDsk^P3+)fhn(1HY;wkEDd{>)(2LSxrA~6A(W!V4# N002ovPDHLkV1l|Vh+O~x literal 0 HcmV?d00001 diff --git a/ground/src/plugins/images/bullet_arrow_up.png b/ground/src/plugins/images/bullet_arrow_up.png new file mode 100644 index 0000000000000000000000000000000000000000..86adcf2fa77edf91d076695957287a9ed67171d0 GIT binary patch literal 2973 zcmV;O3u5$%P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3f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H%e&ckC+@AhPrP6BKT#_XdT7&;F71j}Joy zkC~6lh7E@6o;W@^IpRNZ{ptLtL(gQ-CY~4mqW;US7Zxvm_|@yz&e53Bp_lTPlfP|z zrTyx_>lv@x#=^!PzR7qqF<$gm`|ZJZ+;<)Cqu&ot2z=0000WV@Og>004R=004l4008;_004mL004C`008P>0026e000+nl3&F} z0002PNklPc9cSQ)qo2@_lM zxk!Qr5aVF{mX|c?ugQC_MiSp-! +#include +#include +#include +#include "uavtalk/telemetrymanager.h" +#include "uavobjects/uavobjectmanager.h" +#include "uavobjects/actuatordesired.h" +#include "uavobjects/altitudeactual.h" +#include "uavobjects/attitudeactual.h" +#include "uavobjects/positionactual.h" +#include "uavobjects/gcstelemetrystats.h" + +class Simulator: public QObject +{ + Q_OBJECT +public: + //static ISimulator* Instance(); +//protected: + Simulator(); + ~ISimulator(); + + bool isAutopilotConnected(); + bool isFGConnected(); + +signals: + void myStart(); + void autopilotConnected(); + void autopilotDisconnected(); + void fgConnected(); + void fgDisconnected(); + +private slots: + void onStart(); + void transmitUpdate(); + void receiveUpdate(); + void onAutopilotConnect(); + void onAutopilotDisconnect(); + void onFGConnectionTimeout(); + void telStatsUpdated(UAVObject* obj); + +private: + //static ISimulator* _instance; + + QUdpSocket* inSocket; + QUdpSocket* outSocket; + ActuatorDesired* actDesired; + AltitudeActual* altActual; + AttitudeActual* attActual; + PositionActual* posActual; + GCSTelemetryStats* telStats; + QHostAddress fgHost; + int inPort; + int outPort; + int updatePeriod; + QTimer* txTimer; + QTimer* fgTimer; + bool autopilotConnectionStatus; + bool fgConnectionStatus; + int fgTimeout; + + void processUpdate(QString& data); + void setupOutputObject(UAVObject* obj, int updatePeriod); + void setupInputObject(UAVObject* obj, int updatePeriod); + void setupObjects(); +}; + + +#endif // ISIMULATOR_H diff --git a/ground/src/plugins/object_script.HITLNEW.Release b/ground/src/plugins/object_script.HITLNEW.Release new file mode 100644 index 000000000..6e8b75459 --- /dev/null +++ b/ground/src/plugins/object_script.HITLNEW.Release @@ -0,0 +1,20 @@ +INPUT( +./release/hitlplugin.o +./release/hitlwidget.o +./release/hitloptionspage.o +./release/hitlfactory.o +./release/hitlconfiguration.o +./release/hitlgadget.o +./release/simulator.o +./release/il2simulator.o +./release/fgsimulator.o +./release/moc_hitlwidget.o +./release/moc_hitloptionspage.o +./release/moc_hitlfactory.o +./release/moc_hitlconfiguration.o +./release/moc_hitlgadget.o +./release/moc_simulator.o +./release/moc_fgsimulator.o +./release/moc_il2simulator.o +./release/qrc_hitlresources.o +); diff --git a/ground/src/plugins/object_script.HITLNEWd.Debug b/ground/src/plugins/object_script.HITLNEWd.Debug new file mode 100644 index 000000000..a0fabddb9 --- /dev/null +++ b/ground/src/plugins/object_script.HITLNEWd.Debug @@ -0,0 +1,20 @@ +INPUT( +./debug/hitlplugin.o +./debug/hitlwidget.o +./debug/hitloptionspage.o +./debug/hitlfactory.o +./debug/hitlconfiguration.o +./debug/hitlgadget.o +./debug/simulator.o +./debug/il2simulator.o +./debug/fgsimulator.o +./debug/moc_hitlwidget.o +./debug/moc_hitloptionspage.o +./debug/moc_hitlfactory.o +./debug/moc_hitlconfiguration.o +./debug/moc_hitlgadget.o +./debug/moc_simulator.o +./debug/moc_fgsimulator.o +./debug/moc_il2simulator.o +./debug/qrc_hitlresources.o +); diff --git a/ground/src/plugins/opfgprotocol.xml b/ground/src/plugins/opfgprotocol.xml new file mode 100644 index 000000000..994c1091a --- /dev/null +++ b/ground/src/plugins/opfgprotocol.xml @@ -0,0 +1,201 @@ + + + + + + \n + , + + + aileron + /controls/flight/aileron + float + %f + + + + elevator + /controls/flight/elevator + float + %f + + + + rudder + /controls/flight/rudder + float + %f + + + + throttle + /controls/engines/engine/throttle + float + %f + + + + + + \n + , + + + xRate + /fdm/jsbsim/velocities/p-rad_sec + float + %f + + + + yRate + /fdm/jsbsim/velocities/q-rad_sec + float + %f + + + + zRate + /fdm/jsbsim/velocities/r-rad_sec + float + %f + + + + xAccel + + /accelerations/pilot/x-accel-fps_sec + float + %f + + + + yAccel + /accelerations/pilot/y-accel-fps_sec + float + %f + + + + zAccel + /accelerations/pilot/z-accel-fps_sec + float + %f + + + + Pitch + /orientation/pitch-deg + float + %f + + + + PitchRate + /orientation/pitch-rate-degps + float + %f + + + + Roll + /orientation/roll-deg + float + %f + + + + RollRate + /orientation/roll-rate-degps + float + %f + + + + Yaw + /orientation/heading-magnetic-deg + float + %f + + + + YawRate + /orientation/yaw-rate-degps + float + %f + + + + Latitude + /position/latitude-deg + float + %f + + + + Longitude + /position/longitude-deg + float + %f + + + + Heading + /orientation/heading-deg + float + %f + + + + Altitude + /position/altitude-ft + float + %f + + + + AltitudeAGL + /position/altitude-agl-ft + float + %f + + + + Groundspeed + /velocities/groundspeed-kt + float + %f + + + + Airspeed + /velocities/airspeed-kt + float + %f + + + + Temperature + /environment/temperature-degc + float + %f + + + + Temperature + /environment/temperature-degc + float + %f + + + + Pressure + /environment/pressure-inhg + float + %f + + + + + + diff --git a/ground/src/plugins/simulator.cpp b/ground/src/plugins/simulator.cpp new file mode 100644 index 000000000..f6bb11010 --- /dev/null +++ b/ground/src/plugins/simulator.cpp @@ -0,0 +1,270 @@ +/** + ****************************************************************************** + * + * @file simulator.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +#include "simulator.h" +#include "qxtlogger.h" +#include "extensionsystem/pluginmanager.h" +#include "coreplugin/icore.h" +#include "coreplugin/threadmanager.h" + +volatile bool Simulator::isStarted = false; + +Simulator::Simulator(const SimulatorSettings& params) : + simProcess(NULL), + time(NULL), + inSocket(NULL), + outSocket(NULL), + settings(params), + updatePeriod(50), + simTimeout(2000), + autopilotConnectionStatus(false), + simConnectionStatus(false), + txTimer(NULL), + simTimer(NULL), + name("") +{ + // move to thread + moveToThread(Core::ICore::instance()->threadManager()->getRealTimeThread()); + connect(this, SIGNAL(myStart()), this, SLOT(onStart()),Qt::QueuedConnection); + emit myStart(); +} + +Simulator::~Simulator() +{ + if(inSocket) + { + delete inSocket; + inSocket = NULL; + } + + if(outSocket) + { + delete outSocket; + outSocket = NULL; + } + + if(txTimer) + { + delete txTimer; + txTimer = NULL; + } + + if(simTimer) + { + delete simTimer; + simTimer = NULL; + } + // NOTE: Does not currently work, may need to send control+c to through the terminal + if (simProcess != NULL) + { + //connect(simProcess,SIGNAL(finished(int, QProcess::ExitStatus)),this,SLOT(onFinished(int, QProcess::ExitStatus))); + + simProcess->disconnect(); + if(simProcess->state() == QProcess::Running) + simProcess->kill(); + //if(simProcess->waitForFinished()) + //emit deleteSimProcess(); + delete simProcess; + simProcess = NULL; + } +} + +void Simulator::onDeleteSimulator(void) +{ + // [1] + Simulator::setStarted(false); + // [2] + Simulator::Instances().removeOne(simulatorId); + + disconnect(this); + delete this; +} + +void Simulator::onStart() +{ + QMutexLocker locker(&lock); + + Qt::HANDLE mainThread = QThread::currentThread(); + qDebug() << "Simulator Thread: "<< mainThread; + + // Get required UAVObjects + ExtensionSystem::PluginManager* pm = ExtensionSystem::PluginManager::instance(); + UAVObjectManager* objManager = pm->getObject(); + actDesired = ActuatorDesired::GetInstance(objManager); + altActual = AltitudeActual::GetInstance(objManager); + attActual = AttitudeActual::GetInstance(objManager); + posActual = PositionActual::GetInstance(objManager); + telStats = GCSTelemetryStats::GetInstance(objManager); + + // Listen to autopilot connection events + TelemetryManager* telMngr = pm->getObject(); + connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect())); + connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect())); + //connect(telStats, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(telStatsUpdated(UAVObject*))); + + // If already connect setup autopilot + GCSTelemetryStats::DataFields stats = telStats->getData(); + if ( stats.Status == GCSTelemetryStats::STATUS_CONNECTED ) + onAutopilotConnect(); + + inSocket = new QUdpSocket(); + outSocket = new QUdpSocket(); + setupUdpPorts(settings.hostAddress,settings.inPort,settings.outPort); + + emit processOutput("\nHost: " + settings.hostAddress + "\n" + \ + "inputPort: " + QString::number(settings.inPort) + "\n" + \ + "outpurPort: " + QString::number(settings.outPort) + "\n"); + + qxtLog->info("\nHost: " + settings.hostAddress + "\n" + \ + "inputPort: " + QString::number(settings.inPort) + "\n" + \ + "outpurPort: " + QString::number(settings.outPort) + "\n"); + +// if(!inSocket->waitForConnected(5000)) +// processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.inPort)); + //outSocket->connectToHost(settings.hostAddress,settings.outPort); // FG + //if(!outSocket->waitForConnected(5000)) + // processOutput(QString("Can't connect to %1 on %2 port!").arg(settings.hostAddress).arg(settings.outPort)); + + + connect(inSocket, SIGNAL(readyRead()), this, SLOT(receiveUpdate()),Qt::DirectConnection); + + // Setup transmit timer + txTimer = new QTimer(); + connect(txTimer, SIGNAL(timeout()), this, SLOT(transmitUpdate()),Qt::DirectConnection); + txTimer->setInterval(updatePeriod); + txTimer->start(); + // Setup simulator connection timer + simTimer = new QTimer(); + connect(simTimer, SIGNAL(timeout()), this, SLOT(onSimulatorConnectionTimeout()),Qt::DirectConnection); + simTimer->setInterval(simTimeout); + simTimer->start(); + + // setup time + time = new QTime(); + time->start(); + current.T=0; +} + +void Simulator::receiveUpdate() +{ + // Update connection timer and status + simTimer->setInterval(simTimeout); + simTimer->stop(); + simTimer->start(); + if ( !simConnectionStatus ) + { + simConnectionStatus = true; + emit simulatorConnected(); + } + + // Process data + while(inSocket->bytesAvailable() > 0) + { + // Receive datagram + QByteArray datagram; + datagram.resize(inSocket->pendingDatagramSize()); + QHostAddress sender; + quint16 senderPort; + inSocket->readDatagram(datagram.data(), datagram.size(), + &sender, &senderPort); + QString datastr(datagram); + // Process incomming data + processUpdate(datastr); + } +} + +void Simulator::setupObjects() +{ + setupInputObject(actDesired, 75); + setupOutputObject(altActual, 250); + setupOutputObject(attActual, 75); + setupOutputObject(posActual, 250); +} + +void Simulator::setupInputObject(UAVObject* obj, int updatePeriod) +{ + UAVObject::Metadata mdata; + mdata = obj->getDefaultMetadata(); + mdata.flightAccess = UAVObject::ACCESS_READWRITE; + mdata.gcsAccess = UAVObject::ACCESS_READWRITE; + mdata.flightTelemetryAcked = false; + mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC; + mdata.flightTelemetryUpdatePeriod = updatePeriod; + mdata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL; + obj->setMetadata(mdata); +} + +void Simulator::setupOutputObject(UAVObject* obj, int updatePeriod) +{ + UAVObject::Metadata mdata; + mdata = obj->getDefaultMetadata(); + mdata.flightAccess = UAVObject::ACCESS_READONLY; + mdata.gcsAccess = UAVObject::ACCESS_READWRITE; + mdata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_NEVER; + mdata.gcsTelemetryAcked = false; + mdata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC; + mdata.gcsTelemetryUpdatePeriod = updatePeriod; + obj->setMetadata(mdata); +} + +void Simulator::onAutopilotConnect() +{ + autopilotConnectionStatus = true; + setupObjects(); + emit autopilotConnected(); +} + +void Simulator::onAutopilotDisconnect() +{ + autopilotConnectionStatus = false; + emit autopilotDisconnected(); +} + +void Simulator::onSimulatorConnectionTimeout() +{ + if ( simConnectionStatus ) + { + simConnectionStatus = false; + emit simulatorDisconnected(); + } +} + + +void Simulator::telStatsUpdated(UAVObject* obj) +{ + GCSTelemetryStats::DataFields stats = telStats->getData(); + if ( !autopilotConnectionStatus && stats.Status == GCSTelemetryStats::STATUS_CONNECTED ) + { + onAutopilotConnect(); + } + else if ( autopilotConnectionStatus && stats.Status != GCSTelemetryStats::STATUS_CONNECTED ) + { + onAutopilotDisconnect(); + } +} + diff --git a/ground/src/plugins/simulator.h b/ground/src/plugins/simulator.h new file mode 100644 index 000000000..ee04df879 --- /dev/null +++ b/ground/src/plugins/simulator.h @@ -0,0 +1,194 @@ +/** + ****************************************************************************** + * + * @file simulator.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup HITLPlugin HITL Plugin + * @{ + * @brief The Hardware In The Loop plugin + *****************************************************************************/ +/* + * This program 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. + * + * This program 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 this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef ISIMULATOR_H +#define ISIMULATOR_H + +#include +#include +#include +#include +#include "qscopedpointer.h" +#include "uavtalk/telemetrymanager.h" +#include "uavobjects/uavobjectmanager.h" +#include "uavobjects/actuatordesired.h" +#include "uavobjects/altitudeactual.h" +#include "uavobjects/attitudeactual.h" +#include "uavobjects/positionactual.h" +#include "uavobjects/gcstelemetrystats.h" + + +/** + * just imagine this was a class without methods and all public properties + */ + typedef struct _FLIGHT_PARAM { + + // time + float T; + float dT; + + // speed (relative) + float ias; + float tas; + float groundspeed; + + // position (absolute) + float X; + float Y; + float Z; + + // speed (absolute) + float dX; + float dY; + float dZ; + + //angle + float azimuth; + float pitch; + float roll; + +} FLIGHT_PARAM; + +typedef struct _CONNECTION +{ + QString simulatorId; + QString binPath; + QString dataPath; + QString hostAddress; + int outPort; + int inPort; + bool manual; + QString latitude; + QString longitude; +} SimulatorSettings; + +class Simulator : public QObject +{ + Q_OBJECT + +public: + Simulator(const SimulatorSettings& params); + virtual ~Simulator(); + + bool isAutopilotConnected() const { return autopilotConnectionStatus; } + bool isSimulatorConnected() const { return simConnectionStatus; } + QString Name() const { return name; } + void setName(QString str) { name = str; } + + QString SimulatorId() const { return simulatorId; } + void setSimulatorId(QString str) { simulatorId = str; } + + + + static bool IsStarted() { return isStarted; } + static void setStarted(bool val) { isStarted = val; } + static QStringList& Instances() { return Simulator::instances; } + static void setInstance(const QString& str) { Simulator::instances.append(str); } + + virtual void stopProcess() {} + virtual void setupUdpPorts(const QString& host, int inPort, int outPort) {} + +signals: + void autopilotConnected(); + void autopilotDisconnected(); + void simulatorConnected(); + void simulatorDisconnected(); + void processOutput(QString str); + void deleteSimProcess(); + void myStart(); +public slots: + Q_INVOKABLE virtual bool setupProcess() { return true;} +private slots: + void onStart(); + //void transmitUpdate(); + void receiveUpdate(); + void onAutopilotConnect(); + void onAutopilotDisconnect(); + void onSimulatorConnectionTimeout(); + void telStatsUpdated(UAVObject* obj); + Q_INVOKABLE void onDeleteSimulator(void); + + virtual void transmitUpdate() = 0; + virtual void processUpdate(QString& data) = 0; + +protected: + QProcess* simProcess; + QTime* time; + QUdpSocket* inSocket;//(new QUdpSocket()); + QUdpSocket* outSocket; + + ActuatorDesired* actDesired; + AltitudeActual* altActual; + AttitudeActual* attActual; + PositionActual* posActual; + GCSTelemetryStats* telStats; + + SimulatorSettings settings; + + FLIGHT_PARAM current; + FLIGHT_PARAM old; + QMutex lock; + +private: + int updatePeriod; + int simTimeout; + volatile bool autopilotConnectionStatus; + volatile bool simConnectionStatus; + QTimer* txTimer; + QTimer* simTimer; + QString name; + QString simulatorId; + volatile static bool isStarted; + static QStringList instances; + //QList > requiredUAVObjects; + void setupOutputObject(UAVObject* obj, int updatePeriod); + void setupInputObject(UAVObject* obj, int updatePeriod); + void setupObjects(); +}; + + + +class SimulatorCreator +{ +public: + SimulatorCreator(QString id, QString descr) : + classId(id), + description(descr) + {} + virtual ~SimulatorCreator() {} + + QString ClassId() const {return classId;} + QString Description() const {return description;} + + virtual Simulator* createSimulator(const SimulatorSettings& params) = 0; + +private: + QString classId; + QString description; +}; + +#endif // ISIMULATOR_H diff --git a/ground/src/plugins/ui_fgoptionspage.h b/ground/src/plugins/ui_fgoptionspage.h new file mode 100644 index 000000000..75cb96a64 --- /dev/null +++ b/ground/src/plugins/ui_fgoptionspage.h @@ -0,0 +1,119 @@ +/******************************************************************************** +** Form generated from reading UI file 'fgoptionspage.ui' +** +** Created: Tue 24. Aug 21:12:33 2010 +** by: Qt User Interface Compiler version 4.6.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_FGOPTIONSPAGE_H +#define UI_FGOPTIONSPAGE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "utils/pathchooser.h" + +QT_BEGIN_NAMESPACE + +class Ui_FGOptionsPage +{ +public: + QGridLayout *gridLayout; + QLabel *label; + QLabel *label_2; + Utils::PathChooser *executablePathChooser; + Utils::PathChooser *dataDirectoryPathChooser; + QCheckBox *fgManualControl; + QSpacerItem *verticalSpacer; + + void setupUi(QWidget *FGOptionsPage) + { + if (FGOptionsPage->objectName().isEmpty()) + FGOptionsPage->setObjectName(QString::fromUtf8("FGOptionsPage")); + FGOptionsPage->resize(400, 320); + QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(FGOptionsPage->sizePolicy().hasHeightForWidth()); + FGOptionsPage->setSizePolicy(sizePolicy); + gridLayout = new QGridLayout(FGOptionsPage); + gridLayout->setContentsMargins(0, 0, 0, 0); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + label = new QLabel(FGOptionsPage); + label->setObjectName(QString::fromUtf8("label")); + QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); + label->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(label, 0, 0, 1, 1); + + label_2 = new QLabel(FGOptionsPage); + label_2->setObjectName(QString::fromUtf8("label_2")); + sizePolicy1.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); + label_2->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(label_2, 1, 0, 1, 1); + + executablePathChooser = new Utils::PathChooser(FGOptionsPage); + executablePathChooser->setObjectName(QString::fromUtf8("executablePathChooser")); + QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred); + sizePolicy2.setHorizontalStretch(1); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(executablePathChooser->sizePolicy().hasHeightForWidth()); + executablePathChooser->setSizePolicy(sizePolicy2); + + gridLayout->addWidget(executablePathChooser, 0, 1, 1, 1); + + dataDirectoryPathChooser = new Utils::PathChooser(FGOptionsPage); + dataDirectoryPathChooser->setObjectName(QString::fromUtf8("dataDirectoryPathChooser")); + + gridLayout->addWidget(dataDirectoryPathChooser, 1, 1, 1, 1); + + fgManualControl = new QCheckBox(FGOptionsPage); + fgManualControl->setObjectName(QString::fromUtf8("fgManualControl")); + sizePolicy1.setHeightForWidth(fgManualControl->sizePolicy().hasHeightForWidth()); + fgManualControl->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(fgManualControl, 3, 1, 1, 1); + + verticalSpacer = new QSpacerItem(20, 182, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout->addItem(verticalSpacer, 4, 1, 1, 1); + + + retranslateUi(FGOptionsPage); + + QMetaObject::connectSlotsByName(FGOptionsPage); + } // setupUi + + void retranslateUi(QWidget *FGOptionsPage) + { + FGOptionsPage->setWindowTitle(QApplication::translate("FGOptionsPage", "Form", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("FGOptionsPage", "FlightGear executable:", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("FGOptionsPage", "FlightGear data directory:", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + fgManualControl->setToolTip(QApplication::translate("FGOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_TOOLTIP + fgManualControl->setText(QApplication::translate("FGOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class FGOptionsPage: public Ui_FGOptionsPage {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_FGOPTIONSPAGE_H diff --git a/ground/src/plugins/ui_hitloptionspage.h b/ground/src/plugins/ui_hitloptionspage.h new file mode 100644 index 000000000..4194fe5ad --- /dev/null +++ b/ground/src/plugins/ui_hitloptionspage.h @@ -0,0 +1,208 @@ +/******************************************************************************** +** Form generated from reading UI file 'hitloptionspage.ui' +** +** Created: Wed 25. Aug 11:43:47 2010 +** by: Qt User Interface Compiler version 4.6.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_HITLOPTIONSPAGE_H +#define UI_HITLOPTIONSPAGE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "utils/pathchooser.h" + +QT_BEGIN_NAMESPACE + +class Ui_HITLOptionsPage +{ +public: + QGridLayout *gridLayout; + QLabel *label_3; + QComboBox *chooseFlightSimulator; + QFrame *line; + QLabel *label_7; + QLineEdit *latitude; + QLabel *label_8; + QLineEdit *longitude; + QLabel *label; + Utils::PathChooser *executablePath; + QLabel *label_2; + Utils::PathChooser *dataPath; + QCheckBox *manualControl; + QSpacerItem *verticalSpacer; + QLabel *label_6; + QLineEdit *hostAddress; + QLineEdit *outputPort; + QLabel *label_4; + QLineEdit *inputPort; + QLabel *label_5; + + void setupUi(QWidget *HITLOptionsPage) + { + if (HITLOptionsPage->objectName().isEmpty()) + HITLOptionsPage->setObjectName(QString::fromUtf8("HITLOptionsPage")); + HITLOptionsPage->resize(400, 320); + QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(HITLOptionsPage->sizePolicy().hasHeightForWidth()); + HITLOptionsPage->setSizePolicy(sizePolicy); + gridLayout = new QGridLayout(HITLOptionsPage); + gridLayout->setContentsMargins(0, 0, 0, 0); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + label_3 = new QLabel(HITLOptionsPage); + label_3->setObjectName(QString::fromUtf8("label_3")); + + gridLayout->addWidget(label_3, 1, 1, 1, 1); + + chooseFlightSimulator = new QComboBox(HITLOptionsPage); + chooseFlightSimulator->setObjectName(QString::fromUtf8("chooseFlightSimulator")); + + gridLayout->addWidget(chooseFlightSimulator, 1, 2, 1, 3); + + line = new QFrame(HITLOptionsPage); + line->setObjectName(QString::fromUtf8("line")); + line->setFrameShape(QFrame::HLine); + line->setFrameShadow(QFrame::Sunken); + + gridLayout->addWidget(line, 2, 1, 1, 4); + + label_7 = new QLabel(HITLOptionsPage); + label_7->setObjectName(QString::fromUtf8("label_7")); + + gridLayout->addWidget(label_7, 5, 1, 1, 1); + + latitude = new QLineEdit(HITLOptionsPage); + latitude->setObjectName(QString::fromUtf8("latitude")); + + gridLayout->addWidget(latitude, 5, 2, 1, 1); + + label_8 = new QLabel(HITLOptionsPage); + label_8->setObjectName(QString::fromUtf8("label_8")); + + gridLayout->addWidget(label_8, 5, 3, 1, 1); + + longitude = new QLineEdit(HITLOptionsPage); + longitude->setObjectName(QString::fromUtf8("longitude")); + + gridLayout->addWidget(longitude, 5, 4, 1, 1); + + label = new QLabel(HITLOptionsPage); + label->setObjectName(QString::fromUtf8("label")); + QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(label->sizePolicy().hasHeightForWidth()); + label->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(label, 6, 1, 1, 1); + + executablePath = new Utils::PathChooser(HITLOptionsPage); + executablePath->setObjectName(QString::fromUtf8("executablePath")); + QSizePolicy sizePolicy2(QSizePolicy::Preferred, QSizePolicy::Preferred); + sizePolicy2.setHorizontalStretch(1); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(executablePath->sizePolicy().hasHeightForWidth()); + executablePath->setSizePolicy(sizePolicy2); + + gridLayout->addWidget(executablePath, 6, 2, 1, 3); + + label_2 = new QLabel(HITLOptionsPage); + label_2->setObjectName(QString::fromUtf8("label_2")); + sizePolicy1.setHeightForWidth(label_2->sizePolicy().hasHeightForWidth()); + label_2->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(label_2, 7, 1, 1, 1); + + dataPath = new Utils::PathChooser(HITLOptionsPage); + dataPath->setObjectName(QString::fromUtf8("dataPath")); + + gridLayout->addWidget(dataPath, 7, 2, 1, 3); + + manualControl = new QCheckBox(HITLOptionsPage); + manualControl->setObjectName(QString::fromUtf8("manualControl")); + sizePolicy1.setHeightForWidth(manualControl->sizePolicy().hasHeightForWidth()); + manualControl->setSizePolicy(sizePolicy1); + + gridLayout->addWidget(manualControl, 8, 1, 1, 4); + + verticalSpacer = new QSpacerItem(20, 182, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout->addItem(verticalSpacer, 11, 2, 1, 1); + + label_6 = new QLabel(HITLOptionsPage); + label_6->setObjectName(QString::fromUtf8("label_6")); + + gridLayout->addWidget(label_6, 3, 1, 1, 1); + + hostAddress = new QLineEdit(HITLOptionsPage); + hostAddress->setObjectName(QString::fromUtf8("hostAddress")); + + gridLayout->addWidget(hostAddress, 3, 2, 1, 1); + + outputPort = new QLineEdit(HITLOptionsPage); + outputPort->setObjectName(QString::fromUtf8("outputPort")); + + gridLayout->addWidget(outputPort, 4, 4, 1, 1); + + label_4 = new QLabel(HITLOptionsPage); + label_4->setObjectName(QString::fromUtf8("label_4")); + + gridLayout->addWidget(label_4, 4, 3, 1, 1); + + inputPort = new QLineEdit(HITLOptionsPage); + inputPort->setObjectName(QString::fromUtf8("inputPort")); + + gridLayout->addWidget(inputPort, 4, 2, 1, 1); + + label_5 = new QLabel(HITLOptionsPage); + label_5->setObjectName(QString::fromUtf8("label_5")); + + gridLayout->addWidget(label_5, 4, 1, 1, 1); + + + retranslateUi(HITLOptionsPage); + + QMetaObject::connectSlotsByName(HITLOptionsPage); + } // setupUi + + void retranslateUi(QWidget *HITLOptionsPage) + { + HITLOptionsPage->setWindowTitle(QApplication::translate("HITLOptionsPage", "Form", 0, QApplication::UnicodeUTF8)); + label_3->setText(QApplication::translate("HITLOptionsPage", "Choose flight simulator:", 0, QApplication::UnicodeUTF8)); + label_7->setText(QApplication::translate("HITLOptionsPage", "Latitude in degrees:", 0, QApplication::UnicodeUTF8)); + label_8->setText(QApplication::translate("HITLOptionsPage", "Longitude in degrees:", 0, QApplication::UnicodeUTF8)); + label->setText(QApplication::translate("HITLOptionsPage", "Path executable:", 0, QApplication::UnicodeUTF8)); + label_2->setText(QApplication::translate("HITLOptionsPage", "Data directory:", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + manualControl->setToolTip(QApplication::translate("HITLOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_TOOLTIP + manualControl->setText(QApplication::translate("HITLOptionsPage", "Manual aircraft control (can be used when hardware is not available)", 0, QApplication::UnicodeUTF8)); + label_6->setText(QApplication::translate("HITLOptionsPage", "Host Address:", 0, QApplication::UnicodeUTF8)); + label_4->setText(QApplication::translate("HITLOptionsPage", "Output Port:", 0, QApplication::UnicodeUTF8)); + label_5->setText(QApplication::translate("HITLOptionsPage", "Input Port:", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class HITLOptionsPage: public Ui_HITLOptionsPage {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_HITLOPTIONSPAGE_H diff --git a/ground/src/plugins/ui_hitlwidget.h b/ground/src/plugins/ui_hitlwidget.h new file mode 100644 index 000000000..8a636849b --- /dev/null +++ b/ground/src/plugins/ui_hitlwidget.h @@ -0,0 +1,353 @@ +/******************************************************************************** +** Form generated from reading UI file 'hitlwidget.ui' +** +** Created: Sat 28. Aug 19:09:21 2010 +** by: Qt User Interface Compiler version 4.6.2 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_HITLWIDGET_H +#define UI_HITLWIDGET_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_HITLWidget +{ +public: + QVBoxLayout *verticalLayout; + QFrame *frame; + QVBoxLayout *verticalLayout_2; + QHBoxLayout *horizontalLayout; + QPushButton *startButton; + QSpacerItem *horizontalSpacer; + QPushButton *stopButton; + QSpacerItem *horizontalSpacer_7; + QFrame *line; + QSpacerItem *horizontalSpacer_4; + QLabel *apLabel; + QSpacerItem *horizontalSpacer_5; + QLabel *simLabel; + QSpacerItem *horizontalSpacer_2; + QSpacerItem *horizontalSpacer_6; + QFrame *line_2; + QSpacerItem *horizontalSpacer_8; + QSpacerItem *horizontalSpacer_3; + QPushButton *buttonClearLog; + QTextEdit *textBrowser; + + void setupUi(QWidget *HITLWidget) + { + if (HITLWidget->objectName().isEmpty()) + HITLWidget->setObjectName(QString::fromUtf8("HITLWidget")); + HITLWidget->resize(786, 300); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(HITLWidget->sizePolicy().hasHeightForWidth()); + HITLWidget->setSizePolicy(sizePolicy); + HITLWidget->setStyleSheet(QString::fromUtf8("\n" +"\n" +"QScrollBar:vertical {\n" +" border: 1px solid grey;\n" +" background: grey;\n" +" margin: 22px 0 22px 0;\n" +" }\n" +"\n" +"QScrollBar:vertical:disabled {\n" +" border: 1px solid grey;\n" +" \n" +" background-color: grey;\n" +" margin: 22px 0 22px 0;\n" +" }\n" +"\n" +" QScrollBar::handle:vertical {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(120, 120, 255, 255), stop:1 rgba(80, 80, 160, 255));\n" +" min-height: 20px;\n" +" }\n" +"\n" +"QScrollBar::handle:vertical:disabled{\n" +"background-color: grey;\n" +" min-height: 20px;\n" +" }\n" +"\n" +"\n" +" QScrollBar::handle:vertical:pressed {\n" +"\n" +" background-color: rgb(85, 85, 255);\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(170, 170, 255, 255), stop:1 rgba(80, 80, 160, 255));\n" +"\n" +" min-height: 20px;\n" +" }\n" +"\n" +" QScrollBar::add-line:vertical {\n" +" border: 1px solid black;\n" +"background-color: qlineargradient(" + "spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255));\n" +" height: 20px;\n" +" subcontrol-position: bottom;\n" +" subcontrol-origin: margin;\n" +" }\n" +"\n" +" QScrollBar::add-line:vertical:disabled {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(100, 100, 100, 255));\n" +" border: 1px solid grey;\n" +"\n" +" }\n" +"\n" +" QScrollBar::sub-line:vertical:disabled {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(100, 100, 100, 255));\n" +" border: 1px solid grey;\n" +"\n" +" }\n" +"\n" +" QScrollBar::add-line:vertical:pressed {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200));\n" +" }\n" +"\n" +" QScrollBar::sub-line:vertical:pressed {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200));\n" +"" + " }\n" +"\n" +" QScrollBar::sub-line:vertical {\n" +" border: 1px solid black; \n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255));\n" +" height: 20px;\n" +" subcontrol-position: top;\n" +" subcontrol-origin: margin;\n" +" }\n" +" QScrollBar::down-arrow:vertical {\n" +" \n" +" image: url(:/hitlnew/images/arrow-down2.png);\n" +" }\n" +"\n" +" QScrollBar::up-arrow:vertical {\n" +" image: url(:/hitlnew/images/arrow-up2.png);\n" +" }\n" +"\n" +" QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {\n" +" background: none;\n" +" }\n" +"\n" +"\n" +"QPushButton {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(110, 110, 110, 255), stop:1 rgba(71, 71, 71, 255));\n" +"\n" +" color: rgb(255, 255, 255);\n" +"border: 1px solid black; \n" +"width: 66px;\n" +"height: 20px;\n" +"}\n" +"\n" +"QPushButton:disabled {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2" + ":0.5, y2:1, stop:0 rgba(120, 120, 120, 255));\n" +" color: rgb(194, 194, 194);\n" +"border: 1px solid gray; \n" +"width: 66px;\n" +"height: 20px;\n" +"}\n" +"\n" +"QPushButton:hover {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(255, 255, 255, 200), stop:1 rgba(180, 180, 180, 200));\n" +"color: rgb(255, 255, 255);\n" +"border: 0px; \n" +"}\n" +"QPushButton:pressed {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255));\n" +"color: rgb(255, 255, 255);\n" +"border: 0px; \n" +"}\n" +"\n" +"QPushButton:checked {\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(48, 48, 48, 255), stop:1 rgba(120, 120, 120, 255));\n" +"color: rgb(255, 255, 255);\n" +"border: 0px; \n" +"}")); + verticalLayout = new QVBoxLayout(HITLWidget); + verticalLayout->setContentsMargins(0, 0, 0, 0); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + frame = new QFrame(HITLWidget); + frame->setObjectName(QString::fromUtf8("frame")); + sizePolicy.setHeightForWidth(frame->sizePolicy().hasHeightForWidth()); + frame->setSizePolicy(sizePolicy); + frame->setMinimumSize(QSize(0, 0)); + frame->setMaximumSize(QSize(16777215, 16777215)); + frame->setStyleSheet(QString::fromUtf8("\n" +"\n" +"QFrame{\n" +"background-color: qlineargradient(spread:pad, x1:0.5, y1:0, x2:0.5, y2:1, stop:0 rgba(110, 110, 110, 255), stop:1 rgba(71, 71, 71, 255));\n" +"color: rgba(0, 0, 0, 128);\n" +"}\n" +"")); + frame->setFrameShape(QFrame::StyledPanel); + frame->setFrameShadow(QFrame::Raised); + verticalLayout_2 = new QVBoxLayout(frame); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + verticalLayout_2->setSizeConstraint(QLayout::SetMaximumSize); + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + horizontalLayout->setSizeConstraint(QLayout::SetDefaultConstraint); + startButton = new QPushButton(frame); + startButton->setObjectName(QString::fromUtf8("startButton")); + startButton->setStyleSheet(QString::fromUtf8("")); + + horizontalLayout->addWidget(startButton); + + horizontalSpacer = new QSpacerItem(10, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer); + + stopButton = new QPushButton(frame); + stopButton->setObjectName(QString::fromUtf8("stopButton")); + stopButton->setEnabled(false); + + horizontalLayout->addWidget(stopButton); + + horizontalSpacer_7 = new QSpacerItem(5, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_7); + + line = new QFrame(frame); + line->setObjectName(QString::fromUtf8("line")); + line->setFrameShadow(QFrame::Plain); + line->setFrameShape(QFrame::VLine); + + horizontalLayout->addWidget(line); + + horizontalSpacer_4 = new QSpacerItem(5, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_4); + + apLabel = new QLabel(frame); + apLabel->setObjectName(QString::fromUtf8("apLabel")); + QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Preferred); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(apLabel->sizePolicy().hasHeightForWidth()); + apLabel->setSizePolicy(sizePolicy1); + apLabel->setMinimumSize(QSize(140, 0)); + QFont font; + font.setBold(false); + font.setWeight(50); + apLabel->setFont(font); + apLabel->setLayoutDirection(Qt::LeftToRight); + apLabel->setAutoFillBackground(false); + apLabel->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);")); + apLabel->setAlignment(Qt::AlignCenter); + + horizontalLayout->addWidget(apLabel); + + horizontalSpacer_5 = new QSpacerItem(10, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_5); + + simLabel = new QLabel(frame); + simLabel->setObjectName(QString::fromUtf8("simLabel")); + sizePolicy1.setHeightForWidth(simLabel->sizePolicy().hasHeightForWidth()); + simLabel->setSizePolicy(sizePolicy1); + simLabel->setMinimumSize(QSize(140, 0)); + simLabel->setStyleSheet(QString::fromUtf8("color: rgb(255, 255, 255);")); + simLabel->setAlignment(Qt::AlignCenter); + + horizontalLayout->addWidget(simLabel); + + horizontalSpacer_2 = new QSpacerItem(10, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_2); + + horizontalSpacer_6 = new QSpacerItem(5, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_6); + + line_2 = new QFrame(frame); + line_2->setObjectName(QString::fromUtf8("line_2")); + line_2->setFrameShadow(QFrame::Plain); + line_2->setFrameShape(QFrame::VLine); + + horizontalLayout->addWidget(line_2); + + horizontalSpacer_8 = new QSpacerItem(5, 20, QSizePolicy::Preferred, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_8); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_3); + + buttonClearLog = new QPushButton(frame); + buttonClearLog->setObjectName(QString::fromUtf8("buttonClearLog")); + + horizontalLayout->addWidget(buttonClearLog); + + + verticalLayout_2->addLayout(horizontalLayout); + + textBrowser = new QTextEdit(frame); + textBrowser->setObjectName(QString::fromUtf8("textBrowser")); + QSizePolicy sizePolicy2(QSizePolicy::Expanding, QSizePolicy::Expanding); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(textBrowser->sizePolicy().hasHeightForWidth()); + textBrowser->setSizePolicy(sizePolicy2); + textBrowser->setMinimumSize(QSize(0, 0)); + textBrowser->setAutoFillBackground(false); + textBrowser->setStyleSheet(QString::fromUtf8("QTextEdit {\n" +" background-color: white;\n" +" color: rgb(0, 0, 0);\n" +"}")); + textBrowser->setFrameShape(QFrame::NoFrame); + textBrowser->setFrameShadow(QFrame::Plain); + textBrowser->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); + + verticalLayout_2->addWidget(textBrowser); + + + verticalLayout->addWidget(frame); + + + retranslateUi(HITLWidget); + + QMetaObject::connectSlotsByName(HITLWidget); + } // setupUi + + void retranslateUi(QWidget *HITLWidget) + { + HITLWidget->setWindowTitle(QApplication::translate("HITLWidget", "Form", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + startButton->setToolTip(QApplication::translate("HITLWidget", "Request update", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_TOOLTIP + startButton->setText(QApplication::translate("HITLWidget", "Start", 0, QApplication::UnicodeUTF8)); +#ifndef QT_NO_TOOLTIP + stopButton->setToolTip(QApplication::translate("HITLWidget", "Send update", 0, QApplication::UnicodeUTF8)); +#endif // QT_NO_TOOLTIP + stopButton->setText(QApplication::translate("HITLWidget", "Stop", 0, QApplication::UnicodeUTF8)); + apLabel->setText(QApplication::translate("HITLWidget", "AutoPilot disconnected", 0, QApplication::UnicodeUTF8)); + simLabel->setText(QApplication::translate("HITLWidget", " Simulator disconnected ", 0, QApplication::UnicodeUTF8)); + buttonClearLog->setText(QApplication::translate("HITLWidget", "Clear Log", 0, QApplication::UnicodeUTF8)); + } // retranslateUi + +}; + +namespace Ui { + class HITLWidget: public Ui_HITLWidget {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_HITLWIDGET_H