nasa / openmct

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

Derived Telemetry Prototype #7823

Open scottbell opened 2 months ago

scottbell commented 2 months 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 months 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 months 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 months ago

Todos

@charlesh88

scottbell commented 2 months 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 months 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 months ago

Testing Notes

  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 2 months 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

charlesh88 commented 2 weeks ago

Reference Images

Illustrates expected wrapping / alignment behavior at different widths. Screenshot 2024-11-14 at 10 08 18 AM Screenshot 2024-11-14 at 10 07 47 AM Screenshot 2024-11-14 at 10 07 14 AM Screenshot 2024-11-14 at 10 07 07 AM

charlesh88 commented 2 weeks ago

I've finished front-end sanding and shimming. @scottbell there were some minor markup changes with some v-ifs moving around a bit and some consolidation of containers. I put it through the wringer myself, but could you have a look and make sure I didn't break something?

@akhenry Otherwise, this is ready for review. Because changes are in the combined-rodap-stuff branch, I'm not going to create a PR yet given there might be more outstanding 'stuff'.

scottbell commented 2 weeks ago

@charlesh88 I did a cursory look (made a derived telemetry, testing good & bad equations, etc.) and it seemed to work well. FYI, I did cherry-pick your new commit over to the telemetry-comps branch that has the PR for this.