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

[ldd-geom] Vectors_Cartesian_Specific allows multiple instances of the same vector #268

Open
benjhirsch opened this issue Nov 15, 2023 · 2 comments
Assignees
Labels
bug Something isn't working ldd-geom Issue for ldd-geom repo

Comments

@benjhirsch
Copy link

Describe the issue identified (if applicable)
The Vectors_Cartesian_Specific class allows multiple instances of the same vector with no mandate to disambiguate between them. For example, the class could contain two instances of Vector_Cartesian_Velocity_Target_Relative_To_Spacecraft with different component values, and users/programs would have no way to know which values are correct for what should be a uniquely defined vector.

Describe the solution you'd like
The dictionary should either prohibit multiple instances of the same vector within the class or require that the instances be disambiguated in some way (i.e. different target, different spacecraft).

LDD Dictionary Version
1.9.7.0

PDS4 IM Version
1.19.0.0 and 1.21.0.0 at least

@benjhirsch benjhirsch added bug Something isn't working ldd-geom Issue for ldd-geom repo labels Nov 15, 2023
@edguinness
Copy link

The dictionary team is working on this request. The fix is probably complicated.

@cgobat
Copy link
Member

cgobat commented Apr 11, 2024

Does the fix need to be any more complicated than simply changing it from

<DD_Association>
    <identifier_reference>XSChoice#</identifier_reference>
    <identifier_reference>Vector_Cartesian_Position_Central_Body_To_Spacecraft</identifier_reference>
    <identifier_reference>Vector_Cartesian_Position_Central_Body_To_Target</identifier_reference>
    ...
    <identifier_reference>Vector_Cartesian_Velocity_Target_Relative_To_Sun</identifier_reference>
    <reference_type>component_of</reference_type>
    <minimum_occurrences>1</minimum_occurrences>
    <maximum_occurrences>*</maximum_occurrences>
</DD_Association>

to something like

<DD_Association>
    <identifier_reference>Vector_Cartesian_Position_Central_Body_To_Spacecraft</identifier_reference>
    <reference_type>component_of</reference_type>
    <minimum_occurrences>0</minimum_occurrences>
    <maximum_occurrences>1</maximum_occurrences>
</DD_Association>
<DD_Association>
    <identifier_reference>Vector_Cartesian_Position_Central_Body_To_Target</identifier_reference>
    <reference_type>component_of</reference_type>
    <minimum_occurrences>0</minimum_occurrences>
    <maximum_occurrences>1</maximum_occurrences>
</DD_Association>
...
<DD_Association>
    <identifier_reference>Vector_Cartesian_Velocity_Target_Relative_To_Sun</identifier_reference>
    <reference_type>component_of</reference_type>
    <minimum_occurrences>0</minimum_occurrences>
    <maximum_occurrences>1</maximum_occurrences>
</DD_Association>

?

The only possible regression here that I can see is that it would be possible to have an empty <geom:Vectors_Cartesian_Specific/>, whereas currently at least 1 child is required. If that's undesirable, it would be pretty easily fixed with a schematron rule though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ldd-geom Issue for ldd-geom repo
Projects
Status: Todo
Development

No branches or pull requests

3 participants