[cssm] Small question to WG
Barkley, Erik J (US 3970)
erik.j.barkley at jpl.nasa.gov
Wed Mar 1 16:49:14 UTC 2023
It may be something we want to leave for implementation check. To the best of my knowledge, a regex to match a range of 1—366 (which fits with CCSDS Time code B) tends to be nontrivial to write and harder for mere mortals to read. Regex does not really understand numeric ranges as it is more about pattern matching. We could improve this with a relatively minor mod to the the regex for the day of year portion, i.e, [0-3][0-6][0-9] but this would allow the “patterns” 367, 367, 369 (but of course we would want to allow 359”) So still some minor checking. This would maintain the leading zeroes for the earlier days of the year – ie., “001”, “002”, etc. If you really want to check for just 1..366 as a range, then we probably have a regex something along the lines of (?:36[0-6]|3[0-5][0-9]|[12][0-9]{2}|[1-9]?[0-9]), but this would not allow “001;, just the ”range” of “1” to “366”. And of course you would still have to further check that 366 is only used on those leap year occasions. So perhaps either the relatively minor mod ( [0-3][0-6][0-9] )or just leave it as it is.
Best regards,
-Erik
From: SMWG <smwg-bounces at mailman.ccsds.org> On Behalf Of Colin Haddow via SMWG
Sent: Wednesday, March 1, 2023 5:42
To: Marcin.Gnat at dlr.de; smwg at mailman.ccsds.org
Subject: [EXTERNAL] Re: [cssm] Small question to WG
Hi Marcin,
I think basically it was one of the first things implemented when we were still getting to grips with XML and we've never revisited it. Probably makes sense to tighten up the definition when we do the 5 year review of the AED. I suspect something similiar a[plies to the CCSDS time code A defimition.
Cheers for now
Colin (currently in Madrid airport waiting for connecting flight...)
Sent from Outlook for Android<https://urldefense.us/v3/__https:/aka.ms/AAb9ysg__;!!PvBDto6Hs4WbVuu7!LA8aY0GysUhdBE-foOVfALTzswzYmzTiiN-REieYAx-T5OAiXLors-Iz2EN3nR34YSYimAXDynqU-xKiwW-DOFZGAA$>
________________________________
From: SMWG <smwg-bounces at mailman.ccsds.org<mailto:smwg-bounces at mailman.ccsds.org>> on behalf of Marcin Gnat via SMWG <smwg at mailman.ccsds.org<mailto:smwg at mailman.ccsds.org>>
Sent: Wednesday, March 1, 2023 12:19:34 PM
To: smwg at mailman.ccsds.org<mailto:smwg at mailman.ccsds.org> <smwg at mailman.ccsds.org<mailto:smwg at mailman.ccsds.org>>
Subject: [cssm] Small question to WG
Dear all,
DISCLEIMER: it’s not a initiation of any changes in any standards, but rather a question to smart community 😊
When working on implementation at DLR, one of my colleagues asked me, why our time code definition in schema allows any number ranges (i.e. for the DOY section everything between 000 and 999 is allowed)? Is it just to be handled by implementation (to watch out for DOY being between 001 and 365 or 366)? Any other thoughts?
<xsd:simpleType name="CcsdsAsciiTimeCodeBType">
<xsd:restriction base="xsd:string">
<xsd:pattern value="\d{4}-\d{3}T\d{2}:\d{2}:\d{2}(.(\d)+)?Z?"/>
</xsd:restriction>
</xsd:simpleType>
Cheers
Marcin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ccsds.org/pipermail/smwg/attachments/20230301/b7157cd0/attachment-0001.htm>
More information about the SMWG
mailing list