adding a few more constellations

pull/652/head
Pablo Gonzalez 2021-01-29 11:05:21 +01:00
parent d0d1cbea2c
commit fa0b2c7d08
3 changed files with 26 additions and 16 deletions

View File

@ -1 +1 @@
require("heatshrink").decompress(atob("AEGIAAgVPhAWFAAOACyoYNCxQYMCxZjKFxgwKB42ClAwNFw+O9AwNH48u8RhMLpHu9xhMLg0ipwXBokiMQwXKCoIADC5JGHlwWDMI5ICC44wEVI4XCZxBfC8jzKBRAuCC66oIC4K9IwPuoUk90YYJAXIwVCSYR3HC5WBAgYvPCggAFDQoXGwhAIwVIC5cuBoohDeQoXGpwNFEIbDFC4uCaJL1BKQgXDiVEdQdCB4WCYIIACokhC4uEBgYABC4YJII4kuBgZhEBJAXEEwi3EBIhgDwEABwYuHGAoHDgAXDwIXJRwIXKHoaoGC4ZHDC4JgCC4MoUAIXF91CBgReDC4iwCkh3EwNCZwQXFPAgAPCwQXYYIYAOIwYwTCwgwRFwowRCwwwPFw4wPCxAwNFxIYMCxYYKCxpjICp4AQ"))
require("heatshrink").decompress(atob("mEwwgkhiIAECp8BCwoABiAWVDBoWKDBgWLMZQuMGBQWNGBAuHjtBGBomHjvRGBhdI7vUMJgLGilE7vdohJHC5MUCoIADDAxGKpoWDJI5ICC44wESJS1IGAR4IJAQXgI4YXJXpAXBoJiBBhEQC5JzCigXTABgXeIBJODC5MdaA4hB6IXLpoNFEIbDFC4zRJboIXJojRC6lEBwdEegXdBIYXDZwIAEeY4ABNgQvEEgfdMIkdBIZTDC4gwELwouGC4MABoyQGHQSCEgAXHSAxSDC7pgDKQJiBL4xcBBIZeBC4cUNIUUC4oJGC4RIEAB4WCC7BgDABxGDGCYWEGCIuFGCIWGGB4uHGB4WIGBouJDBgWLDBQWNMZAVPACAA=="))

View File

@ -57,10 +57,6 @@ function drawStars(lat,lon,date){
let starNumber = 0;
//Each star has a number (the position on the file (line number)). These are the lines
//joining each star in the constellations.
constelation_lines=[/*Orion*/[7,68],[10,53],[53,56],[28,68],/*Taurus*/[13,172],[13,340],[293,340],[29,293],
/*canis menor*/[155,8]];
var starPositions = {};
for (i=0;i<f.length;i++)
@ -101,17 +97,31 @@ function drawStars(lat,lon,date){
}
if (settings.constellations){
for (i=0;i<constelation_lines.length;i++)
{
constelation = constelation_lines[i];
positionStar1=starPositions[constelation[0]];
positionStar2=starPositions[constelation[1]];
//Both stars need to be visible
//Each star has a number (the position on the file (line number)). These are the lines
//joining each star in the constellations.
constelations=[[[7,68],[10,53],[53,56],[28,68],"Orion"],[[13,172],[13,340],[293,340],[29,293],"Taurus"],
[[155,8],"Canis Menor"],[[36,81],[87,81],[235,87],[33,235],[33,75],[75,40],"Ursa Major"],[[67,91],[74,67],[91,110],[110,252],"Cassiopeia"],[[23,166],[16,294],[294,44],[166,149],[230,149],[16,23],"Gemini"]];
g.setColor(0,255,0);
for (i=0;i<constelations.length;i++)
{
constelationShowing=false;
for (j=0;j<constelations[i].length-1;j++){
positionStar1=starPositions[constelations[i][j][0]];
positionStar2=starPositions[constelations[i][j][1]];
//Both stars need to be visible
if (positionStar1 && positionStar2)
{
g.drawLine(positionStar1[0],positionStar1[1],positionStar2[0],positionStar2[1]);
constelationShowing=true;
}
else
constelationShowing=false;
g.flip();
}
//Write the name
if (constelationShowing)
g.drawString(constelations[i][constelations[i].length-1],positionStar2[0]+10,positionStar2[1]);
}
}
}

View File

@ -13,14 +13,14 @@
1.204,0.288,0.8,Aldebaran
4.317,-0.461,1.0,AL SCO
3.513,-0.195,1.0,AL VIR
2.030,0.489,1.1,BE GEM
2.030,0.489,1.1,Pollux
6.011,-0.517,1.2,AL PSA
3.350,-1.042,1.2,BE CRU
5.417,0.790,1.2,Deneb
3.838,-1.062,1.3,AL2 CEN
2.655,0.209,1.4,AL LEO
1.827,-0.506,1.5,EP CMA
1.984,0.557,1.6,AL GEM
1.984,0.557,1.6,Castor
3.258,-1.101,1.6,AL1 CRU
1.984,0.557,1.6,AL GEM
3.278,-0.997,1.6,GA CRU

1 1.768 -0.292 -1.5 Sirius
13 1.204 0.288 0.8 Aldebaran
14 4.317 -0.461 1.0 AL SCO
15 3.513 -0.195 1.0 AL VIR
16 2.030 0.489 1.1 BE GEM Pollux
17 6.011 -0.517 1.2 AL PSA
18 3.350 -1.042 1.2 BE CRU
19 5.417 0.790 1.2 Deneb
20 3.838 -1.062 1.3 AL2 CEN
21 2.655 0.209 1.4 AL LEO
22 1.827 -0.506 1.5 EP CMA
23 1.984 0.557 1.6 AL GEM Castor
24 3.258 -1.101 1.6 AL1 CRU
25 1.984 0.557 1.6 AL GEM
26 3.278 -0.997 1.6 GA CRU