Assistance with Yamcs Data-Link Setup and Algorithm Integration

76 views
Skip to first unread message

Tsai Hsuan Hsieh

unread,
Oct 16, 2024, 6:18:53 PM10/16/24
to yamcs

Dear Yamcs Team,

Thanks for your previous help. I've switched to UDP for telemetry and set up multiple datalinks (FSW_UDP_Link, DAQ_AVI_UDP_Link, etc.) for data reception, which were working fine. I'm using RocksDB for storage and aiming to transfer the data to OpenMCT for real-time visualization.

However, after adding a custom telemetry processing algorithm (CustomTelemetryProcessingAlgorithm.java) for data conversion in a the yamcs.myproject.yaml file, I encountered the following error:

yamcs.myproject.yaml: Unknown argument mdb[0]->config_

Here’s a brief overview of my current setup:

  • UDP telemetry data links
  • Custom telemetry processing algorithm
  • Simplified mdb configuration 

Yamcs isn't running after I added the algorithmfile in yamcs.myproject.yaml : 

Screenshot 2024-10-17 at 6.16.23 AM.png

, but I'm unsure if the issue is due to incorrect arguments in yamcs.myproject.yaml or the xtce.xml file. 

Could you advise on how to resolve the "Unknown argument" error and ensure the custom algorithm integration works properly?

Best regards,
Tsai-Hsuan Stasy HSIEH

Nicolae Mihalache

unread,
Oct 17, 2024, 6:44:20 AM10/17/24
to ya...@googlegroups.com
where did you get the "config" in the mdb definition?

And what exactly is your algorithm doing? In Yamcs we call algorithms the things that are defined as part of the MDB and run inside the processor. 
The TM processors have something called a pre-processor which handles packets as they come into Yamcs.

--
You received this message because you are subscribed to the Google Groups "yamcs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yamcs+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yamcs/3c72929e-6fd3-4770-89c7-40e44d1a5108n%40googlegroups.com.

Tsai Hsuan Hsieh

unread,
Oct 18, 2024, 12:21:53 AM10/18/24
to ya...@googlegroups.com

Dear yamcs team,

Thank you so much for pointing that out and providing accurate information! To be completely honest, I was using ChatGpt to find out how to write the xtce.xml file, that's where "config" comes from.

I've checked the algorithm definition, I think my understanding for the yamcs Algorithm is correct. I just put the algorithm in the wrong place.

The algorithm I’ve implemented is now written in JavaScript and defined directly in the xtce.xml file. It processes telemetry data, specifically for Electrical Power Subsystem (EPS) parameters like temperature, voltage, and current, converting raw telemetry data into derived values.

What the Algorithm Does:

  1. Input Processing: The algorithm takes telemetry data for two channels (e.g., temperature, voltage, and current from sensors) as input (Sunsensor).

  2. Data Conversion: For each channel, it processes the raw telemetry values using predefined equations, converting them into derived engineering values such as voltage, current, and temperature.

  3. Output: The converted values are outputted as Sunsensor_Beta and can be used for further processing, display, or alarm generation.

Integration with Yamcs:

  • The algorithm is now defined directly in the xtce.xml file using JavaScript. It is invoked when the Sunsensor telemetry parameter is updated.

  • Algorithm Execution: When the Sunsensor parameter is updated, the algorithm processes the data for two channels and outputs the derived parameter Sunsensor_Beta, which is a derived value.

Data Flow:

  • Preprocessing: The telemetry data is first processed by the preprocessor, defined in yamcs.myproject.yaml.

  • XTCE (MDB): The telemetry parameters and the algorithm are defined in the xtce.xml file. The CustomTelemetryProcessingAlgorithm is triggered by updates to the Sunsensor parameter.

  • Algorithm Execution: The algorithm runs when telemetry data arrives, performing conversions and outputting the derived values, which are available in the telemetry streams.

Let me know if any additional clarification is needed.

Thank you so much again!


Best regards,

Tsai-Hsuan Stasy HSIEH

