Project-Falcon / FGCS

Falcon Ground Control Station

Home Page:https://fgcs.projectfalcon.uk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FGCS

Falcon Ground Control Station.

Learn more on our website!

UI Screenshot


How to run

Windows - Installation
  1. Go to releases and download the most recent versions .exe file
  2. Run the downloaded file, you may have to click "more" then "run anyway" if windows defender blocks it
  3. Once installed it should be accessible via the start menu as "FGCS"
Windows - Manually

Prerequsits

  1. Ensure npm is installed, to do so follow this guide. Note: node version must be >= v20.10.0
  2. Ensure yarn is installed, to do so run npm install --global yarn or follow this guide
  3. We are using python 3.11.9 so make sure its installed before creating the venv. If you have multiple environments then please run python3.11 -m venv venv

Running Frontend Manually

  1. cd gcs
  2. yarn (to install dependencies)
  3. yarn dev

Running Backend Manually

  1. cd radio
  2. Make sure you're in a virtual environment (or create one via python3 -m venv venv) and all dependencies are installed using pip install -r requirements.txt

NOTE: To enter the virtual environment you will need to run venv/Scripts/activate on windows, to learn more please read: how to make venv for linux and winodws or what is a virtual environment?

  1. python app.py

Creating a virtual environment

Create a new Python virtual environment using python -m venv venv. This can then be activated using ./venv/scripts/activate.

Running both simultaneously

NOTE: You don't need to run them at the same time with 1 command, you can run each one individually in separate terminals

To run both the frontend and backend at the same time, you need to make sure all the requirements are installed for both yarn and Python. Then you can install a script globally using npm install -g concurrently. After activating your Python virtual environment, you can run ./run.bat and this should start up both the frontend and backend in one terminal.

Mac/Linux

We currently dont have instructions or releases for mac or linux, we will in future releases. It does run on ubuntu and mac as members of the team use it, but we want to test the instructions before releasing them. Howerver, you can still run both the frontend and backend indivudally by following the windows version with slight alterations to the commands.


Development Info

Stack
  • GUI
    • Electron + Vite + React (JavaScript)
  • Backend
    • Flask (Python)
Python

Version

We are going to be using python 3.11.x so please install that on your computer from Python's website. Please try to use a virtual environment when programming, if you don't know how to do this please message me (Julian)! Name the folder either "env" or "venv" so its in the .gitignore as we don't want to be uploading that to github.

Code Style

We will be using ruff as the code style for python, please look at the documentation found here. When pushing code we have an action to check if it is in the correct code style, if it is not in the correct style it will fail the run and you will need to fix it by running python -m ruff format . in your virtual environment (or something ruff format . works on different systems); this should automatically reformat everything so you can push it again!

Pre-Commit

When cloning the repo for the first time, please install pre-commit. This can be done with a simple pip install pre-commit and then pre-commit install. Our pre-commit hooks will run every time you try to push something, if any of the checks fail then you will not be able to push that commit and receive an error message, often the files will be fixed but not staged, so make sure to re-stage and retry the with pushing commit.

Packaging

Backend

From within the radio folder run pyinstaller --paths .\venv\Lib\site-packages\ --add-data=".\venv\Lib\site-packages\pymavlink\message_definitions\:message_definitions" --add-data=".\venv\Lib\site-packages\pymavlink\:pymavlink" --hidden-import pymavlink .\app.py -n fgcs_backend. This will create an exe and folder within the dist/fgcs_backend/ folder.

Frontend

After compiling the backend, place the contents of radio/dist/fgcs_backend into a folder in gcs/extras. Then from within the gcs folder run yarn build.


Need Help?

Feel free to ask questions in the discussion area.

About

Falcon Ground Control Station

https://fgcs.projectfalcon.uk

License:GNU General Public License v3.0


Languages

Language:JavaScript 61.3%Language:Python 34.1%Language:TypeScript 2.5%Language:CSS 1.1%Language:Batchfile 0.8%Language:HTML 0.1%