Initial commit: add Location Plotter
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
# Location Plotter
|
||||
|
||||
Qt6/C++ GUI that listens to `/dev/ttyUSB2`, parses normal debug lines, and plots live
|
||||
locations on a map.
|
||||
|
||||
The application also includes an interactive 3D Earth/orbit view. It downloads the current
|
||||
stream-derived RINEX 3 navigation file from the BKG/IGS archive at startup and every 15
|
||||
minutes, then recomputes GPS satellite positions for current UTC every minute. The last valid
|
||||
file is cached for offline startup.
|
||||
|
||||
## Parsed fields
|
||||
|
||||
The parser accepts labeled values in the same line or in separate lines:
|
||||
|
||||
```text
|
||||
lat=41.0082 long=28.9784 hheight=123.45 sats=7
|
||||
latitude: 41.0082 longitude: 28.9784 height: 123.45 activeSats: 7
|
||||
active_sats=8
|
||||
navigation software running with 5 satellites
|
||||
GDOP : 3.9576744550
|
||||
PDOP : 3.2540598660
|
||||
HDOP : 2.3631161789
|
||||
VDOP : 2.2370935468
|
||||
TDOP : 2.2526165852
|
||||
tracking PRNs: G03, G08, 14, 21
|
||||
SV=G27
|
||||
lattitude : 40.78925034214206846173
|
||||
longitude : 29.46277530841727809729
|
||||
height : -89.05779508221894502640
|
||||
```
|
||||
|
||||
Accepted location labels:
|
||||
|
||||
- Latitude: `lat`, `latitude`, `lattitude`
|
||||
- Longitude: `long`, `longitude`, `lon`, `lng`
|
||||
- Height: `hheight`, `height`, `alt`, `altitude`
|
||||
- Active satellites: `sat`, `sats`, `satellite`, `satellites`, `active_sats`,
|
||||
`activeSats`, `satellites_active`, `num_sats`, `uydu`
|
||||
- DOP: `GDOP`, `PDOP`, `HDOP`, `VDOP`, `TDOP`
|
||||
- GPS identifiers: `G03`, `PRN: 3`, `PRNs: 3, 8, 14`, `SV=G21`, `SVID: 27`
|
||||
|
||||
If a satellite count arrives without a location, the active satellite display is updated.
|
||||
If a location arrives without a satellite count, the latest known satellite count is attached
|
||||
to that point.
|
||||
If DOP values arrive before a location, the latest known values stay visible in the DOP
|
||||
section and are attached to the next plotted point.
|
||||
If latitude, longitude, and height arrive as separate consecutive lines, they are combined
|
||||
into a single plotted point.
|
||||
|
||||
## Ubuntu'da kurulum
|
||||
|
||||
Ubuntu 22.04 ve daha yeni surumlerde gerekli paketleri kurmak, uygulamayi derlemek ve
|
||||
testleri calistirmak icin:
|
||||
|
||||
```bash
|
||||
git clone <depo-adresi> location_plotter
|
||||
cd location_plotter
|
||||
./setup-ubuntu.sh
|
||||
./run.sh
|
||||
```
|
||||
|
||||
`setup-ubuntu.sh`, gereken Ubuntu paketlerini `apt` ile kurar, Release build olusturur,
|
||||
testleri calistirir ve kullaniciyi seri port erisimi icin `dialout` grubuna ekler.
|
||||
Kurulum sirasinda `sudo` parolasi istenebilir.
|
||||
|
||||
Depo ZIP olarak indirildiyse de klasore girdikten sonra ayni iki betik calistirilabilir.
|
||||
|
||||
## Elle derleme
|
||||
|
||||
Gerekli paketler:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install build-essential cmake qt6-base-dev zlib1g-dev
|
||||
```
|
||||
|
||||
Derleme ve test:
|
||||
|
||||
```bash
|
||||
cmake -S . -B build
|
||||
cmake --build build
|
||||
ctest --test-dir build --output-on-failure
|
||||
```
|
||||
|
||||
Run:
|
||||
|
||||
```bash
|
||||
./run.sh
|
||||
```
|
||||
|
||||
Uygulama Qt tabanli bir masaustu arayuzudur; grafik oturumu olan bir Ubuntu makinede
|
||||
calistirilmalidir. Harita karolari ve guncel RINEX verisi icin internet erisimi gerekir,
|
||||
ancak son gecerli RINEX verisi ve harita onbellegiyle cevrimdisi kullanim da desteklenir.
|
||||
|
||||
The port selector lists only detected `/dev/ttyUSB*` devices. The default selection is
|
||||
`/dev/ttyUSB2` and the default baud rate is `115200`.
|
||||
|
||||
If the port cannot be opened, make sure the user has serial access:
|
||||
|
||||
```bash
|
||||
sudo usermod -a -G dialout "$USER"
|
||||
```
|
||||
|
||||
Log out and back in after changing group membership.
|
||||
|
||||
If the user is already listed in the `dialout` group but the current shell has not picked it
|
||||
up yet, `./run.sh` starts the GUI through `sg dialout` so it can access `/dev/ttyUSB2`
|
||||
without logging out.
|
||||
|
||||
## Notes
|
||||
|
||||
- The map uses OpenStreetMap tiles through Qt Network. If there is no internet connection,
|
||||
points are still drawn over a fallback grid.
|
||||
- The `3B Dunya · Uydular` tab appears beside the map. It uses broadcast ephemeris values
|
||||
from BKG's near-real-time `BRDC00WRD_S` RINEX file to propagate GPS satellites in ECEF.
|
||||
PRNs parsed from the current navigation solve are green; other RINEX satellites are red.
|
||||
Drag to rotate the globe and use the mouse wheel to zoom.
|
||||
- The globe includes a shaded continent layer and a receiver-centred translucent visibility
|
||||
cone. `Min. elevation` accepts a directly typed decimal value from 0 to 90 degrees
|
||||
(10 degrees by default, press Enter after typing);
|
||||
satellites inside the mask get a cyan sight line and halo. Incoming positions update the
|
||||
receiver marker without resetting a globe orientation chosen by dragging.
|
||||
- RINEX download starts at every launch, repeats every 15 minutes, and falls back through the
|
||||
previous two UTC days if today's stream file is unavailable. Current and next-minute satellite
|
||||
positions are propagated from the cached ephemeris, then smoothly interpolated at 30 FPS.
|
||||
- The globe uses an embedded Natural Earth coastline mask with terrain-like land colouring,
|
||||
shallow-water edges, atmospheric shading, and a cached Earth-fixed texture for smooth rotation.
|
||||
- The main content width and the right-side dashboard/UART height are both adjustable by
|
||||
dragging their splitter handles. Dashboard cards scroll independently so the UART log can
|
||||
be enlarged substantially.
|
||||
- `Max` controls how many recent points stay visible and are included in location
|
||||
analysis. The default is 10. When the limit is reached, older points are removed
|
||||
automatically.
|
||||
- Location analysis shows the average of the plotted samples, the last point's deviation
|
||||
from that average, mean deviation, RMS scatter, and max deviation in meters. The average
|
||||
marker can be toggled on the map.
|
||||
- The map layers panel can hide all telemetry overlays, show only the newest location instead
|
||||
of the recent path, and independently toggle the average marker.
|
||||
- The application calculates empirical CEP50 as the median horizontal distance of the retained
|
||||
measurements from their spherical mean, then draws the circle around that measurement center.
|
||||
This is the radius containing 50 percent of the retained position fixes and is independent of
|
||||
the optional user reference.
|
||||
- A user reference can be selected by right-clicking the map. The selected WGS84 coordinates
|
||||
are transferred to the reference fields with 15 decimal places but do not alter CEP50.
|
||||
- Latitude and longitude tokens are preserved exactly as received for the table and map
|
||||
label. Calculations and map projection use IEEE 754 `double` precision.
|
||||
- The OpenStreetMap Standard raster layer supports zoom levels through 19. At latitude 40.8,
|
||||
zoom 19 is approximately 0.23 meters per pixel; the marker still uses subpixel coordinates,
|
||||
but the background tiles cannot add accuracy to the GNSS measurement.
|
||||
- OpenStreetMap attribution is shown on the map. Tile responses use a 100 MB persistent HTTP
|
||||
cache in the application's standard cache directory.
|
||||
- UART log and telemetry views are refreshed in batches so a high-rate serial stream does not
|
||||
rebuild the complete interface for every received line. The locations table uses a virtual
|
||||
model and remains usable with a high `Max` value.
|
||||
- If no new plotted location arrives for 10 seconds while listening, current location
|
||||
points and analysis values are cleared.
|
||||
Reference in New Issue
Block a user