Planet rise and set times #244
Replies: 4 comments 3 replies
-
Hi @mayankkalbhor and welcome to the project! To find rise and set times for a planet, use the SearchRiseSet function. The Node.js demo program riseset.js shows how to find rise/set times for the Sun and Moon. The same approach works for planets also. For example, finding the next time Jupiter rises: const riseTime = Astronomy.SearchRiseSet(Astronomy.Body.Jupiter, observer, +1, date, 300); |
Beta Was this translation helpful? Give feedback.
-
it gives this error: We resolved 'astronomy-bundle' to astronomy-bundle/index.js, but the file does not exist on disk. please check the codepen and open codepen console |
Beta Was this translation helpful? Give feedback.
-
Sorry i mixed 2 things. I am getting the error "Uncaught TypeError: Cannot read properties of null (reading 'SearchRiseSet')" when checking next time Jupiter rises. please check the codepen and open codepen console https://codepen.io/mayanks20/pen/MWGmeEP?editors=0011&layout=left Is there any other import we need to make? |
Beta Was this translation helpful? Give feedback.
-
Thanks @cosinekitty I was able to resolve this. I included browser minified version of astronomy into the script tag and loaded it. Now i am able to fetch the values. //Saturn Rise Time: Sun Sep 18 2022 17:46:22 GMT-0500 (Central Daylight Time) |
Beta Was this translation helpful? Give feedback.
-
Does anyone know how to calculate planet rise and set times in javascript with this library
Beta Was this translation helpful? Give feedback.
All reactions