Add VRS JSON format support for readsb integration
Added comprehensive support for VRS (Virtual Radar Server) JSON format
as a simpler alternative to Beast binary protocol, enabling integration
with readsb --net-vrs-port output.
## Key Features:
- **VRS JSON Parser**: Stream parsing of newline-delimited JSON aircraft data
- **VRS Client**: TCP client with automatic reconnection and error recovery
- **Mixed Format Support**: Use Beast and VRS sources simultaneously
- **Enhanced Aircraft Data**: Added VRS-specific fields (registration, type, operator)
- **Position Source Tracking**: Identifies ADS-B, MLAT, TIS-B, and satellite positions
## Implementation:
- `internal/vrs/parser.go`: VRS JSON message parsing and validation
- `internal/client/vrs.go`: VRS TCP client implementation
- Enhanced `MultiSourceClient` to support both Beast and VRS formats
- Extended `Aircraft` struct with validity flags and additional metadata
- Updated configuration to include `format` field ("beast" or "vrs")
## Testing:
- Successfully tested against svovel:33005 VRS JSON stream
- Verified aircraft data parsing and position tracking
- Confirmed mixed-format operation with existing Beast clients
## Documentation:
- Updated README.md with VRS format configuration examples
- Enhanced ARCHITECTURE.md with VRS parser documentation
- Added data format comparison and configuration guide
This enables simpler integration with modern readsb installations while
maintaining full backward compatibility with existing Beast deployments.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
3d92ce4481
commit
073acb7304
10 changed files with 903 additions and 40 deletions
|
|
@ -67,6 +67,7 @@ type Source struct {
|
|||
Name string `json:"name"` // Human-readable name
|
||||
Host string `json:"host"` // Hostname or IP address
|
||||
Port int `json:"port"` // TCP port number
|
||||
Format string `json:"format"` // Data format: "beast" or "vrs" (default: "beast")
|
||||
Latitude float64 `json:"latitude"` // Receiver location latitude
|
||||
Longitude float64 `json:"longitude"` // Receiver location longitude
|
||||
Altitude float64 `json:"altitude"` // Receiver altitude above sea level
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue