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]: ECI conversions give wrong result for sub-second dates (juliandate issue) #84

Closed
Pokornz opened this issue May 3, 2023 · 3 comments
Labels

Comments

@Pokornz
Copy link

Pokornz commented May 3, 2023

What happened?

When trying to convert to/from ECI coordinates with dates that don't have whole seconds (i.e. milliseconds are not zero), the sub-second information is ignored in the Julian date conversion: https://github.com/geospace-code/pymap3d/blob/main/src/pymap3d/sidereal.py#L87
When used to for ex. convert satellite trajectories, the resulting trajectory has stair-like shape.
image

Relevant log output

No response

@Pokornz Pokornz added the bug label May 3, 2023
@Pokornz
Copy link
Author

Pokornz commented May 3, 2023

It can be pretty much fixed by adding the microseconds
C = (((time.second + time.microsecond / 1e6) / 60.0 + time.minute) / 60.0 + time.hour) / 24.0
image

@Pokornz
Copy link
Author

Pokornz commented May 3, 2023

I accidentally closed the issue.
I have now submitted a pull request. It is my first time contributing to a code base, so any feedback is welcome.
@scivision does this change brake anything/ is there a reason why sub-second information is not used?

@scivision
Copy link
Member

fixed by #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants