{"id":20648926,"url":"https://github.com/francois-poidevin/flighttracker","last_synced_at":"2026-05-05T15:40:11.165Z","repository":{"id":57518728,"uuid":"187791897","full_name":"francois-poidevin/flighttracker","owner":"francois-poidevin","description":"This app is to track all aircrafts that passing onto a specified Bouding Box, store it, and alert an user if the flight doesn't respect flight rules","archived":false,"fork":false,"pushed_at":"2023-02-25T09:09:40.000Z","size":211,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-17T10:11:36.241Z","etag":null,"topics":["cli","docker","golang","postgis","postgres","postgresql","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/francois-poidevin.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-05-21T08:12:26.000Z","updated_at":"2023-02-16T03:47:45.000Z","dependencies_parsed_at":"2024-06-20T13:04:34.084Z","dependency_job_id":"603642e1-198f-4629-afff-ee36cbe0ee83","html_url":"https://github.com/francois-poidevin/flighttracker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francois-poidevin%2Fflighttracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francois-poidevin%2Fflighttracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francois-poidevin%2Fflighttracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/francois-poidevin%2Fflighttracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/francois-poidevin","download_url":"https://codeload.github.com/francois-poidevin/flighttracker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242737018,"owners_count":20177092,"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":["cli","docker","golang","postgis","postgres","postgresql","rest-api"],"created_at":"2024-11-16T17:11:43.026Z","updated_at":"2025-12-05T15:07:42.699Z","avatar_url":"https://github.com/francois-poidevin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flight Tracker\n\nThis app is to track all aircrafts that passing onto a specified Bouding Box, store it, and alert an user if the flight doesn't respect flight rules\n\n## Use cases\n- You think to buy a house, and you want to prevently check if your investissement will be under hight flight pressure\n- You want to know if a specific area have illegal flights (under altitude rules)\n\n## Informations\n### French reglementation\n[Guide_autorisation_survol_basses_hauteurs](https://www.ecologie.gouv.fr/sites/default/files/Guide_autorisation_survol_basses_hauteurs.pdf)\n[Definition - Unité urbaine / Agglomeration](https://www.insee.fr/fr/metadonnees/definition/c1501)\n\n### API feed\n\n- [current use] https://www.flightradar24.com (https://data-live.flightradar24.com/zones/fcgi/feed.js?bounds=43.79,43.53,1.23,2.03\u0026faa=1\u0026satellite=1\u0026mlat=1\u0026flarm=1\u0026adsb=1\u0026gnd=1\u0026air=1\u0026vehicles=1\u0026estimated=1\u0026maxage=14400\u0026gliders=1\u0026stats=1)\n- [in study] https://www.adsbexchange.com/data\n- [in study] https://opensky-network.org/\n\n### Bbox construction\nIf you need to construct a bbox that fit with FlightTracker requierement, take a look in [bboxfinder.com](http://bboxfinder.com)\n\n## Build\n```bash\ngo build -o bin/flighttracker\n```\n\nor\n\n```bash\ndocker build -t flighttracker:latest .\n```\n\n## Configuration file\n### Generate\nGenerate a configuration file on local folder with default values\n```bash\n./bin/flighttracker config new \u003e /configlocal/config_flighttracker.toml\n```\nYou can change the configuration file for specifying configuration\n\n```toml\n###############################\n# Flighttracker Settings \n###############################\n[Flighttracker]\n\n  # tracking bbox (Lat/Lon)\n  bbox = \"43.52,1.32^43.70,1.69\"\n\n  # refresh timing\n  refresh = 5\n\n  # the sinker Type use\n  sinkertype = \"DB\"\n\n  ###############################\n  # postgres sinker configuration \n  ###############################\n  [Flighttracker.postgres]\n\n    # Postgres dbName\n    dbName = \"postgres\"\n\n    # Postgres host\n    host = \"172.17.0.2\"\n\n    # Postgres password\n    password = \"mysecretpassword\"\n\n    # Postgres port\n    port = 5432\n\n    # Postgres user\n    user = \"postgres\"\n\n  ###############################\n  # file sinker configuration \n  ###############################\n  [Flighttracker.file]\n\n    # output raw file name\n    outputraw = \"rawData.log\"\n\n    # output report file name\n    outputreport = \"report.log\"\n\n###############################\n# Logs Settings \n###############################\n[Log]\n\n  # Log level: debug, info, warn, error, dpanic, panic, and fatal\n  level = \"warn\"\n```\n### Explaination\n\n| Parameter        \t| Signification           \t\t\t|\n| ------------- \t|---------------|\n| Flighttracker.refresh\t\t\t| Refresh timer (every n seconds)\t|\n| Flighttracker.bbox\t\t\t\t| BoundingBox where analyse is done (Bottom Left-Top Right)\t|\n| Flighttracker.sinkerType\t\t\t\t| Sinker type (STDOUT or FILE or DB)\t|\n| Flighttracker.postgres.dbName\t\t\t\t| Postgres Database Name\t|\n| Flighttracker.postgres.host\t\t\t        | Postgres Database host\t|\n| Flighttracker.postgres.password\t\t\t\t| Postgres Database password\t|\n| Flighttracker.postgres.port\t\t\t\t    | Postgres Database port\t|\n| Flighttracker.postgres.user\t\t\t\t    | Postgres Database user\t|\n| Flighttracker.file.outputraw\t\t\t| File name for output raw for sinker type 'FILE' \t|\n| Flighttracker.file.outputreport\t\t| File name for output report for sinker type 'FILE'\t|\n| Log\t\t| Log level used\t|\n\n### sinkerType\n\n#### STDOUT\nThe sinker will display on Standard Output the raw data unmarshalled and unmarshalled data with criteria (flight under ...) \n\n#### FILE\nThis sinker will create files on local folder where the application is running under 'log' folder. The _rawData.log_ file store all unmarshalled data from raw json. The _report.log_ file store only unmarshalled data with criteria (flight under ...)\n\n#### DB\n##### Pre-requisite\n\n###### Docker\n```\ndocker run -p 5432:5432 --name some-postgis -e POSTGRES_PASSWORD=mysecretpassword -d postgis/postgis\n```\n\nDatabase is accessible at \u003cYOUR_LOCAL_DOCKER_IP\u003e:5432\n\n###### Local installation (Ubuntu 20.04)\n * Step 1: Update system\n  ```shell\n  sudo apt update\n  sudo apt -y install vim bash-completion wget\n  sudo apt -y upgrade\n  sudo reboot\n  ```\n * Step 2: Add PostgreSQL 12 repository\n  ```shell\n  wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -\n  echo \"deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main\" |sudo tee  /etc/apt/sources.list.d/pgdg.list\n  ```\n * Step 3: Install PostgreSQL 12\n  ```shell\n  sudo apt update\n  sudo apt -y install postgresql-12 postgresql-client-12\n  ```\n * Step 4: Install Postgis extension\n  ```shell\n  sudo su - postgres\n  psql -d postgres\n  postgres=# CREATE EXTENSION postgis;\n  ```\n\nDatabase is accessible at 127.0.0.1:5432\n\n##### Informations\nThis sinker will create a database structure in postgres database (schema and table)\nThis sinker will store inbound data to postgres database\n\n## Run\n### start service\n\nThe _start_ CLI service allow to sink data in differents sinkers has: STDOUT, FILE, DB (POSTGRES)\n\nRunning flightTracker with default information of configuration file\n```bash\n./bin/flighttracker start --config ./configlocal/config_flighttracker.toml\n```\nor\n\n```bash\ndocker run -v /home/poidevin/Projects/flighttracker/configlocal:/tmp flighttracker:latest start --config /tmp/config_flighttracker.toml\n```\nthen call the endpoint on docker container IP (i.e. 172.17.0.1:8080)\n\n### startHttp service\nThe _startHttp_ CLI service allow start a REST server on 8080 port to sink data in database (POSTGRES) and allow to request to the database\n\nRunning flightTracker with default information of configuration file\n```bash\n./bin/flighttracker startHttp --config ./configlocal/config_flighttracker.toml\n```\nor\n\n```bash\ndocker run -v /home/poidevin/Projects/flighttracker/configlocal:/tmp -p 8080:8080 flighttracker:latest startHttp --config /tmp/config_flighttracker.toml\n```\nthen call the endpoint on docker container IP (i.e. 172.17.0.1:8080)\n\n#### endpoints\n\n| endpoint        \t| HTTP Methods           \t\t\t| example           \t\t\t|signification           \t\t\t|\n| ------------- \t|---------------   |---------------   |   ---------------|\n| /start | GET | localhost:8080/api/v1/start | to start the sinking service on database |\n| /stop | GET | localhost:8080/api/v1/stop | to stop the sinking service on database |\n| /search | GET | localhost:8080/api/v1/search?bbox=43.52,1.32^43.70,1.69\u0026altThresholdFeet=500\u0026fromTimeStamp=2021-07-22T09:00:00\u0026toTimeStamp=2021-07-24T12:00:00 | to search data from database on several criteria as path parameters |\n\n##### start\nTo start the sinking service on database\n\n##### stop\nTo stop the sinking service on database\n\n##### search\n| path parameters        \t| signification           \t\t\t|\n|-----------------------  |------------------------------|\n|         bbox                |  BoundingBox where analyse is done (Bottom Left-Top Right)                             |\n|       altThresholdFeet      |   floor threshold for research in Feet unit. Only above and equals data will be returned                         |\n|     fromTimeStamp           |  from time windows for search                             |\n|     toTimeStamp             |  to time windows for search                             |\n\n## Docker images\n\n- Storing data\n\n[Postgis dockerHub image](https://hub.docker.com/r/postgis/postgis/)\n```\nFROM postgis/postgis\n```\n\n- worker\n\n[Golang dockerHub image](https://hub.docker.com/_/golang)\n```\nFROM golang:alpine\n```\n\n## Docker compose - not yet implemented\n\n## Airport area\nFor excluding illegal flights onto airport area, we will use overpass QL to request OSM API to generate polygon of each airport in France\n### Overpass\nPlay the overpass QL script on [Overpass-turbo](https://overpass-turbo.eu/)\n### Overpass QL\n```json\n[out:json][timeout:600];\n// gather results\n(\n  // query part for: “aeroway=aerodrome”\n  node[\"aeroway\"=\"aerodrome\"]({{bbox}});\n  way[\"aeroway\"=\"aerodrome\"]({{bbox}});\n  relation[\"aeroway\"=\"aerodrome\"]({{bbox}});\n);\n// print results\nout body;\n\u003e;\nout skel qt;\n```\n\n### osmtogeojson\nTo generate OSM data to geojson\n[osmtogeojson](https://tyrasd.github.io/osmtogeojson/)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancois-poidevin%2Fflighttracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrancois-poidevin%2Fflighttracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrancois-poidevin%2Fflighttracker/lists"}