Skip to main content
GNSS HAT Library Documentation
Shop GitHub Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Config from JSON

Load GNSS configuration from a JSON file instead of hardcoding it.

Source: examples/python/config_from_json.py, examples/python/res/

Usage

python3 examples/python/config_from_json.py res/config.json
python3 examples/python/config_from_json.py res/config_no_geofencing.json
python3 examples/python/config_from_json.py res/config_no_timepulse.json
python3 examples/python/config_from_json.py res/config_rtk_base.json
python3 examples/python/config_from_json.py res/config_rtk_rover.json
python3 examples/python/config_from_json.py res/config_timing.json

Enum fields (dynamic_model, mode, base_mode, position_type, polarity) accept either the numeric value or the string member name, e.g. "dynamic_model": "STATIONARY".

Why

  • Deployment — ship different configs for different HATs / environments
  • Testing — quickly switch between configurations without recompiling
  • Remote management — update config via file transfer