Nicolae Mihalache

unread,
Oct 18, 2024, 6:10:58 AM10/18/24
to ya...@googlegroups.com
ChatGPT is taking over the world... 
We should set up a ChatGPT auto-responder and then we can all take a long holiday leaving the ChatGPTs to talk among themselves :)

The only problem is that it loses the point sometimes... like in your email - do you actually still have a problem or it's all working as expected?

nicolae

Tsai Hsuan Hsieh

unread,
Oct 18, 2024, 7:26:41 AM10/18/24
to ya...@googlegroups.com
Hi Nicolae,

Thanks for your help. Apologies for the last lengthy email!😂

Yes, so far the problem is resolved, with built-in sensor data in xtce file , the "yamcs: run" finally runs properly. 
I was just worried that the next problem might come up when I inject my real sensor data in xtce.xml. 
But that's another topic for another day.

Good day, 
Stasy


Tsai Hsuan Hsieh

unread,
Oct 20, 2024, 10:34:06 PM10/20/24
to ya...@googlegroups.com
Subject: Timestamp Issues with Telemetry Data in Yamcs

Hi Yamcs Team,

I’m having trouble with timestamps in my Yamcs setup. I keep seeing this in the logs:

<4>Time jumped in the past; current timestamp: +inf, new timestamp: +inf. Flushing old data.

I’m using the GenericPacketPreprocessor and have tried fixing the timestampOffset, but it’s not working. I also tested with fixed timestamps in my simulator, but no luck. I’ve gone through your time documentation and this related issue, but I’m still stuck.

Could you point me in the right direction? How can I adjust my setup to handle timestamps correctly?

Thanks for your help!

Stasy

Nicolae Mihalache

unread,
Oct 21, 2024, 3:21:17 AM10/21/24
to ya...@googlegroups.com
Can you show the configuration you are using and the beginning of your packet in hexadecimal up to and including the timestamp?

Note that you can use timestampOffset: -1 and then Yamcs will use the local time, not extracted from the packet. Maybe that's enough for your needs.

nicolae

Tsai Hsuan Hsieh

unread,
Oct 23, 2024, 12:49:21 AM10/23/24
to ya...@googlegroups.com
Subject: Re: Timestamp Issues with Telemetry Data in Yamcs

Hi Nicolae,

Thanks for your help, and apologies for the belated reply. We just successfully sent a rocket!

Below is the configuration I’m using and the hex dump of the packet, as requested.

1. Configuration from yamcs.myproject.yaml (with timestampOffset: 12):

dataLinks:
  - name: FSW_UDP_Link
    class: org.yamcs.tctm.UdpTmDataLink
    stream: tm_realtime
    port: 5001
    packetPreprocessorClassName: org.yamcs.tctm.GenericPacketPreprocessor
    packetPreprocessorArgs:
      timestampOffset: 12
      seqCountOffset: 4
      byteOrder: BIG_ENDIAN

2. Hexadecimal Packet Dump:

12:21:10.765224 lo    In  IP localhost.58675 > localhost.5001: UDP, length 24
0x0000:  4500 0034 d007 4000 4011 6caf 7f00 0001
0x0010:  7f00 0001 e533 1389 0020 fe33 0000 2bce
0x0020:  0000 017a 5f5d 7c00 0102 0304 0000 0000
0x0030:  0000 0000

3. Issue with timestampOffset: -1

When I switched timestampOffset to -1, the console stopped logging incoming packets. Do you have any suggestions on how to fix this?


Thanks!
Stasy




--
You received this message because you are subscribed to the Google Groups "yamcs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yamcs+un...@googlegroups.com.

Nicolae Mihalache

unread,
Oct 23, 2024, 5:49:56 AM10/23/24
to ya...@googlegroups.com
I just put that configuration in the quickstart project and played the file attached using the command:
nc -u -w 1 localhost 5001 <udp_payload.bin

