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

BUG/ENH: sgp4 epoch #72

Merged
merged 7 commits into from
Jan 21, 2022
Merged

BUG/ENH: sgp4 epoch #72

merged 7 commits into from
Jan 21, 2022

Conversation

jklenzing
Copy link
Member

Description

Closes #67. Fixes a bug where sequential days have a large discontinuity in data when Keplerian elements are used.

Adds epoch kwarg to missions_sgp4 instrument. The epoch is used to specify a datetime that corresponds to the Keplerian elements of the orbit used for propagation.

If a user does not specify an epoch, it defaults to the start of the file range for the instrument. epoch will be set an instantiation.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Using code in #67 and new unit tests.

Test Configuration:

  • Operating system: Mac OS 11.6.1
  • Version number: python 3.8.11

Checklist:

  • Make sure you are merging into the develop (not main) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • Add a note to CHANGELOG.md, summarizing the changes -- fixes for previous pull in same version

@jklenzing jklenzing marked this pull request as ready for review December 23, 2021 20:12
@jklenzing jklenzing added bug Something isn't working enhancement New feature or request labels Dec 23, 2021
@jklenzing jklenzing added this to the 0.3.0 release milestone Dec 23, 2021
@jklenzing jklenzing linked an issue Dec 23, 2021 that may be closed by this pull request
@jklenzing
Copy link
Member Author

@rstoneback, there may be a cleaner way of implementing this.

Comment on lines +64 to +66
if 'epoch' not in self.kwargs['load'].keys():
self.kwargs['load']['epoch'] = self.files.files.index[0]

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this to set the default since I can't access self in the load function.

Copy link
Collaborator

@rstoneback rstoneback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit but looks good.

pysatMissions/instruments/missions_sgp4.py Outdated Show resolved Hide resolved
Co-authored-by: Russell Stoneback <github@stoneris.com>
@jklenzing
Copy link
Member Author

Thanks @rstoneback!

@jklenzing jklenzing merged commit 5bbf05d into develop Jan 21, 2022
@jklenzing jklenzing deleted the bug/sgp4_epoch branch January 21, 2022 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: epoch in sgp4 instrument should be consistent
2 participants