-
Notifications
You must be signed in to change notification settings - Fork 2
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
Basic implementation for ODM parsing #37
Conversation
In order to run diff --git a/ndmxml-3.0.0-common-3.0.xsd b/ndmxml-3.0.0-common-3.0-patched.xsd
index 9417112..75afba9 100644
--- a/ndmxml-3.0.0-common-3.0.xsd
+++ b/ndmxml-3.0.0-common-3.0-patched.xsd
@@ -574,14 +574,14 @@
</xsd:simpleType>
-<xsd:complexType name="rdmPositionType">
+<!-- <xsd:complexType name="rdmPositionType"> -->
<!-- TO DSB: RESOLVE use=optional/use=required for position -->
- <xsd:simpleContent>
+ <!-- <xsd:simpleContent>
<xsd:restriction base="ndm:positionType">
<xsd:attribute name="units" type="ndm:positionUnits" use="required" />
</xsd:restriction>
</xsd:simpleContent>
-</xsd:complexType>
+</xsd:complexType> -->
<xsd:complexType name="velocityType">
@@ -593,14 +593,14 @@
</xsd:complexType>
-<xsd:complexType name="rdmVelocityType">
+<!-- <xsd:complexType name="rdmVelocityType"> -->
<!-- TO DSB: RESOLVE use=optional/use=required for velocity -->
- <xsd:simpleContent>
+ <!-- <xsd:simpleContent>
<xsd:restriction base="ndm:velocityType">
<xsd:attribute name="units" type="ndm:velocityUnits" use="required" />
</xsd:restriction>
</xsd:simpleContent>
-</xsd:complexType>
+</xsd:complexType> -->
<xsd:simpleType name="velocityUnits">
@@ -919,7 +919,7 @@
<!--********************************************************************-->
<!-- Start of ODM covariance type definitions -->
<!--********************************************************************-->
-
+<!--
<xsd:group name="covarianceMatrixElementsGroup">
<xsd:sequence>
<xsd:element name="CX_X" type="ndm:positionCovarianceType"/>
@@ -944,7 +944,7 @@
<xsd:element name="CZ_DOT_Y_DOT" type="ndm:velocityCovarianceType"/>
<xsd:element name="CZ_DOT_Z_DOT" type="ndm:velocityCovarianceType"/>
</xsd:sequence>
- </xsd:group>
+ </xsd:group> -->
<xsd:complexType name="opmCovarianceMatrixAbstractType" abstract="true">
<xsd:sequence>
@@ -960,7 +960,7 @@
<xsd:element name="COV_REF_FRAME" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
-
+<!--
<xsd:complexType name="oemCovarianceMatrixType" mixed="false">
<xsd:complexContent>
<xsd:extension base="ndm:oemCovarianceMatrixAbstractType">
@@ -977,7 +977,7 @@
<xsd:group ref="ndm:covarianceMatrixElementsGroup" />
</xsd:extension>
</xsd:complexContent>
- </xsd:complexType>
+ </xsd:complexType> -->
<xsd:complexType name="positionCovarianceType">
<xsd:simpleContent>
@@ -1254,14 +1254,14 @@
<!-- APM/AEM Quaternion Related -->
<!--********************************************************************-->
-<xsd:complexType name="quaternionType">
+<!-- <xsd:complexType name="quaternionType">
<xsd:all>
<xsd:element name="QC" type="ndm:quaternionComponentType"/>
<xsd:element name="Q1" type="ndm:quaternionComponentType"/>
<xsd:element name="Q2" type="ndm:quaternionComponentType"/>
<xsd:element name="Q3" type="ndm:quaternionComponentType"/>
</xsd:all>
-</xsd:complexType>
+</xsd:complexType> -->
<xsd:simpleType name="quaternionComponentType">
@@ -1272,14 +1272,14 @@
</xsd:simpleType>
-<xsd:complexType name="quaternionRateType">
+<!-- <xsd:complexType name="quaternionRateType">
<xsd:all>
<xsd:element name="QC_DOT" type="ndm:quaternionDotType"/>
<xsd:element name="Q1_DOT" type="ndm:quaternionDotType"/>
<xsd:element name="Q2_DOT" type="ndm:quaternionDotType"/>
<xsd:element name="Q3_DOT" type="ndm:quaternionDotType"/>
</xsd:all>
-</xsd:complexType>
+</xsd:complexType> -->
<xsd:complexType name="quaternionDotType"> |
dc5ac20
to
6bf8a1b
Compare
With
But some patches are needed on top of the main branch of |
905606a
to
211c46e
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #37 +/- ##
==========================================
- Coverage 97.82% 97.59% -0.23%
==========================================
Files 59 70 +11
Lines 20732 26960 +6228
==========================================
+ Hits 20281 26312 +6031
- Misses 451 648 +197 ☔ View full report in Codecov by Sentry. |
17207af
to
b402186
Compare
This is my source material, from April 2023: https://public.ccsds.org/Pubs/502x0b3e1.pdf Here's my understanding of how ODM units work. 7.7.1.1 says:
In tables 3-3 and 4-3 each entry has at most one unit associated with it. So there's no entry which can have two different units. This is also strengthened by the fact that it explains that the units should be included "for documentation purposes and clarity only". Which to me suggests that they do not affect the values, and are only for humans to be able to understand the data at a glance. What makes it murky is the "combinations of units shall adhere to requirements listed in 1.5". Because this talks about units in SI. However to me it seems to refer only to combinations, which is only 1.5.1.2. 1.5.1.2 seems to only talk about combinations of units with other units and does not talk about combining with constants or something. I can draw similar conclusions about 7.7.2 and 7.7.3.1, 7.7.3.4, 7.7.3.6. Where it gets confusing again is 7.7.3.2 and 7.7.3.3, because it points to SANA Registry (reference [11]) which is:
The link shows "content not found". So I am hoping that all of the previous conclusions will hold for this part, but I can't be 100% sure. |
8b74c0f
to
c6deb03
Compare
9d27e1a
to
6081611
Compare
quick-xml handles this natively
We don't support ddd format yet
824ba39
to
6f5a963
Compare
2df92d9
to
bd2a675
Compare
These files are generated using a fork of xml-schema which is patched to generate quick-xml-compliant parsing. The xsd files are the following:
Vec3Double
xs:double
) extensions in xsd-parser-rsCovarianceMatrixType
xml-schema-derive
VecDouble
.= BLA
Cargo.toml
lox_derive
->lox-derive
lox-io
with_unit
After merge:
UserDefinedType
Implement deserializer for UserDefinedType and update docs #118with_unit
Set the right value for with_unit for the KVN parser #122.expect
instead of.unwrap
(see) Replace the unwraps into expects into the kvn proc macro code #125With
xsd-parser-rs
the following features are not working well:With
xml-schema-derive
the following issues exist:xsd-parser-rs
had some basic validation), but this is not a blocker for the first phase, maybe a nice to have in the futureOverall I've had great progress with porting
xml-schema-derive
to generatequick-xml
serde so I will keep using it for now although there's no clear winner betweenxml-schema-derive
andxsd-parser-rs
.Closes #33