When I use timestampOffset -1 I get the current time, when I use timestampOffset: 12 I get a time in the future which comes from the value 0x01020304_00000000 converted to milliseconds since 1970



udp_payload.bin

Tsai Hsuan Hsieh

unread,
Oct 24, 2024, 10:45:37 PM10/24/24
to ya...@googlegroups.com

Subject: Issues with Telemetry and Command Handling in Yamcs

Dear Yamcs Team,

Thank you so much! I switched to timestampOffset -1 and it really solves my problem!

Now I’m having issues regarding telemetry reception and command handling:

1. UDP Telecommands Not Processed Despite Data Received on the Port

I’m using UDP for sending telecommands, and data is being received on port 10025 as shown by tcpdump:

sudo tcpdump -i lo udp port 10025

Output example:

09:06:11.580896 IP localhost.56953 > localhost.10025: UDP, length 8
09:06:12.584304 IP localhost.56953 > localhost.10025: UDP, length 8

But on the Yamcs web interface, the "In count" for the udp-out link remains at 0, and no telecommands are processed.


Screenshot from 2024-10-25 09-45-04.png

Could this be related to my configuration, or is there another setting I am missing to properly process telecommands?

2. Telemetry and Telecommand Simulator in One Java File

I have combined telemetry and telecommand simulators in a single Java file, so they are being generated and sent in a continuous loop. Could running them from the same simulator cause conflicts in Yamcs?

3. Commands Not Appearing in the Web Interface

I have defined commands in my XTCE file (shown below), but they don’t appear on the web interface under the "Send Command" section.

Screenshot from 2024-10-24 14-25-20.png

<CommandMetaData>
  <CommandSet>
    <MetaCommand name="TestCommand">
      <ArgumentList>
        <Argument name="arg1">
          <IntegerArgumentType>
            <IntegerDataEncoding sizeInBits="32" />
          </IntegerArgumentType>
        </Argument>
        <Argument name="arg2">
          <StringArgumentType>
            <StringDataEncoding sizeInBits="64" />
          </StringArgumentType>
        </Argument>
      </ArgumentList>
      <CommandContainer name="TestCommandContainer">
        <EntryList>
          <ArgumentRefEntry argumentRef="arg1" locationInContainerInBits="0" />
          <ArgumentRefEntry argumentRef="arg2" locationInContainerInBits="32" />
        </EntryList>
      </CommandContainer>
    </MetaCommand>
  </CommandSet>
</CommandMetaData>

I have also configured Yamcs to load the XTCE database in yamcs.myproject.yaml as follows:

mdb:
  - type: xtce
    spec: mdb/xtce.xml

Despite this, the commands do not show up in the command list. Could you assist with troubleshooting this?

4. Overlapping Text in Web Interface

I tried several browsers and different resolutions to fix the overlapping text on my end, but in the end the Google Chrome browser still needs to shrink to 80%. And there seems to be no boundary lines that I can drag to resize the items on the Yamcs interface, is there a workaround or fix for this interface issue?

Screenshot from 2024-10-25 09-49-21.png

Thank you so much again!

Best regards,
Stasy




Nicolae Mihalache

unread,
Oct 30, 2024, 9:04:23 PM10/30/24
to ya...@googlegroups.com
Hi Stasy, sorry for the late reply.

1. Not sure what you want to do. In Yamcs commands are sent by Yamcs, not received by it. The quickstart has a udp-out link sending to localhost:10025 but you seem to have a simulator sending to that port (instead of receiving)?
2. Not sure which Java file you are talking about but Yamcs does not care how your simulator is implemented as long as it talks the right protocol. Note sure what your simulator is doing so maybe you can elaborate on that.
3. You need <MetaCommandSet> instead of <CommandSet>. I suggest you use an editor that can verify the xml against the xsd and provide autocompletion. VSCode with some XML plugin is able to do that.
4. I think we have to ask @fqqb about this one. What is the size of your screen? Seems like this pull request might solve it, perhaps you can give it a try:

Reply all
Reply to author
Forward
0 new messages