Skip to content

This repository documents my last project in Adanced Programming 2 course at Bar-Ilan university. In this project I've implemented an Android app that allows the user to remotely control an aircraft in FlightGear simulator.

Notifications You must be signed in to change notification settings

shlomi1993/flight-simulator-android-app

Repository files navigation

FlightSimulatorAndroidApp

Introduction

This repository documents my last project in Adanced Programming 2 course at Bar-Ilan university. In this project I've implemented an Android app that allows the user to remotely control an aircraft in FlightGear simulator.

sshot1

System Requirements

  1. Android device with Android 11.0 x86 OS (The program is likely to work on lower versions as well).
  2. FlightGear simulator – Download here: https://www.flightgear.org/download/

Model, View, ViewModel

The program is devided according to MVVM architecture:

  1. Model: Holds data (client) and logic, sends commands to the flight simulator.
  2. ViewModel: Acts as the link between the Model and View.
  3. View: Responsible for the visualization and creating displays for the user

Class diagram:

FlightControlAppUML

(Click to enlarge)

Instructions for running the app using Android Studio

  1. Install FlightGear on your machine.
  2. Open FlightGear, go to "settings", scroll down to "Additional Settings", then write: "--telnet=socket,in,10,127.0.0.1,6400,tcp". If port 6400 is occupied, you can enter any available port x.
  3. Download FlightSimulatorAndroidApp project.
  4. Open Android Studio and start an AVD - recommend to start Pixel XL API 30.
  5. Start FlightGear simulator.
  6. Build and run the project from Android Studio.
  7. Enter your machine's IP adrress and port 6400 (or port x you chose before).
  8. Touch (click) connect.
  9. You can now control the simulator.

Instructions for running the app using your android device

  1. Install FlightGear on your machine.
  2. Open FlightGear, go to "settings", scroll down to "Additional Settings", then write: "--telnet=socket,in,10,127.0.0.1,6400,tcp". If port 6400 is occupied, you can enter any available port x.
  3. From this repository, download the apk flightcontrol-installation.apk from installable-apk directory to your device.
  4. Install the apk on your device. Note that you will probably need to approve the installation of apps from unauthorized sources as this is an educational program that is unapproved by Play Store.
  5. Start FlightGear simulator.
  6. Start Flight Simulator Control App on your device.
  7. Enter your machine's IP adrress and port 6400 (or port x you chose before).
  8. Touch connect.
  9. You can now control the simulator.

Presentation

Introduction video: https://youtu.be/GOK3DV1zgKs

Slides: FlightControl App Presentation.pptx

Guide for installation on Android Device

Download the apk an locate it (the apk in the screenshot is the flightcontrol-installation.apk before renaming).

Screenshot_20210621-172617_My Files

Choose "Install" to start installation process.

Screenshot_20210621-172622_Package installer

This app is not recognized in Play Store so touch "INSTALL ANYWAY"

Screenshot_20210621-172628_Google Play Store

Installing...

Screenshot_20210621-172635_Package installer

Click "Open" to start the app.

Screenshot_20210621-172647_Package installer

It is possible that your device's Anti-Virus will ask to scan the app because it isn't recognized in Play Store. You can choose "DON'T SEND", trust me :)

Screenshot_20210621-172653_Google Play Store

Now you can start the app:

Screenshot_20210621-172707_Flight Simulator Control App

Enter valid IP address and port number, and press connect.

Screenshot_20210621-172718_Flight Simulator Control App

You can now control the simulated aircraft - Have a nice flight!

Screenshot_20210621-172738_Flight Simulator Control App

IDE and tools

  1. Android Studio
  2. Notepad++
  3. FlightGear Simulator
  4. draw.io ( https://app.diagrams.net/ ) - for the UML
  5. Samsung Galaxy S20 device.

Notes

The program was tested on:

  • Pixel XL API 30 emulator (on Android Studio IDE)
  • Samsung galaxy S20 device (running android 11)

The throttle slider position in the screenshots looks unpositioned, but it was fixed.

It isn't shown in the video, but if the server disconnects during runtime, the user receives a pop-up error that he\she must answer "OK" and then he\she is returned to the main screen.

About

This repository documents my last project in Adanced Programming 2 course at Bar-Ilan university. In this project I've implemented an Android app that allows the user to remotely control an aircraft in FlightGear simulator.

Topics

Resources

Stars

Watchers

Forks

Languages