Decoding Meteor-M2: QPSK, Viterbi, Reed Solomon and JPEG
Friedt, Jean-Michel
A low cost, digital video broadcast-terrestrial (DVB-T) receiver is used to collect radiofrequency signals emitted from the low Earth orbiting Russian satellite Meteor-M2. The QPSK encoded signal is analyzed all the way from extracting bit values, to recovering the JPEG encoded image transmitted from the satellite. This investigation is an opportunity to experimentally assess all the layers of digital communication widely used from Deep Space communication to daily mobile phone communication, including Viterbi encoding, Reed Solomon error correction, and JPEG image display. Few members of the audience might have any interest in the details of Meteor M2 weather satellite transmissions. However, tackling the reception of this digital weather satellite opens the opportunity to address most if not all the layers of the OSI model, from the physical layer by collecting the radiofrequency signal using a cost-effective DVB-T receiver acting as a general purpose software defined radio signal source, to the data link layer with the various error correction schemes implemented to address the corruption introduced by the noisy radiofrequency communication channel (Viterbi, Reed Solomon) and the network layer with the frame encoding including telemetry and, of course, the payload as a digital picture. The latter is encoded in JPEG format, adding more abstractions with the lossy compression to be reverted to display greyscale images representative of the atmosphere and ground reflectivity in the various wavelengths monitored by Meteor M2. This decoding path matches most recent space-borne signal transmissions, as documented by the Consultative Committee for Space Data Systems (CCSDS), and despite extensive documentation available online, a practical demonstration of the various decoding steps helps understanding the many documents over which the information is spread.
 Okay, thank you for being here for last talk. So this last talk would be about decoding meter M2. So what I would like to emphasize is I assume that most people in this room don't care at all about meter M2. The topic here I would like to address is to use meter M2 as the reason for addressing all these fascinating topics. I should emphasize I'm trying to be a physicist. I've never been taught about any of these things here. So I discovered everything by myself. I found it very fascinating to be discovering all these single processing techniques that you find in the various documentation about digital communication. I want to show you how getting from the raw data QPSK all the way to a JPEG image as you can see here will be addressing this talk. So Martin did not care to give you a talk with two semesters of single processing in 20 minutes. I do. So also I should emphasize if you just want to get the image you can go out of room because this meter decoder is doing a much better job at what I'm going to show you. This is working very well. I want to go step by step into what is going here. So really for me the topic is understanding all these things not using readily available software. So that's that's that's a topic of talk. So I'm lucky enough to be going every twice every week twice every year in Arctic regions for glacier monitoring. And so I'm lucky enough to be following all these polar orbiting satellites or low earth orbiting weather satellites including amongst the various little satellites. The one from Russian meteor. So why are Arctic regions most favorable for this kind of monitoring when you have a solar synchronous satellites. There will be in the polar orbit ninety eight degree. So ninety degree would be right over the North Pole. And one of these polar orbiting satellites here I've plotted the trajectory over one day. You see that when you're in Western Europe here is the so in France the green circle is the place you would be if you wanted to see the satellite horizon. This is at an altitude of elevation of 15 degree. This is at elevation of 60 degree below which I don't even bother to take my antenna out in France. You will get at most one pass every day of one of these polar orbiting satellites. While when you go to an Arctic region where you've got all these passes. So it's fascinating because when you're learning to decode a new satellite here you have like 10 10 12 passes per day while here you have one at best. So I'm investigating matter in this context and also using the little RTL is the R receivers because of course when you go there you're not supposed to take a big bag with full of hardware that's not related to your research. So here I can just put one of the little receivers at the bottom of my backpack just find any two wires to make a dipole antenna once you arrive there and you have your your setup for receiving. Meta Ram 2 so I'm sure many of you here in the room have already listened to a no way so the new a satellite are dying breed because no way is no longer renewing their constellation of analog satellites. They started in the 70s now they are at no way 19. I think it was going to go up to 21 and then we'll stop the new way. So now we have to think about the future and the future is digital communication. So digital communication is what is provided by CCSDS. So because the last speaker could not say it is the consultative committee for space data systems. And this is basically a body trying to standardize this communication. So that's a bit of a layout of what I want to talk. So when Bastion was showing you I have my JPEG picture when I have TCP IP when I have TCP and I have IP you've got all your OZ layers. And of course when you want to decode the JPEG image on Firefox where you've got all these libraries for you. And for me the exploration here was I collect this QPSK data at the output of new radio at the running the RTL-SDR data stream. And then how do you go from this QPSK all the way to the JPEG image. So for me it's a little bit like if you were trying to listen to a JPEG image being transmitted in HTML with just no oscilloscope connected to your internet cables. And for me it's an adventure to try to get all the layers one after the other. So of course in this talk I don't claim to be going in detail. I would like to show you the outline. The slides will be available on the website. And I hope it will make you curious about getting into all this story. Now you might be wondering people have been working happily with NOAA. So why even bother with such a complex networking. So this is a talk I saw when I was at Huntsville at the Marshall Space Center from Dave Israel at the YZ conference where he was showing you've got the International Space Station. The International Space Station is flying at 400 kilometer altitude and is visible if you remember my little circles on a radius of 1,500 kilometers. So this means you would need to put one station every 1500 kilometers along the path. So this is what the Americans did for Jimmy and I in Mercury. They had one ship or one station every 1500 kilometers. But that's no problem because they only did one or two orbit. So you just needed to put a few stations along the orbit. ISS is rotating all over the Earth. Of course you cannot put one station every 1500 kilometers all over the Earth. So what is happening now is ISS is completely automated. The astronauts are running the experiments but everything on the ISS is automated from ground stations. And the ISS is only visible from a radius of 1500 kilometers. So the ISS is not directly talking to the Earth but it's talking through the tracking and data relay system, the TDRS satellites, the geostationary satellites. So ISS 400 kilometers rotating quite quickly, talks to TDRS. TDRS are talking with each other and TDRS is sending signal back to Earth. Same is true for Hubble. Hubble Space Telescope is very expensive. You don't want to just run it as it is flying over your head. You want to continuously monitor Hubble Space Telescope measurements. And of course you don't think that the US Air Force cares much about the science in Hubble Space Telescope. But once you figure out that Hubble is just a spy satellite upside down, you might figure out why you have TDRS here in the space. So of course here you have multiple satellites with multiple experiments. So you need a way of packetizing your data. You need to say it's satellite number X which is sending data from instrument number Y. And how do you do this? Well, that's where you go from QPSK, which would be your Ethernet cable all the way to the JPEG image through all the layers of OZ layer. Okay, let's try to have fun with the OZ layers. So first of all we need to predict where a meteor is flying. I still use SATRAC, despite the Y2K bug which is still a patch and is not inserted. You can use WX2IMG in the paper. I explained to you how you can cheat WX2IMG which is no longer maintained into thinking that one of the NOAA satellites is actually Meteor M2 and so that you can... Meteor M2 is actually one of the NOAA satellites. So you can use WX2IMG and if you have internet access you can use the Heavens Above website. Again, the beautiful thing about being in Spiesbergen Arctic region 79°N is you've got all these passes at high elevations, which of course you don't get in the western European country. Lower latitude country you'll get one. Two passes at best. Okay, so we know when Meteor M2 is flying. So we take our RTLSDR. We collect the data. This is all stolen from the Airspy website for receiving Meteor M2. Rational resampler, you have your clocking. So you cost us loop which locks on the frequency offset between the carrier and the local oscillator, bit recovery and so that's a clock recovery. And at the end you got your soft bits. So already I needed to learn the first word when I was doing this. I didn't know what a soft bit is. So soft bit is IQ coefficients where you're in 1 and 0 are not yet saturated but are still represented here by an 8-bit value and you still need to identify whether it is most probably a 1 or a 0. So I didn't know what soft bit meant. So the first question is, are my data even worth investigating? So this is a spectrum unlike GPS. Now we have strong signals so you see there is something happening here. Is it a QPSK signal? Well, if we expand what Paul Boven taught us about GPS where BPSK is collapsed by squaring the signal, well of course if you take the nth power of an nPSK signal you collapse again the spectrum spreading due to the PSK modulation. So here we take our raw signal. Well, there is something but we don't know if it's the right modulation. We square it. It is not BPSK so we haven't collapsed the spectrum. We raise to the fourth power. It is QPSK because your spectrum spreading has collapsed in the carrier. So we can get a signal that are worth investigating further. It seems to be QPSK modulation. So once we've done this, we know it's a packetized system. Packetized system means something will be repeated. If we look at the documentation you will find that all CCSDS compliant communication start with a header. Well, if you have packets you need to know where the packet starts. And the packet start header is 1A CFFC1D. Try to remember this because I will keep on repeating this sentence all over the time. So at first I don't know what this packet is. I just want to know whether there is some repeated header in the signal. So as shown in the previous offer speaker, you just auto-correlate the signal. If there is some redundancy, this redundancy will show. So by auto-correlating my signal, well indeed I see a peak at 16 kilobyte. I see a signal at 32 kilobyte. So there is some redundancy. Every 16,000 samples I have some repetition. So it's definitely worth working further on this data. So the first thing that got me stuck because, again, I'm a physicist. I haven't been taught about signal digital communication was convolutional encoding. So that's the topic of Martin's talk this morning. I'm just going a slightly bit further into it because I want to show you how it's decoded. I don't want to get into the encoding part. The encoding actually is very simple because they show you on various documentation as an X-OR. So as was shown by Martin this morning, you just take your data stream and take convolution. So you try to mix all this data to create as much randomness as you can. So it's one of these bits is corrupted. You have a lot of chance because you've spread the information of a long duration to recover this information. So here it's a seven bit long shifter. You have tabs from which you XOR and you get twice as many bits on the output as you had on the input. So this shift here will clock up, down, up, down and sometimes take the output with one polynomial and on the other. So if you do this, you can also express this as a matrix where time is evolving over the X-axis and you jump. First coefficient, second coefficient, first coefficients of first polynomial, first coefficient of second polynomial, second coefficients of first polynomial and so on. So you have your polynomial which are interleaved and you just shift time. So that's another way of implementing your convolution encoding. And the last way of saying it is you can do this as a state machine. So you take the various states of your polynomial here. You input a new bit into your system and by inputting a new bit in your system, your shift register changes. So if you had zero and you inject a zero, you stay at zero and your output, you run the XOR on this OV zero, you get an output. If you inject a one, well, your zero goes to the last zero drops, the one comes here and you run this for the XOR, you get one one. So you can make this as a state machine. So once you've discovered the state machine expression, you can write this as the evolution of between the various states. So previously I had given names A, B, C, D to my various states and then you can draw the state machine. So A stays in A, A goes to B if you have a one. So these are the input bits. A is fed or zero, it stays at A. A, when it is fed zero, will output zero zero. A, when it is fed zero, where A, when it is fed one will output one one and so on. So you can draw your state machine. So encoding is very efficient, very easy. It's just XOR. Now the reason I wanted to show you this is if you take the same description that we had here, but now you take it to decode. That's a 30 second description of a Viterbian decoding algorithm. In 30 seconds, what you have here is let's imagine I have received this bit stream. So this is what I have received. So I split what I have received into zero zero zero zero zero zero and so on. And what you see here, I start with zero zero. Okay, I get zero zero. That is most probably state A with a zero output. Zero zero, state A zero zero. Zero zero, state A zero zero. So these three zeros are just A looping into the zero zero. Now we get one one. One one is a feasible output of state A that gets us into state B. So we go into state B. When you're in state B, we get one one. That's not possible. We cannot get a one one out of state B. We can get one zero zero one. Well, the moment we don't know what's the best option. So let's follow the two possible path. We know it's wrong, but let's follow the two possible path. After that, we got zero one. So we could be here C, but C cannot have zero one. It can be only one one or zero zero. So C would create two errors. That's the wrong path. So we cut it out and Viterbian tells you let's not follow this one. Now we go into this path here because zero one is a valid output of D that would be considered as a zero. And then you go on and you follow your path. So if I add the output bits here, you have the number in red of errors. Two errors means we give up on this particular branch and we continue with a branch with only one error. And this unique error continues with a consistent path that tells you in the transmission. This bit was erroneous. So you see that by spreading the information over a long duration that we had just a burst of one bit error. That's the point of convolution and coding. It's just a noise on one bit. And this unique bit has been recovered by Viterbian decoding. And then indeed we recover one A, which is the first bit, the first byte of our synchronization word. So OK, we've understood Viterbian decoding. So now, well, we can go for. So yeah, sorry. This is what I so if you don't want to go into all the math by yourself, you have leapfak with you and by K9Q and leapfak will do the job for you. Here I put for you a very simplified chart of running leapfak for Viterbian decoding. Just don't do the same mistake as I did. Leapfak will not take as input zero or one. You need to feed it zero or 255. It's working on a byte. So I struggled for like a couple of weeks. Why is leapfak not decoding just because I was giving it zero and one, give it zero and 255. And again, the word encoded word here will be decoded as one ACFFC1D. So we know that the encoded word of Viterby you can use leapfak to encode or to decode. So this is the encoded word and this is the decoded word. This is how you do it with leapfak. OK, so we've got leapfak. We can check that indeed we can decode our word. So if we have the sequence, so this is an example that was given to me by the author of GR satellites by Daniel Estevez. I hope I pronounced his name correctly. It's you've got the fake decoder here as was shown by by Martin this morning. And if I feed my GR decoder here with encoded word, indeed I can get the output, which is one ACFFC1D except sometimes I get wrong messages because you see here that my input stream is repeating. And if I repeat my input stream, the hypothesis of Viterby is to start with a shift register that is full of zero. And that is not correct because here after the first decoding, I don't have a shift register full of zero. So then I have one wrong one wrong sequence and then I go back to one ACFFC1D, which is the correct sequence. So you can play with this and it's an opportunity to see how the header word of of CCSDS is decoded by by by by the fake decoder in the radio. What is the sequence? Well, as we did for GPS, now I should be able to correlate my received signal with a synchronization word after encoding by Viterby. And it means there will be fails. You see absolutely no correlation peak. I cannot find in my QPSK signal the the set of bits of my encoding word. Why is that? Well, I associated the usual constellation to my QPSK. QPSK is four phases. So I have 90, 180, 270, 360 degrees and 270 degrees. And I associated the word a symbol, a set of bits to each one of these symbols of the states. But why would I do that? Why would I not associate a different symbol to a different bit of this set of bits, pair of bits to each symbol? So this is actually what you figure out when you read the source code of meter decoder. You figure out that meter decoder starts by creating rotated copies of the possible rotated copies, which comes back to say, let's take the standard distribution of big pairs of QPSK. And let's imagine like in in BPSK you can have zero or pi or pi or zero, but in BPSK it doesn't care because you just go to zero, one or one zero, but you will still correlate. Only you have an anti-correlation sort of correlation. But for QPSK you've got all these possible shift positions. So you can swap the real part, you can swap the imaginary part, or you can swap these parts here. And so if you look into meter decoder, you indeed find that, well, I will not get with you, but you swap all the possible big pairs. So one one becomes zero, one one can become zero, one one can become one zero. So you make all the possible combinations. And because you don't care about anti-correlation, these eight possible bit swaps actually become four possible combinations because you have four ways of combining all these bits if you think that one one and zero zero are the same. So having done that, now you can see here all the possible correlations and the only one that gives you correlation. I don't know if you can see this from the room, but you've got no correlation peak for all these cases. But here you've got these correlation peaks every 16,000 bits. So this means this is the right assignment of each symbol into the big pair. So now I found how to convert my QPSK signal into the encoded VTRB keyword and by encoded VTRB synchronization word, I can start decoding my my my my sentences. So I will skip read Solomon because actually read Solomon is a block encoder. So VTRB is to eliminate random bits that have flipped through the communication while read Solomon or what's well. The reason I'm skipping it is because I investigated quite more deeply BCH, which is the encoder block encoder in RDS that was investigated heavily by Boston. So when I worked on BCH, I've put a reference here. You can look at how BCH is working and read Solomon is just an extension of this. The only reason I'm mentioning this is you've got your data here. If you don't want block correction, which is someone is emitting and you've got whole blocks of data that have been corrupted. Well, you can get rid of read Solomon. If you want to use it, just be aware because again, you want to spread information over time because you want to recover as much time as as much information as possible. You will have interleaved read Solomon meaning you have four interleaved read Solomon. You have data one data two data three data four data one data two data three data four. You need to be interleaved the runner read Solomon, they code recovery and then re interleaved your data. So it's just I will skip this because well, because I don't have time to get the details. And again, I give you the example how to run the how to run the read Solomon decoder in in GR fake sorry in leapfake. So if you want to give it a try by yourself, here is my data set. I voluntarily corrupt four bytes. I voluntarily corrupt bytes in the data set. So in the payload or in the correction code. And if I run this in my read Solomon decoder, indeed I detect or I leapfake detects for corrupted bytes and this core for corrupted bytes are these values which can be recovered. So you have to discover which bytes are corrupted, but you can find the properly initial values of these bytes. So just demonstration again, you have to run it by yourself. I can talk as much as I want. If you don't try it by yourself, you don't learn. So try it by yourself. Good. So we claim to have found out how to work with Viterbi decoder. We claim to have worked understood how read Solomon is working. So are the bits that we get out of the Viterbi decoder valid? That's I can claim now I've done the job. I can go away. Well, we want a picture. We don't want a random set of bits. So the first thing we can do when we look at the data sheet is or the documentation of a meter M2 transmission. Whose Web I'll give you the references where you can find documentation. The last slide you see that there is telemetry data and the telemetry data are encoded in a sentence to recognize so that you know where your telemetry data are located. So you've got this magic sentence to 24 168 163 146 blah, blah, blah, 191. So this magic sentence tells you I am sending a telemetry frame. So what do we do? Well, we take all our decoded bits and we cross correlate our decoded bits with this. Sequence and this is one of these all inspiring moments where it works. You find this sentence in all your bits and if you decode the following bytes hours, minutes, seconds, you find that the information was collected at 11 o'clock 48 minutes 33 seconds, which is indeed the output of the meter decoder provided as a reference. So you see here that we have indeed properly decoded the Viterbi and read Solomon or actually in this part I skip read Solomon, but we have understood Viterbi because we can find the telemetry sentence and we can decode proper information. Now I found the telemetry but still a bit far from from pictures. But the next part, the end now is easy because I don't get the details. I took me a couple of months. This work has been started a bit more than a year ago. But once you've got the bits, it's just a matter of basically finding what the bytes are and checking whether they follow the standard. So I will not get the details. But indeed, you see that you've got this header, which is always the same that tells you why we're in a good job. That's the ID. Then they tell you have a counter. Well, indeed, these three bytes, you see that they're increasing one by one. So we're on the right path. And then they tell you here is a header. So this is an address of the first payload because the difficulty is that you've got the data packet and then you've got the payload packet. And there is no reason for the data packet to be synchronized on payload packets. So you might have payload lying over multiple data packets. So this is the address at which the first payload packet is starting and so on and so on. So I will not get the details, but that's just a matter of following the protocol. So once you've got the bytes, it's really easy. And finally, you are supposed on the payload to get JPEG images. And this is where I gave up. I said, OK, I'm not going to re-encode the whole Huffman encoder and everything. So this is where I just took this port of the decoder, the metro M2 decoder that was ported from Pascal to C++. And I just use the decoder. JPEG is standard bachelor level computer science, signal processing training. I didn't want to write all of it again, maybe for the next training session. But yeah, I wanted to get some images. So I went to so to conclude the talk. That's what I get at first. So you are told in the standard again, it's all detailed, the paper that I uploaded on the FOSDM website. You are told that your frames, your JPEG images are 8 by 8 bit frames. These 8 by 8 bit thumbnails repeat 14 times. And each one of these 14 times 8 bit sequences repeats 14 times along one picture line. And then you jump to a next instrument because there are three wavelengths, which they call three instruments. You get one line of the next instrument, 8 bits wide, 1,500 bit long. And then you go to the next instrument and so on. So here you see that I had some missing frames. So some missing thumbnails that I had to introduce. So what I did here is because you've got a counter, you know that when you have missing frames, here I just very stupidly did, if you're missing a frame, copy the previous frame. And this way I could miss, feel the missing thumbnails. And here you start seeing some pattern. And here you've got one parameter in JPEG, which is called the coefficient, quality coefficient, which gives you the relation between the quantization and the quantization matrix. And here is no quality. So you see that the sharp pictures here don't have the same tone as the flatter area of the picture, but you start seeing here the alps. And finally, by applying the quality coefficient, you get an image that is a bit more smooth and that compares, I think, quite favorably to the reference picture that was decoded using the satellite, of a metro decoder that you can find on the internet. So here you see, Istria, you have Balaton Lake somewhere over here, I think. You've got Vinise over here. So if you take the metro decoder, you get an image that is quite consistent with what we got by step-by-step decoding. So that was, of course, in 25, 27 minutes, a very fast highlight of the main steps. Go through the paper. The paper is actually about 50 pages long at the moment and increasing. I'm trying to put every detail about that. From IQ coefficient, overweight for JPEG image. CCSDS is a protocol for space communication. You might not care about weather satellites, but what Daniel Estevez is showing on his blog and as mentioned by Paul is this is a standard for most satellite communication and that's going to be the future because no AA is going to stop the analog satellites. So I think if you're interested in satellite decoding, this is really worth investigating. Daniel Estevez is just addressing all the satellites, armature satellites up there. Lucas Teske is a Brazilian guy who's working on Goethe satellites, geosynchronous, and his website was very inspiring. Despite at some point splitting the path of decoder, his beginning was very exciting. He helped me a lot by email. These two guys helped me a lot. This is the website that was hosting all the files about MetroM2. Somehow in the middle of this investigation, it disappeared. I don't know where the site is. Hopefully we've got a web archive. I don't know where this website is disappeared, but it's a fundamental repository of all the data, some of which cannot be found anywhere else. And finally, there is one article which is not very technical, but it tells you that it could be done. And with that, I conclude my talk and I thank you for your attention. Next one. So just as a quick conclusion, Martin introduced during his introductory talk that we are organizing the European New Radio Day. So my frustration is that here we have two days of first time. We have one day full of talks. We never have time to discuss with each other. Everyone's running to our sessions. And I wanted to have an opportunity to meet with people and sit together. So the way I organize this is one day, or we organize this is one day of oral presentation, one day of tutorials. Everything is open at the moment. We are proposing some tutorial. Please feel free to propose new tutorials. Robin Gates is coming from analog devices to demonstrate the Pluto. So he told me, I hope, and I trust him. It is located in France in Besançon. Besançon is a tiny remote city, which means that hotels are readily available here in the east of France. It's two and a half hour train trip from Paris. It's a few hours from Cal-Sru. It's a couple of hours from Cal-Sru. The call for contribution is March 21st. Registration is free, but please register because I need to organize. I need to know how many people are coming. So registration deadline is May 1st. The website is over here. And hopefully the evening dinner will be a barbecue so that everyone can talk to each other and have more time to discuss. So I will not waste our time with more advertisements, but please come.
 Okay, thank you for being here for last talk.  So this last talk would be about decoding meter M2.  So what I would like to emphasize is I assume that most people in this room don't care at all about meter M2.  The topic here I would like to address is to use meter M2 as the reason for addressing all these fascinating topics.  I should emphasize I'm trying to be a physicist.  I've never been taught about any of these things here.  So I discovered everything by myself.  I found it very fascinating to be discovering all these single processing techniques that you find in the various documentation about digital communication.  I want to show you how getting from the raw data QPSK all the way to a JPEG image as you can see here will be addressing this talk.  So Martin did not care to give you a talk with two semesters of single processing in 20 minutes.  I do.  So also I should emphasize if you just want to get the image you can go out of room because this meter decoder is doing a much better job at what I'm going to show you.  This is working very well.  I want to go step by step into what is going here.  So really for me the topic is understanding all these things not using readily available software.  So that's that's that's a topic of talk.  So I'm lucky enough to be going every twice every week twice every year in Arctic regions for glacier monitoring.  And so I'm lucky enough to be following all these polar orbiting satellites or low earth orbiting weather satellites including amongst the various little satellites.  The one from Russian meteor.  So why are Arctic regions most favorable for this kind of monitoring when you have a solar synchronous satellites.  There will be in the polar orbit ninety eight degree.  So ninety degree would be right over the North Pole.  And one of these polar orbiting satellites here I've plotted the trajectory over one day.  You see that when you're in Western Europe here is the so in France the green circle is the place you would be if you wanted to see the satellite horizon.  This is at an altitude of elevation of 15 degree.  This is at elevation of 60 degree below which I don't even bother to take my antenna out in France.  You will get at most one pass every day of one of these polar orbiting satellites.  While when you go to an Arctic region where you've got all these passes.  So it's fascinating because when you're learning to decode a new satellite here you have like 10 10 12 passes per day while here you have one at best.  So I'm investigating matter in this context and also using the little RTL is the R receivers because of course when you go there you're not supposed to take a big bag with full of hardware that's not related to your research.  So here I can just put one of the little receivers at the bottom of my backpack just find any two wires to make a dipole antenna once you arrive there and you have your your setup for receiving.  Meta Ram 2 so I'm sure many of you here in the room have already listened to a no way so the new a satellite are dying breed because no way is no longer renewing their constellation of analog satellites.  They started in the 70s now they are at no way 19.  I think it was going to go up to 21 and then we'll stop the new way.  So now we have to think about the future and the future is digital communication.  So digital communication is what is provided by CCSDS.  So because the last speaker could not say it is the consultative committee for space data systems.  And this is basically a body trying to standardize this communication.  So that's a bit of a layout of what I want to talk.  So when Bastion was showing you I have my JPEG picture when I have TCP IP when I have TCP and I have IP you've got all your OZ layers.  And of course when you want to decode the JPEG image on Firefox where you've got all these libraries for you.  And for me the exploration here was I collect this QPSK data at the output of new radio at the running the RTL-SDR data stream.  And then how do you go from this QPSK all the way to the JPEG image.  So for me it's a little bit like if you were trying to listen to a JPEG image being transmitted in HTML with just no oscilloscope connected to your internet cables.  And for me it's an adventure to try to get all the layers one after the other.  So of course in this talk I don't claim to be going in detail.  I would like to show you the outline.  The slides will be available on the website.  And I hope it will make you curious about getting into all this story.  Now you might be wondering people have been working happily with NOAA.  So why even bother with such a complex networking.  So this is a talk I saw when I was at Huntsville at the Marshall Space Center from Dave Israel at the YZ conference where he was showing you've got the International Space Station.  The International Space Station is flying at 400 kilometer altitude and is visible if you remember my little circles on a radius of 1,500 kilometers.  So this means you would need to put one station every 1500 kilometers along the path.  So this is what the Americans did for Jimmy and I in Mercury. They had one ship or one station every 1500 kilometers.  But that's no problem because they only did one or two orbit.  So you just needed to put a few stations along the orbit.  ISS is rotating all over the Earth.  Of course you cannot put one station every 1500 kilometers all over the Earth.  So what is happening now is ISS is completely automated.  The astronauts are running the experiments but everything on the ISS is automated from ground stations.  And the ISS is only visible from a radius of 1500 kilometers.  So the ISS is not directly talking to the Earth but it's talking through the tracking and data relay system, the TDRS satellites, the geostationary satellites.  So ISS 400 kilometers rotating quite quickly, talks to TDRS.  TDRS are talking with each other and TDRS is sending signal back to Earth.  Same is true for Hubble. Hubble Space Telescope is very expensive.  You don't want to just run it as it is flying over your head.  You want to continuously monitor Hubble Space Telescope measurements.  And of course you don't think that the US Air Force cares much about the science in Hubble Space Telescope.  But once you figure out that Hubble is just a spy satellite upside down, you might figure out why you have TDRS here in the space.  So of course here you have multiple satellites with multiple experiments.  So you need a way of packetizing your data.  You need to say it's satellite number X which is sending data from instrument number Y.  And how do you do this? Well, that's where you go from QPSK,  which would be your Ethernet cable all the way to the JPEG image through all the layers of OZ layer.  Okay, let's try to have fun with the OZ layers.  So first of all we need to predict where a meteor is flying.  I still use SATRAC, despite the Y2K bug which is still a patch and is not inserted.  You can use WX2IMG in the paper. I explained to you how you can cheat WX2IMG which is no longer maintained  into thinking that one of the NOAA satellites is actually Meteor M2 and so that you can...  Meteor M2 is actually one of the NOAA satellites.  So you can use WX2IMG and if you have internet access you can use the Heavens Above website.  Again, the beautiful thing about being in Spiesbergen Arctic region 79°N is you've got all these passes at high elevations,  which of course you don't get in the western European country.  Lower latitude country you'll get one. Two passes at best.  Okay, so we know when Meteor M2 is flying.  So we take our RTLSDR. We collect the data.  This is all stolen from the Airspy website for receiving Meteor M2.  Rational resampler, you have your clocking.  So you cost us loop which locks on the frequency offset between the carrier and the local oscillator,  bit recovery and so that's a clock recovery.  And at the end you got your soft bits.  So already I needed to learn the first word when I was doing this.  I didn't know what a soft bit is.  So soft bit is IQ coefficients where you're in 1 and 0 are not yet saturated but are still represented here by an 8-bit value  and you still need to identify whether it is most probably a 1 or a 0.  So I didn't know what soft bit meant.  So the first question is, are my data even worth investigating?  So this is a spectrum unlike GPS.  Now we have strong signals so you see there is something happening here.  Is it a QPSK signal?  Well, if we expand what Paul Boven taught us about GPS where BPSK is collapsed by squaring the signal,  well of course if you take the nth power of an nPSK signal you collapse again the spectrum spreading due to the PSK modulation.  So here we take our raw signal.  Well, there is something but we don't know if it's the right modulation.  We square it.  It is not BPSK so we haven't collapsed the spectrum.  We raise to the fourth power.  It is QPSK because your spectrum spreading has collapsed in the carrier.  So we can get a signal that are worth investigating further.  It seems to be QPSK modulation.  So once we've done this, we know it's a packetized system.  Packetized system means something will be repeated.  If we look at the documentation you will find that all CCSDS compliant communication start with a header.  Well, if you have packets you need to know where the packet starts.  And the packet start header is 1A CFFC1D.  Try to remember this because I will keep on repeating this sentence all over the time.  So at first I don't know what this packet is.  I just want to know whether there is some repeated header in the signal.  So as shown in the previous offer speaker, you just auto-correlate the signal.  If there is some redundancy, this redundancy will show.  So by auto-correlating my signal, well indeed I see a peak at 16 kilobyte.  I see a signal at 32 kilobyte.  So there is some redundancy.  Every 16,000 samples I have some repetition.  So it's definitely worth working further on this data.  So the first thing that got me stuck because, again, I'm a physicist.  I haven't been taught about signal digital communication was convolutional encoding.  So that's the topic of Martin's talk this morning.  I'm just going a slightly bit further into it because I want to show you how it's decoded.  I don't want to get into the encoding part.  The encoding actually is very simple because they show you on various documentation as an X-OR.  So as was shown by Martin this morning, you just take your data stream and take convolution.  So you try to mix all this data to create as much randomness as you can.  So it's one of these bits is corrupted.  You have a lot of chance because you've spread the information of a long duration to recover this information.  So here it's a seven bit long shifter.  You have tabs from which you XOR and you get twice as many bits on the output as you had on the input.  So this shift here will clock up, down, up, down and sometimes take the output with one polynomial and on the other.  So if you do this, you can also express this as a matrix where time is evolving over the X-axis and you jump.  First coefficient, second coefficient, first coefficients of first polynomial, first coefficient of second polynomial,  second coefficients of first polynomial and so on.  So you have your polynomial which are interleaved and you just shift time.  So that's another way of implementing your convolution encoding.  And the last way of saying it is you can do this as a state machine.  So you take the various states of your polynomial here.  You input a new bit into your system and by inputting a new bit in your system, your shift register changes.  So if you had zero and you inject a zero, you stay at zero and your output, you run the XOR on this OV zero, you get an output.  If you inject a one, well, your zero goes to the last zero drops, the one comes here and you run this for the XOR, you get one one.  So you can make this as a state machine.  So once you've discovered the state machine expression, you can write this as the evolution of between the various states.  So previously I had given names A, B, C, D to my various states and then you can draw the state machine.  So A stays in A, A goes to B if you have a one.  So these are the input bits.  A is fed or zero, it stays at A.  A, when it is fed zero, will output zero zero.  A, when it is fed zero, where A, when it is fed one will output one one and so on.  So you can draw your state machine.  So encoding is very efficient, very easy.  It's just XOR.  Now the reason I wanted to show you this is if you take the same description that we had here, but now you take it to decode.  That's a 30 second description of a Viterbian decoding algorithm.  In 30 seconds, what you have here is let's imagine I have received this bit stream.  So this is what I have received.  So I split what I have received into zero zero zero zero zero zero and so on.  And what you see here, I start with zero zero. Okay, I get zero zero. That is most probably state A with a zero output.  Zero zero, state A zero zero.  Zero zero, state A zero zero.  So these three zeros are just A looping into the zero zero.  Now we get one one.  One one is a feasible output of state A that gets us into state B.  So we go into state B.  When you're in state B, we get one one.  That's not possible.  We cannot get a one one out of state B.  We can get one zero zero one.  Well, the moment we don't know what's the best option.  So let's follow the two possible path.  We know it's wrong, but let's follow the two possible path.  After that, we got zero one.  So we could be here C, but C cannot have zero one.  It can be only one one or zero zero.  So C would create two errors.  That's the wrong path.  So we cut it out and Viterbian tells you let's not follow this one.  Now we go into this path here because zero one is a valid output of D that would be considered as a zero.  And then you go on and you follow your path.  So if I add the output bits here, you have the number in red of errors.  Two errors means we give up on this particular branch and we continue with a branch with only one error.  And this unique error continues with a consistent path that tells you in the transmission.  This bit was erroneous.  So you see that by spreading the information over a long duration that we had just a burst of one bit error.  That's the point of convolution and coding.  It's just a noise on one bit.  And this unique bit has been recovered by Viterbian decoding.  And then indeed we recover one A, which is the first bit, the first byte of our synchronization word.  So OK, we've understood Viterbian decoding.  So now, well, we can go for.  So yeah, sorry.  This is what I so if you don't want to go into all the math by yourself, you have leapfak with you and by K9Q and leapfak will do the job for you.  Here I put for you a very simplified chart of running leapfak for Viterbian decoding.  Just don't do the same mistake as I did.  Leapfak will not take as input zero or one.  You need to feed it zero or 255.  It's working on a byte.  So I struggled for like a couple of weeks.  Why is leapfak not decoding just because I was giving it zero and one, give it zero and 255.  And again, the word encoded word here will be decoded as one ACFFC1D.  So we know that the encoded word of Viterby you can use leapfak to encode or to decode.  So this is the encoded word and this is the decoded word.  This is how you do it with leapfak.  OK, so we've got leapfak.  We can check that indeed we can decode our word.  So if we have the sequence, so this is an example that was given to me by the author of GR satellites by Daniel Estevez.  I hope I pronounced his name correctly.  It's you've got the fake decoder here as was shown by by Martin this morning.  And if I feed my GR decoder here with encoded word, indeed I can get the output, which is one ACFFC1D except sometimes I get wrong messages because you see here that my input stream is repeating.  And if I repeat my input stream, the hypothesis of Viterby is to start with a shift register that is full of zero.  And that is not correct because here after the first decoding, I don't have a shift register full of zero.  So then I have one wrong one wrong sequence and then I go back to one ACFFC1D, which is the correct sequence.  So you can play with this and it's an opportunity to see how the header word of of CCSDS is decoded by by by by the fake decoder in the radio.  What is the sequence? Well, as we did for GPS, now I should be able to correlate my received signal with a synchronization word after encoding by Viterby.  And it means there will be fails. You see absolutely no correlation peak.  I cannot find in my QPSK signal the the set of bits of my encoding word.  Why is that?  Well, I associated the usual constellation to my QPSK. QPSK is four phases.  So I have 90, 180, 270, 360 degrees and 270 degrees.  And I associated the word a symbol, a set of bits to each one of these symbols of the states.  But why would I do that?  Why would I not associate a different symbol to a different bit of this set of bits, pair of bits to each symbol?  So this is actually what you figure out when you read the source code of meter decoder.  You figure out that meter decoder starts by creating rotated copies of the possible rotated copies, which comes back to say, let's take the standard distribution of big pairs of QPSK.  And let's imagine like in in BPSK you can have zero or pi or pi or zero, but in BPSK it doesn't care because you just go to zero, one or one zero, but you will still correlate.  Only you have an anti-correlation sort of correlation.  But for QPSK you've got all these possible shift positions.  So you can swap the real part, you can swap the imaginary part, or you can swap these parts here.  And so if you look into meter decoder, you indeed find that, well, I will not get with you, but you swap all the possible big pairs.  So one one becomes zero, one one can become zero, one one can become one zero.  So you make all the possible combinations.  And because you don't care about anti-correlation, these eight possible bit swaps actually become four possible combinations because you have four ways of combining all these bits if you think that one one and zero zero are the same.  So having done that, now you can see here all the possible correlations and the only one that gives you correlation.  I don't know if you can see this from the room, but you've got no correlation peak for all these cases.  But here you've got these correlation peaks every 16,000 bits.  So this means this is the right assignment of each symbol into the big pair.  So now I found how to convert my QPSK signal into the encoded VTRB keyword and by encoded VTRB synchronization word, I can start decoding my my my my sentences.  So I will skip read Solomon because actually read Solomon is a block encoder.  So VTRB is to eliminate random bits that have flipped through the communication while read Solomon or what's well.  The reason I'm skipping it is because I investigated quite more deeply BCH, which is the encoder block encoder in RDS that was investigated heavily by Boston.  So when I worked on BCH, I've put a reference here.  You can look at how BCH is working and read Solomon is just an extension of this.  The only reason I'm mentioning this is you've got your data here.  If you don't want block correction, which is someone is emitting and you've got whole blocks of data that have been corrupted.  Well, you can get rid of read Solomon. If you want to use it, just be aware because again, you want to spread information over time because you want to recover as much time as as much information as possible.  You will have interleaved read Solomon meaning you have four interleaved read Solomon.  You have data one data two data three data four data one data two data three data four.  You need to be interleaved the runner read Solomon, they code recovery and then re interleaved your data.  So it's just I will skip this because well, because I don't have time to get the details.  And again, I give you the example how to run the how to run the read Solomon decoder in in GR fake sorry in leapfake.  So if you want to give it a try by yourself, here is my data set.  I voluntarily corrupt four bytes.  I voluntarily corrupt bytes in the data set.  So in the payload or in the correction code. And if I run this in my read Solomon decoder, indeed I detect or I leapfake detects for corrupted bytes and this core for corrupted bytes are these values which can be recovered.  So you have to discover which bytes are corrupted, but you can find the properly initial values of these bytes.  So just demonstration again, you have to run it by yourself.  I can talk as much as I want.  If you don't try it by yourself, you don't learn.  So try it by yourself.  Good.  So we claim to have found out how to work with Viterbi decoder.  We claim to have worked understood how read Solomon is working.  So are the bits that we get out of the Viterbi decoder valid?  That's I can claim now I've done the job.  I can go away.  Well, we want a picture.  We don't want a random set of bits.  So the first thing we can do when we look at the data sheet is or the documentation of a meter M2 transmission.  Whose Web I'll give you the references where you can find documentation.  The last slide you see that there is telemetry data and the telemetry data are encoded in a sentence to recognize so that you know where your telemetry data are located.  So you've got this magic sentence to 24 168 163 146 blah, blah, blah, 191.  So this magic sentence tells you I am sending a telemetry frame.  So what do we do?  Well, we take all our decoded bits and we cross correlate our decoded bits with this.  Sequence and this is one of these all inspiring moments where it works.  You find this sentence in all your bits and if you decode the following bytes hours, minutes, seconds, you find that the information was collected at 11 o'clock 48 minutes 33 seconds, which is indeed the output of the meter decoder provided as a reference.  So you see here that we have indeed properly decoded the Viterbi and read Solomon or actually in this part I skip read Solomon, but we have understood Viterbi because we can find the telemetry sentence and we can decode proper information.  Now I found the telemetry but still a bit far from from pictures.  But the next part, the end now is easy because I don't get the details. I took me a couple of months. This work has been started a bit more than a year ago.  But once you've got the bits, it's just a matter of basically finding what the bytes are and checking whether they follow the standard.  So I will not get the details.  But indeed, you see that you've got this header, which is always the same that tells you why we're in a good job.  That's the ID. Then they tell you have a counter. Well, indeed, these three bytes, you see that they're increasing one by one.  So we're on the right path. And then they tell you here is a header.  So this is an address of the first payload because the difficulty is that you've got the data packet and then you've got the payload packet.  And there is no reason for the data packet to be synchronized on payload packets.  So you might have payload lying over multiple data packets.  So this is the address at which the first payload packet is starting and so on and so on.  So I will not get the details, but that's just a matter of following the protocol.  So once you've got the bytes, it's really easy.  And finally, you are supposed on the payload to get JPEG images.  And this is where I gave up.  I said, OK, I'm not going to re-encode the whole Huffman encoder and everything.  So this is where I just took this port of the decoder, the metro M2 decoder that was ported from Pascal to C++.  And I just use the decoder.  JPEG is standard bachelor level computer science, signal processing training.  I didn't want to write all of it again, maybe for the next training session.  But yeah, I wanted to get some images.  So I went to so to conclude the talk.  That's what I get at first.  So you are told in the standard again, it's all detailed, the paper that I uploaded on the FOSDM website.  You are told that your frames, your JPEG images are 8 by 8 bit frames.  These 8 by 8 bit thumbnails repeat 14 times.  And each one of these 14 times 8 bit sequences repeats 14 times along one picture line.  And then you jump to a next instrument because there are three wavelengths, which they call three instruments.  You get one line of the next instrument, 8 bits wide, 1,500 bit long.  And then you go to the next instrument and so on.  So here you see that I had some missing frames.  So some missing thumbnails that I had to introduce.  So what I did here is because you've got a counter, you know that when you have missing frames,  here I just very stupidly did, if you're missing a frame, copy the previous frame.  And this way I could miss, feel the missing thumbnails.  And here you start seeing some pattern.  And here you've got one parameter in JPEG, which is called the coefficient, quality coefficient,  which gives you the relation between the quantization and the quantization matrix.  And here is no quality.  So you see that the sharp pictures here don't have the same tone as the flatter area of the picture,  but you start seeing here the alps.  And finally, by applying the quality coefficient, you get an image that is a bit more smooth  and that compares, I think, quite favorably to the reference picture that was decoded using the satellite,  of a metro decoder that you can find on the internet.  So here you see, Istria, you have Balaton Lake somewhere over here, I think.  You've got Vinise over here.  So if you take the metro decoder, you get an image that is quite consistent with what we got by step-by-step decoding.  So that was, of course, in 25, 27 minutes, a very fast highlight of the main steps.  Go through the paper.  The paper is actually about 50 pages long at the moment and increasing.  I'm trying to put every detail about that.  From IQ coefficient, overweight for JPEG image.  CCSDS is a protocol for space communication.  You might not care about weather satellites, but what Daniel Estevez is showing on his blog and as mentioned by Paul is  this is a standard for most satellite communication and that's going to be the future because no AA is going to stop the analog satellites.  So I think if you're interested in satellite decoding, this is really worth investigating.  Daniel Estevez is just addressing all the satellites, armature satellites up there.  Lucas Teske is a Brazilian guy who's working on Goethe satellites, geosynchronous, and his website was very inspiring.  Despite at some point splitting the path of decoder, his beginning was very exciting.  He helped me a lot by email.  These two guys helped me a lot.  This is the website that was hosting all the files about MetroM2.  Somehow in the middle of this investigation, it disappeared.  I don't know where the site is.  Hopefully we've got a web archive.  I don't know where this website is disappeared, but it's a fundamental repository of all the data, some of which cannot be found anywhere else.  And finally, there is one article which is not very technical, but it tells you that it could be done.  And with that, I conclude my talk and I thank you for your attention.  Next one.  So just as a quick conclusion, Martin introduced during his introductory talk that we are organizing the European New Radio Day.  So my frustration is that here we have two days of first time.  We have one day full of talks.  We never have time to discuss with each other.  Everyone's running to our sessions.  And I wanted to have an opportunity to meet with people and sit together.  So the way I organize this is one day, or we organize this is one day of oral presentation, one day of tutorials.  Everything is open at the moment.  We are proposing some tutorial.  Please feel free to propose new tutorials.  Robin Gates is coming from analog devices to demonstrate the Pluto.  So he told me, I hope, and I trust him.  It is located in France in Besançon.  Besançon is a tiny remote city, which means that hotels are readily available here in the east of France.  It's two and a half hour train trip from Paris.  It's a few hours from Cal-Sru.  It's a couple of hours from Cal-Sru.  The call for contribution is March 21st.  Registration is free, but please register because I need to organize.  I need to know how many people are coming.  So registration deadline is May 1st.  The website is over here.  And hopefully the evening dinner will be a barbecue so that everyone can talk to each other and have more time to discuss.  So I will not waste our time with more advertisements, but please come.
Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__0_167.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__168_2051.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__2052_4499.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__4500_4619.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__4620_5243.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__5244_6935.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__6936_10151.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__10152_11303.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__11304_13811.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__13812_15227.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__15228_17927.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__17928_18275.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__18276_18419.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__18420_18527.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__18528_19403.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__19404_19511.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__19512_19595.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__19596_21503.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__21504_22523.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__22524_23843.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__23844_25547.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__25548_26831.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__26832_27911.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__27912_28427.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__28428_28595.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__28596_29495.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__29496_31283.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__31284_32519.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__32520_35063.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__35064_36491.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__36492_37367.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__37368_39587.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__39588_40091.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__40092_40235.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__40236_42611.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__42612_44807.png Decoding_Meteor-M2__QPSK__Viterbi__Reed_Solomon_and_JPEG_from_IQ_coefficients_to_images__analysis_o__44808_44929.png
Okay, thank you for being here for last talk. So this last talk would be about decoding meter M2. So what I would like to emphasize is I assume that most people in this room don't care at all about meter M2. The topic here I would like to address is to use meter M2 as the reason for addressing all these fascinating topics. I should emphasize I'm trying to be a physicist. I've never been taught about any of these things here. So I discovered everything by myself. I found it very fascinating to be discovering all these single processing techniques that you find in the various documentation about digital communication. I want to show you how getting from the raw data QPSK all the way to a JPEG image as you can see here will be addressing this talk. So Martin did not care to give you a talk with two semesters of single processing in 20 minutes. I do. So also I should emphasize if you just want to get the image you can go out of room because this meter decoder is doing a much better job at what I'm going to show you. This is working very well. I want to go step by step into what is going here. So really for me the topic is understanding all these things not using readily available software. So that's that's that's a topic of talk. So I'm lucky enough to be going every twice every week twice every year in Arctic regions for glacier monitoring. And so I'm lucky enough to be following all these polar orbiting satellites or low earth orbiting weather satellites including amongst the various little satellites. The one from Russian meteor. So why are Arctic regions most favorable for this kind of monitoring when you have a solar synchronous satellites. There will be in the polar orbit ninety eight degree. So ninety degree would be right over the North Pole. And one of these polar orbiting satellites here I've plotted the trajectory over one day. You see that when you're in Western Europe here is the so in France the green circle is the place you would be if you wanted to see the satellite horizon. This is at an altitude of elevation of 15 degree. This is at elevation of 60 degree below which I don't even bother to take my antenna out in France. You will get at most one pass every day of one of these polar orbiting satellites. While when you go to an Arctic region where you've got all these passes. So it's fascinating because when you're learning to decode a new satellite here you have like 10 10 12 passes per day while here you have one at best. So I'm investigating matter in this context and also using the little RTL is the R receivers because of course when you go there you're not supposed to take a big bag with full of hardware that's not related to your research. So here I can just put one of the little receivers at the bottom of my backpack just find any two wires to make a dipole antenna once you arrive there and you have your your setup for receiving. Meta Ram 2 so I'm sure many of you here in the room have already listened to a no way so the new a satellite are dying breed because no way is no longer renewing their constellation of analog satellites. They started in the 70s now they are at no way 19. I think it was going to go up to 21 and then we'll stop the new way. So now we have to think about the future and the future is digital communication. So digital communication is what is provided by CCSDS. So because the last speaker could not say it is the consultative committee for space data systems. And this is basically a body trying to standardize this communication. So that's a bit of a layout of what I want to talk. So when Bastion was showing you I have my JPEG picture when I have TCP IP when I have TCP and I have IP you've got all your OZ layers. And of course when you want to decode the JPEG image on Firefox where you've got all these libraries for you. And for me the exploration here was I collect this QPSK data at the output of new radio at the running the RTL-SDR data stream. And then how do you go from this QPSK all the way to the JPEG image. So for me it's a little bit like if you were trying to listen to a JPEG image being transmitted in HTML with just no oscilloscope connected to your internet cables. And for me it's an adventure to try to get all the layers one after the other. So of course in this talk I don't claim to be going in detail. I would like to show you the outline. The slides will be available on the website. And I hope it will make you curious about getting into all this story. Now you might be wondering people have been working happily with NOAA. So why even bother with such a complex networking. So this is a talk I saw when I was at Huntsville at the Marshall Space Center from Dave Israel at the YZ conference where he was showing you've got the International Space Station. The International Space Station is flying at 400 kilometer altitude and is visible if you remember my little circles on a radius of 1,500 kilometers. So this means you would need to put one station every 1500 kilometers along the path. So this is what the Americans did for Jimmy and I in Mercury. They had one ship or one station every 1500 kilometers. But that's no problem because they only did one or two orbit. So you just needed to put a few stations along the orbit. ISS is rotating all over the Earth. Of course you cannot put one station every 1500 kilometers all over the Earth. So what is happening now is ISS is completely automated. The astronauts are running the experiments but everything on the ISS is automated from ground stations. And the ISS is only visible from a radius of 1500 kilometers. So the ISS is not directly talking to the Earth but it's talking through the tracking and data relay system, the TDRS satellites, the geostationary satellites. So ISS 400 kilometers rotating quite quickly, talks to TDRS. TDRS are talking with each other and TDRS is sending signal back to Earth. Same is true for Hubble. Hubble Space Telescope is very expensive. You don't want to just run it as it is flying over your head. You want to continuously monitor Hubble Space Telescope measurements. And of course you don't think that the US Air Force cares much about the science in Hubble Space Telescope. But once you figure out that Hubble is just a spy satellite upside down, you might figure out why you have TDRS here in the space. So of course here you have multiple satellites with multiple experiments. So you need a way of packetizing your data. You need to say it's satellite number X which is sending data from instrument number Y. And how do you do this? Well, that's where you go from QPSK, which would be your Ethernet cable all the way to the JPEG image through all the layers of OZ layer. Okay, let's try to have fun with the OZ layers. So first of all we need to predict where a meteor is flying. I still use SATRAC, despite the Y2K bug which is still a patch and is not inserted. You can use WX2IMG in the paper. I explained to you how you can cheat WX2IMG which is no longer maintained into thinking that one of the NOAA satellites is actually Meteor M2 and so that you can... Meteor M2 is actually one of the NOAA satellites. So you can use WX2IMG and if you have internet access you can use the Heavens Above website. Again, the beautiful thing about being in Spiesbergen Arctic region 79°N is you've got all these passes at high elevations, which of course you don't get in the western European country. Lower latitude country you'll get one. Two passes at best. Okay, so we know when Meteor M2 is flying. So we take our RTLSDR. We collect the data. This is all stolen from the Airspy website for receiving Meteor M2. Rational resampler, you have your clocking. So you cost us loop which locks on the frequency offset between the carrier and the local oscillator, bit recovery and so that's a clock recovery. And at the end you got your soft bits. So already I needed to learn the first word when I was doing this. I didn't know what a soft bit is. So soft bit is IQ coefficients where you're in 1 and 0 are not yet saturated but are still represented here by an 8-bit value and you still need to identify whether it is most probably a 1 or a 0. So I didn't know what soft bit meant. So the first question is, are my data even worth investigating? So this is a spectrum unlike GPS. Now we have strong signals so you see there is something happening here. Is it a QPSK signal? Well, if we expand what Paul Boven taught us about GPS where BPSK is collapsed by squaring the signal, well of course if you take the nth power of an nPSK signal you collapse again the spectrum spreading due to the PSK modulation. So here we take our raw signal. Well, there is something but we don't know if it's the right modulation. We square it. It is not BPSK so we haven't collapsed the spectrum. We raise to the fourth power. It is QPSK because your spectrum spreading has collapsed in the carrier. So we can get a signal that are worth investigating further. It seems to be QPSK modulation. So once we've done this, we know it's a packetized system. Packetized system means something will be repeated. If we look at the documentation you will find that all CCSDS compliant communication start with a header. Well, if you have packets you need to know where the packet starts. And the packet start header is 1A CFFC1D. Try to remember this because I will keep on repeating this sentence all over the time. So at first I don't know what this packet is. I just want to know whether there is some repeated header in the signal. So as shown in the previous offer speaker, you just auto-correlate the signal. If there is some redundancy, this redundancy will show. So by auto-correlating my signal, well indeed I see a peak at 16 kilobyte. I see a signal at 32 kilobyte. So there is some redundancy. Every 16,000 samples I have some repetition. So it's definitely worth working further on this data. So the first thing that got me stuck because, again, I'm a physicist. I haven't been taught about signal digital communication was convolutional encoding. So that's the topic of Martin's talk this morning. I'm just going a slightly bit further into it because I want to show you how it's decoded. I don't want to get into the encoding part. The encoding actually is very simple because they show you on various documentation as an X-OR. So as was shown by Martin this morning, you just take your data stream and take convolution. So you try to mix all this data to create as much randomness as you can. So it's one of these bits is corrupted. You have a lot of chance because you've spread the information of a long duration to recover this information. So here it's a seven bit long shifter. You have tabs from which you XOR and you get twice as many bits on the output as you had on the input. So this shift here will clock up, down, up, down and sometimes take the output with one polynomial and on the other. So if you do this, you can also express this as a matrix where time is evolving over the X-axis and you jump. First coefficient, second coefficient, first coefficients of first polynomial, first coefficient of second polynomial, second coefficients of first polynomial and so on. So you have your polynomial which are interleaved and you just shift time. So that's another way of implementing your convolution encoding. And the last way of saying it is you can do this as a state machine. So you take the various states of your polynomial here. You input a new bit into your system and by inputting a new bit in your system, your shift register changes. So if you had zero and you inject a zero, you stay at zero and your output, you run the XOR on this OV zero, you get an output. If you inject a one, well, your zero goes to the last zero drops, the one comes here and you run this for the XOR, you get one one. So you can make this as a state machine. So once you've discovered the state machine expression, you can write this as the evolution of between the various states. So previously I had given names A, B, C, D to my various states and then you can draw the state machine. So A stays in A, A goes to B if you have a one. So these are the input bits. A is fed or zero, it stays at A. A, when it is fed zero, will output zero zero. A, when it is fed zero, where A, when it is fed one will output one one and so on. So you can draw your state machine. So encoding is very efficient, very easy. It's just XOR. Now the reason I wanted to show you this is if you take the same description that we had here, but now you take it to decode. That's a 30 second description of a Viterbian decoding algorithm. In 30 seconds, what you have here is let's imagine I have received this bit stream. So this is what I have received. So I split what I have received into zero zero zero zero zero zero and so on. And what you see here, I start with zero zero. Okay, I get zero zero. That is most probably state A with a zero output. Zero zero, state A zero zero. Zero zero, state A zero zero. So these three zeros are just A looping into the zero zero. Now we get one one. One one is a feasible output of state A that gets us into state B. So we go into state B. When you're in state B, we get one one. That's not possible. We cannot get a one one out of state B. We can get one zero zero one. Well, the moment we don't know what's the best option. So let's follow the two possible path. We know it's wrong, but let's follow the two possible path. After that, we got zero one. So we could be here C, but C cannot have zero one. It can be only one one or zero zero. So C would create two errors. That's the wrong path. So we cut it out and Viterbian tells you let's not follow this one. Now we go into this path here because zero one is a valid output of D that would be considered as a zero. And then you go on and you follow your path. So if I add the output bits here, you have the number in red of errors. Two errors means we give up on this particular branch and we continue with a branch with only one error. And this unique error continues with a consistent path that tells you in the transmission. This bit was erroneous. So you see that by spreading the information over a long duration that we had just a burst of one bit error. That's the point of convolution and coding. It's just a noise on one bit. And this unique bit has been recovered by Viterbian decoding. And then indeed we recover one A, which is the first bit, the first byte of our synchronization word. So OK, we've understood Viterbian decoding. So now, well, we can go for. So yeah, sorry. This is what I so if you don't want to go into all the math by yourself, you have leapfak with you and by K9Q and leapfak will do the job for you. Here I put for you a very simplified chart of running leapfak for Viterbian decoding. Just don't do the same mistake as I did. Leapfak will not take as input zero or one. You need to feed it zero or 255. It's working on a byte. So I struggled for like a couple of weeks. Why is leapfak not decoding just because I was giving it zero and one, give it zero and 255. And again, the word encoded word here will be decoded as one ACFFC1D. So we know that the encoded word of Viterby you can use leapfak to encode or to decode. So this is the encoded word and this is the decoded word. This is how you do it with leapfak. OK, so we've got leapfak. We can check that indeed we can decode our word. So if we have the sequence, so this is an example that was given to me by the author of GR satellites by Daniel Estevez. I hope I pronounced his name correctly. It's you've got the fake decoder here as was shown by by Martin this morning. And if I feed my GR decoder here with encoded word, indeed I can get the output, which is one ACFFC1D except sometimes I get wrong messages because you see here that my input stream is repeating. And if I repeat my input stream, the hypothesis of Viterby is to start with a shift register that is full of zero. And that is not correct because here after the first decoding, I don't have a shift register full of zero. So then I have one wrong one wrong sequence and then I go back to one ACFFC1D, which is the correct sequence. So you can play with this and it's an opportunity to see how the header word of of CCSDS is decoded by by by by the fake decoder in the radio. What is the sequence? Well, as we did for GPS, now I should be able to correlate my received signal with a synchronization word after encoding by Viterby. And it means there will be fails. You see absolutely no correlation peak. I cannot find in my QPSK signal the the set of bits of my encoding word. Why is that? Well, I associated the usual constellation to my QPSK. QPSK is four phases. So I have 90, 180, 270, 360 degrees and 270 degrees. And I associated the word a symbol, a set of bits to each one of these symbols of the states. But why would I do that? Why would I not associate a different symbol to a different bit of this set of bits, pair of bits to each symbol? So this is actually what you figure out when you read the source code of meter decoder. You figure out that meter decoder starts by creating rotated copies of the possible rotated copies, which comes back to say, let's take the standard distribution of big pairs of QPSK. And let's imagine like in in BPSK you can have zero or pi or pi or zero, but in BPSK it doesn't care because you just go to zero, one or one zero, but you will still correlate. Only you have an anti-correlation sort of correlation. But for QPSK you've got all these possible shift positions. So you can swap the real part, you can swap the imaginary part, or you can swap these parts here. And so if you look into meter decoder, you indeed find that, well, I will not get with you, but you swap all the possible big pairs. So one one becomes zero, one one can become zero, one one can become one zero. So you make all the possible combinations. And because you don't care about anti-correlation, these eight possible bit swaps actually become four possible combinations because you have four ways of combining all these bits if you think that one one and zero zero are the same. So having done that, now you can see here all the possible correlations and the only one that gives you correlation. I don't know if you can see this from the room, but you've got no correlation peak for all these cases. But here you've got these correlation peaks every 16,000 bits. So this means this is the right assignment of each symbol into the big pair. So now I found how to convert my QPSK signal into the encoded VTRB keyword and by encoded VTRB synchronization word, I can start decoding my my my my sentences. So I will skip read Solomon because actually read Solomon is a block encoder. So VTRB is to eliminate random bits that have flipped through the communication while read Solomon or what's well. The reason I'm skipping it is because I investigated quite more deeply BCH, which is the encoder block encoder in RDS that was investigated heavily by Boston. So when I worked on BCH, I've put a reference here. You can look at how BCH is working and read Solomon is just an extension of this. The only reason I'm mentioning this is you've got your data here. If you don't want block correction, which is someone is emitting and you've got whole blocks of data that have been corrupted. Well, you can get rid of read Solomon. If you want to use it, just be aware because again, you want to spread information over time because you want to recover as much time as as much information as possible. You will have interleaved read Solomon meaning you have four interleaved read Solomon. You have data one data two data three data four data one data two data three data four. You need to be interleaved the runner read Solomon, they code recovery and then re interleaved your data. So it's just I will skip this because well, because I don't have time to get the details. And again, I give you the example how to run the how to run the read Solomon decoder in in GR fake sorry in leapfake. So if you want to give it a try by yourself, here is my data set. I voluntarily corrupt four bytes. I voluntarily corrupt bytes in the data set. So in the payload or in the correction code. And if I run this in my read Solomon decoder, indeed I detect or I leapfake detects for corrupted bytes and this core for corrupted bytes are these values which can be recovered. So you have to discover which bytes are corrupted, but you can find the properly initial values of these bytes. So just demonstration again, you have to run it by yourself. I can talk as much as I want. If you don't try it by yourself, you don't learn. So try it by yourself. Good. So we claim to have found out how to work with Viterbi decoder. We claim to have worked understood how read Solomon is working. So are the bits that we get out of the Viterbi decoder valid? That's I can claim now I've done the job. I can go away. Well, we want a picture. We don't want a random set of bits. So the first thing we can do when we look at the data sheet is or the documentation of a meter M2 transmission. Whose Web I'll give you the references where you can find documentation. The last slide you see that there is telemetry data and the telemetry data are encoded in a sentence to recognize so that you know where your telemetry data are located. So you've got this magic sentence to 24 168 163 146 blah, blah, blah, 191. So this magic sentence tells you I am sending a telemetry frame. So what do we do? Well, we take all our decoded bits and we cross correlate our decoded bits with this. Sequence and this is one of these all inspiring moments where it works. You find this sentence in all your bits and if you decode the following bytes hours, minutes, seconds, you find that the information was collected at 11 o'clock 48 minutes 33 seconds, which is indeed the output of the meter decoder provided as a reference. So you see here that we have indeed properly decoded the Viterbi and read Solomon or actually in this part I skip read Solomon, but we have understood Viterbi because we can find the telemetry sentence and we can decode proper information. Now I found the telemetry but still a bit far from from pictures. But the next part, the end now is easy because I don't get the details. I took me a couple of months. This work has been started a bit more than a year ago. But once you've got the bits, it's just a matter of basically finding what the bytes are and checking whether they follow the standard. So I will not get the details. But indeed, you see that you've got this header, which is always the same that tells you why we're in a good job. That's the ID. Then they tell you have a counter. Well, indeed, these three bytes, you see that they're increasing one by one. So we're on the right path. And then they tell you here is a header. So this is an address of the first payload because the difficulty is that you've got the data packet and then you've got the payload packet. And there is no reason for the data packet to be synchronized on payload packets. So you might have payload lying over multiple data packets. So this is the address at which the first payload packet is starting and so on and so on. So I will not get the details, but that's just a matter of following the protocol. So once you've got the bytes, it's really easy. And finally, you are supposed on the payload to get JPEG images. And this is where I gave up. I said, OK, I'm not going to re-encode the whole Huffman encoder and everything. So this is where I just took this port of the decoder, the metro M2 decoder that was ported from Pascal to C++. And I just use the decoder. JPEG is standard bachelor level computer science, signal processing training. I didn't want to write all of it again, maybe for the next training session. But yeah, I wanted to get some images. So I went to so to conclude the talk. That's what I get at first. So you are told in the standard again, it's all detailed, the paper that I uploaded on the FOSDM website. You are told that your frames, your JPEG images are 8 by 8 bit frames. These 8 by 8 bit thumbnails repeat 14 times. And each one of these 14 times 8 bit sequences repeats 14 times along one picture line. And then you jump to a next instrument because there are three wavelengths, which they call three instruments. You get one line of the next instrument, 8 bits wide, 1,500 bit long. And then you go to the next instrument and so on. So here you see that I had some missing frames. So some missing thumbnails that I had to introduce. So what I did here is because you've got a counter, you know that when you have missing frames, here I just very stupidly did, if you're missing a frame, copy the previous frame. And this way I could miss, feel the missing thumbnails. And here you start seeing some pattern. And here you've got one parameter in JPEG, which is called the coefficient, quality coefficient, which gives you the relation between the quantization and the quantization matrix. And here is no quality. So you see that the sharp pictures here don't have the same tone as the flatter area of the picture, but you start seeing here the alps. And finally, by applying the quality coefficient, you get an image that is a bit more smooth and that compares, I think, quite favorably to the reference picture that was decoded using the satellite, of a metro decoder that you can find on the internet. So here you see, Istria, you have Balaton Lake somewhere over here, I think. You've got Vinise over here. So if you take the metro decoder, you get an image that is quite consistent with what we got by step-by-step decoding. So that was, of course, in 25, 27 minutes, a very fast highlight of the main steps. Go through the paper. The paper is actually about 50 pages long at the moment and increasing. I'm trying to put every detail about that. From IQ coefficient, overweight for JPEG image. CCSDS is a protocol for space communication. You might not care about weather satellites, but what Daniel Estevez is showing on his blog and as mentioned by Paul is this is a standard for most satellite communication and that's going to be the future because no AA is going to stop the analog satellites. So I think if you're interested in satellite decoding, this is really worth investigating. Daniel Estevez is just addressing all the satellites, armature satellites up there. Lucas Teske is a Brazilian guy who's working on Goethe satellites, geosynchronous, and his website was very inspiring. Despite at some point splitting the path of decoder, his beginning was very exciting. He helped me a lot by email. These two guys helped me a lot. This is the website that was hosting all the files about MetroM2. Somehow in the middle of this investigation, it disappeared. I don't know where the site is. Hopefully we've got a web archive. I don't know where this website is disappeared, but it's a fundamental repository of all the data, some of which cannot be found anywhere else. And finally, there is one article which is not very technical, but it tells you that it could be done. And with that, I conclude my talk and I thank you for your attention. Next one. So just as a quick conclusion, Martin introduced during his introductory talk that we are organizing the European New Radio Day. So my frustration is that here we have two days of first time. We have one day full of talks. We never have time to discuss with each other. Everyone's running to our sessions. And I wanted to have an opportunity to meet with people and sit together. So the way I organize this is one day, or we organize this is one day of oral presentation, one day of tutorials. Everything is open at the moment. We are proposing some tutorial. Please feel free to propose new tutorials. Robin Gates is coming from analog devices to demonstrate the Pluto. So he told me, I hope, and I trust him. It is located in France in Besançon. Besançon is a tiny remote city, which means that hotels are readily available here in the east of France. It's two and a half hour train trip from Paris. It's a few hours from Cal-Sru. It's a couple of hours from Cal-Sru. The call for contribution is March 21st. Registration is free, but please register because I need to organize. I need to know how many people are coming. So registration deadline is May 1st. The website is over here. And hopefully the evening dinner will be a barbecue so that everyone can talk to each other and have more time to discuss. So I will not waste our time with more advertisements, but please come.
various documentation about digital understanding all these things not using readily available software. So that's that's that's a enough to be following all these polar orbiting satellites or low earth orbiting weather satellites including amongst the various little and the future is digital communication. So standardize this communication. So that's a bit QPSK data at the output of new radio at the Earth. Same is true for Hubble. Hubble Space the way to the JPEG image through all the layers the data. This is all stolen from the Airspy website for receiving Meteor M2. Rational the documentation you will find that all CCSDS repeated header in the signal. So as shown in the communication was convolutional encoding. So error. And this unique error continues with a consistent path that tells you in the that by spreading the information over a long Solomon is just an extension of this. The only spread information over time because you want to because I don't have time to get the details. And and the telemetry data are encoded in a sentence Viterbi because we can find the telemetry this is an address of the first payload because this is the address at which the first payload supposed on the payload to get JPEG images. And favorably to the reference picture that was step-by-step decoding. So that was, of course, in steps. Go through the paper. The paper is communication. You might not care about weather standard for most satellite communication and if you're interested in satellite decoding, this sessions. And I wanted to have an opportunity to