J2000 to Now - Rotation_EQJ_EQD #114
-
Hi ! Thank you for this wonderful module! I am looking for a way to get the position of a star on today's date. I have the coordinates of the star but in J2000 format (ra/dec). Someone can help me ? My code is in javascript. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Hi @mikasmart ! That is a great question. You were on the right track looking at
Or you can optionally specify a particular date and time to use:
|
Beta Was this translation helpful? Give feedback.
-
I did a test with M57 and using data from Stelarium. The results are very close but incorrect. With M57 (data from Stelarium) Result from equator_of_date (Must be equal to M57 & NOW) NOW / 18h54m22.32 - 33°03'21.6" / 18.90621 - 33.05597 Test started with command |
Beta Was this translation helpful? Give feedback.
-
Hi @cosinekitty First of all, let me congratulate you on your astronomy engine library! I just found it and still wondering, how well it is implemented and how easy is to use it! I am coming from the C#.NET world and I also tried other libraries, like for example Joe Sauve's AASharp which is very good too but has somewhat poor or almost zero documentation. Nevemind, I had the same question as @mikasmart and meanwhile I am thinking about, whether is it possible to do it a different way, using the Astonomy.Equator( ) method, like this: I have one star from the Henry Draper catalog, having its _RA.icrs and _DE.icrs coordinates, both are J2000 in decimal degrees. My C# code is then: using CosineKitty;
// J2000 equatorial coordinates of the HD11150 star
var RA = 28.9986; // according to VizieR catalog desc it's in decimal degrees, later we need to convert to sidereal hours by dividing 15
var DE = 80.9102; // decimal degrees
var obs = new Observer(lat, lon, height);
var now = DateTime.UtcNow; // the date we want to convert to
var astro_now = new AstroTime(now);
// do the conversion
// first let's define a star, but switch RA coordinate in decimal degrees to sidereal hours, because the method expects it
Astronomy.DefineStar(Body.Star1, RA / 15.0, DE, 1000.0);
var coord = Astronomy.Equator(Body.Star1, astro_now, obs, EquatorEpoch.OfDate, Aberration.None);
// do something with the coord, e. g. display it My question is, whether is the above calculation correct for the input star? Does the Equator method convert J2000 to JNow coordinates this whay? BR, Ladislav |
Beta Was this translation helpful? Give feedback.
Hi @mikasmart ! That is a great question. You were on the right track looking at
Rotation_EQJ_EQD
. This is not a trivial conversion, so I have added a demo to illustrate it for you. Take a look at equator_of_date.js. Here is a sample of how to use it for the equator at the current date and time:Or you can optionally specify a particular date and time to use: