3D viewer and simulator for to visualize the flight path and power production of tethered wind drones and kites for airborne wind energy applications
Julia 1.6.x or 1.7.x must be installed. You can download it at https://www.julialang.org/
On Linux or MAC you can install the latest Julia version with the following command:
bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"
At least a dual core PC or MAC with 4 GB RAM (min. 2 GB) is required. OpenGL, version 3.3 or higher must be working.
It should work on Windows, Linux and Mac, but until now only tested on Linux (Ubuntu 18.04 and Ubuntu 20.04) and Windows 10.
If you are using Windows, read Windows.md first.
After installing julia, create a work folder:
cd
mkdir repos
cd repos
Check out the source code:
git clone https://github.com/ufechner7/KiteViewer.git
cd KiteViewer
Create a pre-compiled system image (needed for good performance):
./create_sys_image.sh
This takes about 10 to 15 minutes and needs to be done at least once, but also after important package updates because it freezes the package versions.
Run the program and show the GUI:
./run_julia.sh
include("src/KiteViewer.jl")
main()
Click on PLAY to play the log file (and wait until the flight data import is finished when you do it the first time.) Use the right mouse button to zoom and the left mouse button to pan the 3D view.
When you run KiteViewer for the first time the flight data is imported and converted to the .arrow format.
With the following commands you can import csv flight data manually:
./run_julia.sh
include("src/Importer.jl")
If you have your own .csv log files you need to extend the importer for your data format.
To start the simulation, click the button "START". To steer the kite, use the right and left cursor keys. For a first test, after pressing the START button press the right cursor twice and wait. If you started the main function from a Julia console you can see the setting of the steering as numbers in the console.
To test the 4-point simulator and steer the kite with a joystick, look at KiteSimulators .
Use the package Revise to speed up testing of code changes:
./run_julia.sh
includet("src/KiteViewer.jl")
Please don't forget the t at end of the includet command.
Now make changes to KiteViewer.jl and then execute
main()
Revise is watching the file KiteViewer.jl, and each time a changed version is saved any changed function is recompiled, but only the function that was changed and nothing else, therefore this is much faster than restarting Julia after a change.
On Linux it can help to activate the "performance" governor. This can be done with the command: sudo ./performance.sh
If you use the script ./run_julia.sh the system image with the precompiled packages will be used.
If you do not want to make changes to the code you can also run the app by typing ./kiteviewer.sh
.
More detailed explaination here: SystemImage.md (Tested on Windows10 and Linux.)
The simulator is tested against the results of the paper Dynamic Model of a Pumping Kite Power System. For details of the tests see: Tests.md
I am currently moving the code of this repository into a set of Julia packages, called "Julia Kite Power Tools". Advantages:
- more modular code, use only the packages you need
- automated unit tests
- better, auto-generated documentation
- easier installation, only Julia required, not git any more
The code for viewing log files will be found in the package KiteViewers, the code for running simulations in the package KiteSimulators.
- Research Fechner for the scientic background of this code
- The metapackage KiteSimulators
- the package KiteUtils
- the packages KiteModels and WinchModels and KitePodModels and AtmosphericModels
- the packages KiteControllers and KiteViewers
Author: Uwe Fechner (uwe.fechner.msc@gmail.com)