INITIAL
This commit is contained in:
@@ -1,3 +1,29 @@
|
||||
# macker
|
||||
# Macker
|
||||
|
||||
Matrix-integrated car tracker
|
||||
Two processes: the client reads GPS fixes from gpsd in the car, and the VPS server receives them and serves a live location page. Requires Go 1.27 and a running gpsd on the car.
|
||||
|
||||
From this repository on the VPS:
|
||||
|
||||
```sh
|
||||
go build -o /tmp/macker-server ./server
|
||||
/tmp/macker-server -ingest :2948 -http :8080
|
||||
```
|
||||
|
||||
On the car, from this repository:
|
||||
|
||||
```sh
|
||||
go build -o /tmp/macker-client ./client
|
||||
/tmp/macker-client -addr YOUR_VPS_HOST -port 2948 -interval 5s -batch 25
|
||||
```
|
||||
|
||||
Open `http://YOUR_VPS_HOST:8080`. Allow the car to reach TCP port 2948 and the browser to reach the web port. For operation across the public internet, use a private tunnel (such as WireGuard) between car and VPS and bind `-ingest` to the VPS tunnel address. Put the web listener behind an HTTPS reverse proxy with authentication if the location should be private. The application's TCP ingestion and web endpoints have no built-in authentication or encryption.
|
||||
|
||||
The browser polls every two seconds. Speed comes from gpsd in metres per second and is shown in mph and km/h. The current gpsd dependency represents omitted speed as zero, so a GPS report without speed can appear stationary. Reports without a position fix are ignored. “Last update” uses the GPS fix time, falling back to server receipt time when absent. After 30 seconds, the page marks the fix stale and hides current speed. Delayed timestamped fixes cannot replace newer fixes.
|
||||
|
||||
The server retains only the latest fix in memory; a restart clears it. There is no route history or durable client queue. The existing gob-wrapped JSON wire format is retained; both binaries should be rebuilt for speed support. Browser access to unpkg.com and tile.openstreetmap.org is required for the map. Map integration follows the [Leaflet quick start](https://leafletjs.com/examples/quick-start/); OpenStreetMap attribution is included.
|
||||
|
||||
Checks:
|
||||
|
||||
```sh
|
||||
go test -race ./client/... ./server/... ./datapoint/...
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user