Colorado Ultraviolet Transit Experiment (CUTE): S-band transmissions #311
Replies: 11 comments 1 reply
-
Thank you for the VERY thorough explanation! I "thought" that I had replicated your steps to add the new block [CCSDS deframer (sans Reed-Solomon)] to my gr-satellites local install, but unfortunately that block continues to be 'not found' on my system. Your notes mention:
... but unless I am looking in the wrong place, I do not see any recent changes to that file nor any reference to the new block inside it. I'd be so grateful for a push in the right direction to allow me to have this new block available for testing in my local install so that I might follow along with the developments here. Many thanks! -Scott, K4KDR |
Beta Was this translation helpful? Give feedback.
-
Hi Scott, Please note that I pushed these changes to the lasp/gr-satellites fork, as I don't have direct commit access to gr-satellites. (I did open a pull request recently at Daniel's repository here for some CUTE UHF-related code, which he merged earlier this week. So this code will most likely find its way into this (upstream) gr-satellites repo the same way.) So, you'll need to clone that fork like so:
and build/install as you would normally. (Please let me know if you need help building this code.) It might also be worth noting that I was able to cherry-pick these commits over to the maint-3.8 branch and test these with GNURadio 3.8 as well if you're using that version. (I could explain how to do that as well if you need.) Keep in mind that it's not enough to re-run 'make' after pulling these code changes: you will need to re-generate makefiles with CMake for the changes in CMakeLists.txt to propagate. Anyway, if you could share some more details of what you tried, I'd be able to assist better.
Here's that file: And the corresponding change to the CMakeLists.txt: lasp@91fd8ba#diff-15bc7ae52de968dcdd55de32a820963f47ab4fc763aaaef4df0c8e76854328a8 Thanks, Nick |
Beta Was this translation helpful? Give feedback.
-
Many thanks for the reply! #1, somehow I missed that the 'CMakeLists.txt' file in question was not in the root, but was 'grc/components/deframers/CMakeLists.txt'. So, I have copied over your version. The new block is now available in my system! #2, I am not quite done as the there is a complaint about the new argument:
... clearly I have not properly incorporated all your additions to allow that to be interpreted. I will track that down next. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
Works perfectly w/ your sample I/Q file! Very sorry that I didn't copy over your changes properly the first time. FYI, system here is Ubuntu 18.04, GNU Radio 3.8.1.0, gr-satellites branch 'maint-3.8' No idea if I will be able to downlink your 2.4 GHz signal with enough SNR for decodes, but it'll be great to have the decoder incorporated into gr-sats. Thanks for the help & best of luck with the project! |
Beta Was this translation helpful? Give feedback.
-
Hi Scott, Glad you managed to figure things out, and thanks for sharing that screenshot! However, your screenshot showed me that I actually put a link to the wrong I&Q file 😬 The correct file is called CUTE_Sband_raw_4Msps_PRBS_recvd_trimmed.bin I'll edit the original issue report to have the new link. CUTE is using BPSK modulation, and you should see a spectrum evenly centered about 2.402 GHz. It should look something like this:
LASP has a 4.2m(!) dish, and even with that we struggle with our S-band link. I should have noted, we're wont be configured at launch to beacon over S-band, because successfully closing that link requires the spacecraft to actively point its patch antenna towards the ground, which means that we can't collect science data at the same time. So, our conops has us send commands to the spacecraft during passes to schedule active pointing on future passes for S-band downlink. But--we will be beaconing every 16 seconds on UHF, at 437.250 MHz--see my other issue report for details on that :)
Thanks! Nick |
Beta Was this translation helpful? Give feedback.
-
Thanks for updating the sample I/Q file location. Fortunately for me, that decodes properly in GRC as well. Appreciate the UHF beacon info; I'll be listening when the time comes! |
Beta Was this translation helpful? Give feedback.
-
Hi Nick! Thanks for this very detailed report. Indeed gr-satellites is currently missing the capability to deframe CCSDS uncoded frames, and this is a nice addition. May I suggest to call the new GRC block "CCSDS uncoded deframer" instead of just "CCSDS deframer"? This is how the TM Synchronization and Coding Blue Book refers to these frames (see Section 11.3, for instance). At first I was thinking that it was best to create a new Python block, but I like better your solution of adding an optional parameter to the RS Python block and then creating a new GRC block, since the RS block already has some options ( You are right that the correct way to add a hook is
Again, I would suggest using Something you might want to do if you have time is adding documentation for this new deframer. See "CCSDS Deframers" here. Just a mention of the existence of the uncoded deframer in that section would be fine, since the RS and concatenated deframer are treated together. Also see the large bullet list here. An item for the uncoded deframer should be included in that list. By the way, I found this note a bit confusing:
The syncword is not descrambled, and the CCSDS synchronous scrambler is reset at the beginning of the frame (just after the syncword), so even if I wanted to descrambler the syncword, I wouldn't know what the output would be, since the descrambler is not initialized at this point. Regarding defragmentation of packets, I think this is better done in a transport. However, there is something I don't understand well. How do you know if the frame you get contains the first fragment or it is one of the subsequent fragments? Is the Transfer Frame header a TM Space Data Link Primary Header, containing the First Header Pointer? If so, then I understand. Will the S-band transmitter be used to downlink files? If so, you might want to take a look at the file receiver infrastructure in gr-satellites, which is able to reassemble files that are transmitted in chunk (and it is rather general regarding the format of the chunks). I think I have addressed all the points in your comment, but if I've missed something, don't hesitate to insist, since that's a long comment, so I might have forgotten about something. |
Beta Was this translation helpful? Give feedback.
-
Hi Daniel, Apologies for the slow response, and thanks for your feedback.
I've gone ahead and made those changes--you can find these in commit
Interesting. My remark (that this is the value of the sync word after descrambling) was based off an assumption. In the 'Sync and create PDU' block, the default sync word is
which works, whereas BCT claims that the sync word is supposed to be
which is a good amount different, and doesn't work if entered as the sync word in said block. So, I assumed that 0x352EF853 must have been the value of the un-scrambled sync word, assuming further that scrambled this appears as 0x1ACFFC1D.
Yes, the transfer frame header contains a first header pointer. I am attaching the output of some C code I wrote a while back to decode a stream of S-band data, which should hopefully clarify things. Note that I cut the output short at an arbitrary point as somewhere shortly thereafter an erroneous bit caused the output to get screwy.
Sort of... the CUTE instrument can generate a few different data products:
Most of these data products are significantly larger than the transfer frame size: the CUTE detector is a Teledyne E2V CCD42-10, which has a resolution of 2048x512, and our ADC resolution is 16-bits. So, not counting the image header, the raw 2D frames are 2 megabits in size, which means that they take about 1024 transfer frames to get down. But thanks for pointing out that part of the code--I'll give that a look. |
Beta Was this translation helpful? Give feedback.
-
Hi, Your commit c0c014c looks perfect. You can send that in a PR right away if you want.
Apparently 0x352EF853 appears as the ASM for embedded data stream in Section 9.6 of the Blue book my guess is that in this transmitter it might be used internally when moving frames from the software to the transmitter, but it isn't sent over the air.
Thanks. That makes sense. It's pretty standard CCSDS stuff. |
Beta Was this translation helpful? Give feedback.
-
On a related note. Now that Github has added support for discussions in the repositories, I have started using them, and thought of some guidelines. From what I have seen so far (I'm a newcomer to this feature), discussions are somewhat similar to issues, but they can't be closed (which kind of makes sense, since you can call an issue "solved", but in a discussion anyone could come later with an interesting comment), and they support answering to particular messages (so you can have threads instead of just a single line of comments). I have transferred to the discussions the other issues that were open about satellite teams, since they haven't had any comments in months and I think the discussions section for satellite teams is a better place to gather all this information. Do you it's good to transfer your two issues to the discussions section? I think these are very good documentation, and in the discussions they don't risk being mixed with many other issues. If you think this is good, I'm not sure if you can do it yourself (there's a link called "Convert to discussion" on the right). If not, let me know and I'll do it. |
Beta Was this translation helpful? Give feedback.
-
Hi @daniestevez, apologies for the delay in responding to this.
Sure, that sounds good to me! However, I don't see a 'convert to discussion' button, unless I am looking in the wrong place. It would make sense that an unprivileged user such as myself would not be able to do this (to prevent abuse), so I suspect that you'd have to be the one to do it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Introduction
This is a continuation of issue #297, "Add support for the Colorado Ultraviolet Transit Experiment (CUTE)", with a focus on adding support for CUTE's S-band transmitter as opposed to its UHF transceiver.
CUTE S-band transmitter description
Demodulation
The BPSK demodulator that currently exists in
gr-satellites
has been found to work to demodulate CUTE S-band transmissions without modification.Deframing
gr-satellites
has two CCSDS deframers:python/components/deframers/ccsds_rs_deframer.py
)python/components/deframers/ccsds_concatenated_deframer.py
)Both of these assume that a forward error correcting (FEC) code is used. CUTE does not use an FEC, so neither of these blocks will work as-is. However, the former is very close to being usable as-is if the FEC block is bypassed.
The blocks internal to the CCSDS Reed-Solomon deframer are initialized in
ccsds_rs_deframer.py
at lines 62 through 73:gr-satellites/python/components/deframers/ccsds_rs_deframer.py
Lines 62 to 73 in 7f193ab
These blocks are then connected together on lines 75 through 86:
gr-satellites/python/components/deframers/ccsds_rs_deframer.py
Lines 75 to 86 in 7f193ab
So, these blocks are connected as such:
The problem w.r.t. CUTE is that this block does not provide a way of disabling (disconnecting) the
decode_rs
(self.fec
) block.I was able to successfully decode a recorded CUTE CCSDS transmission over S-band with
gr-satellites
with the following combination of blocks:I.e., this is equivalent to the
gr-satellites
CCSDS Reed-Solomon block withscrambler == 'CCSDS'
,precoding == differential
, and thedecode_rs
block removed.Modifying the CCSDS Reed-Solomon block to be compatible with CUTE S-band transmissions
Modifying the CCSDS Reed-Solomon decoder block to allow disabling forward error correction can be accomplished relatively easily, by adding a new
rs_en
parameter to the constructor:Exposing this new
rs_en
parameter to the user can be accomplished by then editinggrc/components/deframers/satellites_ccsds_rs_deframer.block.yml
. However, from an end-user perspective, this might be confusing: a user would not likely suspect that the CCSDS Reed Solomon deframer block would allow disabling a major part of its namesake, and might expect to find a separate CCSDS deframer block lacking Reed-Solomon decoding. I was able to accomplish this (i.e., create a separate block) without duplicating (Python) code by creating another.block.yml
file,grc/components/deframers/satellites_ccsds_deframer.block.yml
, which instantiates accsds_rs_deframer
withrs_en
forcibly set toFalse
. This same parameter in the CCSDS Reed Solomon deframer block (satellites_ccsds_rs_deframer.block.yml
) stays hidden from the user:rs_en
is forcibly set in this file toTrue
.However, I am not sure how exactly to implement this in
_deframer_hooks()
ingr-satellites/python/core/gr_satellites_flowgraph.py
. I think the right way of doing this is to add a line using theset_options()
routine, like so:Decoding
All data transmitted by CUTE over its S-band link is contained within a 2048 CCSDS transfer frame. Each transfer frame is prefixed by a 4-byte sync word. A CCSDS packet within a transfer frame may span multiple frames.
If the payload is longer than 2048 - 24 = 2024 bytes, the next transfer frame will not begin with CCSDS primary or secondary headers: it will continue with payload bytes that "overflowed" the previous transfer frame.
I am not sure how to deal with the problem of packets that span multiple transfer frames. I suppose I could do similar to what I did for CUTE's UHF packets, which is to say, implement a stateful telemetry decoder, but the idea of re-assembling frames in a
transport
seems more appealing in this case.Progress thus far
As can be seen from the links earlier in this issue report, I have pushed two commits to lasp/gr-satellites:
I am attaching a zip file, CUTE S-band flow graphs.zip, containing two flow graphs:
A̵ ̵t̵e̵s̵t̵ ̵I̵&̵Q̵ ̵f̵i̵l̵e̵ ̵c̵a̵n̵ ̵b̵e̵ ̵f̵o̵u̵n̵d̵ ̵a̵t̵ ̵t̵h̵i̵s̵ ̵l̵i̵n̵k̵.
EDIT: the correct file is called CUTE_Sband_raw_4Msps_PRBS_recvd_trimmed.bin--the above link points to a 70cm (UHF) CUTE beacon, not S-band data.
To-do
Beta Was this translation helpful? Give feedback.
All reactions