Socket Data and BST files
Users can look at the raw data being sent by the SBS unit by using a Telnet application to listen to port 30003.
The datastream looks like this:
Decoding this stream isn't difficult.
are six message types - MSG, SEL, ID, AIR, STA, CLK. Most data from aircraft
is contained in the MSG lines whilst the other types are triggered by
user input or system settings. The MSG data was inhibited with a five
minute delay in BaseStation versions prior to 18.104.22.168 but from this
version onwards is in real time.
Transmission messages (MSG) from aircraft may be one of eight types:
Each of the above message types may contain up to 22 data fields separated by commas. These fields are:
Notes (Courtesy of Edgy):
The socket data outputs a -1 for true, and a 0 for false. Neither means it is not used.
Field 11 (Callsign) is an 8 character (6 bit ASCII subset) field. In BaseStation a NULL is shown as a '@' which is ASCII for NULL. In the cockpit it is just a space on the transponder window, but is sent as a NULL. Therefore, if a crew enter eight spaces in the cockpit this will show in BaseStation as @@@@@@@@.
Field 12 (Altitude) can be 25ft or 100 foot resolution. Mode-C is 100 ft, but many aircraft today send out 25 ft resolution to be able to fly in Europe IFR (RVSM) space. BaseStation only displays Barometer altitude but in the data are HAE (height above ellipsoid), which is sent as the difference between GPS altitude and barometric altitude.
Each message type contains different field content. In the table below green represents the fields that are sent and grey shows fields for which null data is transmitted. MSG signals contain up to 22 fields and other message types contain up to 10 fields.
1. STA message uses the callsign field to record status flags based on user time-out values. Values are PL (Position Lost), SL (Signal Lost), RM (Remove), AD (Delete) and OK (used to reset time-outs if aircraft returns into cover).
2. CLK message returns a value of -1 in Fields 4 and 6. Field 5 is null.
3. MSG,7 (Air to Air message) has only recently been included in the socket output.
4. Although aircraft now transmit Heading and True Airspeed these values are not available in the socket output.
Examples of each message:
It can be seen that no single MSG type provides all the data we use in BaseStation and that some data fields are unique to one message type. Callsign is only found in MSG,1, VertRate only in MSG,4 and Squawk in MSG,6.
To collect all 11 data fields for one aircraft would require the reception of at least four MSG types (MSG,1, MSG,3, MSG,4 and MSG,6) but note that MSG,6 is only triggered by ground radar interrogation. If the aircraft is outside any ground radar coverage no MSG,6 will be sent. As MSG,6 is the only message that sends out the squawk code it means this will only be displayed for SBS users who are detecting aircraft within Mode S ground radar coverage.
Likewise MSG,5 and MSG,8 are only sent on interrogation but the data in these types is available in other messages.
MSG,5 and MSG,6 are not CRC secured and will only be received should an aircraft have already sent a MSG,1, 2, 3, 4 or 8.
If Field 22 (IsOnGround) is being sent this will trigger a change of values in Field 12 (Altitude) and in Fields 15 and 16 (Latitude and Longitude). Field 12 (Altitude) will reset to zero and whilst the aircraft remains on the ground no altitude data will be sent.
The Compact Position Report in ADS-B sends Lat/Long data in 17 bits and when airborne this gives accuracy to 5.1 metres. 17 bits equates to four decimal places for Lat/Long values - e.g N54.1234, W145.1234. For ground operations greater positional accuracy is required and so Lat/Long values are extended to five decimal places - e.g. N54.12345, W145.12345 - which gives an accuracy of 1.25 metres.
To accommodate this accuracy into a 17 bit string some data is dropped - the full Lat/Long position data is no longer sent. In BaseStation the missing data needs to be added by the user and this is why Lat/Long values are only interpreted correctly if a location is set in the BaseStation Location Manager. For most users adding a home location in the Location Manager is sufficient but mobile users need to add further locations for the airfields they may be visiting abroad. By abroad I mean intercontinental as BaseStation now plots ground traffic correctly to within approx 2500nm of the set location (it formerly was only 90nm).
The socket data always shows Lat/Long data to five decimal places and can provide full 1.25 metre accuracy where this is sent.
My thanks go to Andy (Three Miles), Dave Reid and Steve (Edgy) who have posted much information on the Kinetic forum about socket data format. Without their research this page wouldn't exist.
Basestation has the an option to record data. This is not raw socket data as described above but processed data for the Basestation display.
Unlike raw data, each string in the BST files shows 17 data field values. All are populated, using last known values for each string until a socket MSG updates any values.
The recorded datastream looks like this:
The BST file contains 17 data fields separated by commas. These fields are: