Make aircraft trail handling more consistent and the code hopefully
easier to understand.
Fix position comparison (comparing array references does not work).
When initially loading the SkyView webpage, there are sometimes gaps in
the aircraft trails when the trail transitions from estimated/dotted to
known/solid track.
Fix elastic band style to handle estimated segments properly.
Right now all of these commands are in plaintext in a single line. Splitting them in a code block makes it more readable and easier to copy and paste directly into a terminal.
Rescale penalties so badly inconsistent messages will tend to get
the same penalty in all formats, so the ambiguity check kicks in.
With this final change the HEADING_SPEED and TRACK_TURN message rates
are almost identical, which is what we'd expect to see if the
interrogator is asking for both at about the same rate.
Before:
567 AMBIGUOUS
7445 GICB_CAPS
19173 EMPTY_RESPONSE
75252 UNKNOWN
76469 AIRCRAFT_IDENT
127603 ACAS_RA
212654 HEADING_SPEED
223068 DATALINK_CAPS
229807 TRACK_TURN
269267 VERTICAL_INTENT
466 "suspicious"
After:
7445 GICB_CAPS
17432 AMBIGUOUS
19173 EMPTY_RESPONSE
75252 UNKNOWN
76469 AIRCRAFT_IDENT
127603 ACAS_RA
212718 HEADING_SPEED
212878 TRACK_TURN
223068 DATALINK_CAPS
269267 VERTICAL_INTENT
328 "suspicious"
If the \n termination of TSV messages is missing, faup1090 encounters
the following error:
Caught background error: list must have an even number of elements
while executing
"array set row [split $line "\t"]"
(object "::faup1090" method "::FaupConnection::data_available" body line 28)
This missing termination with \n can happen when p == end is true in the
overrun check. vsnprintf will always terminate the string with \0, so if
the vsnprintf is called to write the to the last position in the buffer
(end-1), it will write \0 instead to terminate the string as not to
overflow the buffer.
To catch that possibility the overrun check is changed to p < end as
then vsnprintf is assured to have had enough room to write the \0
termination to end-1.
Due to commit 45886edc40
faup1090: write _v on every line, bump TSV_VERSION
and maybe other changes the TSV packets are bigger and some users have
reported the following error:
piaware[9040]: faup1090(27427): fatsv: output too large (max 600, overran by 20)
Fix this error by increasing TSV_MAX_PACKET_SIZE to 800