Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoscale creates weird plots if the min and max are very close #7321

Closed
3 of 7 tasks
ozyx opened this issue Dec 20, 2023 · 8 comments
Closed
3 of 7 tasks

Autoscale creates weird plots if the min and max are very close #7321

ozyx opened this issue Dec 20, 2023 · 8 comments
Labels
invalid duplicate or incorrectly filed severity:blocker type:bug
Milestone

Comments

@ozyx
Copy link
Contributor

ozyx commented Dec 20, 2023

Summary

Certain aggregate members which always emit a constant value are losing precision right before they are plotted, which leads to weird plots.

Screenshot 2023-12-20 at 1 48 11 PM

Screenshot 2023-12-20 at 1 47 59 PM

Notice that the same telemetry point on yamcs graph does NOT display incorrectly, so this is something Open MCT is doing.

Screenshot 2023-12-20 at 5 04 28 PM

Expected vs Current Behavior

The value coming in should be the value plotted. I.e:
If we receive the value 3.1456, we should plot that value at the same precision it was received.

Steps to Reproduce

Environment

  • Open MCT Version:
  • Deployment Type:
  • OS:
  • Browser:

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@ozyx ozyx added the type:bug label Dec 20, 2023
@ozyx ozyx added this to the Target:3.3.0 milestone Dec 20, 2023
@ozyx ozyx self-assigned this Dec 20, 2023
@unlikelyzero
Copy link
Collaborator

Setting as blocker given the context in which this was found

@ozyx ozyx changed the title Autoscale range calculations lose precision which leads to misrepresented data Some aggregate member values lose precision which leads to misrepresented data Dec 21, 2023
@scottbell
Copy link
Contributor

FWIW, if I override the websocket callback and add:

if (this.isTelemetryMessage(message)) {
                    let values = message.data.values || [];
                    let parentName = subscriptionDetails.domainObject.name;

                    values.forEach(parameter => {
                        let datum = {
                            id: qualifiedNameToId(subscriptionDetails.name),
                            timestamp: parameter[METADATA_TIME_KEY]
                        };
                        let value = getValue(parameter, parentName);
                        if (parameter?.engValue?.type === 'FLOAT') {
                            value = 3.31456;
                        }
...

it seems to display properly:

Screen.Recording.2023-12-21.at.9.51.09.AM.mov

@ozyx
Copy link
Contributor Author

ozyx commented Dec 21, 2023

Yeah, I went on a whole wild goose chase yesterday afternoon. I think the issue is that telemetry from yamcs sent over websocket/json has lower precision than historical data fetched from the API

@ozyx
Copy link
Contributor Author

ozyx commented Dec 21, 2023

I'm leaning towards this being a yamcs bug now? @unlikelyzero lets sync today when you have a minute

@ozyx
Copy link
Contributor Author

ozyx commented Dec 22, 2023

According to Mark R, these two values are identical and thus it's up to the client to display them in a non-confusing way. I'm inclined to agree, which would make this an Open MCT / plotting / autoscale issue

@ozyx ozyx changed the title Some aggregate member values lose precision which leads to misrepresented data Autoscale creates weird plots if the min and max are very close Jan 3, 2024
@akhenry
Copy link
Contributor

akhenry commented Jan 3, 2024

According to Mark R, these two values are identical and thus it's up to the client to display them in a non-confusing way.

@ozyx @merose 3.1456 might be 3.31455984 rounded, but it might also be 3.31455983. They're not necessarily the same number, and I can guarantee that treating all values within a certain precision as the same number will break functionality for other users who may care about differences at that precision. So I'm not convinced that changing how auto-scaling works is the right way to fix inconsistent precision from Yamcs.

I think if Yamcs is inconsistent with its precision when reporting real-time vs historical values, and they don't want to change that behavior, then we should just force all telemetry values to the lowest level of precision in the adapter, so in this case we round to 3.31456. We will have to confirm what strategy Yamcs uses for rounding to make sure we're consistent.

@ozyx
Copy link
Contributor Author

ozyx commented Jan 3, 2024

@akhenry its worth mentioning that using protobufs doesn't have this issue, it's just the yamcs json that sends telemetry with different precision

@unlikelyzero unlikelyzero removed this from the Target:3.3.0 milestone Jan 5, 2024
@unlikelyzero
Copy link
Collaborator

Closing to be tracked in akhenry/openmct-yamcs#406

@unlikelyzero unlikelyzero added the invalid duplicate or incorrectly filed label Feb 8, 2024
@unlikelyzero unlikelyzero added this to the Wont Fix milestone Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid duplicate or incorrectly filed severity:blocker type:bug
Projects
None yet
Development

No branches or pull requests

4 participants