-
Notifications
You must be signed in to change notification settings - Fork 121
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
next_pass throws ValueError when called during an ongoing pass (sometimes) #164
Comments
Thanks for this report, and for making the effort to include sample code! My next few weeks might be busy, but hopefully I'll at some point have a chance to do some debugging to track down why the routine is misbehaving here. |
Using
Firstly, I got the same error as reported. With the added debug statements I get the following:
The next rise is again past the set, so I modified the rollback and got this result:
No exception, but something smells fishy here because the rise/transit/set are all the same date/time. @dmopalmer What is the |
1440 is the number of minutes in a day(24*60), so 1.0/1440 is 1 minute in days. So before the modification, it sees the 05:57:30 rise and redoes the calculation starting at 05:56:30. With the modification it has a different start. My guess is that with your initial conditions, the 05:57:30 event is a very low pass just above the horizon for a second or less. Try plotting altitude vs time at 1s intervals to confirm. |
@kerel-fs I have somewhat of a workaround which I use and may be of use to you. Instead of passing in So for each pass returned by In the case of an exception being thrown, I check for the values of |
🐞 Problem
The function
next_pass
invoked withsinglepass=True
(default since pyephem 3.7.7.0) throws an ValueError when there is an ongoing pass atobserver.time
sometimes (i.e. not for all datetimes during an onging pass, but for some, thanks @adamkalis for figuring this out!).Example code
Expected output: The pass details of the following pass (i.e. the next pass after the currently ongoing one has finished).
Pass details (calculated using sattools/pass)
References
Best regards,
kerel
The text was updated successfully, but these errors were encountered: