nasa / openmct

A web based mission control framework.
https://nasa.github.io/openmct/
Other
12k stars 1.24k forks source link

Derived Telemetry Prototype #7823

Open scottbell opened 2 weeks ago

scottbell commented 2 weeks ago

Is your feature request related to a problem? Please describe. Create a new objected in Open MCT that supports a user entered expression (in math.js format) and outputs the result of that expression as telemetry.

charlesh88 commented 2 weeks ago

In progress notes while working in the branch. This may totally just be stuff you haven't gotten to yet, but if not, you're welcome:

charlesh88 commented 2 weeks ago

Changes so far:

Screenshot 2024-09-04 at 6 33 24 PM Screenshot 2024-09-04 at 6 33 46 PM

charlesh88 commented 2 weeks ago

Todos

@charlesh88

scottbell commented 2 weeks ago

Great work @charlesh88! I think I addressed the issues you described, and am working toward some e2e tests now. One question though: do we want to make the expression itself more prominent? It's rather small now, and is probably the main thing I want to be looking at when I bring up the view?

charlesh88 commented 2 weeks ago

Agree on the smallness of the expression; gave it a monospace font which looks bigger and is just better. Have pushed what I think are near complete changes for derived telemetry:

TODOs:

scottbell commented 2 weeks ago

To test:

  1. Create a new Derived Telemetry object
  2. Drop a couple of SWGs on it
  3. Change the parameter names from a to x, and b to y
  4. Add a simple math.js expression: x*y - ensure expression is valid
  5. Change expression to a*b - ensure expression is marked invalid
  6. Change back to a*b, and add some test values to the parameters (e.g., 2 and 5), then toggle "Apply Test Data". Ensure the output matches the multiplication.
  7. Go to the inspector tab in edit mode, and change the output format to %0.2f and save. Ensure floating point is formatted to only two decimals places in the output.
  8. Untoggle "Apply Test Data" and put time conductor in real time mode. Ensure "Current Output" has a changing number that looks reasonable.
  9. Drop Derived telemetry into an overlay plot along with the SWGs. Ensure both historical and realtime data plots.
unlikelyzero commented 1 week ago

Needs developer review but the tests and a11y look great. I made some comments.

Also we need to create good release notes and be sure to call this experimental. I went ahead and moved this to the 4.1.0 release