Open Teddyz opened 4 years ago
I misunderstood the depreciated thing:
Deprecated since version 3.8, will be removed in version 3.10: The loop parameter.
I found that I had to change line 198 in message.py from
microsecond = int(int(F) * 1e3)
to
microsecond = int(int(F[:3]) * 1e3)
because sometimes Windows manages to include a fourth decimal.
Do you have a copy of the raw SBS message that caused this issue?
I think it would get stuck on the third line of this example:
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:15.860,2020/07/13,03:39:15.876,,38000,,,,,,,0,,0,0
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:15.964,2020/07/13,03:39:15.974,,38000,,,,,,,0,,0,0
MSG,6,111,11111,394A04,111111,2020/07/13,03:39:15.3405,2020/07/13,03:39:15.993,,,,,,,,3511,0,0,0,0
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:16.097,2020/07/13,03:39:16.104,,38000,,,,,,,0,,0,0
MSG,4,111,11111,394A04,111111,2020/07/13,03:39:16.146,2020/07/13,03:39:16.164,,,479,221,,,-64,,,,,0
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:16.176,2020/07/13,03:39:16.184,AFR267 ,38000,,,,,,,0,,0,0
MSG,3,111,11111,394A04,111111,2020/07/13,03:39:16.329,2020/07/13,03:39:16.349,,38000,,,57.62976,12.77232,,,,,,0
MSG,8,111,11111,394A04,111111,2020/07/13,03:39:16.330,2020/07/13,03:39:16.350,,,,,,,,,,,,0
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:16.498,2020/07/13,03:39:16.503,,38000,,,,,,,0,,0,0
MSG,5,111,11111,394A04,111111,2020/07/13,03:39:16.500,2020/07/13,03:39:16.503,,38000,,,,,,,0,,0,0
Hmm, I'm not sure I've ever encountered that in my testing. I'm running on a Raspberry Pi.
Something like microsecond = int(F.ljust(6, '0'))
is probably better so as to retain the value without truncation.
I will test if that works. Doing it right now, but no planes in the air at the moment. Can be because it is 4 am.
My receiver is a SDR Play. They have a modified version of dump1090 that works with this radio. I am running it on Windows.
I got a the problem that python complains about missing microseconds. I think this happens if a packet arrives at a whole second. Great if you can tell me how to fix or hide this.
While learning how asyncio works, I see in the documentation that many parts are depreciated from Python v3.8, for example sleep. Probably not a problem in a while.
Thanks!
Line numbers might not be exactly as in origninal code because I added a few print()-rows