Using Reed Solomon to decode CADU

138 views
Skip to first unread message

Jerome Puech

unread,
Jun 15, 2022, 9:32:46 AM6/15/22
to yamcs
Hi,

I am trying to implement a udp TM link receiver, and I want to use Reed Solomon to decode my frames.

My frames are a CADU with 1115 bytes of header + data and 160 bytes of RS at the end.

So I tried 2 yaml configurations :
  • 1)
    • With frameLength: 1115 in the datalink. 
    • Consequence : Yamcs is running, but I get this error when I send my frame : 
      • 15:18:04.760 pus [22] UdpTmFrameLink [udp-frame-tm] Error processing frame: java.lang.IllegalArgumentException: Bad length 1115 (expected 1275)
      • org.yamcs.tctm.ccsds.CcsdsFrameDecoder.decodeFrame(CcsdsFrameDecoder.java:62)
      • org.yamcs.tctm.ccsds.AbstractTmFrameLink.handleFrame(AbstractTmFrameLink.java:71)
      • org.yamcs.tctm.ccsds.UdpTmFrameLink.run(UdpTmFrameLink.java:72)
      • java.base/java.lang.Thread.run(Thread.java:829)
  • 2)
    • With frameLength: 1275 in the datalink.
    • Consequence: Yamcs is not running and I get this error :
      • 15:22:39.683 _global [1] YamcsServer Failure while attempting to validate configuration: Raw frame decoder output frame length 1115 does not match the defined frame length 1275
            org.yamcs.tctm.ccsds.AbstractTmFrameLink.init(AbstractTmFrameLink.java:41)
            org.yamcs.tctm.ccsds.UdpTmFrameLink.init(UdpTmFrameLink.java:37)
            org.yamcs.management.LinkManager.createDataLink(LinkManager.java:125)
            org.yamcs.management.LinkManager.<init>(LinkManager.java:94)
            org.yamcs.YamcsServerInstance.doInit(YamcsServerInstance.java:144)
            org.yamcs.YamcsInstanceService.initAsync(YamcsInstanceService.java:61)
            org.yamcs.YamcsServerInstance.init(YamcsServerInstance.java:121)
            org.yamcs.YamcsServer.addInstance(YamcsServer.java:563)
            org.yamcs.YamcsServer.addGlobalServicesAndInstances(YamcsServer.java:1321)
            org.yamcs.YamcsServer.prepareStart(YamcsServer.java:1156)
            org.yamcs.YamcsServer.main(YamcsServer.java:953)


Under i added  an example of frame I am sending and the datalink configuration I am using.

Do you know if there is another parameter to add in the config file for RS ?

Many thanks,
Jérôme


Example of frame :

0x3fc1e30b1800080ac40b002d1003190002793c34e50000000000006c0000000000000000000000000000000000000000000080100000e5a88aa307ffffff0416aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa0100c000205a7193cd5477980f245afa3ef4f12a5ececf04572f281c9e41468c26ff9b05acb3c7ea0a5af46ed882b1502ca2dc914c4ee467fb36eab7f9fce0560fc03603117b36ba368df0dc874a9efea76d98c800c5cb4d8557107ec84a6f42afbfb91aaa252517bbb038f0c515ea21ab5188b4b3e46216367592b636b00523beefc4738b9373a291aefdc8c7ee30aedc5e9681e69e8453044503c5b5fc954243728e67


datalink config :

  - name: udp-frame-tm
    enabledAtStartup: true
    class: org.yamcs.tctm.ccsds.UdpTmFrameLink
    port: 10016
    rawFrameDecoder:
      codec: RS # NONE Or RS
      interleavingDepth: 5 # 1, 2, 3, 4, 5 or 8
      errorCorrectionCapability: 16 #8 or 16
      derandomize: false
    ### Frame type has to be AOS (CCSDS 732.0-B-3), TM (CCSDS 132.0-B-2) or USLP (CCSDS 732.1-B-1)
    frameType: "TM"
    spacecraftId: 1020 # Change it according to your spacecraftId
    frameLength: 1275 # decoded frame length. If you are sending a TM transfer frame 1115
    frameHeaderErrorControlPresent: true
    insertZoneLength: 0
    errorDetection: NONE #NONE, CRC16 or CRC32 (only for USLP)
    clcwStream: "clcw"    #publish the received CLCW (what they call OCF in the CCSDS AOS/TM/USLP standards) to this stream, to be used by the FOP1
    goodFrameStream: "good_frame_stream" #publish the good frames on this stream
    badFrameStream: "bad_frame_stream"   #publish the bad frames on this stream
    virtualChannels:
      - vcId: 0
        ocfPresent: true
        service: "PACKET"  #supported services for AOS are M_PDU, B_PDU or VCA_SDU
        maxPacketLength: 2048
        packetPreprocessorClassName: org.yamcs.tctm.pus.PusPacketPreprocessor
        packetPreprocessorArgs:
           errorDetection:
              type: CRC-16-CCIIT
           timeEncoding:
              type: CUC
              epoch: TAI
              implicitPField: 0x1F
           pktTimeOffset: 11
           timePktTimeOffset: 7
        stream: "tm_realtime" #which yamcs stream to put the data on

Alexandre Laborie

unread,
Jun 27, 2022, 7:06:31 AM6/27/22
to yamcs
I also tested it with Jérome's configuration,  starting from the ccsds-frames example given with yamcs source code, and had the same issue. In the first case, it seems like the Reed-Solomon part (end of frame) is just removed, so the RS decoder is kind of lost. Hence, should we modify CcsdsFrameDecoder.java or are we missing something in the yaml configuration?
Thanks, and best regards,
Alexandre Laborie
Reply all
Reply to author
Forward
0 new messages