![]() |
|
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
Dear group,
Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? Thanks in advance! Anthony. |
#2
|
|||
|
|||
![]() "Anthony Ayiomamitis" wrote in message ... Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? Thanks in advance! It's not online, but Google Earth has a Google Sky view with which you can do this. However, you need to go into the Backyard Astronomy Layer and tick the Constellation Boundaries option to make it easy to work out which constellation you are in. |
#3
|
|||
|
|||
![]()
On Sep 26, 8:21*am, Anthony Ayiomamitis wrote:
Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? http://vizier.u-strasbg.fr/vizier/Vi...llations.htx#q - Canopus56 P.S. - I havenot run across any code samples to derive a function in Java or VBA. |
#4
|
|||
|
|||
![]()
On Sep 26, 10:12*am, canopus56 wrote:
On Sep 26, 8:21*am, Anthony Ayiomamitis wrote: Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? Also of interest: you can also download the constellation boundary line points from VizieR catalogue VI/49 at: http://vizier.u-strasbg.fr/viz-bin/VizieR?-source=VI/49 I havenot found a way to use the VizieR search form for catalogue VI/ 49 to return a simple constellation list. - C |
#5
|
|||
|
|||
![]()
On Sep 26, 10:12*am, canopus56 wrote:
On Sep 26, 8:21*am, Anthony Ayiomamitis wrote: Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? P.P.S. Looks like there is a separate Simbad catalogue that includes data and sample code in C for determining the constellation directly from position: http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/42 - Canopus56 |
#6
|
|||
|
|||
![]()
In article ,
canopus56 wrote: On Sep 26, 8:21=A0am, Anthony Ayiomamitis wrote: Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? http://vizier.u-strasbg.fr/vizier/Vi...llations.htx#q - Canopus56 P.S. - I havenot run across any code samples to derive a function in Java or VBA. Here's some old C code of mine which does just that. I think it's quite easy to rewrite in Java if you want. It compiles directly as C++: /* constell.c Program to find in which constellation an RA/Dec position is Adapted from CONST.FOR by Paul Schlyter, 1989-10-08 Re-arranged 1989-12-31 */ enum constell { And, Ant, Aps, Aqr, Aql, Ara, Ari, Aur, Boo, Cae, Cam, Cnc, CVn, CMa, CMi, Cap, Car, Cas, Cen, Cep, Cet, Cha, Cir, Col, Com, CrA, CrB, Crv, Crt, Cru, Cyg, Del, Dor, Dra, Equ, Eri, For, Gem, Gru, Her, Hor, Hya, Hyi, Ind, Lac, Leo, LMi, Lep, Lib, Lup, Lyn, Lyr, Men, Mic, Mon, Mus, Nor, Oct, Oph, Ori, Pav, Peg, Per, Phe, Pic, Psc, PsA, Pup, Pyx, Ret, Sge, Sgr, Sco, Scl, Sct, Ser, Sex, Tau, Tel, Tri, TrA, Tuc, UMa, UMi, Vel, Vir, Vol, Vul, NotFound = -1 }; #define Ser_Caput Ser #define Ser_Cauda Ser /* Table of IAU constellation boundaries. Equinox: 1875.0 */ static struct constbor { float RA_lower, RA_upper, decl; enum constell con; } constbor[] = { 0.0000f, 24.0000f, 88.0000f, UMi, 8.0000f, 14.5000f, 86.5000f, UMi, 21.0000f, 23.0000f, 86.1667f, UMi, 18.0000f, 21.0000f, 86.0000f, UMi, 0.0000f, 8.0000f, 85.0000f, Cep, 9.1667f, 10.6667f, 82.0000f, Cam, 0.0000f, 5.0000f, 80.0000f, Cep, 10.6667f, 14.5000f, 80.0000f, Cam, 17.5000f, 18.0000f, 80.0000f, UMi, 20.1667f, 21.0000f, 80.0000f, Dra, 0.0000f, 3.5083f, 77.0000f, Cep, 11.5000f, 13.5833f, 77.0000f, Cam, 16.5333f, 17.5000f, 75.0000f, UMi, 20.1667f, 20.6667f, 75.0000f, Cep, 7.9667f, 9.1667f, 73.5000f, Cam, 9.1667f, 11.3333f, 73.5000f, Dra, 13.0000f, 16.5333f, 70.0000f, UMi, 3.1000f, 3.4167f, 68.0000f, Cas, 20.4167f, 20.6667f, 67.0000f, Dra, 11.3333f, 12.0000f, 66.5000f, Dra, 0.0000f, 0.3333f, 66.0000f, Cep, 14.0000f, 15.6667f, 66.0000f, UMi, 23.5833f, 24.0000f, 66.0000f, Cep, 12.0000f, 13.5000f, 64.0000f, Dra, 13.5000f, 14.4167f, 63.0000f, Dra, 23.1667f, 23.5833f, 63.0000f, Cep, 6.1000f, 7.0000f, 62.0000f, Cam, 20.0000f, 20.4167f, 61.5000f, Dra, 20.5367f, 20.6000f, 60.9167f, Cep, 7.0000f, 7.9667f, 60.0000f, Cam, 7.9667f, 8.4167f, 60.0000f, UMa, 19.7667f, 20.0000f, 59.5000f, Dra, 20.0000f, 20.5367f, 59.5000f, Cep, 22.8667f, 23.1667f, 59.0833f, Cep, 0.0000f, 2.4333f, 58.5000f, Cas, 19.4167f, 19.7667f, 58.0000f, Dra, 1.7000f, 1.9083f, 57.5000f, Cas, 2.4333f, 3.1000f, 57.0000f, Cas, 3.1000f, 3.1667f, 57.0000f, Cam, 22.3167f, 22.8667f, 56.2500f, Cep, 5.0000f, 6.1000f, 56.0000f, Cam, 14.0333f, 14.4167f, 55.5000f, UMa, 14.4167f, 19.4167f, 55.5000f, Dra, 3.1667f, 3.3333f, 55.0000f, Cam, 22.1333f, 22.3167f, 55.0000f, Cep, 20.6000f, 21.9667f, 54.8333f, Cep, 0.0000f, 1.7000f, 54.0000f, Cas, 6.1000f, 6.5000f, 54.0000f, Lyn, 12.0833f, 13.5000f, 53.0000f, UMa, 15.2500f, 15.7500f, 53.0000f, Dra, 21.9667f, 22.1333f, 52.7500f, Cep, 3.3333f, 5.0000f, 52.5000f, Cam, 22.8667f, 23.3333f, 52.5000f, Cas, 15.7500f, 17.0000f, 51.5000f, Dra, 2.0417f, 2.5167f, 50.5000f, Per, 17.0000f, 18.2333f, 50.5000f, Dra, 0.0000f, 1.3667f, 50.0000f, Cas, 1.3667f, 1.6667f, 50.0000f, Per, 6.5000f, 6.8000f, 50.0000f, Lyn, 23.3333f, 24.0000f, 50.0000f, Cas, 13.5000f, 14.0333f, 48.5000f, UMa, 0.0000f, 1.1167f, 48.0000f, Cas, 23.5833f, 24.0000f, 48.0000f, Cas, 18.1750f, 18.2333f, 47.5000f, Her, 18.2333f, 19.0833f, 47.5000f, Dra, 19.0833f, 19.1667f, 47.5000f, Cyg, 1.6667f, 2.0417f, 47.0000f, Per, 8.4167f, 9.1667f, 47.0000f, UMa, 0.1667f, 0.8667f, 46.0000f, Cas, 12.0000f, 12.0833f, 45.0000f, UMa, 6.8000f, 7.3667f, 44.5000f, Lyn, 21.9083f, 21.9667f, 44.0000f, Cyg, 21.8750f, 21.9083f, 43.7500f, Cyg, 19.1667f, 19.4000f, 43.5000f, Cyg, 9.1667f, 10.1667f, 42.0000f, UMa, 10.1667f, 10.7833f, 40.0000f, UMa, 15.4333f, 15.7500f, 40.0000f, Boo, 15.7500f, 16.3333f, 40.0000f, Her, 9.2500f, 9.5833f, 39.7500f, Lyn, 0.0000f, 2.5167f, 36.7500f, And, 2.5167f, 2.5667f, 36.7500f, Per, 19.3583f, 19.4000f, 36.5000f, Lyr, 4.5000f, 4.6917f, 36.0000f, Per, 21.7333f, 21.8750f, 36.0000f, Cyg, 21.8750f, 22.0000f, 36.0000f, Lac, 6.5333f, 7.3667f, 35.5000f, Aur, 7.3667f, 7.7500f, 35.5000f, Lyn, 0.0000f, 2.0000f, 35.0000f, And, 22.0000f, 22.8167f, 35.0000f, Lac, 22.8167f, 22.8667f, 34.5000f, Lac, 22.8667f, 23.5000f, 34.5000f, And, 2.5667f, 2.7167f, 34.0000f, Per, 10.7833f, 11.0000f, 34.0000f, UMa, 12.0000f, 12.3333f, 34.0000f, CVn, 7.7500f, 9.2500f, 33.5000f, Lyn, 9.2500f, 9.8833f, 33.5000f, LMi, 0.7167f, 1.4083f, 33.0000f, And, 15.1833f, 15.4333f, 33.0000f, Boo, 23.5000f, 23.7500f, 32.0833f, And, 12.3333f, 13.2500f, 32.0000f, CVn, 23.7500f, 24.0000f, 31.3333f, And, 13.9583f, 14.0333f, 30.7500f, CVn, 2.4167f, 2.7167f, 30.6667f, Tri, 2.7167f, 4.5000f, 30.6667f, Per, 4.5000f, 4.7500f, 30.0000f, Aur, 18.1750f, 19.3583f, 30.0000f, Lyr, 11.0000f, 12.0000f, 29.0000f, UMa, 19.6667f, 20.9167f, 29.0000f, Cyg, 4.7500f, 5.8833f, 28.5000f, Aur, 9.8833f, 10.5000f, 28.5000f, LMi, 13.2500f, 13.9583f, 28.5000f, CVn, 0.0000f, 0.0667f, 28.0000f, And, 1.4083f, 1.6667f, 28.0000f, Tri, 5.8833f, 6.5333f, 28.0000f, Aur, 7.8833f, 8.0000f, 28.0000f, Gem, 20.9167f, 21.7333f, 28.0000f, Cyg, 19.2583f, 19.6667f, 27.5000f, Cyg, 1.9167f, 2.4167f, 27.2500f, Tri, 16.1667f, 16.3333f, 27.0000f, CrB, 15.0833f, 15.1833f, 26.0000f, Boo, 15.1833f, 16.1667f, 26.0000f, CrB, 18.3667f, 18.8667f, 26.0000f, Lyr, 10.7500f, 11.0000f, 25.5000f, LMi, 18.8667f, 19.2583f, 25.5000f, Lyr, 1.6667f, 1.9167f, 25.0000f, Tri, 0.7167f, 0.8500f, 23.7500f, Psc, 10.5000f, 10.7500f, 23.5000f, LMi, 21.2500f, 21.4167f, 23.5000f, Vul, 5.7000f, 5.8833f, 22.8333f, Tau, 0.0667f, 0.1417f, 22.0000f, And, 15.9167f, 16.0333f, 22.0000f, Ser_Caput, 5.8833f, 6.2167f, 21.5000f, Gem, 19.8333f, 20.2500f, 21.2500f, Vul, 18.8667f, 19.2500f, 21.0833f, Vul, 0.1417f, 0.8500f, 21.0000f, And, 20.2500f, 20.5667f, 20.5000f, Vul, 7.8083f, 7.8833f, 20.0000f, Gem, 20.5667f, 21.2500f, 19.5000f, Vul, 19.2500f, 19.8333f, 19.1667f, Vul, 3.2833f, 3.3667f, 19.0000f, Ari, 18.8667f, 19.0000f, 18.5000f, Sge, 5.7000f, 5.7667f, 18.0000f, Ori, 6.2167f, 6.3083f, 17.5000f, Gem, 19.0000f, 19.8333f, 16.1667f, Sge, 4.9667f, 5.3333f, 16.0000f, Tau, 15.9167f, 16.0833f, 16.0000f, Her, 19.8333f, 20.2500f, 15.7500f, Sge, 4.6167f, 4.9667f, 15.5000f, Tau, 5.3333f, 5.6000f, 15.5000f, Tau, 12.8333f, 13.5000f, 15.0000f, Com, 17.2500f, 18.2500f, 14.3333f, Her, 11.8667f, 12.8333f, 14.0000f, Com, 7.5000f, 7.8083f, 13.5000f, Gem, 16.7500f, 17.2500f, 12.8333f, Her, 0.0000f, 0.1417f, 12.5000f, Peg, 5.6000f, 5.7667f, 12.5000f, Tau, 7.0000f, 7.5000f, 12.5000f, Gem, 21.1167f, 21.3333f, 12.5000f, Peg, 6.3083f, 6.9333f, 12.0000f, Gem, 18.2500f, 18.8667f, 12.0000f, Her, 20.8750f, 21.0500f, 11.8333f, Del, 21.0500f, 21.1167f, 11.8333f, Peg, 11.5167f, 11.8667f, 11.0000f, Leo, 6.2417f, 6.3083f, 10.0000f, Ori, 6.9333f, 7.0000f, 10.0000f, Gem, 7.8083f, 7.9250f, 10.0000f, Cnc, 23.8333f, 24.0000f, 10.0000f, Peg, 1.6667f, 3.2833f, 9.9167f, Ari, 20.1417f, 20.3000f, 8.5000f, Del, 13.5000f, 15.0833f, 8.0000f, Boo, 22.7500f, 23.8333f, 7.5000f, Peg, 7.9250f, 9.2500f, 7.0000f, Cnc, 9.2500f, 10.7500f, 7.0000f, Leo, 18.2500f, 18.6622f, 6.2500f, Oph, 18.6622f, 18.8667f, 6.2500f, Aql, 20.8333f, 20.8750f, 6.0000f, Del, 7.0000f, 7.0167f, 5.5000f, CMi, 18.2500f, 18.4250f, 4.5000f, Ser_Cauda, 16.0833f, 16.7500f, 4.0000f, Her, 18.2500f, 18.4250f, 3.0000f, Oph, 21.4667f, 21.6667f, 2.7500f, Peg, 0.0000f, 2.0000f, 2.0000f, Psc, 18.5833f, 18.8667f, 2.0000f, Ser_Cauda, 20.3000f, 20.8333f, 2.0000f, Del, 20.8333f, 21.3333f, 2.0000f, Equ, 21.3333f, 21.4667f, 2.0000f, Peg, 22.0000f, 22.7500f, 2.0000f, Peg, 21.6667f, 22.0000f, 1.7500f, Peg, 7.0167f, 7.2000f, 1.5000f, CMi, 3.5833f, 4.6167f, 0.0000f, Tau, 4.6167f, 4.6667f, 0.0000f, Ori, 7.2000f, 8.0833f, 0.0000f, CMi, 14.6667f, 15.0833f, 0.0000f, Vir, 17.8333f, 18.2500f, 0.0000f, Oph, 2.6500f, 3.2833f, -1.7500f, Cet, 3.2833f, 3.5833f, -1.7500f, Tau, 15.0833f, 16.2667f, -3.2500f, Ser_Caput, 4.6667f, 5.0833f, -4.0000f, Ori, 5.8333f, 6.2417f, -4.0000f, Ori, 17.8333f, 17.9667f, -4.0000f, Ser_Cauda, 18.2500f, 18.5833f, -4.0000f, Ser_Cauda, 18.5833f, 18.8667f, -4.0000f, Aql, 22.7500f, 23.8333f, -4.0000f, Psc, 10.7500f, 11.5167f, -6.0000f, Leo, 11.5167f, 11.8333f, -6.0000f, Vir, 0.0000f, 00.3333f, -7.0000f, Psc, 23.8333f, 24.0000f, -7.0000f, Psc, 14.2500f, 14.6667f, -8.0000f, Vir, 15.9167f, 16.2667f, -8.0000f, Oph, 20.0000f, 20.5333f, -9.0000f, Aql, 21.3333f, 21.8667f, -9.0000f, Aqr, 17.1667f, 17.9667f, -10.0000f, Oph, 5.8333f, 8.0833f, -11.0000f, Mon, 4.9167f, 5.0833f, -11.0000f, Eri, 5.0833f, 5.8333f, -11.0000f, Ori, 8.0833f, 8.3667f, -11.0000f, Hya, 9.5833f, 10.7500f, -11.0000f, Sex, 11.8333f, 12.8333f, -11.0000f, Vir, 17.5833f, 17.6667f, -11.6667f, Oph, 18.8667f, 20.0000f, -12.0333f, Aql, 4.8333f, 4.9167f, -14.5000f, Eri, 20.5333f, 21.3333f, -15.0000f, Aqr, 17.1667f, 18.2500f, -16.0000f, Ser_Cauda, 18.2500f, 18.8667f, -16.0000f, Sct, 8.3667f, 8.5833f, -17.0000f, Hya, 16.2667f, 16.3750f, -18.2500f, Oph, 8.5833f, 9.0833f, -19.0000f, Hya, 10.7500f, 10.8333f, -19.0000f, Crt, 16.2667f, 16.3750f, -19.2500f, Oph, 15.6667f, 15.9167f, -20.0000f, Lib, 12.5833f, 12.8333f, -22.0000f, Crv, 12.8333f, 14.2500f, -22.0000f, Vir, 9.0833f, 9.7500f, -24.0000f, Hya, 1.6667f, 2.6500f, -24.3833f, Cet, 2.6500f, 3.7500f, -24.3833f, Eri, 10.8333f, 11.8333f, -24.5000f, Crt, 11.8333f, 12.5833f, -24.5000f, Crv, 14.2500f, 14.9167f, -24.5000f, Lib, 16.2667f, 16.7500f, -24.5833f, Oph, 0.0000f, 1.6667f, -25.5000f, Cet, 21.3333f, 21.8667f, -25.5000f, Cap, 21.8667f, 23.8333f, -25.5000f, Aqr, 23.8333f, 24.0000f, -25.5000f, Cet, 9.7500f, 10.2500f, -26.5000f, Hya, 4.7000f, 4.8333f, -27.2500f, Eri, 4.8333f, 6.1167f, -27.2500f, Lep, 20.0000f, 21.3333f, -28.0000f, Cap, 10.2500f, 10.5833f, -29.1667f, Hya, 12.5833f, 14.9167f, -29.5000f, Hya, 14.9167f, 15.6667f, -29.5000f, Lib, 15.6667f, 16.0000f, -29.5000f, Sco, 4.5833f, 4.7000f, -30.0000f, Eri, 16.7500f, 17.6000f, -30.0000f, Oph, 17.6000f, 17.8333f, -30.0000f, Sgr, 10.5833f, 10.8333f, -31.1667f, Hya, 6.1167f, 7.3667f, -33.0000f, CMa, 12.2500f, 12.5833f, -33.0000f, Hya, 10.8333f, 12.2500f, -35.0000f, Hya, 3.5000f, 3.7500f, -36.0000f, For, 8.3667f, 9.3667f, -36.7500f, Pyx, 4.2667f, 4.5833f, -37.0000f, Eri, 17.8333f, 19.1667f, -37.0000f, Sgr, 21.3333f, 23.0000f, -37.0000f, PsA, 23.0000f, 23.3333f, -37.0000f, Scl, 3.0000f, 3.5000f, -39.5833f, For, 9.3667f, 11.0000f, -39.7500f, Ant, 0.0000f, 1.6667f, -40.0000f, Scl, 1.6667f, 3.0000f, -40.0000f, For, 3.8667f, 4.2667f, -40.0000f, Eri, 23.3333f, 24.0000f, -40.0000f, Scl, 14.1667f, 14.9167f, -42.0000f, Cen, 15.6667f, 16.0000f, -42.0000f, Lup, 16.0000f, 16.4208f, -42.0000f, Sco, 4.8333f, 5.0000f, -43.0000f, Cae, 5.0000f, 6.5833f, -43.0000f, Col, 8.0000f, 8.3667f, -43.0000f, Pup, 3.4167f, 3.8667f, -44.0000f, Eri, 16.4208f, 17.8333f, -45.5000f, Sco, 17.8333f, 19.1667f, -45.5000f, CrA, 19.1667f, 20.3333f, -45.5000f, Sgr, 20.3333f, 21.3333f, -45.5000f, Mic, 3.0000f, 3.4167f, -46.0000f, Eri, 4.5000f, 4.8333f, -46.5000f, Cae, 15.3333f, 15.6667f, -48.0000f, Lup, 0.0000f, 2.3333f, -48.1667f, Phe, 2.6667f, 3.0000f, -49.0000f, Eri, 4.0833f, 4.2667f, -49.0000f, Hor, 4.2667f, 4.5000f, -49.0000f, Cae, 21.3333f, 22.0000f, -50.0000f, Gru, 6.0000f, 8.0000f, -50.7500f, Pup, 8.0000f, 8.1667f, -50.7500f, Vel, 2.4167f, 2.6667f, -51.0000f, Eri, 3.8333f, 4.0833f, -51.0000f, Hor, 0.0000f, 1.8333f, -51.5000f, Phe, 6.0000f, 6.1667f, -52.5000f, Car, 8.1667f, 8.4500f, -53.0000f, Vel, 3.5000f, 3.8333f, -53.1667f, Hor, 3.8333f, 4.0000f, -53.1667f, Dor, 0.0000f, 1.5833f, -53.5000f, Phe, 2.1667f, 2.4167f, -54.0000f, Eri, 4.5000f, 5.0000f, -54.0000f, Pic, 15.0500f, 15.3333f, -54.0000f, Lup, 8.4500f, 8.8333f, -54.5000f, Vel, 6.1667f, 6.5000f, -55.0000f, Car, 11.8333f, 12.8333f, -55.0000f, Cen, 14.1667f, 15.0500f, -55.0000f, Lup, 15.0500f, 15.3333f, -55.0000f, Nor, 4.0000f, 4.3333f, -56.5000f, Dor, 8.8333f, 11.0000f, -56.5000f, Vel, 11.0000f, 11.2500f, -56.5000f, Cen, 17.5000f, 18.0000f, -57.0000f, Ara, 18.0000f, 20.3333f, -57.0000f, Tel, 22.0000f, 23.3333f, -57.0000f, Gru, 3.2000f, 3.5000f, -57.5000f, Hor, 5.0000f, 5.5000f, -57.5000f, Pic, 6.5000f, 6.8333f, -58.0000f, Car, 0.0000f, 1.3333f, -58.5000f, Phe, 1.3333f, 2.1667f, -58.5000f, Eri, 23.3333f, 24.0000f, -58.5000f, Phe, 4.3333f, 4.5833f, -59.0000f, Dor, 15.3333f, 16.4208f, -60.0000f, Nor, 20.3333f, 21.3333f, -60.0000f, Ind, 5.5000f, 6.0000f, -61.0000f, Pic, 15.1667f, 15.3333f, -61.0000f, Cir, 16.4208f, 16.5833f, -61.0000f, Ara, 14.9167f, 15.1667f, -63.5833f, Cir, 16.5833f, 16.7500f, -63.5833f, Ara, 6.0000f, 6.8333f, -64.0000f, Pic, 6.8333f, 9.0333f, -64.0000f, Car, 11.2500f, 11.8333f, -64.0000f, Cen, 11.8333f, 12.8333f, -64.0000f, Cru, 12.8333f, 14.5333f, -64.0000f, Cen, 13.5000f, 13.6667f, -65.0000f, Cir, 16.7500f, 16.8333f, -65.0000f, Ara, 2.1667f, 3.2000f, -67.5000f, Hor, 3.2000f, 4.5833f, -67.5000f, Ret, 14.7500f, 14.9167f, -67.5000f, Cir, 16.8333f, 17.5000f, -67.5000f, Ara, 17.5000f, 18.0000f, -67.5000f, Pav, 22.0000f, 23.3333f, -67.5000f, Tuc, 4.5833f, 6.5833f, -70.0000f, Dor, 13.6667f, 14.7500f, -70.0000f, Cir, 14.7500f, 17.0000f, -70.0000f, TrA, 0.0000f, 1.3333f, -75.0000f, Tuc, 3.5000f, 4.5833f, -75.0000f, Hyi, 6.5833f, 9.0333f, -75.0000f, Vol, 9.0333f, 11.2500f, -75.0000f, Car, 11.2500f, 13.6667f, -75.0000f, Mus, 18.0000f, 21.3333f, -75.0000f, Pav, 21.3333f, 23.3333f, -75.0000f, Ind, 23.3333f, 24.0000f, -75.0000f, Tuc, 0.7500f, 1.3333f, -76.0000f, Tuc, 0.0000f, 3.5000f, -82.5000f, Hyi, 7.6667f, 13.6667f, -82.5000f, Cha, 13.6667f, 18.0000f, -82.5000f, Aps, 3.5000f, 7.6667f, -85.0000f, Men, 0.0000f, 24.0000f, -90.0000f, Oct, 0.0f, 0.0f, 0.0f, NotFound }; /* RAh1875 = RA in hours, equinox B1875.0 = JD 240 5889.258 55 */ /* dec1875 = Decl in degrees equinox B1875.0 = JD 240 5889.258 55 */ enum constell which_const( double RAh1875, double dec1875 ) { struct constbor *constb; /* Find constellation such that the declination entered is higher than the lower boundary of the constellation when the upper and lower right ascensions for the constellation bound the entered right ascension */ for( constb = constbor; constb-con = 0; constb++ ) { if ( RAh1875 = constb-RA_lower && RAh1875 constb-RA_upper && constb-decl = dec1875 ) return constb-con; /* Constellation found */ } return NotFound; /* Constellation not found */ } /* which_const */ -- ---------------------------------------------------------------- Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN e-mail: pausch at stjarnhimlen dot se WWW: http://stjarnhimlen.se/ |
#7
|
|||
|
|||
![]()
On Sep 27, 2:43 am, (Paul Schlyter) wrote:
In article , canopus56 wrote: On Sep 26, 8:21=A0am, Anthony Ayiomamitis wrote: Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? http://vizier.u-strasbg.fr/vizier/Vi...llations.htx#q - Canopus56 P.S. - I havenot run across any code samples to derive a function in Java or VBA. Here's some old C code of mine which does just that. I think it's quite easy to rewrite in Java if you want. It compiles directly as C++: [...] It's actually a subroutine, not a program. Need a main program to call it. :-) And before anyone translates it to Java, it'd be wise to read this: http://java.sun.com/developer/Books/shiftintojava/page1.html noting the comments about enums. :-) |
#8
|
|||
|
|||
![]()
In article ,
Thad Floryan wrote: On Sep 27, 2:43 am, (Paul Schlyter) wrote: In article , canopus56 wrote: On Sep 26, 8:21=A0am, Anthony Ayiomamitis wrote: Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? http://vizier.u-strasbg.fr/vizier/Vi...llations.htx#q - Canopus56 P.S. - I havenot run across any code samples to derive a function in Java or VBA. Here's some old C code of mine which does just that. I think it's quite easy to rewrite in Java if you want. It compiles directly as C++: [...] It's actually a subroutine, not a program. Need a main program to call it. :-) I never claimed it was a program - I merely said it's "code" - which it is. Btw, main() in a C, C++ or Java program is nothing but a subroutine either - it needs the startup code to be executed.... g ...but since the compiler usually provides you with the startup code, programmers need not worry about that, and therefore oversimplifies things so they believe the main() subroutine is a "program".... And before anyone translates it to Java, it'd be wise to read this: http://java.sun.com/developer/Books/shiftintojava/page1.html noting the comments about enums. :-) That page is out of date! True, enum was omitted from early versions of Java - but now it's been added back to the language. I think it was added back in Java 1.5, aka Java 5 .... With that in mind, one shall of course read the link you pointed to above. It's a good example that some things are actually simpler in plain C than in Java. Sure, it can be fun to toss around a lerge numbers of objects here and there in your program, but it can also obfuscate the underlying algorithm.... Now, if one wants to translate my C code to an eariler version of Java which doesn't support enum's, the most straightforward method would be to rewrite the C enum statement into a series of "final int name = value;" statements in your Java code. Because that's what an enum really is: a compact way to assign a series of symbolic names to integer constants. Of course it's not typesafe! C, C++ and java are not typesafe languages! If you want a typesafe language, you should turn to Algol, Pascal or Ada and shy away from C, C++ and Java! The web page you pointed to above makes a lot of noise about the "difference" between a struct and a class. The difference is quite small, actually it's almost nonexistent. C has "struct" but not "class", Java has "class" but not "struct". C++ has both "struct" and "class" though - and what's the difference between a C++ "struct" and a C++ "class"? The difference is much much smaller than most programmer's are aware of: in a C++ "struct", all members are public by default while in a C++ "class" all members are private by default. If you don't rely on the default properties but explicitly declare the members in the struct/class as public/private/whatever, then a C++ struch and class are exactly the same thing! Yes, a C++ struct can have member methods, inner structs/classes - you name it! So it's not really a matter of the difference between a "struct" and a "class", it's a matter of the difference between a "C struct" and a "C++ struct" -- and there's a lot of differences between these! -- ---------------------------------------------------------------- Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN e-mail: pausch at stjarnhimlen dot se WWW: http://stjarnhimlen.se/ |
#9
|
|||
|
|||
![]()
On Sep 27, 5:13 am, (Paul Schlyter) wrote:
In article , Thad Floryan wrote: [...] It's actually a subroutine, not a program. Need a main program to call it. :-) I never claimed it was a program - I merely said it's "code" - which it is. But the 2nd comment line of your code claims: "Program to find in which constellation an RA/Dec position is" I was attemping to forestall a plethora of "Wah! I 'piled it and it don't run" messages. :-) Something as simple as this: #include stdio.h main() { int which_const(double, double); printf("Constellation = %d\n", which_const(12.345, 12.345)); } will exercise your routine for demo purposes. |
#10
|
|||
|
|||
![]()
On Sep 27, 3:43*am, (Paul Schlyter) wrote:
In article , canopus56 wrote: On Sep 26, 8:21=A0am, Anthony Ayiomamitis wrote: Dear group, Is anyone aware of an online facility where a user would enter an RA and Dec and he would be informed of the constellation matching those coordinates? http://vizier.u-strasbg.fr/vizier/Vi...llations.htx#q - Canopus56 P.S. - I havenot run across any code samples to derive a function in Java or VBA. Here's some old C code of mine which does just that. *I think it's quite easy to rewrite in Java if you want. *It compiles directly as C++: snip all Thanks, Paul. When I get around to whipping up Javascript or VBA version, I'll also translate those 1875 epoch coordinates to the 2010 epoch. - Canopus56 |
|
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
extracting a 2D plane from a 3D FITS image | Douglas Alan | FITS | 0 | February 9th 07 08:17 PM |
self-extracting diskette image to hard disk? | [email protected] | Misc | 0 | October 16th 05 02:07 PM |
Constellation from SAO number? | Giancarlo | Misc | 2 | December 7th 04 06:16 PM |
How About Some New Constellation Boundaries? | Mark Lepkowski | Amateur Astronomy | 9 | December 2nd 04 03:54 AM |