Commit 8eb9c53c authored by DonLakeFlyer's avatar DonLakeFlyer

Get XCode build working again

Remove unused FlightGear stuff
More work
More
More
More
More
Windows build updates
Linux fixes
Fix unit test run directory
parent c5b4a7df
...@@ -45,15 +45,15 @@ install: ...@@ -45,15 +45,15 @@ install:
build_script: build_script:
- mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && %QT_QMAKE_DIR%\qmake -r CONFIG+=%CONFIG% %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro - mkdir %SHADOW_BUILD_DIR% && cd %SHADOW_BUILD_DIR% && %QT_QMAKE_DIR%\qmake -r CONFIG+=%CONFIG% %APPVEYOR_BUILD_FOLDER%\qgroundcontrol.pro
- cd %SHADOW_BUILD_DIR% && %QT_JOM_DIR%\jom - cd %SHADOW_BUILD_DIR% && %QT_JOM_DIR%\jom
- if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\release\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe ) - if "%CONFIG%" EQU "installer" ( copy %SHADOW_BUILD_DIR%\staging\QGroundControl-installer.exe %APPVEYOR_BUILD_FOLDER%\QGroundControl-installer.exe )
# Generate the source server information to embed in the PDB # Generate the source server information to embed in the PDB
# Temporarily disabled while we try to figure out where this is located on appveyor image # Temporarily disabled while we try to figure out where this is located on appveyor image
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb" | grep qgroundcontrol | grep -v moc_ | grep -v libs\\mavlink | grep -v build_windows_install | python %APPVEYOR_BUILD_FOLDER%\deploy\genPDBsrcsrv.py > %SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv' # - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\srctool.exe" -r -u "%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb" | grep qgroundcontrol | grep -v moc_ | grep -v libs\\mavlink | grep -v build_windows_install | python %APPVEYOR_BUILD_FOLDER%\deploy\genPDBsrcsrv.py > %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv'
# write the source server info # write the source server info
# - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb -s:srcsrv' # - '"C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv\pdbstr.exe" -w -i:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb.srcsrv -p:%SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb -s:srcsrv'
# build the symbol / PE store # build the symbol / PE store
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\qgroundcontrol.pdb /t qgroundcontrol' # - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.pdb /t qgroundcontrol'
# - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\release\qgroundcontrol.exe /t qgroundcontrol' # - 'cd %APPVEYOR_BUILD_FOLDER% && "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\symstore.exe" add /compress /s symbols /f %SHADOW_BUILD_DIR%\qgc-app\qgroundcontrol.exe /t qgroundcontrol'
# - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1' # - ps: 'cd $env:appveyor_build_folder; .\deploy\lowercaseify_symbolstore.ps1'
test_script: test_script:
...@@ -62,7 +62,7 @@ test_script: ...@@ -62,7 +62,7 @@ test_script:
artifacts: artifacts:
- path: QGroundControl-installer.exe - path: QGroundControl-installer.exe
name: qgcinstaller name: qgcinstaller
- path: build_windows_install\release\qgroundcontrol.pdb - path: build_windows_install\staging\qgroundcontrol.pdb
name: pdb name: pdb
deploy: deploy:
......
...@@ -212,7 +212,7 @@ script: ...@@ -212,7 +212,7 @@ script:
mkdir -p ~/.config/QtProject/ && mkdir -p ~/.config/QtProject/ &&
cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ && cp ${TRAVIS_BUILD_DIR}/test/qtlogging.ini ~/.config/QtProject/ &&
export QT_FATAL_WARNINGS=1 && export QT_FATAL_WARNINGS=1 &&
./debug/qgroundcontrol-start.sh --unittest; ./staging/qgroundcontrol-start.sh --unittest;
fi fi
after_success: after_success:
...@@ -238,7 +238,7 @@ before_deploy: ...@@ -238,7 +238,7 @@ before_deploy:
# create linux appimage # create linux appimage
- cd ${TRAVIS_BUILD_DIR} - cd ${TRAVIS_BUILD_DIR}
- if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then - if [[ "${SPEC}" = "linux-g++-64" && "${CONFIG}" = "installer" ]]; then
./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/release ${SHADOW_BUILD_DIR}/release/package; ./deploy/create_linux_appimage.sh ${TRAVIS_BUILD_DIR} ${SHADOW_BUILD_DIR}/staging ${SHADOW_BUILD_DIR}/package;
fi fi
deploy: deploy:
...@@ -249,7 +249,7 @@ deploy: ...@@ -249,7 +249,7 @@ deploy:
secret_access_key: secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: builds/${TRAVIS_BRANCH} upload-dir: builds/${TRAVIS_BRANCH}
acl: public_read acl: public_read
region: us-west-2 region: us-west-2
...@@ -265,7 +265,7 @@ deploy: ...@@ -265,7 +265,7 @@ deploy:
secret_access_key: secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: latest upload-dir: latest
acl: public_read acl: public_read
region: us-west-2 region: us-west-2
...@@ -281,7 +281,7 @@ deploy: ...@@ -281,7 +281,7 @@ deploy:
secret_access_key: secret_access_key:
secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4= secure: BsLXeXUPsCJdX4tawrDnO8OFK5Hk4kzlDTiyH93En6TbjUargVAWDMcHVj7TUhr7+3Tao1W1zb0G4SJe9kHv+jrky0yE72KvoG3YAON0VXWKizxBAKkgHE2RxSTNAwDeKbi2G6YJfNDescBBfX7zEohShdXglQu7CGaUQKRaiI4=
bucket: qgroundcontrol bucket: qgroundcontrol
local_dir: ${SHADOW_BUILD_DIR}/release/package local_dir: ${SHADOW_BUILD_DIR}/package
upload-dir: ${TRAVIS_BRANCH} upload-dir: ${TRAVIS_BRANCH}
acl: public_read acl: public_read
region: us-west-2 region: us-west-2
...@@ -297,8 +297,8 @@ deploy: ...@@ -297,8 +297,8 @@ deploy:
secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ= secure: K/Zqr/FCC7QvzFxYvBtCinPkacQq2ubJ2qm982+38Zf/KjibVOF1dEbVdrGZmII6Tg5DaQzNXGYkg5PvYmJgT9xRsqeQjeYIUYqYZpAt+HYWA38AVfMU8jip/1P1wmwqD469nzJOBBa8yfsMs6Ca7tBaNl/zTxCRGnAgEzqtkdQ=
file_glob: true file_glob: true
file: file:
- ${SHADOW_BUILD_DIR}/release/package/qgroundcontrol.* - ${SHADOW_BUILD_DIR}/qgc-app/package/qgroundcontrol.*
- ${SHADOW_BUILD_DIR}/release/package/QGroundControl.* - ${SHADOW_BUILD_DIR}/qgc-app/package/QGroundControl.*
skip_cleanup: true skip_cleanup: true
on: on:
tags: true tags: true
......
...@@ -9,18 +9,14 @@ ...@@ -9,18 +9,14 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>###</string> <string>${QMAKE_FULL_VERSION}</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>#.#.#</string> <string>${QMAKE_FULL_VERSION}</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key> <key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string> <string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>org.qgroundcontrol.qgroundcontrol</string> <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>NOTE</key>
<string>Open source ground control app provided by QGroundControl dev team</string>
<key>NSCameraUsageDescription</key> <key>NSCameraUsageDescription</key>
<string>QGC uses UVC camera devices for FPV</string> <string>Camera devices used for FPV</string>
</dict> </dict>
</plist> </plist>
...@@ -84,7 +84,6 @@ linux { ...@@ -84,7 +84,6 @@ linux {
DEFINES += QGC_GST_TAISYNC_ENABLED DEFINES += QGC_GST_TAISYNC_ENABLED
DEFINES += QGC_GST_MICROHARD_ENABLED DEFINES += QGC_GST_MICROHARD_ENABLED
DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR DEFINES += QGC_ENABLE_MAVLINK_INSPECTOR
DEFINES += _CRT_NO_SECURE_WARNINGS
QMAKE_CFLAGS -= -Zc:strictStrings QMAKE_CFLAGS -= -Zc:strictStrings
QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings QMAKE_CFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
...@@ -92,19 +91,11 @@ linux { ...@@ -92,19 +91,11 @@ linux {
QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings QMAKE_CXXFLAGS_RELEASE -= -Zc:strictStrings
QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO -= -Zc:strictStrings
QMAKE_CXXFLAGS += /std:c++17 QMAKE_CXXFLAGS += /std:c++17
QMAKE_CXXFLAGS_WARN_ON -= -w34100 # Qt insanity which prevents /wd on 4100 error from working correctly QMAKE_CXXFLAGS_WARN_ON += /WX /W3 \
QMAKE_CXXFLAGS += /W3 \ /wd4005 \ # silence warnings about macro redefinition, these come from the shapefile code with is external
/wd4290 \ # ignore exception specifications /wd4290 \ # ignore exception specifications
/wd4267 \ # silence conversion from 'size_t' to 'int', possible loss of data, these come from gps drivers shared with px4 /wd4267 \ # silence conversion from 'size_t' to 'int', possible loss of data, these come from gps drivers shared with px4
/wd4100 # unreferenced formal parameter - gst-plugins-good /wd4100 # unreferenced formal parameter - gst-plugins-good
QMAKE_CFLAGS += /W3 \
/wd4005 \ # shape file code
/wd4267 \ # shape file code
/wd4996 # shape file code
!WarningsAsErrorsOff {
QMAKE_CXXFLAGS += /WX
QMAKE_CFLAGS += /WX
}
} else { } else {
error("Unsupported Windows toolchain, only Visual Studio 2017 64 bit is supported") error("Unsupported Windows toolchain, only Visual Studio 2017 64 bit is supported")
} }
...@@ -123,7 +114,7 @@ linux { ...@@ -123,7 +114,7 @@ linux {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6 QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
} }
#-- Not forcing anything. Let qmake find the latest, installed SDK. #-- Not forcing anything. Let qmake find the latest, installed SDK.
#QMAKE_MAC_SDK = macosx10.15 QMAKE_MAC_SDK = macosx10.15
QMAKE_CXXFLAGS += -fvisibility=hidden QMAKE_CXXFLAGS += -fvisibility=hidden
QMAKE_CXXFLAGS_WARN_ON += -Werror \ QMAKE_CXXFLAGS_WARN_ON += -Werror \
-Wno-unused-parameter # gst-plugins-good -Wno-unused-parameter # gst-plugins-good
...@@ -163,6 +154,11 @@ linux|macx|ios { ...@@ -163,6 +154,11 @@ linux|macx|ios {
} }
} }
!MacBuild {
# See QGCPostLinkCommon.pri for details on why MacBuild doesn't use DESTDIR
DESTDIR = staging
}
MobileBuild { MobileBuild {
DEFINES += __mobile__ DEFINES += __mobile__
} }
...@@ -235,7 +231,7 @@ CONFIG(debug, debug|release) { ...@@ -235,7 +231,7 @@ CONFIG(debug, debug|release) {
# Setup our build directories # Setup our build directories
BASEDIR = $$IN_PWD SOURCE_DIR = $$IN_PWD
!iOSBuild { !iOSBuild {
OBJECTS_DIR = $${OUT_PWD}/obj OBJECTS_DIR = $${OUT_PWD}/obj
...@@ -253,10 +249,8 @@ LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC ...@@ -253,10 +249,8 @@ LOCATION_PLUGIN_NAME = QGeoServiceProviderFactoryQGC
DEFINES += _TTY_NOWARN_ DEFINES += _TTY_NOWARN_
MacBuild { MacBuild {
# Xcode 8.3 has issues on how MAVLink accesses (packed) message structure members. QMAKE_TARGET_BUNDLE_PREFIX = org.qgroundcontrol
# Note that this will fail when Xcode version reaches 10.x.x QMAKE_BUNDLE = qgroundcontrol
XCODE_VERSION = $$system($$PWD/tools/get_xcode_version.sh)
greaterThan(XCODE_VERSION, 8.2.0): QMAKE_CXXFLAGS_WARN_ON += -Wno-address-of-packed-member
} }
# #
......
...@@ -45,7 +45,7 @@ isEmpty(MAVLINKPATH) { ...@@ -45,7 +45,7 @@ isEmpty(MAVLINKPATH) {
MAVLINKPATH = $$fromfile(user_config.pri, MAVLINKPATH) MAVLINKPATH = $$fromfile(user_config.pri, MAVLINKPATH)
message($$sprintf("Using user-supplied mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH)) message($$sprintf("Using user-supplied mavlink path '%1' specified in user_config.pri", $$MAVLINKPATH))
} else { } else {
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL MAVLINKPATH = $$SOURCE_DIR/$$MAVLINKPATH_REL
} }
} }
...@@ -115,22 +115,22 @@ SOURCES += \ ...@@ -115,22 +115,22 @@ SOURCES += \
# #
MacBuild { MacBuild {
INCLUDEPATH += \ INCLUDEPATH += \
$$BASEDIR/libs/Frameworks/SDL2.framework/Headers $$SOURCE_DIR/libs/Frameworks/SDL2.framework/Headers
LIBS += \ LIBS += \
-F$$BASEDIR/libs/Frameworks \ -F$$SOURCE_DIR/libs/Frameworks \
-framework SDL2 -framework SDL2
} else:LinuxBuild { } else:LinuxBuild {
PKGCONFIG = sdl2 PKGCONFIG = sdl2
} else:WindowsBuild { } else:WindowsBuild {
INCLUDEPATH += $$BASEDIR/libs/sdl2/msvc/include INCLUDEPATH += $$SOURCE_DIR/libs/sdl2/msvc/include
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Windows/x64/include INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Windows/x64/include
LIBS += -L$$BASEDIR/libs/sdl2/msvc/lib/x64 LIBS += -L$$SOURCE_DIR/libs/sdl2/msvc/lib/x64
LIBS += -lSDL2 LIBS += -lSDL2
} }
# Include Android OpenSSL libs # Include Android OpenSSL libs
AndroidBuild { AndroidBuild {
include($$BASEDIR/libs/OpenSSL/android_openssl/openssl.pri) include($$SOURCE_DIR/libs/OpenSSL/android_openssl/openssl.pri)
message("ANDROID_EXTRA_LIBS") message("ANDROID_EXTRA_LIBS")
message($$ANDROID_TARGET_ARCH) message($$ANDROID_TARGET_ARCH)
message($$ANDROID_EXTRA_LIBS) message($$ANDROID_EXTRA_LIBS)
...@@ -157,10 +157,10 @@ contains(DEFINES, QGC_ENABLE_PAIRING) { ...@@ -157,10 +157,10 @@ contains(DEFINES, QGC_ENABLE_PAIRING) {
AndroidBuild { AndroidBuild {
contains(QT_ARCH, arm) { contains(QT_ARCH, arm) {
LIBS += $$ANDROID_EXTRA_LIBS LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-armeabi-v7a/include INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Android/arch-armeabi-v7a/include
} else { } else {
LIBS += $$ANDROID_EXTRA_LIBS LIBS += $$ANDROID_EXTRA_LIBS
INCLUDEPATH += $$BASEDIR/libs/OpenSSL/Android/arch-x86/include INCLUDEPATH += $$SOURCE_DIR/libs/OpenSSL/Android/arch-x86/include
} }
} }
} }
......
...@@ -7,88 +7,71 @@ ...@@ -7,88 +7,71 @@
# #
################################################################################ ################################################################################
QMAKE_POST_LINK += echo "Copying files" # These are the Post Link steps which are common to all builds
#
# Copy the application resources to the associated place alongside the application
#
LinuxBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR
}
MacBuild {
DESTDIR_COPY_RESOURCE_LIST = $$DESTDIR/$${TARGET}.app/Contents/MacOS
}
# Windows version of QMAKE_COPY_DIR of course doesn't work the same as Mac/Linux. It will only
# copy the contents of the source directory. It doesn't create the top level source directory
# in the target.
WindowsBuild {
# Make sure to keep both side of this if using the same set of directories
DESTDIR_COPY_RESOURCE_LIST = $$replace(DESTDIR,"/","\\")
BASEDIR_COPY_RESOURCE_LIST = $$replace(BASEDIR,"/","\\")
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY_DIR \"$$BASEDIR_COPY_RESOURCE_LIST\\resources\\flightgear\" \"$$DESTDIR_COPY_RESOURCE_LIST\\flightgear\"
} else {
!MobileBuild {
# Make sure to keep both sides of this if using the same set of directories
QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/resources/flightgear $$DESTDIR_COPY_RESOURCE_LIST
}
}
# #
# Perform platform specific setup # Perform platform specific setup
# #
MacBuild { MacBuild {
# Update version info in bundle QMAKE_POST_LINK += echo "Post Link Common"
PLIST_FILE = $$DESTDIR/$${TARGET}.app/Contents/Info.plist
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $${MAC_VERSION}\" $$PLIST_FILE # Qt is screwed up if you use qmake to create an XCode Project which has a DESTDIR set on it.
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $${MAC_BUILD}\" $$PLIST_FILE # This is because XCode builds create the .app in BUILT_PRODUCTS_DIR. If you use a DESTDIR then
QMAKE_POST_LINK += && /usr/libexec/PlistBuddy -c \"Set :CFBundleExecutable 'MacOs/$${TARGET}'\" $$PLIST_FILE # Qt adds a Copy Phase to the build which copies the .app from the BUILT_PRODUCTS_DIR to DESTDIR.
} # This causes all sort of problem which are too long to list here. In order to work around this
# We have to duplicate the post link commands here to work from two different locations. And to deal
MacBuild { # with the differences between post list command running in a shell script (XCode) versus a makefile (Qt Creator)
# Copy non-standard frameworks into app package macx-xcode {
QMAKE_POST_LINK += && rsync -a --delete $$BASEDIR/libs/Frameworks $$DESTDIR/$${TARGET}.app/Contents/ # SDL2 Framework
# SDL2 Framework QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.Framework $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET} QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap # AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) { contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$BASEDIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $$DESTDIR/$${TARGET}.app/Contents/Frameworks/ QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $$DESTDIR/$${TARGET}.app/Contents/MacOS/$${TARGET} QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $BUILT_PRODUCTS_DIR/$${TARGET}.app/Contents/MacOS/$${TARGET}
}
} else {
# SDL2 Framework
QMAKE_POST_LINK += && rsync -a --delete $$SOURCE_DIR/libs/Frameworks/SDL2.Framework $${TARGET}.app/Contents/Frameworks
QMAKE_POST_LINK += && install_name_tool -change "@rpath/SDL2.framework/Versions/A/SDL2" "@executable_path/../Frameworks/SDL2.framework/Versions/A/SDL2" $${TARGET}.app/Contents/MacOS/$${TARGET}
# AirMap
contains (DEFINES, QGC_AIRMAP_ENABLED) {
QMAKE_POST_LINK += && rsync -a $$SOURCE_DIR/libs/airmapd/macOS/$$AIRMAP_QT_PATH/* $${TARGET}.app/Contents/Frameworks/
QMAKE_POST_LINK += && install_name_tool -change "@rpath/libairmap-qt.0.0.1.dylib" "@executable_path/../Frameworks/libairmap-qt.0.0.1.dylib" $${TARGET}.app/Contents/MacOS/$${TARGET}
}
} }
} }
WindowsBuild { WindowsBuild {
BASEDIR_WIN = $$replace(BASEDIR, "/", "\\") #BASEDIR_WIN = $$replace(SOURCE_DIR, "/", "\\")
DESTDIR_WIN = $$replace(DESTDIR, "/", "\\")
QT_BIN_DIR = $$dirname(QMAKE_QMAKE) QT_BIN_DIR = $$dirname(QMAKE_QMAKE)
# Copy dependencies # Copy dependencies
DebugBuild: DLL_QT_DEBUGCHAR = "d" DebugBuild: DLL_QT_DEBUGCHAR = "d"
ReleaseBuild: DLL_QT_DEBUGCHAR = "" ReleaseBuild: DLL_QT_DEBUGCHAR = ""
COPY_FILE_LIST = \ COPY_FILE_LIST = \
$$BASEDIR\\libs\\sdl2\\msvc\\lib\\x64\\SDL2.dll \ $$SOURCE_DIR\\libs\\sdl2\\msvc\\lib\\x64\\SDL2.dll \
$$BASEDIR\\deploy\\libcrypto-1_1-x64.dll \ $$SOURCE_DIR\\deploy\\libcrypto-1_1-x64.dll \
$$BASEDIR_WIN\\deploy\\libssl-1_1-x64.dll $$SOURCE_DIR\\deploy\\libssl-1_1-x64.dll
for(COPY_FILE, COPY_FILE_LIST) { for(COPY_FILE, COPY_FILE_LIST) {
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR_WIN\" QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$COPY_FILE\" \"$$DESTDIR\"
} }
ReleaseBuild { ReleaseBuild {
# Copy Visual Studio DLLs # Copy Visual Studio DLLs
# Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed. # Note that this is only done for release because the debugging versions of these DLLs cannot be redistributed.
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$BASEDIR\\deploy\\msvcp140.dll\" \"$$DESTDIR_WIN\" QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$SOURCE_DIR\\deploy\\msvcp140.dll\" \"$$DESTDIR\"
QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$BASEDIR\\deploy\\vcruntime140.dll\" \"$$DESTDIR_WIN\" QMAKE_POST_LINK += $$escape_expand(\\n) $$QMAKE_COPY \"$$SOURCE_DIR\\deploy\\vcruntime140.dll\" \"$$DESTDIR\"
} }
DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR_WIN\\$${TARGET}.exe)) DEPLOY_TARGET = $$shell_quote($$shell_path($$DESTDIR\\$${TARGET}.exe))
QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --qmldir=$${BASEDIR_WIN}\\src $${DEPLOY_TARGET} QMAKE_POST_LINK += $$escape_expand(\\n) $$QT_BIN_DIR\\windeployqt --qmldir=$${SOURCE_DIR}\\src $${DEPLOY_TARGET}
} }
LinuxBuild { LinuxBuild {
QMAKE_POST_LINK += echo "Post Link Common"
QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins QMAKE_POST_LINK += && mkdir -p $$DESTDIR/Qt/libs && mkdir -p $$DESTDIR/Qt/plugins
# QT_INSTALL_LIBS # QT_INSTALL_LIBS
...@@ -163,9 +146,9 @@ LinuxBuild { ...@@ -163,9 +146,9 @@ LinuxBuild {
# QGroundControl start script # QGroundControl start script
contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) | !exists($$PWD/custom/custom.pri) { contains (CONFIG, QGC_DISABLE_CUSTOM_BUILD) | !exists($$PWD/custom/custom.pri) {
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol-start.sh $$DESTDIR QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/deploy/qgroundcontrol-start.sh $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/deploy/qgroundcontrol.desktop $$DESTDIR QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/deploy/qgroundcontrol.desktop $$DESTDIR
QMAKE_POST_LINK += && $$QMAKE_COPY $$BASEDIR/resources/icons/qgroundcontrol.png $$DESTDIR QMAKE_POST_LINK += && $$QMAKE_COPY $$SOURCE_DIR/resources/icons/qgroundcontrol.png $$DESTDIR
} else { } else {
include($$PWD/custom/custom_deploy.pri) include($$PWD/custom/custom_deploy.pri)
} }
......
...@@ -7,9 +7,12 @@ ...@@ -7,9 +7,12 @@
# #
################################################################################ ################################################################################
# These are the Post Link steps which are specific to installer builds
installer { installer {
DEFINES += QGC_INSTALL_RELEASE DEFINES += QGC_INSTALL_RELEASE
MacBuild { MacBuild {
#QMAKE_POST_LINK += && rsync -a --delete $BUILT_PRODUCTS_DIR/$${TARGET}.app .
VideoEnabled { VideoEnabled {
# Install the gstreamer framework # Install the gstreamer framework
# This will: # This will:
...@@ -18,39 +21,38 @@ installer { ...@@ -18,39 +21,38 @@ installer {
# Relocate all dylibs so they can work under @executable_path/... # Relocate all dylibs so they can work under @executable_path/...
# Copy the result into the app bundle # Copy the result into the app bundle
# Make sure qgroundcontrol can find them # Make sure qgroundcontrol can find them
message("Preparing GStreamer Framework") QMAKE_POST_LINK += && $$SOURCE_DIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${TARGET}.app $${TARGET}
QMAKE_POST_LINK += && $$BASEDIR/tools/prepare_gstreamer_framework.sh $${OUT_PWD}/gstwork/ $${DESTDIR}/$${TARGET}.app $${TARGET}
} else {
message("Skipping GStreamer Framework")
} }
# We cd to release directory so we can run macdeployqt without a path to the QMAKE_POST_LINK += && echo macdeployqt
# qgroundcontrol.app file. If you specify a path to the .app file the symbolic QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=1 -qmldir=$${SOURCE_DIR}/src
# links to plugins will not be created correctly.
QMAKE_POST_LINK += && cd $${DESTDIR} && $$dirname(QMAKE_QMAKE)/macdeployqt $${TARGET}.app -appstore-compliant -verbose=1 -qmldir=$${BASEDIR}/src
# macdeployqt is missing some relocations once in a while. "Fix" it: # macdeployqt is missing some relocations once in a while. "Fix" it:
QMAKE_POST_LINK += && python $$BASEDIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1 QMAKE_POST_LINK += && echo osxrelocator
QMAKE_POST_LINK += && python $$SOURCE_DIR/tools/osxrelocator.py $${TARGET}.app/Contents @rpath @executable_path/../Frameworks -r > /dev/null 2>&1
# Create package # Create package
QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "$${DESTDIR}/" QMAKE_POST_LINK += && echo hdiutil
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o $${DESTDIR}/package/$${TARGET}.dmg QMAKE_POST_LINK += && mkdir -p staging
QMAKE_POST_LINK += && rsync -a --delete $${TARGET}.app staging
QMAKE_POST_LINK += && hdiutil create /tmp/tmp.dmg -ov -volname "$${TARGET}-$${MAC_VERSION}" -fs HFS+ -srcfolder "staging"
QMAKE_POST_LINK += && hdiutil convert /tmp/tmp.dmg -format UDBZ -o package/$${TARGET}.dmg
QMAKE_POST_LINK += && rm /tmp/tmp.dmg QMAKE_POST_LINK += && rm /tmp/tmp.dmg
} }
WindowsBuild { WindowsBuild {
QMAKE_POST_LINK += $$escape_expand(\\n) cd $$BASEDIR_WIN && $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR_WIN}\\$${TARGET}-installer.exe\"" "$$BASEDIR_WIN\\deploy\\qgroundcontrol_installer.nsi") QMAKE_POST_LINK += $$escape_expand(\\n) $$quote("\"C:\\Program Files \(x86\)\\NSIS\\makensis.exe\"" $$(QGC_NSIS_INSTALLER_PARAMETERS) /DDRIVER_MSI="$$SOURCE_DIR\\deploy\\driver.msi" /DINSTALLER_ICON="\"$${QGC_INSTALLER_ICON}\"" /DHEADER_BITMAP="\"$${QGC_INSTALLER_HEADER_BITMAP}\"" /DAPPNAME="\"$${QGC_APP_NAME}\"" /DEXENAME="\"$${TARGET}\"" /DORGNAME="\"$${QGC_ORG_NAME}\"" /DDESTDIR=$${DESTDIR} /NOCD "\"/XOutFile $${DESTDIR}\\$${TARGET}-installer.exe\"" "$$SOURCE_DIR\\deploy\\qgroundcontrol_installer.nsi")
OTHER_FILES += deploy/qgroundcontrol_installer.nsi OTHER_FILES += deploy/qgroundcontrol_installer.nsi
} }
LinuxBuild { LinuxBuild {
#-- TODO: This uses hardcoded paths. It should use $${DESTDIR} #-- TODO: This uses hardcoded paths. It should use $${DESTDIR}
QMAKE_POST_LINK += && mkdir -p release/package QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && tar -cj --exclude='package' -f release/package/QGroundControl.tar.bz2 release --transform 's/release/qgroundcontrol/' QMAKE_POST_LINK += && tar -cj --exclude='package' -f package/QGroundControl.tar.bz2 staging --transform 's/$${DESTDIR}/qgroundcontrol/'
} }
AndroidBuild { AndroidBuild {
QMAKE_POST_LINK += && mkdir -p $${DESTDIR}/package QMAKE_POST_LINK += && mkdir -p package
QMAKE_POST_LINK += && make install INSTALL_ROOT=$${DESTDIR}/android-build/ QMAKE_POST_LINK += && make install INSTALL_ROOT=android-build/
QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output $${DESTDIR}/android-build --deployment bundled --gradle --sign $${BASEDIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS) QMAKE_POST_LINK += && androiddeployqt --input android-libQGroundControl.so-deployment-settings.json --output android-build --deployment bundled --gradle --sign $${SOURCE_DIR}/android/android_release.keystore dagar --storepass $$(ANDROID_STOREPASS)
contains(QT_ARCH, arm) { contains(QT_ARCH, arm) {
QGC_APK_BITNESS = "32" QGC_APK_BITNESS = "32"
} else:contains(QT_ARCH, arm64) { } else:contains(QT_ARCH, arm64) {
...@@ -58,6 +60,6 @@ installer { ...@@ -58,6 +60,6 @@ installer {
} else { } else {
QGC_APK_BITNESS = "" QGC_APK_BITNESS = ""
} }
QMAKE_POST_LINK += && cp $${DESTDIR}/android-build/build/outputs/apk/android-build-release-signed.apk $${DESTDIR}/package/QGroundControl$${QGC_APK_BITNESS}.apk QMAKE_POST_LINK += && cp android-build/build/outputs/apk/android-build-release-signed.apk package/QGroundControl$${QGC_APK_BITNESS}.apk
} }
} }
...@@ -85,7 +85,7 @@ doInstall: ...@@ -85,7 +85,7 @@ doInstall:
; Driver location is http://firmware.ardupilot.org/Tools/MissionPlanner/driver.msi ; Driver location is http://firmware.ardupilot.org/Tools/MissionPlanner/driver.msi
; Whenever this driver is updated in the repo QGCCURRENTDRIVERVERSION must be bumped by 1 ; Whenever this driver is updated in the repo QGCCURRENTDRIVERVERSION must be bumped by 1
File deploy\driver.msi File ${DRIVER_MSI}
WriteUninstaller $INSTDIR\${EXENAME}-Uninstall.exe WriteUninstaller $INSTDIR\${EXENAME}-Uninstall.exe
WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}" WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
......
# ------------------------------------------------- ################################################################################
# QGroundControl - Micro Air Vehicle Groundstation #
# Please see our website at <http://qgroundcontrol.org> # (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
# Maintainer: #
# Lorenz Meier <lm@inf.ethz.ch> # QGroundControl is licensed according to the terms in the file
# (c) 2009-2019 QGroundControl Developers # COPYING.md in the root of the source code directory.
# License terms set in COPYING.md #
# ------------------------------------------------- ################################################################################
QMAKE_PROJECT_DEPTH = 0 # undocumented qmake flag to force absolute paths in make files QMAKE_PROJECT_DEPTH = 0 # undocumented qmake flag to force absolute paths in make files
...@@ -29,12 +29,6 @@ TARGET = QGroundControl ...@@ -29,12 +29,6 @@ TARGET = QGroundControl
TEMPLATE = app TEMPLATE = app
QGCROOT = $$PWD QGCROOT = $$PWD
DebugBuild {
DESTDIR = $${OUT_PWD}/debug
} else {
DESTDIR = $${OUT_PWD}/release
}
QML_IMPORT_PATH += $$PWD/src/QmlControls QML_IMPORT_PATH += $$PWD/src/QmlControls
# #
...@@ -43,7 +37,7 @@ QML_IMPORT_PATH += $$PWD/src/QmlControls ...@@ -43,7 +37,7 @@ QML_IMPORT_PATH += $$PWD/src/QmlControls
MacBuild { MacBuild {
QMAKE_INFO_PLIST = Custom-Info.plist QMAKE_INFO_PLIST = Custom-Info.plist
ICON = $${BASEDIR}/resources/icons/macx.icns ICON = $${SOURCE_DIR}/resources/icons/macx.icns
OTHER_FILES += Custom-Info.plist OTHER_FILES += Custom-Info.plist
LIBS += -framework ApplicationServices LIBS += -framework ApplicationServices
} }
...@@ -68,8 +62,8 @@ QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl ...@@ -68,8 +62,8 @@ QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl
QGC_APP_COPYRIGHT = "Copyright (C) 2019 QGroundControl Development Team. All rights reserved." QGC_APP_COPYRIGHT = "Copyright (C) 2019 QGroundControl Development Team. All rights reserved."
WindowsBuild { WindowsBuild {
QGC_INSTALLER_ICON = "WindowsQGC.ico" QGC_INSTALLER_ICON = "$$SOURCE_DIR\\WindowsQGC.ico"
QGC_INSTALLER_HEADER_BITMAP = "installheader.bmp" QGC_INSTALLER_HEADER_BITMAP = "$$SOURCE_DIR\\installheader.bmp"
} }
# Load additional config flags from user_config.pri # Load additional config flags from user_config.pri
...@@ -126,17 +120,17 @@ iOSBuild { ...@@ -126,17 +120,17 @@ iOSBuild {
ForAppStore { ForAppStore {
message(App Store Build) message(App Store Build)
#-- Create official, versioned Info.plist #-- Create official, versioned Info.plist
APP_STORE = $$system(cd $${BASEDIR} && $${BASEDIR}/tools/update_ios_version.sh $${BASEDIR}/ios/iOSForAppStore-Info-Source.plist $${BASEDIR}/ios/iOSForAppStore-Info.plist) APP_STORE = $$system(cd $${SOURCE_DIR} && $${SOURCE_DIR}/tools/update_ios_version.sh $${SOURCE_DIR}/ios/iOSForAppStore-Info-Source.plist $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist)
APP_ERROR = $$find(APP_STORE, "Error") APP_ERROR = $$find(APP_STORE, "Error")
count(APP_ERROR, 1) { count(APP_ERROR, 1) {
error("Error building .plist file. 'ForAppStore' builds are only possible through the official build system.") error("Error building .plist file. 'ForAppStore' builds are only possible through the official build system.")
} }
QT += qml-private QT += qml-private
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOSForAppStore-Info.plist QMAKE_INFO_PLIST = $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOSForAppStore-Info.plist OTHER_FILES += $${SOURCE_DIR}/ios/iOSForAppStore-Info.plist
} else { } else {
QMAKE_INFO_PLIST = $${BASEDIR}/ios/iOS-Info.plist QMAKE_INFO_PLIST = $${SOURCE_DIR}/ios/iOS-Info.plist
OTHER_FILES += $${BASEDIR}/ios/iOS-Info.plist OTHER_FILES += $${SOURCE_DIR}/ios/iOS-Info.plist
} }
QMAKE_ASSET_CATALOGS += ios/Images.xcassets QMAKE_ASSET_CATALOGS += ios/Images.xcassets
BUNDLE.files = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST BUNDLE.files = ios/QGCLaunchScreen.xib $$QMAKE_INFO_PLIST
...@@ -509,7 +503,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin { ...@@ -509,7 +503,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
#src/AnalyzeView/LogDownloadTest.h \ #src/AnalyzeView/LogDownloadTest.h \
#src/qgcunittest/FileDialogTest.h \ #src/qgcunittest/FileDialogTest.h \
#src/qgcunittest/FileManagerTest.h \ #src/qgcunittest/FileManagerTest.h \
#src/qgcunittest/FlightGearTest.h \
#src/qgcunittest/MainWindowTest.h \ #src/qgcunittest/MainWindowTest.h \
#src/qgcunittest/MessageBoxTest.h \ #src/qgcunittest/MessageBoxTest.h \
...@@ -553,7 +546,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin { ...@@ -553,7 +546,6 @@ DebugBuild { PX4FirmwarePlugin { PX4FirmwarePluginFactory { APMFirmwarePlugin {
#src/AnalyzeView/LogDownloadTest.cc \ #src/AnalyzeView/LogDownloadTest.cc \
#src/qgcunittest/FileDialogTest.cc \ #src/qgcunittest/FileDialogTest.cc \
#src/qgcunittest/FileManagerTest.cc \ #src/qgcunittest/FileManagerTest.cc \
#src/qgcunittest/FlightGearTest.cc \
#src/qgcunittest/MainWindowTest.cc \ #src/qgcunittest/MainWindowTest.cc \
#src/qgcunittest/MessageBoxTest.cc \ #src/qgcunittest/MessageBoxTest.cc \
...@@ -1381,9 +1373,7 @@ AndroidBuild { ...@@ -1381,9 +1373,7 @@ AndroidBuild {
# Localization # Localization
# #
TRANSLATIONS += \ TRANSLATIONS += $$files($$PWD/localization/qgc_*.ts)
$$files($$PWD/translations/qgc_source_*.ts) \
$$files($$PWD/translations/qgc_json_*.ts)
CONFIG+=lrelease embed_translations CONFIG+=lrelease embed_translations
#------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------
...@@ -1394,7 +1384,7 @@ CONFIG+=lrelease embed_translations ...@@ -1394,7 +1384,7 @@ CONFIG+=lrelease embed_translations
contains (CONFIG, QGC_DISABLE_BUILD_SETUP) { contains (CONFIG, QGC_DISABLE_BUILD_SETUP) {
message("Disable standard build setup") message("Disable standard build setup")
} else { } else {
include(QGCSetup.pri) include(QGCPostLinkCommon.pri)
} }
# #
...@@ -1404,7 +1394,7 @@ contains (CONFIG, QGC_DISABLE_BUILD_SETUP) { ...@@ -1404,7 +1394,7 @@ contains (CONFIG, QGC_DISABLE_BUILD_SETUP) {
contains (CONFIG, QGC_DISABLE_INSTALLER_SETUP) { contains (CONFIG, QGC_DISABLE_INSTALLER_SETUP) {
message("Disable standard installer setup") message("Disable standard installer setup")
} else { } else {
include(QGCInstaller.pri) include(QGCPostLinkInstaller.pri)
} }
DISTFILES += \ DISTFILES += \
......
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Easy Star (R/C)</description>
<author>Ken Northup, 3d model </author>
<author>Ron Jensen, 3d model, FDM</author>
<aircraft-version>0.0</aircraft-version>
<flight-model>jsb</flight-model>
<aero>easystar</aero>
<!--
<systems>
<autopilot>
<path>Aircraft/Malolo1/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Malolo1/Systems/electrical.xml</path>
</electrical>
</systems> -->
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/EasyStar/Models/easystar.xml</path>
</model>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">0.15</y-offset-m>
<z-offset-m archive="y">0.40</z-offset-m>
<pitch-offset-deg>0</pitch-offset-deg>
</config>
</view>
<view n="101">
<name>News Camera</name>
<type>lookat</type>
<internal type="bool">true</internal>
<config>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<target-lat-deg-path>/sim/tower/latitude-deg</target-lat-deg-path>
<target-lon-deg-path>/sim/tower/longitude-deg</target-lon-deg-path>
<target-alt-ft-path>/sim/tower/altitude-ft</target-alt-ft-path>
<!--
<target-heading-deg-path></target-heading-deg-path>
<target-pitch-deg-path></target-pitch-deg-path>
<target-roll-deg-path></target-roll-deg-path>
-->
</config>
</view>
<chase-distance-m archive="y" type="double">-7.5</chase-distance-m>
<help>
<title>Easy Star R/C</title>
<line>Cruise speed: mph</line>
<line>Never-exceed (Vne): mph</line>
<line>Best Glide (Vglide): mph</line>
<line>Maneuvering (Va): mph</line>
<line>Approach speed: mph</line>
<line>Stall speed (Vs): mph</line>
</help>
</sim>
<controls>
<flight>
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
</flight>
</controls>
</PropertyList>
<?xml version="1.0"?>
<!-- Calculated from http://brantuas.com/ezcalc/dma1.asp using a Speed 400 motor, 5.5x4.5 prop and 8 KAN 950 cells -->
<electric_engine name="ElecMot400">
<power unit="WATTS"> 70.0 </power>
</electric_engine>
<?xml version="1.0"?>
<!-- Generated by Javaprop
-->
<propeller name="prop">
<ixx> 1e-4 </ixx>
<diameter unit="IN"> 5.5 </diameter>
<numblades> 2 </numblades>
<gearratio>1.0 </gearratio>
<ct_factor>1.0 </ct_factor>
<cp_factor>1.0 </cp_factor>
<table name="C_THRUST" type="internal">
<tableData>
0.00 0.088784
0.05 0.091205
0.10 0.090752
0.15 0.089925
0.20 0.088593
0.25 0.086674
0.30 0.084053
0.35 0.080709
0.40 0.076332
0.45 0.070568
0.50 0.063187
0.55 0.055458
0.60 0.047475
0.65 0.039233
0.70 0.030741
0.71 0.029014
0.72 0.027279
0.73 0.025533
0.74 0.023780
0.75 0.022018
0.76 0.020248
0.77 0.018470
0.78 0.016683
0.79 0.014887
0.80 0.013086
0.81 0.011274
0.82 0.009459
0.83 0.007626
0.84 0.005791
0.85 0.003949
0.86 0.002076
0.87 0.000208
0.88 -0.001676
0.89 -0.003521
0.90 -0.005448
0.91 -0.007298
0.92 -0.009234
</tableData>
</table>
<table name="C_POWER" type="internal">
<tableData>
0.00 0.048163
0.05 0.047685
0.10 0.047684
0.15 0.047603
0.20 0.048065
0.25 0.048509
0.30 0.049003
0.35 0.049322
0.40 0.049003
0.45 0.047900
0.50 0.045619
0.55 0.042672
0.60 0.039115
0.65 0.034900
0.70 0.029989
0.71 0.028920
0.72 0.027823
0.73 0.026695
0.74 0.025539
0.75 0.024353
0.76 0.023136
0.77 0.021891
0.78 0.020614
0.79 0.019306
0.80 0.017969
0.81 0.016598
0.82 0.015201
0.83 0.013764
0.84 0.012300
0.85 0.010804
0.86 0.009257
0.87 0.007688
0.88 0.006079
0.89 0.004477
0.90 0.002777
0.91 0.001121
0.92 -0.000641
</tableData>
</table>
</propeller>
This diff is collapsed.
<?xml version="1.0"?>
<PropertyList>
<path>easystar.ac</path>
</PropertyList>
This diff is collapsed.
Original readme:
************************************************************************
* MULTIPLEX Modellsport GmbH & Co. KG *
* Neuer Weg 2, D-75223 Niefern, Germany *
************************************************************************
Wir haben die Flugeigenschaften so genau wie mglich
dem realen Modell angenhert. In extremen Flugsituationen sind jedoch Ab-
weichungen mglich.
This Model was created for FMS and now modified by Ken Northup using AC3D and is freely distributed. Please feel free to modify as you wish using AC3D. If you modify and make a better paint scheme, feel free to contact me via email, as I would love to see different versions created for Clearview RC Simulator. To Install, simply extract the file and put the folder under the models in the Clearview RC Simulator. The next time you run Clearview, it will appear under the Airplane selections.
Ken Northup
Helos360@bellsouth.net
\ No newline at end of file
The EasyStar model is from http://gitorious.org/ron-s-hanger/easystar-rc (fork at https://gitorious.org/~thomasgubler/ron-s-hanger/thomasgublers-easystar-rc)
I slightly adapted some files in order to make the model work when it's not located in the default flightgear aircraft folder.
-Thomas Gubler
<?xml version="1.0"?>
<initialize name="reset00">
<!--
This file sets up the aircraft to start off
from the runway in preparation for takeoff.
-->
<ubody> 0.0 </ubody>
<vbody> 0.0 </vbody>
<wbody> 0.0 </wbody>
<latitude> 47.0 </latitude>
<longitude> 122.0 </longitude>
<phi> 0.0 </phi>
<theta> 0.0 </theta>
<psi> 150.0 </psi>
<altitude> 4.7 </altitude>
</initialize>
<?xml version="1.0"?>
<initialize name="reset01">
<!--
This file drops the aircraft from 1000 ft to see what happens.
-->
<ubody> 0.0 </ubody>
<vbody> 0.0 </vbody>
<wbody> 0.0 </wbody>
<latitude> 47.0 </latitude>
<longitude> 122.0 </longitude>
<phi> 0.0 </phi>
<theta> 0.0 </theta>
<psi> 150.0 </psi>
<altitude> 1000.7 </altitude>
</initialize>
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Malolo1(R/C)</description>
<author>Innis Cunningham, Josh Wilson</author>
<aircraft-version>0.0</aircraft-version>
<startup>
<splash-texture>Aircraft/Malolo1/Malolo1-splash.rgb</splash-texture>
</startup>
<flight-model>jsb</flight-model>
<aero>Malolo1</aero>
<fuel-fraction>0.8</fuel-fraction>
<!--
<systems>
<autopilot>
<path>Aircraft/Malolo1/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Malolo1/Systems/electrical.xml</path>
</electrical>
</systems> -->
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/Malolo1/Models/Malolo1.xml</path>
</model>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">0.26</y-offset-m>
<z-offset-m archive="y">0.34</z-offset-m>
<pitch-offset-deg>-8</pitch-offset-deg>
</config>
</view>
<chase-distance-m archive="y" type="double">-15.0</chase-distance-m>
<help>
<title>YardStik 110 (Sig Mfg)</title>
<line>Cruise speed: 60 mph</line>
<line>Never-exceed (Vne): 85 mph</line>
<line>Best Glide (Vglide): 20 mph</line>
<line>Maneuvering (Va): 50 mph</line>
<line>Approach speed: 15-25 mph</line>
<line>Stall speed (Vs): 10 mph</line>
</help>
</sim>
<controls>
<flight>
<aileron-trim>-0.01</aileron-trim> <!-- fixed -->
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
<rudder-trim>0.00</rudder-trim> <!-- fixed -->
</flight>
<engines>
<engine n="0">
<magnetos>3</magnetos>
</engine>
</engines>
<door>1.0</door>
</controls>
<engines>
<engine>
<rpm type="double">700</rpm>
</engine>
</engines>
<!-- An autopilot on a Cub??? -->
<autopilot>
<config>
<min-climb-speed-kt type="float">48.0</min-climb-speed-kt>
<best-climb-speed-kt type="float">56.0</best-climb-speed-kt>
<target-climb-rate-fpm type="float">400.0</target-climb-rate-fpm>
<target-descent-rate-fpm type="float">1000.0</target-descent-rate-fpm>
<elevator-adj-factor type="float">6000.0</elevator-adj-factor>
<integral-contribution type="float">0.008</integral-contribution>
<zero-pitch-throttle type="float">0.35</zero-pitch-throttle>
<zero-pitch-trim-full-throttle type="float">0.001</zero-pitch-trim-full-throttle>
</config>
</autopilot>
</PropertyList>
This diff is collapsed.
<?xml version="1.0"?>
<!-- Generated by Aero-Matic v 0.7
Inputs:
horsepower: 3.8
pitch: fixed
Outputs:
linear-blade-inches: 10.331602005498
-->
<propeller name="Rascal Propeller">
<ixx> 0.00085 </ixx>
<diameter unit="IN"> 18.0 </diameter>
<numblades> 2 </numblades>
<minpitch> 30 </minpitch>
<maxpitch> 30 </maxpitch>
<table name="C_THRUST" type="internal">
<tableData>
0.0 0.0776
0.1 0.0744
0.2 0.0712
0.3 0.0655
0.4 0.0588
0.5 0.0518
0.6 0.0419
0.7 0.0318
0.8 0.0172
1.0 -0.0058
1.4 -0.0549
</tableData>
</table>
<table name="C_POWER" type = "internal">
<tableData>
0.0 0.0902
0.1 0.0893
0.2 0.0880
0.3 0.0860
0.4 0.0810
0.5 0.0742
0.6 0.0681
0.7 0.0572
0.8 0.0467
1.0 0.0167
1.4 -0.0803
</tableData>
</table>
</propeller>
<?xml version="1.0"?>
<!-- Zenoah G-26A -->
<!-- 2.96 hp engine -->
<!-- one horsepower equals 745.69987 Watts -->
<electric_engine name="electric_1mw">
<power unit="WATTS"> 2207.27 </power>
</electric_engine>
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Malolo1(R/C)</description>
<author>Innis Cunningham, Josh Wilson</author>
<aircraft-version>0.0</aircraft-version>
<startup>
<splash-texture>Aircraft/Malolo1/Malolo1-splash.rgb</splash-texture>
</startup>
<flight-model>jsb</flight-model>
<aero>Malolo1</aero>
<fuel-fraction>0.8</fuel-fraction>
<!--
<systems>
<autopilot>
<path>Aircraft/Malolo1/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Malolo1/Systems/electrical.xml</path>
</electrical>
</systems> -->
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/Malolo1/Models/Malolo1.xml</path>
</model>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">0.26</y-offset-m>
<z-offset-m archive="y">0.34</z-offset-m>
<pitch-offset-deg>-8</pitch-offset-deg>
</config>
</view>
<chase-distance-m archive="y" type="double">-15.0</chase-distance-m>
<help>
<title>YardStik 110 (Sig Mfg)</title>
<line>Cruise speed: 60 mph</line>
<line>Never-exceed (Vne): 85 mph</line>
<line>Best Glide (Vglide): 20 mph</line>
<line>Maneuvering (Va): 50 mph</line>
<line>Approach speed: 15-25 mph</line>
<line>Stall speed (Vs): 10 mph</line>
</help>
<menubar>
<default>
<menu n="10">
<label>Malolo</label>
<enabled type="bool">true</enabled>
<item>
<label>Operate catapult</label>
<binding>
<command>nasal</command>
<script>
malolo1.launchCatapult();
</script>
</binding>
</item>
</menu>
</default>
</menubar>
</sim>
<nasal>
<malolo1>
<file>Aircraft/Malolo1/Nasal/catapult.nas</file>
</malolo1>
</nasal>
<controls>
<flight>
<aileron-trim>-0.01</aileron-trim> <!-- fixed -->
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
<rudder-trim>0.00</rudder-trim> <!-- fixed -->
</flight>
<engines>
<engine n="0">
<magnetos>3</magnetos>
</engine>
</engines>
<door>1.0</door>
</controls>
<engines>
<engine>
<rpm type="double">700</rpm>
</engine>
</engines>
<!-- An autopilot on a Cub??? -->
<autopilot>
<config>
<min-climb-speed-kt type="float">48.0</min-climb-speed-kt>
<best-climb-speed-kt type="float">56.0</best-climb-speed-kt>
<target-climb-rate-fpm type="float">400.0</target-climb-rate-fpm>
<target-descent-rate-fpm type="float">1000.0</target-descent-rate-fpm>
<elevator-adj-factor type="float">6000.0</elevator-adj-factor>
<integral-contribution type="float">0.008</integral-contribution>
<zero-pitch-throttle type="float">0.35</zero-pitch-throttle>
<zero-pitch-trim-full-throttle type="float">0.001</zero-pitch-trim-full-throttle>
</config>
</autopilot>
</PropertyList>
This diff is collapsed.
<?xml version="1.0"?>
<PropertyList>
<path>Malolo1.ac</path>
<offsets>
<z-m>-0.01</z-m>
<pitch-deg>0.2</pitch-deg>
</offsets>
<animation>
<type>rotate</type>
<object-name>rhelevon</object-name>
<property>controls/flight/elevator</property>
<factor>15</factor>
<offset-deg>0</offset-deg>
<center>
<x-m>0.65</x-m>
<y-m>1.4</y-m>
<z-m>0.07</z-m>
</center>
<axis>
<x>0.215</x>
<y>1</y>
<z>0.056</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>rhelevon</object-name>
<property>controls/flight/aileron</property>
<factor>-15</factor>
<offset-deg>0</offset-deg>
<center>
<x-m>0.65</x-m>
<y-m>1.4</y-m>
<z-m>0.07</z-m>
</center>
<axis>
<x>0.215</x>
<y>1</y>
<z>0.056</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>lhelevon</object-name>
<property>controls/flight/elevator</property>
<factor>15</factor>
<offset-deg>0</offset-deg>
<center>
<x-m>0.65</x-m>
<y-m>-1.4</y-m>
<z-m>0.07</z-m>
</center>
<axis>
<x>-0.215</x>
<y>1</y>
<z>-0.056</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>lhelevon</object-name>
<property>controls/flight/aileron</property>
<factor>15</factor>
<offset-deg>0</offset-deg>
<center>
<x-m>0.65</x-m>
<y-m>-1.4</y-m>
<z-m>0.07</z-m>
</center>
<axis>
<x>-0.215</x>
<y>1</y>
<z>-0.056</z>
</axis>
</animation>
<animation>
<type>spin</type>
<object-name>prop2</object-name>
<property>engines/engine/rpm</property>
<factor>-0.2</factor>
<center>
<x-m>0</x-m>
<y-m>0</y-m>
<z-m>0.0156</z-m>
</center>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
</PropertyList>
var launchCatapult = func {
# time on catapult = 1/10 sec
# speed when leaving catapult = 50 km/h ?
var countdownRunning = 1;
var count = 3;
var countdown = func {
if (countdownRunning) {
if (count != 0) {
setprop("/sim/screen/white",count);
count = count - 1;
settimer(countdown, 1);
}
else {
countdownRunning = 0;
setprop("/sim/screen/yellow","Go!");
launch();
}
}
}
countdown();
var launchRunning = 1;
var magnitude = 230; # lbs, unrealisticly high, because the FDM is wrong
var launch = func {
if (launchRunning) {
if (magnitude == 0){
launchRunning = 0;
# remove launcher contact points
setprop("/fdm/jsbsim/contact/unit[6]/pos-norm",0);
setprop("/fdm/jsbsim/contact/unit[7]/pos-norm",0);
setprop("/fdm/jsbsim/contact/unit[8]/pos-norm",0);
}
setprop("/fdm/jsbsim/external_reactions/catapult/magnitude",magnitude);
print (magnitude);
magnitude = 0;
settimer(launch, 0.1);
}
}
}
This is the original Malolo1 model with added catapult functionality. The catapult is from https://gitorious.org/mavlab/x100/
-Thomas Gubler
<?xml version="1.0"?>
<PropertyList>
<name>rascal-config</name>
<layout>vbox</layout>
<x>40</x>
<y>40</y>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<text>
<label>Rascal Configuration</label>
</text>
<empty><stretch>true</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>nasal</command>
<script>rascal.dialog.close()</script>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>table</layout>
<!-- row zero -->
<checkbox>
<row>0</row> <col>0</col>
<halign>left</halign>
<label>External Autopilot Enable</label>
<property>/ugear/settings/ap-enable</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row one -->
<checkbox>
<row>1</row> <col>0</col>
<halign>left</halign>
<label>External Turret Control Enable</label>
<property>/ugear/settings/turret-enable</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row two -->
<checkbox>
<row>2</row> <col>0</col>
<halign>left</halign>
<label>Smoke</label>
<property>/sim/multiplay/generic/int[0]</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row three -->
<checkbox>
<row>3</row> <col>0</col>
<halign>left</halign>
<label>Trajectory Markers</label>
<property>/sim/multiplay/generic/int[1]</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<hrule/>
</PropertyList>
<?xml version="1.0"?>
<!-- Generated by Aero-Matic v 0.7
Inputs:
horsepower: 3.8
pitch: fixed
Outputs:
linear-blade-inches: 10.331602005498
-->
<propeller name="Rascal Propeller">
<ixx> 0.00085 </ixx>
<diameter unit="IN"> 18.0 </diameter>
<numblades> 2 </numblades>
<minpitch> 30 </minpitch>
<maxpitch> 30 </maxpitch>
<table name="C_THRUST" type="internal">
<tableData>
0.0 0.0776
0.1 0.0744
0.2 0.0712
0.3 0.0655
0.4 0.0588
0.5 0.0518
0.6 0.0419
0.7 0.0318
0.8 0.0172
1.0 -0.0058
1.4 -0.0549
</tableData>
</table>
<table name="C_POWER" type = "internal">
<tableData>
0.0 0.0902
0.1 0.0893
0.2 0.0880
0.3 0.0860
0.4 0.0810
0.5 0.0742
0.6 0.0681
0.7 0.0572
0.8 0.0467
1.0 0.0167
1.4 -0.0803
</tableData>
</table>
</propeller>
<?xml version="1.0"?>
<!-- Zenoah G-26A -->
<!-- 2.96 hp engine -->
<!-- one horsepower equals 745.69987 Watts -->
<electric_engine name="electric_1mw">
<power unit="WATTS"> 2207.27 </power>
</electric_engine>
<?xml version="1.0"?>
<PropertyList>
<path>Rascal110-000-013.ac</path>
<model>
<path>Aircraft/Rascal/Models/smokeW.xml</path>
<offsets>
<x-m> 2.0</x-m>
<y-m> 0.0</y-m>
<z-m> 0.0</z-m>
<roll-deg> 0</roll-deg>
<pitch-deg> 0</pitch-deg>
<heading-deg>0</heading-deg>
</offsets>
</model>
<animation>
<type>rotate</type>
<object-name>L_Aileron</object-name>
<property>/surface-positions/left-aileron-pos-norm</property>
<factor>20.0</factor> <!-- fixme -->
<center>
<x-m>0.735</x-m>
<y-m>-0.450</y-m>
<z-m>0.139</z-m>
</center>
<axis>
<x>0.037</x>
<y>1.0</y>
<z>-0.029</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>R_Aileron</object-name>
<property>/surface-positions/right-aileron-pos-norm</property>
<factor>20.0</factor> <!-- fixme -->
<center>
<x-m>0.735</x-m>
<y-m>0.450</y-m>
<z-m>0.139</z-m>
</center>
<axis>
<x>-0.037</x>
<y>1.0</y>
<z>0.029</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>Elevator</object-name>
<property>/surface-positions/elevator-pos-norm</property>
<factor>35.0</factor> <!-- fixme -->
<center>
<x-m>1.752</x-m>
<y-m>0.0</y-m>
<z-m>0.051</z-m>
</center>
<axis>
<x>0.0</x>
<y>1.0</y>
<z>0.0</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>Rudder</object-name>
<property>/surface-positions/rudder-pos-norm</property>
<factor>35.0</factor> <!-- fixme -->
<center>
<x-m>1.752</x-m>
<y-m>0.0</y-m>
<z-m>0.0</z-m>
</center>
<axis>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</axis>
</animation>
</PropertyList>
AC3Db
MATERIAL "ac3dmat9" rgb 0 0 1 amb 0 0 1 emis 0 0 1 spec 0 0 1 shi 0 trans 0
MATERIAL "ac3dmat3" rgb 1 0 0 amb 1 0 0 emis 1 0 0 spec 1 0 0 shi 0 trans 0
OBJECT world
kids 2
OBJECT poly
name "line"
loc 0 0.5 0
numvert 2
0 0.5 0
0 -0.5 0
numsurf 1
SURF 0x22
mat 0
refs 2
0 0 1
1 0 0
kids 0
OBJECT poly
name "line"
numvert 2
0 0 -3
0 0 3
numsurf 1
SURF 0x22
mat 1
refs 2
0 0 1
1 0 0
kids 0
<?xml version="1.0"?>
<!-- Trajectory Marker config file - Lee Elliott -->
<PropertyList>
<path>Trajectory-Marker.ac</path>
</PropertyList>
#! /bin/sh
for f in "$@" ; do
sed -i.before-color-change 's,\(MATERIAL.*\)rgb\(.*\)amb\(.*\)emis\(.*\)spec\(.*\)shi\(.*\)trans\(.*\)$,\1rgb\2amb\2emis\4spec\5shi\6trans\7,1' "$f"
if ! cmp "${f}" "${f}.before-color-change" > /dev/null 2>&1 ; then
echo "$f has changed colors!"
fi
done
<?xml version="1.0" encoding="UTF-8"?>
<!-- New version May, 07, 2009 by 102nd-YU-Nitro -->
<PropertyList>
<!-- OSG Particles -->
<particlesystem>
<name>smoke</name>
<offsets>
<x-m> 0.000 </x-m>
<y-m> 0.000 </y-m>
<z-m> -0.000 </z-m>
<roll-deg> 0.000 </roll-deg>
<pitch-deg> 0.000 </pitch-deg>
<heading-deg> 0.000 </heading-deg>
</offsets>
<texture>smoke.png</texture>
<condition>
<property>sim/multiplay/generic/int[0]</property>
</condition>
<emissive>false</emissive>
<lighting>false</lighting>
<align>billboard</align> <!-- billboard / fixed -->
<attach>world</attach> <!-- world / local-->
<placer>
<type>point</type> <!-- sector / segments / point -->
</placer>
<shooter>
<theta-min-deg>10</theta-min-deg>
<theta-max-deg>86</theta-max-deg>
<phi-min-deg>-1.5</phi-min-deg>
<phi-max-deg>8</phi-max-deg>
<speed-mps>
<value>10</value>
<spread>2.5</spread>
</speed-mps>
<rotation-speed>
<x-min-deg-sec>5</x-min-deg-sec>
<y-min-deg-sec>5</y-min-deg-sec>
<z-min-deg-sec>5</z-min-deg-sec>
<x-max-deg-sec>60</x-max-deg-sec>
<y-max-deg-sec>60</y-max-deg-sec>
<z-max-deg-sec>60</z-max-deg-sec>
</rotation-speed>
</shooter>
<counter>
<particles-per-sec>
<value>100</value>
<spread>1</spread>
</particles-per-sec>
</counter>
<particle>
<start>
<color>
<red><value> 0.9 </value></red>
<green><value> 0.9 </value></green>
<blue><value> 0.9 </value></blue>
<alpha><value> 0.3 </value></alpha>
</color>
<size>
<value>0.3</value>
</size>
</start>
<end>
<color>
<red><value> 0.900 </value></red>
<green><value> 0.900 </value></green>
<blue><value> 0.900 </value></blue>
<alpha><value> 0.001 </value></alpha>
</color>
<size>
<value>10.0</value>
</size>
</end>
<life-sec>
<value>60</value>
</life-sec>
<mass-kg>0.001</mass-kg>
<radius-m>1.0</radius-m>
</particle>
<program>
<fluid>air</fluid> <!-- air / water -->
<gravity>false</gravity>
<wind>true</wind>
</program>
</particlesystem>
</PropertyList>
This information has not been updated for the Rascal, please ignore, we
are still at pre-pre-pre-alpha with this model!
PIPER J3 CUB PERFORMANCE DATA
=============================
[This information is copied from the 1946 J3C-65 owner's handbook.]
FLYING HINTS
The Piper Cub Special represents more than 15 years of diligent
aircraft engineering and manufacturing experience. Its simplicity of
design and construction, its low operating and maintenance costs, its
inherent stability, ruggedness, and its outstanding safety and ease of
flying, have made it the most popular airplane in aviation history.
The Piper Cub Special is the time-tested product of millions of hours
of flying under all conceivable conditions both in the military and in
peace time.
There are hints on starting, flying, stopping, and other related
topics that are important to the owner who wants to conserve his
airplane -- keep it in maximum airworthy condition -- and enjoy a full
measure of flying satisfaction.
First, each pilot should become familiar enough with his Piper Cub
Special that he can accomplish a satisfactory pre-flight inspection.
This check is simple and requires only a few minutes. See Section IX
for check list. Daily check of airplane prior to flight should be the
first in a number of safe flying habits the pilot should acquire.
A. BEFORE STARTING ENGINE
(1) Make routine check of gasoline supply. Visible fuel gauge is
integral part of gas tank cap; it will not show number of gallons but
will show proportion of fuel in tank by length of rod which extends
upward from cap. A full tank of 12 U.S. gallons will be indicated by
11 inches of rod extending beyond cap. Keep gas gauge rod clean and
smooth with crocus cloth for accuracy and freedom of movement.
(2) Check oil level in engine sump by removing oil cap and gauge. Oil
stick should indicate oil level up to index mark of 4 quarts.
(3) Check freedom of movement of flight and engine controls.
B. STARTING ENGINE
(1) Chock wheels, or have occupant who is familiar with controls set
brakes in cabin.
(2) Ignition switch OFF. Verify.
(3) Set throttle approximately 1/10 open.
(4) Push fuel shut-off ON.
(5) Turn propeller through several times.
(6) Turn ignition switch ON.
(7) Start engine by pulling propeller through with a snap.
CAUTION -- Always handle propeller as if switch were "ON." Stand as
far in front of propeller as possible. Use both hands and grasp one
blad approximately midway from tip. Do not overgrasp blade. Do not
wear long, loose clothing. Make sure footing is sure to preclude
possibility of feet slipping.
(8) If engine does not start, turn switch OFF. Turn primer knob to
unlock, pull out, pump three or four times, then reseat primer and
lock by turning in opposite direction. In extremely cold weather a
few strokes of the primer as the engine starts will enable it to keep
running. NOTE -- Avoid excessive priming as it causes raw gasoline to
wash lubricating oil from engine cylinder walls. Do not prime warm
engine.
(9) Repeat starting procedures 6, 7.
(10) If engine loads up and refuses to start, turn ignition switch
"OFF,", open throttle wide and turn propeller through backwards
several times to unload excessive gas mixture in cylinders. Then
close throttle and repeat starting procedure.
C. ENGINE WARM-UP
(1) As soon as engine starts, advance throttle slightly to idle at 700
R.P.M. Check engine instruments. If oil pressure gauge does not
indicate pressure within 30 seconds, stop engine immediately, check
and correct trouble before any further operation. Oil temperature
during operating should not rise above 200° F. and oil pressure should
not fall below 30 pounds. With engine warm, idling speed should be
550-600 R.P.M.
(2) Rev engine up to 2100 R.P.M. on both magnetos. Switch to LEFT and
RIGHT magnetos. R.P.M. drop should not be over 75 R.P.M. CAUTION
--Do not operate engine on either single magneto for more than 30
seconds at a time, as this tends to foul the non-operating spark plugs
in the ignition circuit of the magneto that is switched off.
D. STOPPING ENGINE
(1) Never cut switch immediately after landing as this causes engine
to cool too rapidly.
(2) Idle engine, especially in high temperature operating conditions,
for several minutes. It is advisable to switch to each magneto for 30
second intervals to allow gradual cooling of engine. This helps to
prevent overheating of spark plug insulators and will lessen tendency
for "after-firing."
(3) Check for carburetor heat OFF during idling.
E. TAXIING
(1) Open throttle to start airplane in motion; then close throttle to
a setting sufficient to keep airplane rolling. Do not keep throttle
advanced so that it is necessary to control taxi speed of airplane
with brakes. This causes unnecessary wear and tear on brakes and
tires.
(2) Taxi slowly (speed of a fast walk) controlling direction with
rudder which is connected to a steerable tail wheel. Use brakes only
for positive, precision ground control when necessary.
(3) Taxi upwind with stick back; downwind with stick forward. When
ground winds are in excess of 15 M.P.H., turn into wind using ailerons
in direction of turn; apply ailerons away from the turn when turning
downwind. This procedure helps to prevent the wind "picking up" a
wing during windy, gusty conditions. Always make ground turns slowly.
F. GENERAL FLYING
(1) For takeoff use full throttle, heading into wind. Airplane loaded
will become airborne at approximately 39 M.P.H. Best climb speed is
an indicated 55 M.P.H.
(2) Indicated R.P.M. for cruising speed of 73 M.P.H. is 2150.
Take-off R.P.M. is 2300. Do not fly at full throttle over 3 minutes.
(3) Use CARBURETOR AIR HEAT when engine runs "rough" and tachometer
shows drop in R.P.M. which may be due to ice forming in carburetor.
Tachometer should recover to within 50 R.P.M. below normal when using
carburetor heat. Push heater to "OFF" position, and if icing
condition has been cleared, R.P.M. should return to normal. Continued
use of carburetor heat will only cause increased fuel consumption and
loss of power.
(4) Maximum permissible diving speed is 122 M.P.H.
G. APPROACH AND LANDING
(1) Push carburetor heat ON prior to throttling back for glide, or for
any other flight maneuver.
(2) Glide between 50-60 M.P.H. depending upon loading of airplane and
gust conditions.
NOTE -- "Clear" engine by opening throttle gently, every 200-250 feet
of descent during a long glide so that engine temperature will be
maintained.
Throttle action on the part of the pilot should be smooth and gentle
at all times.
H. PARKING AND MOORING
(1) After termination of flight, enter flying time in aircraft and
engine log books.
(2) Turn ignition and fuel OFF.
(3) Chcok the wheels of airplane.
(4) If airplane is not to be flown for some time, it should be
hangared or tied down. Use good quality 1/2" - 5/8" diameter rope.
Secure to lift assist handle at aft end of fuselage; also at upper end
of both front wing lift struts where they attach to wing. Make sure
that rope passes between aileron cable and lift strut. Mooring ropes,
when airplane is tied down, should have no slack.
(5) Lock aileron and elevator controls by wrapping front seat belt
completely around rear control stick, tighten and buckle.
(6) Under excessively wind conditions, airplane should be tailed into
wind for mooring.
[Here is my older information.]
These are the only numbers I could find. They are for a J3 Cub with
an 85HP engine rather than 65 hp, so some adjustments may be
necessary. The source is
http://www.evergreenfs.com/planedata.htm
Speeds
------
Best rate of climb (Vy): 65 mph (57 kt)
Best angle of climb (Vx): 55 mph (48 kt)
Cruise: 70 mph (61 kt)
Never-exceed (Vne): 122 mph (106 kt)
Best Glide (Vglide): 60 mph (52 kt)
Stall (Vs): 38 mph (33 kt)
Maneuvering (Va): 70 mph (61 kt)
Approach: 50-60 mph (44-52 kt)
Power
-----
Take off: full
Climb: 50 rpm below full
Cruise: 2300 rpm
Approach: 1200 rpm
Practice stalls: 1200 rpm
Distances
---------
Take-off: 450-800 ft
Landing: 200-800 ft
Fuel
----
Total fuel: 12 gal US
Usable fuel: 12 gal US
Grade: 80/87
GPH: 5 gal US/hr
<?xml version="1.0" encoding="UTF-8"?>
<PropertyList>
<key n="9">
<name>Ctrl-I</name>
<desc>Show configuration dialog</desc>
<binding>
<command>nasal</command>
<script>rascal.dialog.toggle()</script>
</binding>
</key>
<key n="83">
<name>S</name>
<desc>Toggle smoke</desc>
<binding>
<command>property-toggle</command>
<property>sim/multiplay/generic/int[0]</property>
</binding>
</key>
</PropertyList>
<?xml version="1.0"?>
<PropertyList>
<submodel>
<name>trajectory marker</name>
<model>Aircraft/Rascal/Models/Trajectory-Marker.xml</model>
<trigger>/sim/multiplay/generic/int[1]</trigger>
<speed>0</speed>
<repeat>true</repeat>
<delay>0.75</delay>
<count>-1</count>
<x-offset>-0.5</x-offset>
<y-offset>0.0</y-offset>
<z-offset>-0.08</z-offset>
<yaw-offset>0.0</yaw-offset>
<pitch-offset>0.0</pitch-offset>
<eda>1000000000.00</eda>
<life>600</life>
<buoyancy>32</buoyancy>
<wind>false</wind>
<aero-stabilised>false</aero-stabilised>
</submodel>
</PropertyList>
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Rascal 110 (R/C)</description>
<author>Lee Elliot (3D) Dave Culp (JSBsim dynamics) and Curt Olson</author>
<aircraft-version>0.1</aircraft-version>
<startup>
<splash-texture>Aircraft/Rascal/Rascal110-splash.rgb</splash-texture>
</startup>
<flight-model>jsb</flight-model>
<aero>Rascal110-JSBSim</aero>
<fuel-fraction>0.8</fuel-fraction>
<systems>
<autopilot>
<path>Aircraft/Rascal/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Rascal/Systems/electrical.xml</path>
</electrical>
</systems>
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/Rascal/Models/Rascal110.xml</path>
</model>
<hud>
<path n="1">Huds/NTPS.xml</path>
<visibility n="1">true</visibility>
<color>
<transparent type="bool">true</transparent>
<antialiased type="bool">true</antialiased>
<brightness type="float">0.85</brightness>
<alpha type="float">0.85</alpha>
</color>
<palette>
<color n="0">
<red type="float">0.38</red>
<green type="float">1.0</green>
<blue type="float">0.22</blue>
</color>
<color n="1">
<red type="float">1.0</red>
<green type="float">0.0</green>
<blue type="float">0.0</blue>
</color>
</palette>
</hud>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">-0.15</y-offset-m>
<z-offset-m archive="y">0.9</z-offset-m>
<pitch-offset-deg>-8</pitch-offset-deg>
</config>
</view>
<submodels>
<serviceable type="bool">1</serviceable>
<path>Aircraft/Rascal/Rascal-submodels.xml</path>
</submodels>
<view n="1">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="2">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="3">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="4">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="5">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="6">
<config>
<target-z-offset-m archive="y" type="double">0.5</target-z-offset-m>
</config>
</view>
<view n="101">
<name>News Camera</name>
<type>lookat</type>
<internal type="bool">true</internal>
<config>
<eye-lat-deg-path>/position/latitude-deg</eye-lat-deg-path>
<eye-lon-deg-path>/position/longitude-deg</eye-lon-deg-path>
<eye-alt-ft-path>/position/altitude-ft</eye-alt-ft-path>
<eye-heading-deg-path>/orientation/heading-deg</eye-heading-deg-path>
<eye-pitch-deg-path>/orientation/pitch-deg</eye-pitch-deg-path>
<eye-roll-deg-path>/orientation/roll-deg</eye-roll-deg-path>
<x-offset-m>0.0</x-offset-m>
<y-offset-m>-0.35</y-offset-m>
<z-offset-m>-0.4</z-offset-m>
<target-lat-deg-path>/sim/input/click/latitude-deg</target-lat-deg-path>
<target-lon-deg-path>/sim/input/click/longitude-deg</target-lon-deg-path>
<target-alt-ft-path>/sim/input/click/elevation-ft</target-alt-ft-path>
</config>
</view>
<view n="102">
<name>Camera View</name>
<enabled type="bool" userarchive="y">true</enabled>
<type>lookfrom</type>
<internal type="bool">false</internal>
<config>
<from-model type="bool">true</from-model>
<from-model-idx type="int">0</from-model-idx>
<ground-level-nearplane-m type="double">0.5f</ground-level-nearplane-m>
<default-field-of-view-deg type="double">55.0</default-field-of-view-deg>
</config>
</view>
<multiplay>
<chat_display>1</chat_display>
<generic>
<int type="bool">0</int> <!-- smoke -->
<int type="bool">0</int> <!-- trajectory markers -->
</generic>
</multiplay>
<help>
<title>Rascal 110 (Sig Mfg)</title>
<line>Cruise speed: 60 kts</line>
<line>Never-exceed (Vne): 85 kts</line>
<line>Best Glide (Vglide): 20 kts</line>
<line>Maneuvering (Va): 50 kts</line>
<line>Approach speed: 20-25 kts</line>
<line>Stall speed (Vs): 15 kts</line>
</help>
</sim>
<nasal>
<rascal>
<file>Aircraft/Rascal/Systems/main.nas</file>
<file>Aircraft/Rascal/Systems/airdata.nas</file>
<file>Aircraft/Rascal/Systems/ugear.nas</file>
</rascal>
</nasal>
<yasim>
<Rascal110>
<pilot-lb>2</pilot-lb>
</Rascal110>
</yasim>
<input>
<keyboard include="Rascal-keyboard.xml"/>
</input>
<controls>
<flight>
<aileron-trim>-0.01</aileron-trim> <!-- fixed -->
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
<rudder-trim>0.00</rudder-trim> <!-- fixed -->
</flight>
<engines>
<engine n="0">
<magnetos>3</magnetos>
</engine>
</engines>
<smoke alias="/sim/multiplay/generic/int[0]"/>
<trajectory-markers alias="/sim/multiplay/generic/int[1]"/>
</controls>
<engines>
<engine>
<rpm type="double">700</rpm>
</engine>
</engines>
</PropertyList>
<?xml version="1.0"?>
<!--
************************************************************************
Rascal 110 R/C airplane config. This files ties together all the components
used by FGFS to represent the Rascal 110 (by Sig Mfg) including the flight
dynamics model, and external 3D model.
************************************************************************
-->
<PropertyList>
<sim>
<description>Rascal 110 (R/C)</description>
<author>Lee Elliot (3D) Dave Culp (JSBsim dynamics) and Curt Olson</author>
<aircraft-version>0.1</aircraft-version>
<startup>
<splash-texture>Aircraft/Rascal/Rascal110-splash.rgb</splash-texture>
</startup>
<flight-model>yasim</flight-model>
<aero>Rascal110-YASim</aero>
<fuel-fraction>0.8</fuel-fraction>
<systems>
<autopilot>
<path>Aircraft/Rascal/Systems/110-autopilot.xml</path>
</autopilot>
<electrical>
<path>Aircraft/Rascal/Systems/electrical.xml</path>
</electrical>
</systems>
<sound>
<path>Aircraft/Generic/generic-sound.xml</path>
</sound>
<panel>
<visibility archive="n">false</visibility>
</panel>
<model>
<path archive="y">Aircraft/Rascal/Models/Rascal110.xml</path>
</model>
<view>
<internal archive="y">true</internal>
<config>
<x-offset-m archive="y">0.0</x-offset-m>
<y-offset-m archive="y">-0.3</y-offset-m>
<z-offset-m archive="y">0.9</z-offset-m>
<pitch-offset-deg>-8</pitch-offset-deg>
</config>
</view>
<help>
<title>Rascal 110 (Sig Mfg)</title>
<line>Cruise speed: 60 mph</line>
<line>Never-exceed (Vne): 85 mph</line>
<line>Best Glide (Vglide): 20 mph</line>
<line>Maneuvering (Va): 50 mph</line>
<line>Approach speed: 15-25 mph</line>
<line>Stall speed (Vs): 10 mph</line>
</help>
</sim>
<yasim>
<Rascal110>
<pilot-lb>2</pilot-lb>
</Rascal110>
</yasim>
<controls>
<flight>
<aileron-trim>-0.01</aileron-trim> <!-- fixed -->
<elevator-trim>0.00</elevator-trim> <!-- controllable -->
<rudder-trim>0.00</rudder-trim> <!-- fixed -->
</flight>
<engines>
<engine n="0">
<magnetos>3</magnetos>
</engine>
</engines>
<door>1.0</door>
</controls>
<engines>
<engine>
<rpm type="double">700</rpm>
</engine>
</engines>
<!-- An autopilot on a Cub??? -->
<autopilot>
<config>
<min-climb-speed-kt type="float">48.0</min-climb-speed-kt>
<best-climb-speed-kt type="float">56.0</best-climb-speed-kt>
<target-climb-rate-fpm type="float">400.0</target-climb-rate-fpm>
<target-descent-rate-fpm type="float">1000.0</target-descent-rate-fpm>
<elevator-adj-factor type="float">6000.0</elevator-adj-factor>
<integral-contribution type="float">0.008</integral-contribution>
<zero-pitch-throttle type="float">0.35</zero-pitch-throttle>
<zero-pitch-trim-full-throttle type="float">0.001</zero-pitch-trim-full-throttle>
</config>
</autopilot>
</PropertyList>
<?xml version="1.0"?>
<!--
************************************************************************
YASim aerodynamic model for a Rascal 110 (R/C airplane by Sig Mfg.)
Started December 19, 2005 by Curtis Olson.
This aerodynamic model is based on three-views, self captured
performance data, and few guesses. These sites provided particularly
useful information or were simply fun to visit:
The reference datum for measurements is the tip of the nose.
************************************************************************
-->
<!-- 12 lb aircraft weight includes engine, but not fuel (empty weight) -->
<airplane mass="12">
<!-- Approach configuration -->
<approach speed="15" aoa="4">
<control-setting axis="/controls/engines/engine[0]/throttle" value="0.10"/>
</approach>
<!-- Cruise configuration -->
<cruise speed="65" alt="1000">
<control-setting axis="/controls/engines/engine[0]/throttle" value="1.00"/>
<control-setting axis="/controls/engines/engine[0]/mixture" value="1.00"/>
<control-setting axis="/controls/flight/elevator-trim" value="0.4"/>
</cruise>
<!-- pilot's eyepoint -->
<cockpit x="-0.48" y="0" z="0.30"/>
<fuselage ax="0.00" ay="0.00" az="-0.05" bx="-1.93" by="0.00" bz="-0.05"
width="0.30" taper="0.47" midpoint="0.58"/>
<!--
The Rascal has an eliptical wing, but we'll model it as a straight
tapered wing with the equivalent wing area.
Note that the dihedral is exaggerated to simulate hull-interference effects
on a high-wing aircraft; once YASim models that properly, the
angle should be reduced to something like 2 degrees.
Note that the Rascal has no flaps. With a stall speed of 10kt, who
needs them?
-->
<wing x="-0.66" y="0.07" z="0.11" taper="0.73" incidence="0" twist="-3"
length="1.33" chord="0.41" sweep="0" dihedral="5" camber="0.0">
<stall aoa="15" width="4" peak="1.5"/>
<flap0 start=".40" end="0.95" lift="1.1" drag="1.2"/>
<control-input axis="/controls/flight/aileron" control="FLAP0" split="true"/>
<control-input axis="/controls/flight/aileron-trim" control="FLAP0" split="true"/>
<control-output control="FLAP0" side="left"
prop="/surface-positions/left-aileron-pos-norm"/>
<control-output control="FLAP0" side="right"
prop="/surface-positions/right-aileron-pos-norm"/>
</wing>
<hstab x="-1.80" y="0.03" z="0.00" taper="0.6" effectiveness="1.0"
length="0.43" chord="0.18" sweep="0" incidence="0.00">
<stall aoa="16" width="4" peak="1.5"/>
<flap0 start="0" end="1" lift="1.3" drag="1.2"/>
<control-input axis="/controls/flight/elevator" control="FLAP0"/>
<control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>
<control-output control="FLAP0" prop="/surface-positions/elevator-pos-norm"/>
</hstab>
<!-- rudder has to be able to counteract aileron drag -->
<vstab x="-1.80" y="0.00" z="0.00" taper="0.38" effectiveness="1.0"
length="0.37" chord="0.33" sweep="0" incidence="0.00">
<stall aoa="16" width="4" peak="1.5"/>
<flap0 start="0" end="1" lift="2.0" drag="1.2"/>
<control-input axis="/controls/flight/rudder" control="FLAP0" invert="true"/>
<control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>
<control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"
min="1" max="-1"/>
</vstab>
<!-- motor is reported to do 2.4 bhp but this way over powers the aircraft -->
<propeller radius="0.23"
x="-0.10" y="0.00" z="0.00"
mass="3.5" moment="0.001"
cruise-speed="60" cruise-rpm="7500"
cruise-alt="2000" cruise-power="0.6"
takeoff-power="0.6" takeoff-rpm="7000">
<piston-engine eng-power="0.6" eng-rpm="7000"
displacement="1.60"/>
<actionpt x="0.00" y="0.00" z="0.00"/>
<control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
<control-input axis="/controls/engines/engine[0]/starter" control="STARTER"/>
<control-input axis="/controls/engines/engine[0]/magnetos" control="MAGNETOS"/>
<control-input axis="/controls/engines/engine[0]/mixture" control="MIXTURE"/>
</propeller>
<gear x="-1.93" y="0.00" z="-0.13" compression="0.01">
<control-input axis="/controls/flight/rudder" control="STEER"
src0="-1.0" src1="1.0"
dst0="0.5" dst1="-0.5"/>
</gear>
<gear x="-0.48" y="0.27" z="-0.39" compression="0.03"> <!-- left main -->
<control-input axis="/controls/gear/brake-left" control="BRAKE" split="true"/>
<control-input axis="/controls/gear/brake-parking" control="BRAKE" split="true"/>
</gear>
<gear x="-0.48" y="-0.27" z="-0.39" compression="0.03"> <!-- right main -->
<control-input axis="/controls/gear/brake-right" control="BRAKE" split="true"/>
<control-input axis="/controls/gear/brake-parking" control="BRAKE" split="true"/>
</gear>
<!-- There's just one 20 oz tank, right behind the engine (!!!) -->
<tank x="-0.23" y="0.0" z="-0.08" capacity="1.00"/>
<!--
Note the tandem seating; the x values (arms) come from the
weight-and-balance page cited at the start.
-->
<ballast x="0.0" y="00" z="0.0" mass="1.2"/>
<!-- pilot -->
<!-- <weight x="-0.91" y="0" z="-0.70" -->
<!-- mass-prop="/yasim/j3cub/pilot-lb"/> -->
<!-- passenger -->
<!-- <weight x="-0.23" y="0" z="-0.70" -->
<!-- mass-prop="/yasim/j3cub/passenger-lb"/> -->
</airplane>
var last_time = 0.0;
var last_speed = 0.0;
var speed_sensed = 0.0;
var sensor_step = 1.0;
var speed_filt = 0.0;
var accel_filt = 0.0;
var compute_airspeed_accel = func( speed_filt, dt ) {
# print ( "computing forward acceleration ", dt );
var delta_speed = speed_filt - last_speed;
last_speed = speed_filt;
var accel = delta_speed / dt;
return accel;
}
var update_airdata = func( dt ) {
# crude model of a noisy electronic pitot tube
sensed_speed = getprop("/velocities/airspeed-kt");
var r = rand();
if ( r < 0.3333 ) {
sensed_speed = sensed_speed - sensor_step;
} elsif ( r > 0.6666 ) {
sensed_speed = sensed_speed + sensor_step;
}
speed_filt = 0.97 * speed_filt + 0.03 * sensed_speed;
var sensed_accel = 0.0;
if ( dt > 0 ) {
sensed_accel = compute_airspeed_accel( speed_filt, dt );
}
accel_filt = 0.97 * accel_filt + 0.03 * sensed_accel;
setprop("/accelerations/airspeed-ktps", accel_filt);
}
<?xml version="1.0"?>
<!-- The cub doesn't really have an electrical system but let's give -->
<!-- it a little bit of something since we don't have a virtual ground -->
<!-- crew to go out and flip the prop for us. -->
<PropertyList>
<!-- Supplier list -->
<supplier>
<name>Battery 1</name>
<prop>/systems/electrical/suppliers/battery[0]</prop>
<kind>battery</kind>
<volts>28</volts> <!-- needs to be > 24.5, but this is a guess -->
<amps>60</amps> <!-- I have no idea! -->
</supplier>
<supplier>
<name>Alternator 1</name>
<prop>/systems/electrical/suppliers/alternator[0]</prop>
<kind>alternator</kind>
<rpm-source>/engines/engine[0]/rpm</rpm-source>
<volts>28</volts> <!-- stubbed in -->
<amps>60</amps> <!-- from the 172S Skyhawk Information Manual -->
</supplier>
<!-- Bus list -->
<bus>
<name>Master Bus</name>
<prop>/systems/electrical/outputs/bus[0]</prop>
<prop>/systems/electrical/outputs/transponder</prop>
</bus>
<!-- Generic Outputs -->
<output>
<name>Starter 1 Power</name>
<prop>/systems/electrical/outputs/starter[0]</prop>
</output>
<output>
<name>Landing Light Power</name>
<prop>/systems/electrical/outputs/landing-light</prop>
</output>
<output>
<name>Beacon Power</name>
<prop>/systems/electrical/outputs/beacon</prop>
</output>
<output>
<name>Strobe Lights Power</name>
<prop>/systems/electrical/outputs/strobe-lights</prop>
</output>
<output>
<name>Taxi Lights Power</name>
<prop>/systems/electrical/outputs/taxi-lights</prop>
</output>
<output>
<name>Pitot Heat Power</name>
<prop>/systems/electrical/outputs/pitot-heat</prop>
</output>
<!-- connect in power sources -->
<connector>
<input>Alternator 1</input>
<output>Master Bus</output>
<switch>
<prop>/controls/engines/engine[0]/master-alt</prop>
</switch>
</connector>
<connector>
<input>Battery 1</input>
<output>Master Bus</output>
<switch>
<prop>/controls/engines/engine[0]/master-bat</prop>
</switch>
</connector>
<!-- connect starter output -->
<connector>
<input>Master Bus</input>
<output>Starter 1 Power</output>
<switch>
<prop>/controls/engines/engine[0]/starter</prop>
<initial-state>off</initial-state>
</switch>
</connector>
<!-- connect master bus outputs -->
<connector>
<input>Master Bus</input>
<output>Landing Light Power</output>
<switch>
<prop>/controls/switches/landing-light</prop>
</switch>
</connector>
<connector>
<input>Master Bus</input>
<output>Beacon Power</output>
<switch>
<prop>/controls/switches/flashing-beacon</prop>
</switch>
</connector>
<connector>
<input>Master Bus</input>
<output>Strobe Lights Power</output>
<switch>
<prop>/controls/switches/strobe-lights</prop>
</switch>
</connector>
<connector>
<input>Master Bus</input>
<output>Taxi Lights Power</output>
<switch>
<prop>/controls/switches/taxi-lights</prop>
</switch>
</connector>
<connector>
<input>Master Bus</input>
<output>Pitot Heat Power</output>
<switch>
<prop>/controls/switches/pitot-heat</prop>
</switch>
</connector>
</PropertyList>
var dialog = gui.Dialog.new("/sim/gui/dialogs/rascal/config/dialog",
"Aircraft/Rascal/Dialogs/config.xml");
var last_time = 0.0;
var main_loop = func {
var time = getprop("/sim/time/elapsed-sec");
var dt = time - last_time;
last_time = time;
update_airdata( dt );
update_ugear( dt );
settimer(main_loop, 0);
}
setlistener("/sim/signals/fdm-initialized",
func {
main_loop();
});
var update_ugear = func( dt ) {
var max_zoom_rate = 10*dt;
var max_pan_rate = 30*dt;
var max_tilt_rate = 45*dt;
var ap_enable = props.globals.getNode("/ugear/settings/ap-enable");
if ( ap_enable == nil ) {
props.globals.initNode("/ugear/settings/ap-enable", 0, "BOOL", 1);
ap_enable = props.globals.getNode("/ugear/settings/ap-enable");
}
if ( ap_enable.getBoolValue() ) {
setprop( "/controls/flight/aileron", getprop("/ugear/act/aileron") );
setprop( "/controls/flight/elevator", getprop("/ugear/act/elevator") );
}
var turret_enable = props.globals.getNode("/ugear/settings/turret-enable");
if ( turret_enable == nil ) {
props.globals.initNode("/ugear/settings/turret-enable", 0, "BOOL", 1);
turret_enable = props.globals.getNode("/ugear/settings/turret-enable");
}
if ( (getprop("/sim/current-view/name") == "Camera View")
and turret_enable.getBoolValue() )
{
var target_zoom = getprop("/ugear/act/channel6");
var target_pan = -getprop("/ugear/act/channel7");
if ( target_pan < -180.0 ) { target_pan += 360.0; }
if ( target_pan > 180.0 ) { target_pan -= 360.0; }
var target_tilt = -getprop("/ugear/act/channel8");
var cur_zoom = getprop("/sim/current-view/field-of-view");
var cur_pan = getprop("/sim/current-view/heading-offset-deg");
var cur_tilt = getprop("/sim/current-view/pitch-offset-deg");
var diff = 0.0;
diff = target_zoom - cur_zoom;
if ( diff > max_zoom_rate ) { diff = max_zoom_rate; }
if ( diff < -max_zoom_rate ) { diff = -max_zoom_rate; }
setprop("/sim/current-view/field-of-view", cur_zoom + diff);
diff = target_pan - cur_pan;
if ( diff > 180 ) { diff -= 360; }
if ( diff < -180 ) { diff += 360; }
if ( diff > max_pan_rate ) { diff = max_pan_rate; }
if ( diff < -max_pan_rate ) { diff = -max_pan_rate; }
setprop("/sim/current-view/heading-offset-deg", cur_pan + diff);
diff = target_tilt - cur_tilt;
if ( diff > 90 ) { diff = 90; }
if ( diff < -90 ) { diff = -90; }
if ( diff > max_tilt_rate ) { diff = max_tilt_rate; }
if ( diff < -max_tilt_rate ) { diff = -max_tilt_rate; }
setprop("/sim/current-view/pitch-offset-deg", cur_tilt + diff);
}
}
<?xml version="1.0"?>
<initialize name="reset00">
<ubody unit="FT/SEC"> 110.783 </ubody>
<vbody unit="FT/SEC"> 5.03584 </vbody>
<wbody unit="FT/SEC"> -0.226825 </wbody>
<phi unit="DEG"> -2.16197 </phi>
<theta unit="DEG"> -1.06069 </theta>
<psi unit="DEG"> 2.95853 </psi>
<longitude unit="DEG"> 0 </longitude>
<latitude unit="DEG"> 0 </latitude>
<altitude unit="FT"> -0.401227 </altitude>
</initialize>
<?xml version="1.0"?>
<PropertyList>
<name>rascal-config</name>
<layout>vbox</layout>
<x>40</x>
<y>40</y>
<group>
<layout>hbox</layout>
<empty><stretch>true</stretch></empty>
<text>
<label>Rascal Configuration</label>
</text>
<empty><stretch>true</stretch></empty>
<button>
<pref-width>16</pref-width>
<pref-height>16</pref-height>
<legend></legend>
<default>1</default>
<keynum>27</keynum>
<border>2</border>
<binding>
<command>nasal</command>
<script>rascal.dialog.close()</script>
</binding>
</button>
</group>
<hrule/>
<group>
<layout>table</layout>
<!-- row zero -->
<checkbox>
<row>0</row> <col>0</col>
<halign>left</halign>
<label>External Autopilot Enable</label>
<property>/ugear/settings/ap-enable</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row one -->
<checkbox>
<row>1</row> <col>0</col>
<halign>left</halign>
<label>External Turret Control Enable</label>
<property>/ugear/settings/turret-enable</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row two -->
<checkbox>
<row>2</row> <col>0</col>
<halign>left</halign>
<label>Smoke</label>
<property>/sim/multiplay/generic/int[0]</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
<!-- row three -->
<checkbox>
<row>3</row> <col>0</col>
<halign>left</halign>
<label>Trajectory Markers</label>
<property>/sim/multiplay/generic/int[1]</property>
<live>true</live>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>
<hrule/>
</PropertyList>
<?xml version="1.0"?>
<!-- Generated by Aero-Matic v 0.7
Inputs:
horsepower: 3.8
pitch: fixed
Outputs:
linear-blade-inches: 10.331602005498
-->
<propeller name="Rascal Propeller">
<ixx> 0.00085 </ixx>
<diameter unit="IN"> 18.0 </diameter>
<numblades> 2 </numblades>
<minpitch> 30 </minpitch>
<maxpitch> 30 </maxpitch>
<table name="C_THRUST" type="internal">
<tableData>
0.0 0.0776
0.1 0.0744
0.2 0.0712
0.3 0.0655
0.4 0.0588
0.5 0.0518
0.6 0.0419
0.7 0.0318
0.8 0.0172
1.0 -0.0058
1.4 -0.0549
</tableData>
</table>
<table name="C_POWER" type = "internal">
<tableData>
0.0 0.0902
0.1 0.0893
0.2 0.0880
0.3 0.0860
0.4 0.0810
0.5 0.0742
0.6 0.0681
0.7 0.0572
0.8 0.0467
1.0 0.0167
1.4 -0.0803
</tableData>
</table>
</propeller>
<?xml version="1.0"?>
<!-- Zenoah G-26A -->
<!-- 2.96 hp engine -->
<!-- one horsepower equals 745.69987 Watts -->
<electric_engine name="electric_1mw">
<power unit="WATTS"> 2207.27 </power>
</electric_engine>
<?xml version="1.0"?>
<PropertyList>
<path>Rascal110-000-013.ac</path>
<model>
<path>Aircraft/Rascal/Models/smokeW.xml</path>
<offsets>
<x-m> 2.0</x-m>
<y-m> 0.0</y-m>
<z-m> 0.0</z-m>
<roll-deg> 0</roll-deg>
<pitch-deg> 0</pitch-deg>
<heading-deg>0</heading-deg>
</offsets>
</model>
<animation>
<type>rotate</type>
<object-name>L_Aileron</object-name>
<property>/surface-positions/left-aileron-pos-norm</property>
<factor>20.0</factor> <!-- fixme -->
<center>
<x-m>0.735</x-m>
<y-m>-0.450</y-m>
<z-m>0.139</z-m>
</center>
<axis>
<x>0.037</x>
<y>1.0</y>
<z>-0.029</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>R_Aileron</object-name>
<property>/surface-positions/right-aileron-pos-norm</property>
<factor>20.0</factor> <!-- fixme -->
<center>
<x-m>0.735</x-m>
<y-m>0.450</y-m>
<z-m>0.139</z-m>
</center>
<axis>
<x>-0.037</x>
<y>1.0</y>
<z>0.029</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>Elevator</object-name>
<property>/surface-positions/elevator-pos-norm</property>
<factor>35.0</factor> <!-- fixme -->
<center>
<x-m>1.752</x-m>
<y-m>0.0</y-m>
<z-m>0.051</z-m>
</center>
<axis>
<x>0.0</x>
<y>1.0</y>
<z>0.0</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>Rudder</object-name>
<property>/surface-positions/rudder-pos-norm</property>
<factor>35.0</factor> <!-- fixme -->
<center>
<x-m>1.752</x-m>
<y-m>0.0</y-m>
<z-m>0.0</z-m>
</center>
<axis>
<x>0.0</x>
<y>0.0</y>
<z>1.0</z>
</axis>
</animation>
</PropertyList>
AC3Db
MATERIAL "ac3dmat9" rgb 0 0 1 amb 0 0 1 emis 0 0 1 spec 0 0 1 shi 0 trans 0
MATERIAL "ac3dmat3" rgb 1 0 0 amb 1 0 0 emis 1 0 0 spec 1 0 0 shi 0 trans 0
OBJECT world
kids 2
OBJECT poly
name "line"
loc 0 0.5 0
numvert 2
0 0.5 0
0 -0.5 0
numsurf 1
SURF 0x22
mat 0
refs 2
0 0 1
1 0 0
kids 0
OBJECT poly
name "line"
numvert 2
0 0 -3
0 0 3
numsurf 1
SURF 0x22
mat 1
refs 2
0 0 1
1 0 0
kids 0
<?xml version="1.0"?>
<!-- Trajectory Marker config file - Lee Elliott -->
<PropertyList>
<path>Trajectory-Marker.ac</path>
</PropertyList>
#! /bin/sh
for f in "$@" ; do
sed -i.before-color-change 's,\(MATERIAL.*\)rgb\(.*\)amb\(.*\)emis\(.*\)spec\(.*\)shi\(.*\)trans\(.*\)$,\1rgb\2amb\2emis\4spec\5shi\6trans\7,1' "$f"
if ! cmp "${f}" "${f}.before-color-change" > /dev/null 2>&1 ; then
echo "$f has changed colors!"
fi
done
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment