[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107969":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},107969,"flightscope-public","nathanmarlor\u002Fflightscope-public","nathanmarlor","Handheld Raspberry Pi flight tracker for a young plane-spotter: live map, plane photos and routes, a logbook, ADS-B antenna fallback and a 3D-printed case",null,"Python",88,8,5,0,1,15,3,46.86,"MIT License",false,"main",true,[],"2026-11-03 10:41:24","2026-11-22 23:56:14","# Flightscope\n\nA handheld, battery-powered flight tracker for children. Tap a plane on the map to see a photo\nof it, where it came from and where it's going; follow it, or catch it in a logbook. No ads, no\naccounts. Runs on a Raspberry Pi 4 with a 4.3\" touchscreen, a UPS HAT with two 21700\ncells, a GPS, and (as a fallback when there's no Wi‑Fi) a FlightAware Pro Stick Plus ADS‑B\nreceiver. The whole thing lives in a 3D‑printed case.\n\n## Hardware\n\n| Part | Notes |\n|---|---|\n| Raspberry Pi 4B (2 GB) | |\n| Waveshare 4.3\" DSI capacitive touchscreen (800×480) | overlay `vc4-kms-dsi-waveshare-800x480` |\n| Waveshare UPS HAT (D) + 2 × Molicel P42A 21700 | pogo‑pin power, INA219 fuel gauge on I2C 0x43 |\n| Adafruit Ultimate GPS Breakout | on the Pi UART (`\u002Fdev\u002Fserial0`), backup power from the pack |\n| FlightAware Pro Stick Plus + SMA bulkhead + antenna | readsb; only started when the internet feed is down |\n| 12 mm latching switch, panel‑mount USB‑C, M3 inserts and screws (M2.5 for the Pi\u002FHAT stack) | see `case\u002FREADME.md` |\n\n## Software (`flightscope\u002F`)\n\nPure Python + pygame‑ce, rendering straight to the framebuffer (`\u002Fdev\u002Ffb0`) and reading touch\nfrom evdev, so there's no desktop, no X, no compositor. Boots to the map in ~10 s.\n\n- **Map** — offline vector map clipped from Natural Earth + OurAirports, continuous pinch zoom,\n  planes coloured by altitude with drawn icons (helicopters too), dotted route lines to origin\n  and destination, FOLLOW mode, star badges for logged planes.\n- **Plane data** — adsb.lol v2 point query over Wi‑Fi (5 s polls, polite back‑off), routes from\n  adsbdb and adsb.im, photos from Planespotters. The antenna (readsb) is a fallback only: it's\n  stopped while the feed is healthy to save ~1 W, and started as soon as the feed goes quiet.\n- **Offline** — an aircraft database (tar1090-db) and a route database (VRS standing data) are\n  downloaded weekly while online, so planes heard on the antenna still get a registration, type and\n  route with no internet. Setup > Status > \"Antenna only\" simulates being offline (the app stops\n  using the internet; Wi-Fi and SSH stay up) for testing the antenna.\n- **Logbook** — one entry per airframe, \"seen again\" after 2 h or a new flight, totals by\n  airline and by type, two‑step delete.\n- **Setup screen** — hold Home for 3 s: status, Wi‑Fi (scan\u002Fjoin with an on‑screen keyboard),\n  settings with steppers (saved to `~\u002F.config\u002Fflightscope\u002Fconfig.json`), battery detail, power.\n- **Power** — backlight dims then powers the panel down through DRM (touch wakes it), battery %\n  from an OCV curve with load correction, time‑to‑empty\u002Ffull. GPS \"You\" marker; the feed follows\n  the device when it has a fix.\n\nDev hooks on the device (`\u002Ftmp\u002Fflightscope.shot`, `.tap`, `.pinch`, `.sel`, `.admin`, `.key`)\nlet you drive and screenshot the UI over SSH.\n\n## Getting it on a Pi\n\n1. `provision\u002Fflash.sh` writes Raspberry Pi OS Lite (Trixie, arm64) and drops in the cloud‑init\n   files (`user-data`, `network-config` — fill in your Wi‑Fi), the `config.txt` additions and\n   a quiet‑boot `cmdline.txt`. First boot installs packages, readsb and the venv.\n2. `tools\u002Fdeploy.sh` rsyncs `flightscope\u002F` to the Pi and (re)starts the systemd service.\n3. Make it safe to switch off at any time (the panel switch cuts power instantly): shut the Pi down,\n   put the card in a reader and run `sudo provision\u002Fmake-readonly.sh \u002Fdev\u002FsdX`. The system then runs\n   read-only (overlayroot, writes go to RAM) and a small `fsdata` partition at `\u002Fdata` keeps the logbook,\n   settings, route\u002Fphoto cache and saved Wi‑Fi. `tools\u002Fdeploy.sh` writes through to the real rootfs\n   when the overlay is on. To change the system itself, `sudo raspi-config nonint disable_overlayfs` and reboot.\n4. Build the offline map for your area once:\n   `python3 tools\u002Fbuild_map.py \u003Clat> \u003Clon> --radius-nm 220` → `flightscope\u002Fdata\u002Fmap.json`.\n   It reads Natural Earth 10 m `land`, `lakes`, `urban_areas`, `coastline`, `rivers_europe`,\n   `populated_places_simple` GeoJSON and OurAirports `airports.csv` \u002F `runways.csv` from `data\u002F`\n   (not committed — download from naturalearthdata.com and ourairports.com).\n\nRuntime config lives on the device; the only two things you must set are `owner` (the child's\nname) and `photo_contact` (Planespotters requires a contact in the User‑Agent). Home is set\nfrom the GPS on the setup screen.\n\n## Case (`case\u002F`)\n\nParametric CadQuery model (`flightscope_case.py`) with a pairwise interference check\n(`check.py`), component stand‑ins and STL export (`exploded.py`), an interactive Three.js\nassembly viewer (`viewer.html`, with wiring, screws and an explode slider) and a caliper\nmeasurement sheet (`measure.html`) that feeds real dimensions back into the model.\nPrint settings, hardware list, screw table and assembly steps are in\n`case\u002FREADME.md`. Printed STLs are in `case\u002Fout\u002F`.\n\nBuild it on any Linux box with [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) and ImageMagick:\n\n```\nuv venv case\u002F.venv --python 3.12 && VIRTUAL_ENV=case\u002F.venv uv pip install -r case\u002Frequirements.txt\ncase\u002Fbuild.sh            # STLs, clash check, fit-test prints, renders, viewer data (~4 min)\n```\n\n## Layout\n\n```\nflightscope\u002F      the app (sources\u002F, ui\u002F, data\u002F, fonts\u002F)\nprovision\u002F        cloud-init + config.txt + systemd unit + flash script\ntools\u002F            deploy.sh, build_map.py\ncase\u002F             CadQuery case (build.sh), checks, viewer, measurement sheet, print presets, STLs\n```\n\nFonts: Nunito (SIL OFL, `flightscope\u002Ffonts\u002FOFL.txt`). Map data: Natural Earth and OurAirports (public domain).\nLive data, fetched at runtime and not redistributed here: adsb.lol, adsbdb, adsb.im, Planespotters,\nwiedehopf\u002Ftar1090-db, VRS standing data. Please be polite to these free services: the app polls\ngently, backs off when told to, and needs `photo_contact` set before it asks Planespotters.\n\nCode and case: MIT.\n","这是一款面向青少年航空爱好者的手持式飞行追踪设备，基于树莓派4构建，支持离线地图浏览、实时航班信息查看、航线跟踪与日志记录。核心功能包括：纯Python+pygame-ce实现的无桌面环境轻量渲染、双数据源自动切换（优先使用adsb.lol在线API，断网时启用ADS-B接收器）、离线飞机数据库与航线缓存、GPS定位与低功耗电源管理。适用于户外观机、航空科普教学及便携式ADS-B接收场景，无需网络账户或广告。",2,"2026-11-24 04:33:08","CREATED_QUERY"]