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

RC 1.0.5 #34

Merged
merged 2 commits into from
Nov 20, 2024
Merged

RC 1.0.5 #34

merged 2 commits into from
Nov 20, 2024

Conversation

semuadmin
Copy link
Contributor

@semuadmin semuadmin commented Nov 16, 2024

pyspartn Pull Request Template

Description

  1. Add new optional timetags argument to SPARTNReader & SPARTNMessage, to allow them to use any available 32-bit gnssTimeTag values from the incoming datastream in order to decrypt messages (rather than having to provide an explicit basedate).
    • The timetags argument is a dict of the format {0: 495763673, 1: 485866844, 3: 410283479} where the key represents the message subType (0 = GPS, 1 = GLO, 2 = GAL, etc.), and the value represents the 32-bit gnssTimeTag value from the data stream (if present).
    • If a nominal decryption basedate of TIMEBASE (datetime(2010, 1, 1, 0, 0, tzinfo=timezone.utc)), or integer 0, is passed to SPARTNReader, it will endeavour to capture 32-bit gnssTimeTag values for each msgSubtype from the incoming data stream and pass these to SPARTNMessage via the timetags arg to decrypt messages of the same msgSubtype with 16-bit gnssTimeTags (timeTagtype=0).
    • NB: this will only work if the data stream contains valid 32-bit gnssTimeTag values for the same msgSubtype e.g. if an HPAC message with msgSubtype=2 precedes a GAD or OCB message with msgSubType=2 and timeTagtype=0 - until such an eventuality occurs, decryption of GAD or OCB messages may fail!
    • Always use quitonerror=ERRLOG or quitonerror=ERRIGNORE when setting basedate to TIMEBASE.
  2. SPARTMMessage will now return explicit SPARTNDecryptionError if unable to successfully decrypt/decode message using key and basedate provided.

Testing

Please test all changes, however trivial, against the supplied pytest suite tests/test_*.py. Please describe any test cases you have amended or added to this suite to maintain >= 90% code coverage.

  • tests added to test_stream.py

Checklist:

  • I agree to abide by the code of conduct (see CODE_OF_CONDUCT.md).
  • My code follows the style guidelines of this project (see CONTRIBUTING.MD).
  • I have performed a self-review of my own code.
  • (if appropriate) I have cited my public domain SPARTN documentation source(s).
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • (if appropriate) I have added test cases to the tests/test_*.py pytest suite to maintain >= 90% code coverage.
  • I have tested my code against the full tests/test_*.py unittest suite.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I have signed my commits.
  • I understand and acknowledge that the code will be published under a BSD 3-Clause license.

@semuadmin semuadmin added the enhancement New feature or request label Nov 16, 2024
@semuadmin semuadmin added this to the RC 1.0.5 milestone Nov 16, 2024
@semuadmin semuadmin self-assigned this Nov 16, 2024
@semuadmin semuadmin marked this pull request as draft November 16, 2024 18:36
@semuadmin semuadmin force-pushed the RC-1.0.5 branch 2 times, most recently from 266d082 to efa7e0e Compare November 17, 2024 10:10
@semuadmin semuadmin requested a review from a team November 17, 2024 23:30
@semuadmin semuadmin force-pushed the RC-1.0.5 branch 2 times, most recently from b1fdc97 to 752a31c Compare November 18, 2024 10:58
@semuadmin semuadmin marked this pull request as ready for review November 19, 2024 10:07
@semuadmin semuadmin merged commit 5550d39 into main Nov 20, 2024
@semuadmin semuadmin deleted the RC-1.0.5 branch November 20, 2024 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants