yamcs / yamcs-studio

Desktop TM/TC Client for Yamcs
https://docs.yamcs.org/yamcs-studio/
Eclipse Public License 2.0
27 stars 14 forks source link

Add documentation or tool-tips for Yamcs Studio element properties #107

Closed keywcorp-dali closed 3 years ago

keywcorp-dali commented 3 years ago

In attempting to use the XY graph as my first attempt at using Yamcs studio, I wasn't sure what each of the properties do. I am currently having trouble figuring out how to use my packet's measure time (delivered from the spacecraft) as the X-axis. Screenshot from 2021-04-30 13-16-41

keywcorp-dali commented 3 years ago

Nvm. Found the more indepth documentation. Specifically for scripts I found it here: https://docs.yamcs.org/yamcs-studio/authoring/scripts/

fqqb commented 3 years ago

Set "Time Format" on X Axis, it will then take the parameter's time. I agree, widgets should have some full reference on the website.

keywcorp-dali commented 3 years ago

Thanks, I did try this and it seems like (via the PV Info) the latest timestamps were AQUIRED, but nothing shows up on the plot. Zooming way out doesn't show it, and i made sure there were lines and points in the trace. It seems to work if i leave it blank and it just is a raw count on the X axis but not when i set my timestamp.

fqqb commented 3 years ago

It could be I'm misunderstanding, but if you start with an blank XY graph, and (1) set 'PV Name' to the parameter you want to plot, and (2) set 'Time Format', then that is all there is to it.

Each parameter value in Yamcs has a linked generation time (usually coming from the packet), and this time is what Yamcs Studio will use on the X axis.

keywcorp-dali commented 3 years ago

Ah OK, i did get that to work. Our data is buffered several times before it reaches our Yamcs installation, so there is some lag between creation and reception. Each packet that comes in has a field of when it was generated on the craft. I was trying to display the parameter value against the craft-generated time, not necessarily the Yamcs-received time. Is that possible?

fqqb commented 3 years ago

In Yamcs each parameter value has in fact a 'generation time' (= packet time), and a 'reception time'. Usually we don't care about reception time. Studio uses the generation time.

So it sounds like your generation time is not yet correctly configured server-side. In Yamcs this is done via a preprocessor. This is a piece of code that intercepts each packet to determine some packet metadata.

In the following example the packet time is set to some system date, but you can make your own preprocessor and extract the time from the packet yourself, then set it (this code has access to the full packet binary): https://github.com/yamcs/quickstart/blob/master/src/main/java/com/example/myproject/MyPacketPreprocessor.java#L47

Once you have a custom preprocessor, you can activate by configuring it on the appropriate link, like in this example: https://github.com/yamcs/quickstart/blob/master/src/main/yamcs/etc/yamcs.myproject.yaml#L29

Pinging @xpromache in case he would have further input.

keywcorp-dali commented 3 years ago

This was exactly the information I needed. Thank you for taking time to help me. I have it displaying correctly now that I'm using the preprocessor to set the generation time.