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

Get time of maximum eclipse & Chart JS update #15

Closed
wants to merge 24 commits into from

Conversation

johnarban
Copy link
Contributor

@johnarban johnarban commented Jan 24, 2024

This finds the time of maximum eclipse as well as the peak value. It uses slightly better values for the distance (the topocentric distance to the moon provide by astrocalc, and the true distance ot the sun rather than the average distance). Since the Sun is a bit more than 1 AU, the eclipse fraction can be about a percent higher than we currently estimate. this also derives the eclipse peak time and estimates the beginning and end of the eclipse. In all, it takes about 30ms to run, so it is run only when the location is changed. The plot and display I put in are very temporary, and only useful for testing (I don't know if we really want to have a graph or not).

The main goal for this commit is so that the user can easily when the eclipse is. This can then also be used by us to modify the user interface or time controls depending on the phase of the eclipse

@patudom
Copy link
Contributor

patudom commented Jan 29, 2024

Can you remind me how we intend to use this calculation? Is it solely for the purpose of deciding when to slow down time, as discussed in #14?

It looks like there are still round off errors because there is a large margin of places within the totality path where the max % doesn’t quite reach 1. (And it looks like the delta from 1 varies depending on where you are along the totality path):

Screenshot 2024-01-29 at 6 39 46 PM Screenshot 2024-01-29 at 6 40 08 PM

Also, I was trying to compare the max eclipse times for locations in a chart on this page, but it looks like there may be errors there. For example, if you look at Poplar Bluff, MO, their totality start and max totality times are the same. I would expect max totality to happen ~halfway between the start/end times, which is more in line with what John’s calculation shows, right? Or could their times be correct if the approach to/exist from totality are not symmetrical?

Screenshot 2024-01-29 at 6 13 30 PM

For all the locations I checked, John's "max eclipse time" is within the totality bounds on the chart, so I do think it will serve our purposes if we just want to find some time during totality.

  • Is it possible to run a query for whether a selected location is within the shaded eclipse path?

  • If so, we can use John’s max eclipse time to figure out internally when to slow down time to show the corona sprite for longer - maybe +/- 10 seconds from John's max time.

  • We can also add a button somewhere that says “go to totality” when you are inside the eclipse path.

But we probably don’t want to otherwise display any of this calculated info since it doesn’t always agree with data found elsewhere.

  • If that makes sense, we should strip out anything from the UI and internal calculations that we aren’t actually going to expose.

@patudom
Copy link
Contributor

patudom commented Feb 12, 2024

I think this is superseded by #60, so is it ok if we close this, @johnarban?

@johnarban
Copy link
Contributor Author

it is ok to close

😭

@johnarban johnarban closed this Feb 12, 2024
@johnarban
Copy link
Contributor Author

As a note. this uses an updated version of the Chart JS scatter plot component, with some small usability updates which make a little easier to use.

@johnarban johnarban changed the title Get time of maximum eclipse Get time of maximum eclipse & Chart JS update Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants