-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dump1090 improvements. Overhauled traffic parsing. UAT groundspeed and air/ground status bug fixes. #285
Conversation
Is #241 addressed in this update? |
@peepsnet -- it should be. The "Last_seen" variable will be set only when a valid position fix is parsed; it is currently set on any valid speed, altitude, etc. message. After six seconds, we stop sending invalid fix targets; after 60 seconds they're removed from the database entirely. |
Some of the "to-do" items listed above have been incorporated into a new development branch. I'll pull these over into new_dump1090 (and therefore this PR) once I get a little testing. Improvements:
Towers page refreshes more quickly, and shows current, average, and peak power (dB) levels. (Old traffic page shows strength as sum of amplitude.) ADS-B targets are dark blue / dark tan with airplane icons. ADS-R targets are also airplane icons, but with lighter colors to show that they're relayed by ground transmitters. TIS-B targets shown the same colors, and replacing the airplane with a satellite dish. |
All very cool! I gotta run to meet someone at the airport. So I don't have the time right now to look at your changes. Quick question: Is the 0 to -48 dB hard coded? Or does it pivot off of tgain? I ask because I lowered the gain of my SDR's yesterday by 6 dB (to 420) and am liking what I see in flight. (Anecdotally, the SDR's seem to work better.) I'm not asking for you to accommodate outliers. Am just wondering if anything will break when some users tweak tgain from its default? (I can live with signal strength being incorrect in my case.) |
How does a meer mortal go about pulling this into their build? |
@Axtel4 -- If you just want to make a build for testing, it would be cleanest to clone it into a new project.
This creates a new folder ("stratux-avsquirrel") and pulls a copy of my master branch. One you have a local copy of my repo, you'll need to run If you run the following commands once you're in "stratux-avsquirrel", it will checkout, make, and install the most recent commit version of my "new_dump1090-mutability" branch.
Or, if you want to make a specific commit, you can use that instead of the branch name.
|
@Ergonomicmike -- the -48 to 0 dB is based on the signal level seen by the ADC stage in the radios. If they go full scale, you'll see ~0 dB, regardless of what you're doing with gain or preamplifiers. If they don't saturate, they'll be somewhat under 0 dB. Our SDRs report the i and q components of the signal. These are both 8-bit signed integers, so each component is ±127.5 units of raw amplitude at 1-unit resolution. This makes the smallest detectable value = 0.5. Since dB of amplitude = 20 * log(a/a_ref), 20 * log(127.5/0.5) = 48.1 dB. We see the same number if I carry through the power calculations. For each sample, amplitude of the signal is sqrt(i^2 + q^2). In dump978, this is scaled by a factor of 8 to make full-scale = 1000 units, and then this averaged across all of the samples in a single UAT message. (That's the raw "ss=123" value you see in the uat.log files.) These are phase-modulated signals, so amplitude should remain constant and less than or equal to 1000 throughout the measurement cycle. (Mathematically, the magnitude could be as high as 1414 if the ADC saturates and Q & I both measure full-scale; in practice, I've noticed amplitudes of 1100-1200). Dump1090-mutability goes further: it squares the amplitude of each sample to determine power. The power values are then averaged over the message, then normalized such that max power = 1. Fractional power is then reported in the new dump1090 messages. In traffic.go, I take the fractional powers, and calculate dB = 20*log(power). So, to get the towers and UAT traffic to match what dump1090 is doing, I just have to rescale the max value from 1000 to 1. The code I committed last night converts to power first, but in retrospect, this isn't really needed for single samples if I'm reporting dB since by definition 10 * log(amplitude) == 20 * log(amplitude^2). |
@AvSquirrel . Thanks. I built the code this evening and I have been doing some testing. At 1090 the received power is between -35 and -25 dB. (I don't have enough UAT traffic here to do much testing.) I find it interesting is strongest signal is only -25 when the aircraft is in close proximity. When the targets drop below -35 dB they drop off the list. Note: I am still running close to full gain on the 1090 dongle. Inserting a 3 dB pad in the antenna line reduces the signal by approximately 3 dB. Which tells me I am not saturated and the scaling looks about right. I took a look at the ES log and wow there is a lot of good info in there now. But, I found out I don't want to let it run long as it gets huge when it is uncompressed (200+ MB for 30 minutes of data.) How does "SignalLevel:0.000844" correlated to the Signal Level on the traffic page? Is there a way to split these back out into their own columns without the colons? It adds a bunch to extra steps to remove the : before processing the data in Excel for analysis.
Also, can the ICAO address be converted back to Hex instead of being presented in decimal?
|
@AvSquirrel Following up on:
Reading above I see where you wrote,
So if the fractional power is 0.000844 then dB would be:
But I didn't see any values that low on the traffic page. Edit: |
Dump1090 improvements. Overhauled traffic parsing. UAT groundspeed and air/ground status bug fixes.
I drove by it local tower this morning. Within a eighth mile the tower signal peaked at +1.46 dB. The lowest signal I saw was -29.7 dB. At -29.7 dB the Tower page would stop updating then it would go blank. I thought maybe I would see more than a 30 dB delta in the received signal strength since the Dynamic Range of the dongles are around 48 dB. |
@Axtel4 -- Dump978 reports normalized average amplitude (voltage) for the message, and dump1090-mutability reports normalized average power. Conversions that take into account the scaling factor between the two are therefore:
As you seem to have found, the conversion to dB takes this into account: dB_p = 10_log(power), but dB_v = 20_log(voltage). So, using dump978 amplitude of 50 as a reliable 978 MHz message reception threshold:
On 1090 traffic, I'm typically seeing position fixes starting at about -30 dB, and they're reliable at and above -25 dB. UAT amplitudes of 50 also corresponds nicely to this -25 dB threshold. Altitude messages are shorter, and I'll see them down to about -35 dB.
Keep in mind that 18 dB is only three doublings of signal strength above the detection floor. I'm still astounded what we can do with these little $20 radios. |
@AvSquirrel Thanks. That helps a lot. As you I am still amazed at the capabilities of these little dongles. This is the a plot of the tower signal strength I recorded this morning while driving into work. I mentioned this in the previous post. My reception starts about -30 dB and peaks around +1.4 dB. |
Add Stratux-specific branch of MalcolmRobb/dump1090 and overhaul the traffic.go parsing routines.
Dump1090 changes:
Stratux changes:
1090 ES parsing is completely overhauled to support the new dump1090 format. Additional ES parsing changes include:
-New TargetType flag will allow traffic source to be cleanly shown on UI traffic page (future commit)
978 UAT parsing improved to fix a couple of significant bugs:
Other 978 improvements include:
Refinements to GDL90 message packaging include:
Other changes include:
To-do items include: