i nerd sniped myself tonight and i imagine the NSA operative who is assigned to me is very confused by the increasingly erratic and frustrated google searches for HOW DO I CALCULATE THE MOON WHERE IS THE MOON
-
@jon_valdes my hope was that the moon's position relative to the earth would be the one situation where geocentrism still holds enough water for a useful approximation, but I'm starting to think that this is a problem space where people don't typically seek useful approximations
@aeva what I found is most methods for calculating these things are approximations that break down if you deviate from the year 2000 by more than 5 millenia or something. It just depends on what you consider a "useful" approximation
-
@aeva what I found is most methods for calculating these things are approximations that break down if you deviate from the year 2000 by more than 5 millenia or something. It just depends on what you consider a "useful" approximation
@jon_valdes oh that's great. I figure for my use case it only has to be moderately accurate for the remainder of my lifespan however short or long that may be, and it's not really my problem if it accumulates a bit of drift after that
-
@jon_valdes oh that's great. I figure for my use case it only has to be moderately accurate for the remainder of my lifespan however short or long that may be, and it's not really my problem if it accumulates a bit of drift after that
@aeva perhaps the easiest way would be to look at how other programs do it. I spent a bunch of time reading code for Stellarium, for example. Perhaps that, or a website like this could help you?
https://eyes.nasa.gov/apps/orrery/#/moon?time=2025-09-10T04:57:12.041+00:00 -
@aeva perhaps the easiest way would be to look at how other programs do it. I spent a bunch of time reading code for Stellarium, for example. Perhaps that, or a website like this could help you?
https://eyes.nasa.gov/apps/orrery/#/moon?time=2025-09-10T04:57:12.041+00:00@jon_valdes i found this a few hours ago http://www.geoastro.de/elevazmoon/basics/index.htm haven't had a chance to look at it in detail but it looked promising at first skim
-
@jon_valdes i found this a few hours ago http://www.geoastro.de/elevazmoon/basics/index.htm haven't had a chance to look at it in detail but it looked promising at first skim
@aeva @jon_valdes I'm trying to remember what program we use to generate location accurate star charts in Avatar and Division... Maybe it can do the moon as well, will look it up later.
-
@aeva @jon_valdes I'm trying to remember what program we use to generate location accurate star charts in Avatar and Division... Maybe it can do the moon as well, will look it up later.
@aeva @jon_valdes alright I think we just use data from sdss and reproject it for alpha centuri, blindly extrapolating for the correct date using the star velocity. so no complex orbital mechanics. However for the planetary bodies in solar system we use code derived from https://stjarnhimlen.se/comp/ppcomp.html
-
@aeva @jon_valdes alright I think we just use data from sdss and reproject it for alpha centuri, blindly extrapolating for the correct date using the star velocity. so no complex orbital mechanics. However for the planetary bodies in solar system we use code derived from https://stjarnhimlen.se/comp/ppcomp.html
Word of caution about calculating these things on the GPU: implementations of trigonometric functions on the GPU are less accurate than you'd hope, and if you calculate a bunch of sin() and cos() for your view direction per pixel, they turn out not to be accurate enough for stable movement across a 60° fov on a 4K screen. Particularly Intel, which seems to barely pass the D3D precision requirements there...
-
Word of caution about calculating these things on the GPU: implementations of trigonometric functions on the GPU are less accurate than you'd hope, and if you calculate a bunch of sin() and cos() for your view direction per pixel, they turn out not to be accurate enough for stable movement across a 60° fov on a 4K screen. Particularly Intel, which seems to barely pass the D3D precision requirements there...
@jon_valdes @aeva right, yeah I should also mention all that is done on the cpu, and with double precision. I'm not really sure if you can even squeeze it to work with f32.
-
@jon_valdes @aeva right, yeah I should also mention all that is done on the cpu, and with double precision. I'm not really sure if you can even squeeze it to work with f32.
-
@jon_valdes @dotstdy blessedly I'm planning on doing this on the cpu, but