Add a GNSS simulator for dev without gpsd running
bin/gnss_simulator.rb speaks gpsd's own JSON wire protocol directly on its default port -- GpsdClient connects to it exactly as it would to real gpsd, no app changes needed, and no gpsd install/daemon required either (unlike the existing fake-NMEA-source approach in docs/development.adoc, which still needs gpsd itself in front of it). Drives a loop around a center point at a driving-ish pace rather than sitting still, since a fixed position isn't much of a "GNSS position" to look at. Verified end to end: started it, pointed a dev server at it, and confirmed /api/gnss/position reports a moving fix across two polls.
This commit is contained in:
1 parent
4aafe332a7
commit
61ba86c6e6
3 files changed
+95
-4
No files matched your search
@@ -18,7 +18,7 @@ jobs:
|
||||
bundler-cache: true
|
||||
|
||||
- name: Ruby syntax check
|
||||
run: find app.rb config lib -name "*.rb" -print0 | xargs -0 -n1 ruby -c
|
||||
run: find app.rb config lib bin -name "*.rb" -print0 | xargs -0 -n1 ruby -c
|
||||
|
||||
- name: App loads without errors
|
||||
run: bundle exec ruby -e 'require_relative "app"'
|
||||
|
||||
Reference in new issue
Block a user