Possible to search for rise/set times for arbitrary RA/DEC? #268
-
I was curious if it's possible/what the best way to search for a rise/set times of an arbitrary celestial body (eg. Messier 31). Using the JS library I see SearchRiseSet, however it takes a predefined Body from the included enum. Is it possible to dynamically create a body and hand it to the function or do I need to iterate thought time to find when the alt is 0? Sorry if I've overlooked something obvious. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
You are right, currently there is no convenient way to do that in Astronomy Engine. Let me think about this one. At the very least, I will create a demo program that shows how to use the generic |
Beta Was this translation helpful? Give feedback.
-
I'm starting to add support for up to 8 user-defined stars. You can efficiently re-define a star at any moment, so really it's an unlimited number of stars, but up to 8 simultaneous no-hassle distinct ones. I'm working on this in the define_star branch. The TypeScript/JavaScript code already has a working rise/set/culmination search for arbitrary stars that has been tested for Sirius and Canopus. Test data comes from the US Navy's Rise/Set/Transit Times online tool. I have started on the C version, and will move on to the other languages once that's finished. The initial support will be in SearchRiseSet, SearchHourAngle, and functions they call like HelioVector and GeoVector. GeoVector will correct star positions for parallax and (optionally) aberration. Over time I will add user-defined star support to other functions. It will probably take a couple more days to finish this. I'll post back here once it's officially released. I'm glad you brought this up because it's something I've had in the back of my mind for a while. |
Beta Was this translation helpful? Give feedback.
-
Sounds good, I'll happily test once released. Thanks for such a quick response! |
Beta Was this translation helpful? Give feedback.
-
OK, I just released Astronomy Engine v2.1.12, which includes support for user-defined stars. Take a look at the new function DefineStar. Once you have defined a star, you will be able to use Please let me know how it works, and if you have questions. User-defined stars will work with other functions where they would make sense, such as |
Beta Was this translation helpful? Give feedback.
-
This is working well and seems to be accurate (I'm spot checking various objects with Stelarium). Thanks for incorporating so quickly. I'll let you know if I see anything out of the ordinary. |
Beta Was this translation helpful? Give feedback.
OK, I just released Astronomy Engine v2.1.12, which includes support for user-defined stars. Take a look at the new function DefineStar. Once you have defined a star, you will be able to use
SearchRiseSet
to find when it rises or sets, andSearchHourAngle
to find when it culminates (hour angle = 0).Please let me know how it works, and if you have questions. User-defined stars will work with other functions where they would make sense, such as
HelioVector
andGeoVector
. If you find any functions where user-defined stars aren't working, please let me know.