{"id":20164851,"url":"https://github.com/px4/flight_review","last_synced_at":"2025-06-27T03:10:30.339Z","repository":{"id":12457789,"uuid":"71870777","full_name":"PX4/flight_review","owner":"PX4","description":"web application for flight log analysis \u0026 review","archived":false,"fork":false,"pushed_at":"2025-05-22T02:33:47.000Z","size":34914,"stargazers_count":219,"open_issues_count":30,"forks_count":200,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-05-22T22:07:14.746Z","etag":null,"topics":["bokeh","drone","flight-log-analysis","interactive-plots","plotting","px4","python","web"],"latest_commit_sha":null,"homepage":"https://logs.px4.io/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PX4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-10-25T07:27:46.000Z","updated_at":"2025-05-09T12:30:38.000Z","dependencies_parsed_at":"2023-02-10T21:00:48.567Z","dependency_job_id":"52c3898d-035d-49e0-8f4e-b620f68b805f","html_url":"https://github.com/PX4/flight_review","commit_stats":{"total_commits":580,"total_committers":45,"mean_commits":12.88888888888889,"dds":"0.28103448275862064","last_synced_commit":"e4127c8cbcf6e718cab26aa6157bf2d14197d85a"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PX4/flight_review","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fflight_review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fflight_review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fflight_review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fflight_review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PX4","download_url":"https://codeload.github.com/PX4/flight_review/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PX4%2Fflight_review/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262181059,"owners_count":23271319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bokeh","drone","flight-log-analysis","interactive-plots","plotting","px4","python","web"],"created_at":"2024-11-14T00:35:52.316Z","updated_at":"2025-06-27T03:10:30.292Z","avatar_url":"https://github.com/PX4.png","language":"JavaScript","readme":"# Flight Review\n\nThis is a web application for flight log analysis. It allows users to upload\nULog flight logs, and analyze them through the browser.\n\nIt uses the [bokeh](http://bokeh.pydata.org) library for plotting and the\n[Tornado Web Server](http://www.tornadoweb.org).\n\nFlight Review is deployed at https://review.px4.io.\n\n![Plot View](screenshots/plot_view.png)\n\n## 3D View\n![3D View](screenshots/3d_view.gif)\n\n\n## Installation and Setup\n\n### Requirements\n\n- Python3 (3.6+ recommended)\n- SQLite3\n- [http://fftw.org/](http://fftw.org/)\n\n#### Ubuntu\n\n```bash\nsudo apt-get install sqlite3 libfftw3-bin libfftw3-dev\n```\n\n**Note:** Under some Ubuntu and Debian environments you might have to\ninstall ATLAS\n\n```bash\nsudo apt-get install libatlas3-base\n```\n\n#### macOS\n\nmacOS already provides SQLite3.\nUse [Homebrew](https://brew.sh) to install fftw:\n\n```bash\nbrew install fftw\n```\n\n### Installation\n\n```bash\n# After git clone, enter the directory\ngit clone --recursive https://github.com/PX4/flight_review.git\ncd flight_review/app\npip install -r requirements.txt\n# Note: preferably use a virtualenv\n\n# Note: if you get an error about \"ModuleNotFoundError: No module named 'libevents_parse'\" update submodules\ngit submodule update --init --recursive\n```\n\n### Setup\n\nInitialize the Database as following:\n\n```bash\n./app/setup_db.py\n```\n\n**Note:** `setup_db.py` can also be used to upgrade the database tables, for instance when new entries are added (it automatically detects that).\n\n#### Settings\n\n- By default the app will load `config_default.ini` configuration file\n- You can override any setting from `config_default.ini` with a user config file\n  `config_user.ini` (untracked)\n- Any setting on `config_user.ini` has priority over\n  `config_default.ini`\n\n## Usage\n\nFor local usage, the server can be started directly with a log file name,\nwithout having to upload it first:\n\n```bash\ncd app\n./serve.py -f \u003cfile.ulg\u003e\n```\n\nTo start the whole web application:\n```bash\ncd app\n./serve.py --show\n```\n\nThe `plot_app` directory contains a bokeh server application for plotting. It\ncan be run stand-alone with `bokeh serve --show plot_app` (or with `cd plot_app;\nbokeh serve --show main.py`, to start without the html template).\n\nThe whole web application is run with the `serve.py` script. Run `./serve.py -h`\nfor further details.\n\n## Interactive Usage\nThe plotting can also be used interative using a Jupyter Notebook. It\nrequires python knowledge, but provides full control over what and how to plot\nwith immediate feedback.\n\n- Start the notebook\n- Locate and open the test notebook file `testing_notebook.ipynb`.\n\n```bash\n# Launch jupyter notebook\ncd app\njupyter notebook testing_notebook.ipynb\n```\n\n# Implementation\nThe web site is structured around a bokeh application in `app/plot_app`\n(`app/plot_app/configured_plots.py` contains all the configured plots). This\napplication also handles the statistics page, as it contains bokeh plots as\nwell. The other pages (upload, browse, ...) are implemented as tornado handlers\nin `app/tornado_handlers/`.\n\n`plot_app/helper.py` additionally contains a list of log topics that the plot\napplication can subscribe to. A topic must live in this list in order to be\nplotted.\n\nTornado uses a single-threaded event loop. This means all operations should be\nnon-blocking (see also http://www.tornadoweb.org/en/stable/guide/async.html).\n(This is currently not the case for sending emails).\n\nReading ULog files is expensive and thus should be avoided if not really\nnecessary. There are two mechanisms helping with that:\n- Loaded ULog files are kept in RAM using an LRU cache with configurable size\n  (when using the helper method). This works from different requests and\n  sessions and from all source contexts.\n- There's a LogsGenerated DB table, which contains extracted data from ULog\n  for faster access.\n\n## Caching\nIn addition to in-memory caching there is also some on-disk caching: KML files\nare stored on disk. Also the parameters and airframes are cached and downloaded\nevery 24 hours. It is safe to delete these files (but not the cache directory).\n\n## Notes about python imports\nBokeh uses dynamic code loading and the `plot_app/main.py` gets loaded on each\nsession (page load) to isolate requests. This also means we cannot use relative\nimports. We have to use `sys.path.append` to include modules in `plot_app` from\nthe root directory (Eg `tornado_handlers.py`). Then to make sure the same module\nis only loaded once, we use `import xy` instead of `import plot_app.xy`.\nIt's useful to look at `print('\\n'.join(sys.modules.keys()))` to check this.\n\n# Docker usage\n\nThis section explains how to work with docker.\n\n## Arguments\n\nEdit the `.env` file according to your setup:\n\n- PORT - The number of port, what listen service in docker, default 5006\n- USE_PROXY - The set his, if you use reverse proxy (Nginx, ...)\n- DOMAIN - The address domain name for origin, default = *\n- CERT_PATH - The SSL certificate volume path\n- EMAIL - Email for challenging Let's Encrypt DNS\n\n## Paths\n\n- /opt/service/config_user.ini - Path for config\n- /opt/service/data - Folder where stored database\n- .env - Environment variables for nginx and app docker container\n\n## Build Docker Image\n\n```bash\ncd app\ndocker build -t px4flightreview -f Dockerfile .\n```\n\n## Work with docker-compose\nRun the following command to start docker container.\nPlease modify the `.env` and add `app/config_user.ini` with respective stages.\n\nUncomment the `BOKEH_ALLOW_WS_ORIGIN` with your local IP Address when\ndeveloping, this is for the bokeh application's websocket to work.\n\n### Development\n```bash\ndocker-compose -f docker-compose.dev.yml up\n```\n\n### Test Locally\nTest locally with nginx:\n\n```bash\ndocker-compose up\n```\n\nRemember to Change `NGINX_CONF` to use `default_ssl.conf` and add the `EMAIL`\nfor production.\n\n### Production\n```bash\nhtpasswd -c ./nginx/.htpasswd username\n# here to create a .htpasswd for nginx basic authentication\nchmod u+x init-letsencrypt.sh\n./init-letsencrypt.sh\n```\n\n## Contributing\nContributions are welcome! Just open a pull request with detailed description\nwhy the changes are needed, or open an issue for bugs, feature requests, etc...\n\nFeel free to run `./run_pylint.sh` before PR to ensure CICD checks pass on your code. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpx4%2Fflight_review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpx4%2Fflight_review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpx4%2Fflight_review/lists"}