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:
Ole-Morten Duesund 2025-08-31 11:02:27 +02:00
commit 073acb7304
10 changed files with 903 additions and 40 deletions

29
vrs-test-config.json Normal file
View file

@ -0,0 +1,29 @@
{
"server": {
"host": "",
"port": 8080
},
"sources": [
{
"id": "svovel-vrs",
"name": "Svovel VRS JSON",
"host": "svovel",
"port": 33005,
"format": "vrs",
"latitude": 60.0,
"longitude": 10.0,
"altitude": 100.0,
"enabled": true
}
],
"settings": {
"history_limit": 500,
"stale_timeout": 60,
"update_rate": 1
},
"origin": {
"latitude": 60.0,
"longitude": 10.0,
"name": "Oslo Area"
}
}