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
|
|
@ -155,6 +155,26 @@ type Aircraft struct {
|
|||
SelectedAltitude int // MCP/FCU selected altitude in feet
|
||||
SelectedHeading float64 // MCP/FCU selected heading in degrees
|
||||
BaroSetting float64 // Barometric pressure setting (QNH) in millibars
|
||||
|
||||
// Additional fields from VRS JSON and extended sources
|
||||
Registration string // Aircraft registration (e.g., "N12345")
|
||||
AircraftType string // Aircraft type (e.g., "B738")
|
||||
Operator string // Airline or operator name
|
||||
|
||||
// Validity flags for optional fields (used by VRS and other sources)
|
||||
CallsignValid bool // Whether callsign is valid
|
||||
PositionValid bool // Whether position is valid
|
||||
AltitudeValid bool // Whether altitude is valid
|
||||
GeomAltitudeValid bool // Whether geometric altitude is valid
|
||||
GroundSpeedValid bool // Whether ground speed is valid
|
||||
TrackValid bool // Whether track is valid
|
||||
VerticalRateValid bool // Whether vertical rate is valid
|
||||
SquawkValid bool // Whether squawk code is valid
|
||||
OnGroundValid bool // Whether on-ground status is valid
|
||||
|
||||
// Position source indicators
|
||||
PositionMLAT bool // Position derived from MLAT
|
||||
PositionTISB bool // Position from TIS-B
|
||||
}
|
||||
|
||||
// Decoder handles Mode S and ADS-B message decoding with CPR position resolution.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue