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

More accurate rotation #10

Merged
merged 1 commit into from
Feb 23, 2023
Merged

Conversation

dieghernan
Copy link
Contributor

@dieghernan dieghernan commented Feb 23, 2023

Fix #9

Following #7 and #9 this PR computes the rotation of the projection (lon) as per d3-celestial:

https://github.com/ofrohn/d3-celestial/blob/7e720a3de062059d4c5400a379146a601d9010e0/celestial.js#L1215-L1250

Again, MapsForMoments is incorrect, for a given day provides the star position as per 22:00 UTC (see post on #7 for more info), but this PR would replicate exactly their results:

https://mapsformoments.co.uk/modules/starnameregistry/js/map-builder.js?v=d3

                'copies': '1',
                'deliveryOption': 'post',
                'selectedHour': '22',
                'selectedMinute': '00',
                'message': '',
                'message1': '',
                'message2': '',
                'hours': hours,
                'minutes': minutes,

@dieghernan
Copy link
Contributor Author

dieghernan commented Feb 23, 2023

See comparisons:

#9

plot_starmap( "Riyadh, Saudi Arabia",
              date = "2023-02-14")

image

@dieghernan
Copy link
Contributor Author

#5

plot_starmap( "Caracas",
              date = "1992-02-29")

image

@benyamindsmith
Copy link
Owner

@dieghernan Wow! Thank you! I saw your answer on the GIS StackExchange but I didn't get a chance to look over your answer!

I'm flattered that you took the time to contribute to the package and implementing the get_mst() function you authored. Also good catch for making a utils.R file.

Your PR looks good as far as I can tell. Thank you again!

@benyamindsmith benyamindsmith merged commit afe31be into benyamindsmith:main Feb 23, 2023
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.

can't plot Riyadh with coordinates
2 participants