Announcement

Collapse
No announcement yet.

Manual decoding of port 20003 data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Manual decoding of port 20003 data

    Hi.

    I'm trying to understand the raw data coming out of TCP port 30002. The format looks like:

    Code:
    @0090D9428B305D4CA2C997A296;\n
    when I grab it with a very simple Python script. I can't see how to decode something which starts 00.

    This
    Code:
    0090D9428B305D4CA2C997A296
    set of hex pairs is only 13 bytes (104 bits) and starts in a dissimilar fashion to the expected message of the form:

    Code:
    8D4840D6202CC371C32CE0576098
    (14 bytes = 112 bits).

    I had a look at an elderly post: https://forum.flightradar24.com/foru...aw-data-format but the two links provided there are out of date, although the poster seems to be seeing similar numbers to me.

    What am I missing, please in my reading about the data format? Or what do I need to be Googling?

    Thanks,

  • #2
    I don't believe anything does. They're ignored unless 112



    Much easier to read pre decoded stuff. 30003.
    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

    Comment


    • #3
      Ah. That looks like what I expected the port 30002 data to look like. I've been poking the wrong port. Thank you.

      Comment


      • #4
        I'm afraid the The format of data I see on port 30003 is:
        Code:
        MSG,5,333,133,89630E,233,2023/04/20,22:57:02.506,2023/04/20,22:57:02.506,,35000,,,,,,,0,,0,0
        ...different again from the data in the link above.
        Are all my port numbers mixed up?

        Comment


        • #5
          30002 = raw binary
          30003 = decoded messages from above.

          Everything is there.

          Most people use the decoded data and extract what is needed while other software feeders make use of the raw and do it server side.

          Decoded tells you if it is an airborne message, ground, location etc based on the MSG type and following comma delimited data.

          Feel free to post/discuss suggestions here http://forum.flightradar24.com/threa...4840#post74840 (http://forum.flightradar24.com/threads/9875-Info-Updates-Ammendments-Placeholder?p=74840#post74840) This guide is not to be taken as officially sourced support information. It is contributor-made Information has been repeated many


          The question possibly shouldn't be, why/how can I interpret the data from these ports and how to make sense of it (kind of wheel reinventing)

          But rather, what are you hoping to do with it and achieve reading those ports?



          Theres already tools that read the decoded data and write to databases and I use one of those to come up with daily logging in sql with php queries.

          And many of the online video streamers with Active airport aircraft data do the same.
          Posts not to be taken as official support representation - Just a helpful uploader who tinkers

          Comment


          • #6
            The goal would be a script to isolate flights within about 3 or 4 miles and republish them as MQTT packets that I can have on a Home Assistant screen. It's a party piece: "Ah, yes, that plane's on its way to Fuertaventura..." Ooooh, how do you know?" "Ah, well, let me bore you to death with the details."

            I have the port 30003 data read now. I believe the format is called "SBS-1."

            Comment


            • #7
              Correct. And if they are the right msg type (MSG3), they come with the gps details in the string. Extrapolation by means of comma separation and you get them.

              Capture to json or sql, run a query against it periodically with distance calc from your known gps position and you get a circle distance in whatever distance you want

              I Do this currently with a java dumper, that i then query on with mysql. Will provide example later.
              ​​​​​​

              Posts not to be taken as official support representation - Just a helpful uploader who tinkers

              Comment


              • #8
                That's encouraging. I have the CSV dumping in Python. I'm hoping that with a small radius, the 2D cartesian calculations for distance from GZ work adequately.

                Slight aside: I flicked past a post recently which indicated that something which folks want to do as soon as they install FR24 is to use their SDR for other frequencies. You might have guessed I have an IoT thing going on, so am also interested in 433MHz but without upsetting my 1090MHz receiver. Do you know the post I'm rambling about or do you have a pointer, please?

                Comment


                • #9
                  This is a function that's does magic, written by Coupe here.

                  Setting pi, plot a circle and using set location. Expanding it to match the received location for size

                  I do geodist(long/lat) of the captured gps data and it calcs how far in NM from x/y.

                  FUNCTION `GeoDist`(lat2 FLOAT, lon2 FLOAT
                  ) RETURNS float
                  BEGIN
                  DECLARE pi, q1, q2, q3 FLOAT;
                  DECLARE rads FLOAT DEFAULT 0;
                  SET pi = PI();
                  SET lat2 = lat2 * pi / 180;
                  SET lon2 = lon2 * pi / 180;
                  SET q1 = COS(yyy.yyyy * pi / 180-lon2);
                  SET q2 = COS(-xx.xxxx * pi / 180-lat2);
                  SET q3 = COS(-xx.xxxx * pi / 180+lat2);
                  SET rads = ACOS( 0.5*((1.0+q1)*q2 - (1.0-q1)*q3) );
                  RETURN 3443.9307 * rads;
                  END
                  Posts not to be taken as official support representation - Just a helpful uploader who tinkers

                  Comment


                  • #10
                    Nope. But you need multiple sticks for different frequencies and set them with different SNs.
                    Posts not to be taken as official support representation - Just a helpful uploader who tinkers

                    Comment


                    • #11
                      I would normally bow to your knowledge, so forgive the interrogation, but is the (typical SDR) ability to receive multiple frequencies simply beyond the capability of these little sticks or is it a software limitation? Thanks

                      Comment


                      • #12
                        You're using software to toggle the chip frequency. 1090/adsb is essentially real-time 2 packet/sec/plane

                        Switching to another and hoping it gets good data switching back n forth is pushing it. So dedication to adsb is better on its own and a 2nd used for scanning or other frequency

                        1090 apps like to self tune to a fixed frequency. Sdr sharp or rtl_sdr can work with rtl_fm for everything else and scan multiple channels
                        Posts not to be taken as official support representation - Just a helpful uploader who tinkers

                        Comment

                        Working...
                        X