Skip to content

Commit

Permalink
Initial FlexiFlightViz version
Browse files Browse the repository at this point in the history
  • Loading branch information
ybeyer committed Jul 7, 2023
1 parent 53a44bb commit b933c10
Show file tree
Hide file tree
Showing 14 changed files with 1,984 additions and 0 deletions.
106 changes: 106 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Build and Test

on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main

defaults:
run:
shell: bash

env:
SOURCE_DIR: ${{ github.workspace }}
QT_VERSION: 5.15.2
ARTIFACT: FlexiFlightVis

jobs:
build:
runs-on: ubuntu-20.04

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
host: linux
target: desktop
dir: ${{ runner.temp }}

- name: Install dependencies
run: sudo apt-get install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev

- name: Create build directory
run: |
mkdir ${{ runner.temp }}/shadow_build_dir
mkdir ${{ runner.temp }}/shadow_app_dir
- name: Build
working-directory: ${{ runner.temp }}/shadow_build_dir
run: |
qmake ${SOURCE_DIR}/FlexiFlightVis.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
make
- name: Download linuxdeployqt
working-directory: ${{ runner.temp }}/shadow_app_dir
run: |
wget -c --quiet "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
- name: Create AppImage
working-directory: ${{ runner.temp }}/shadow_app_dir
run: |
cp ${SOURCE_DIR}/deploy/FlexiFlightVis.desktop.desktop ${{ runner.temp }}/shadow_build_dir/
cp ${SOURCE_DIR}/deploy/FlexiFlightVis.png ${{ runner.temp }}/shadow_build_dir/
./linuxdeployqt-continuous-x86_64.AppImage ../shadow_build_dir/FlexiFlightVis -appimage
- name: Save artifact
uses: actions/upload-artifact@main
with:
name: ${{ env.ARTIFACT }}
path: ${{ runner.temp }}/shadow_app_dir/${{ env.ARTIFACT }}-x86_64.AppImage

release:
if: github.event_name == 'push' && github.ref_type == 'tag'
name: Release
runs-on: ubuntu-20.04
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.ARTIFACT }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Test
run: |
echo $RELEASE_VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./FlexiFlightVis-x86_64.AppImage
asset_name: FlexiFlightVis-${{ env.RELEASE_VERSION }}.AppImage
asset_content_type: application

36 changes: 36 additions & 0 deletions FlexiFlightVis.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
QT += core gui opengl network

LIBS += -lGLU

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
src/aircraft.cpp \
src/main.cpp \
src/mainwindow.cpp \
src/myudp.cpp \
src/structWithFieldnames.cpp

HEADERS += \
src/aircraft.h \
src/mainwindow.h \
src/myudp.h \
src/structWithFieldnames.h

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
47 changes: 47 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# FlexiFlightVis

FlexiFlightVis is a program for a technical visualization of flexible airplanes.
It is intended to run the simulation of the flexible airplane in Matlab/Simulink.
However, since Matlab/Simulink has limited capabilities for 3D visualization, FlexiFlightVis can be used for visualization.
Therefore, the state of the airplane must be transferred from Matlab/Simulink to FlexiFlightVis via UDP for real-time visualization.
Because of the UDP interface, FlexiFlightVis can run on a different computer than the Matlab/Simulink simulation.
FlexiFlightVis assumes a certain organization of the aircraft state (struct).
Take a look at the example to see how it works.


## Installation

- Linux:
Download and run the AppImage in the Releases.

- Windows:
Currently not supported (but you can try to build from source).


## Example

FlexiFlightVis is used in the following research project:
[https://github.com/iff-gsc/SE2A_Aviation_2023](https://github.com/iff-gsc/SE2A_Aviation_2023)


## Build from source (Linux)

- Install Qt5:
```
sudo apt-get install qt5-default
```
- Install dependencies:
```
sudo apt-get install -y libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
```
- Clone FlexiFlightVis:
```
git clone https://github.com/iff-gsc/flexiflightvis.git
```
- Compile the program from Qt Creator or from terminal:
```
mkdir build
cd build
qmake ../FlexiFlightVis/FlexiFlightVis.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug
make
```
7 changes: 7 additions & 0 deletions deploy/FlexiFlightVis.desktop.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Type=Application
Name=FlexiFlightVis
Comment=Aeroelastic Airplane Visualization
Exec=FlexiFlightVis
Icon=FlexiFlightVis
Categories=Office;
Binary file added deploy/FlexiFlightVis.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit b933c10

Please sign in to comment.