17
apps.json
|
@ -1638,7 +1638,7 @@
|
||||||
"name": "Round clock with seconds, minutes and date",
|
"name": "Round clock with seconds, minutes and date",
|
||||||
"shortName":"Round Clock",
|
"shortName":"Round Clock",
|
||||||
"icon": "app.png",
|
"icon": "app.png",
|
||||||
"version":"0.03",
|
"version":"0.04",
|
||||||
"description": "Designed round clock with ticks for minutes and seconds and heart rate indication",
|
"description": "Designed round clock with ticks for minutes and seconds and heart rate indication",
|
||||||
"tags": "clock",
|
"tags": "clock",
|
||||||
"type": "clock",
|
"type": "clock",
|
||||||
|
@ -2714,12 +2714,15 @@
|
||||||
"name": "Planetarium",
|
"name": "Planetarium",
|
||||||
"shortName":"Planetarium",
|
"shortName":"Planetarium",
|
||||||
"icon": "planetarium.png",
|
"icon": "planetarium.png",
|
||||||
"version":"0.02",
|
"readme": "README.md",
|
||||||
|
"version":"0.03",
|
||||||
"description": "Planetarium showing up to 500 stars using the watch location and time",
|
"description": "Planetarium showing up to 500 stars using the watch location and time",
|
||||||
"tags": "",
|
"tags": "",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"planetarium.app.js","url":"planetarium.app.js"},
|
{"name":"planetarium.app.js","url":"planetarium.app.js"},
|
||||||
{"name":"planetarium.data.csv","url":"planetarium.data.csv"},
|
{"name":"planetarium.data.csv","url":"planetarium.data.csv"},
|
||||||
|
{"name":"planetarium.const.csv","url":"planetarium.const.csv"},
|
||||||
|
{"name":"planetarium.extra.csv","url":"planetarium.extra.csv"},
|
||||||
{"name":"planetarium.settings.js","url":"settings.js"},
|
{"name":"planetarium.settings.js","url":"settings.js"},
|
||||||
{"name":"planetarium.img","url":"planetarium-icon.js","evaluate":true}
|
{"name":"planetarium.img","url":"planetarium-icon.js","evaluate":true}
|
||||||
],
|
],
|
||||||
|
@ -2730,14 +2733,14 @@
|
||||||
{ "id": "tapelauncher",
|
{ "id": "tapelauncher",
|
||||||
"name": "Tape Launcher",
|
"name": "Tape Launcher",
|
||||||
"icon": "icon.png",
|
"icon": "icon.png",
|
||||||
"version":"0.01",
|
"version":"0.02",
|
||||||
"description": "An App launcher, icons displayed in a horizontal tape, swipe or use buttons",
|
"description": "An App launcher, icons displayed in a horizontal tape, swipe or use buttons",
|
||||||
"readme": "README.md",
|
"readme": "README.md",
|
||||||
"tags": "tool,system,launcher",
|
"tags": "tool,system,launcher",
|
||||||
"type":"launch",
|
"type":"launch",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"tapelaunch.app.js","url":"app.js"},
|
{"name":"tapelauncher.app.js","url":"app.js"},
|
||||||
{"name":"tapelaunch.img","url":"icon.js","evaluate":true}
|
{"name":"tapelauncher.img","url":"icon.js","evaluate":true}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ "id": "oblique",
|
{ "id": "oblique",
|
||||||
|
@ -2759,8 +2762,8 @@
|
||||||
"description": "Basic app to test the bangle.js input interface. It displays the result in text or a switch on/off image.",
|
"description": "Basic app to test the bangle.js input interface. It displays the result in text or a switch on/off image.",
|
||||||
"tags": "input,interface,buttons,touch",
|
"tags": "input,interface,buttons,touch",
|
||||||
"storage": [
|
"storage": [
|
||||||
{"name":"test_userInput.app.js","url":"app.js"},
|
{"name":"testuserinput.app.js","url":"app.js"},
|
||||||
{"name":"test_userInput.img","url":"app-icon.js","evaluate":true}
|
{"name":"testuserinput.img","url":"app-icon.js","evaluate":true}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: Major speed improvement. Added more stars. Up to 500!
|
0.02: Major speed improvement. Added more stars. Up to 500!
|
||||||
|
0.03: Added more stars and constellations. Now it shows 20 constellations.
|
|
@ -4,7 +4,7 @@ This planetarium takes your position and time and plots the sky as it is.
|
||||||
|
|
||||||
No planets, or moon, only stars. It can show the 500 most brilliant stars in the sky.
|
No planets, or moon, only stars. It can show the 500 most brilliant stars in the sky.
|
||||||
|
|
||||||
Plan is to show also constellations, but this is work in progress. Now it shows Taurus and Orion as examples.
|
It shows also constellations. Now it has 20 constellations but this is work in progress. Only northern hemisphere covered now.
|
||||||
|
|
||||||
I think code is quite optimized already. It runs as fast as I could make it run. If someone has some ideas to speed it up, I could plot more stars.
|
I think code is quite optimized already. It runs as fast as I could make it run. If someone has some ideas to speed it up, I could plot more stars.
|
||||||
|
|
||||||
|
@ -16,4 +16,17 @@ The planetarium plots the stars as if you are looking to the sky (with your watc
|
||||||
## Improvements
|
## Improvements
|
||||||
I plan to add more constellations as soon as I have time. I am adding the constellations that I know of, but the plan is to add all the main ones (at least for North Hemisphere).
|
I plan to add more constellations as soon as I have time. I am adding the constellations that I know of, but the plan is to add all the main ones (at least for North Hemisphere).
|
||||||
|
|
||||||
Please note that the watch hardware is limited and computing the stars positions is a quite intensive task for this little processor. This is why it plots only stars and no planets or the moon. For plotting the planets, storage will be a limiting factor as well as computing the position for planets needs more initial data compared with stars.
|
Please note that the watch hardware is limited and computing the stars positions is a quite intensive task for this little processor. This is why it plots only stars and no planets or the moon. For plotting the planets, storage will be a limiting factor as well as computing the position for planets needs more initial data compared with stars.
|
||||||
|
|
||||||
|
## Do you want to contribute?
|
||||||
|
Maybe you want to add some more constellations to the planetarium. As you can see I didn't cover constellations in the south hemisphere. How to do it? It is a bit tedious but it can be done and you will learn the constellations pretty well at the end of it. Steps:
|
||||||
|
- Open the file `plantearium.data.csv`. There you have the 500 stars that we have in the planetarium. The number of each star is the line number. For instance for Sirius, the star number will be 1.
|
||||||
|
- Find the two stars that you want to join in your constellation (a constellation line). For identifying a star you have to have a look at the name, usually something like `AL UMA` (alpha star of constellation ursa major). Lets say that you want to join stars 155 and 8 (this is constellation canis menor, that only has a line joining two stars).
|
||||||
|
- Go to file `planetarium.const.csv` and add two lines for your new constellation. The first one will be the name of the constellation, the second one the pair of stars that you want to join, separated by coma (see the file for examples).
|
||||||
|
- Do not forget to add a break line after the last constellation.
|
||||||
|
- Upload the new `planetarium.const.csv` to your bangle (or emulator) and test it out.
|
||||||
|
|
||||||
|
What is a constellation star is not in the 500 star list in `planetarium.data.csv`? If you need another star to draw the constellation you can find that star in the full star list (`starinfo/planetarium.stars.csv`) and put it in `planetarium.extra.csv`. That stars will be loaded only when constellations are shown. In order to refer to these extra stars in the `planetarium.const.csv` you have to use the code `e_linenumber`, in order to differentiate them from the stars in the normal file. For instance, to refer to the first star in the file `planetarium.extra.csv`, you will refer it as `e_1`. Do not forget to add an extra line at the end as in the other files.
|
||||||
|
|
||||||
|
## Development version
|
||||||
|
Please check the latest development version [here](https://github.com/pglez82/BangleApps)
|
||||||
|
|
|
@ -35,14 +35,59 @@ function siderealTime(julianDay)
|
||||||
return toRadians(280.46061837 + 360.98564736629 * (julianDay - 2451545.0) + 0.000387933 * T * T - T * T * T / 38710000);
|
return toRadians(280.46061837 + 360.98564736629 * (julianDay - 2451545.0) + 0.000387933 * T * T - T * T * T / 38710000);
|
||||||
}
|
}
|
||||||
|
|
||||||
function drawStars(lat,lon,date){
|
/*
|
||||||
|
* Draws a single star in the sky.
|
||||||
|
* starPositions is a dictionary that gets modified and it is used later for ploting the constelations
|
||||||
|
*/
|
||||||
|
function drawStar(zeta,theta,z,julianDay,latitude,longitude,starInfo,starNumber,starPositions){
|
||||||
|
let starRA = parseFloat(starInfo[0]);
|
||||||
|
let starDE = parseFloat(starInfo[1]);
|
||||||
|
let starMag = parseFloat(starInfo[2]);
|
||||||
|
var dec = Math.asin(Math.sin(theta) * Math.cos(starDE) * Math.cos(starRA + zeta) + Math.cos(theta) * Math.sin(starDE));
|
||||||
|
var ascen = Math.atan2(Math.cos(starDE) * Math.sin(starRA + zeta), Math.cos(theta) * Math.cos(starDE) * Math.cos(starRA + zeta) - Math.sin(theta) * Math.sin(starDE)) + z;
|
||||||
|
var H = siderealTime(julianDay) - longitude - ascen;
|
||||||
|
//Compute altitude
|
||||||
|
var alt = Math.asin(Math.sin(latitude) * Math.sin(dec) + Math.cos(latitude) * Math.cos(dec) * Math.cos(H));
|
||||||
|
if(alt >= 0)
|
||||||
|
{
|
||||||
|
//Compute azimuth
|
||||||
|
var azi = Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(latitude) - Math.tan(dec) * Math.cos(latitude));
|
||||||
|
var x = size / 2 + size / 2 * Math.cos(alt) * Math.sin(azi);
|
||||||
|
var y = size / 2 + size / 2 * Math.cos(alt) * Math.cos(azi);
|
||||||
|
starPositions[starNumber] = [x,y];
|
||||||
|
var magnitude = starMag<1?2:1;
|
||||||
|
//Stars between 1.5 and 4 magnitude should get a different colour
|
||||||
|
var col=1;
|
||||||
|
if (starMag<=1.5)
|
||||||
|
col=1;
|
||||||
|
else if (starMag>1.5 && starMag<2)
|
||||||
|
col=0.9;
|
||||||
|
else if (starMag>=2 && starMag<3)
|
||||||
|
col=0.7;
|
||||||
|
else if (starMag>=3 && starMag<3.5)
|
||||||
|
col=0.5;
|
||||||
|
else
|
||||||
|
col=0.3;
|
||||||
|
|
||||||
|
g.setColor(col,col,col);
|
||||||
|
g.fillCircle(x, y, magnitude);
|
||||||
|
if (starMag<1 && settings.starnames)
|
||||||
|
g.drawString(starInfo[3],x,y+2);
|
||||||
|
g.flip();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function plotSky(lat,lon,date){
|
||||||
var longitude = toRadians(-lon);
|
var longitude = toRadians(-lon);
|
||||||
var latitude = toRadians(lat);
|
var latitude = toRadians(lat);
|
||||||
|
|
||||||
var julianDay = toJulianDay(date.getFullYear(), date.getMonth()+1,date.getDate(),
|
var julianDay = toJulianDay(date.getFullYear(), date.getMonth()+1,date.getDate(),
|
||||||
date.getHours() + date.getTimezoneOffset() / 60,
|
date.getHours() + date.getTimezoneOffset() / 60,
|
||||||
date.getMinutes(), date.getSeconds());
|
date.getMinutes(), date.getSeconds());
|
||||||
var size = 240;
|
|
||||||
|
|
||||||
storage = require('Storage');
|
storage = require('Storage');
|
||||||
f=storage.read("planetarium.data.csv","r");
|
f=storage.read("planetarium.data.csv","r");
|
||||||
|
@ -63,64 +108,50 @@ function drawStars(lat,lon,date){
|
||||||
while (lineend>=0) {
|
while (lineend>=0) {
|
||||||
line = f.substring(linestart,lineend);
|
line = f.substring(linestart,lineend);
|
||||||
starNumber++;
|
starNumber++;
|
||||||
//console.log(line);
|
|
||||||
//Process the star
|
//Process the star
|
||||||
starInfo = line.split(',');
|
starInfo = line.split(',');
|
||||||
//console.log(starInfo[0]);
|
drawStar(zeta,theta,z,julianDay,latitude,longitude,starInfo,starNumber,starPositions);
|
||||||
starRA = parseFloat(starInfo[0]);
|
|
||||||
starDE = parseFloat(starInfo[1]);
|
|
||||||
starMag = parseFloat(starInfo[2]);
|
|
||||||
//var start = new Date().getTime();
|
|
||||||
var dec = Math.asin(Math.sin(theta) * Math.cos(starDE) * Math.cos(starRA + zeta) + Math.cos(theta) * Math.sin(starDE));
|
|
||||||
var ascen = Math.atan2(Math.cos(starDE) * Math.sin(starRA + zeta), Math.cos(theta) * Math.cos(starDE) * Math.cos(starRA + zeta) - Math.sin(theta) * Math.sin(starDE)) + z;
|
|
||||||
var H = siderealTime(julianDay) - longitude - ascen;
|
|
||||||
//Compute altitude
|
|
||||||
var alt = Math.asin(Math.sin(latitude) * Math.sin(dec) + Math.cos(latitude) * Math.cos(dec) * Math.cos(H));
|
|
||||||
if(alt >= 0)
|
|
||||||
{
|
|
||||||
//Compute azimuth
|
|
||||||
var azi = Math.atan2(Math.sin(H), Math.cos(H) * Math.sin(latitude) - Math.tan(dec) * Math.cos(latitude));
|
|
||||||
var x = size / 2 + size / 2 * Math.cos(alt) * Math.sin(azi);
|
|
||||||
var y = size / 2 + size / 2 * Math.cos(alt) * Math.cos(azi);
|
|
||||||
starPositions[starNumber] = [x,y];
|
|
||||||
var magnitude = starMag<1?2:1;
|
|
||||||
//Stars between 1.5 and 4 magnitude should get a different colour
|
|
||||||
var col=1;
|
|
||||||
if (starMag<=1.5)
|
|
||||||
col=1;
|
|
||||||
else if (starMag>1.5 && starMag<2)
|
|
||||||
col=0.9;
|
|
||||||
else if (starMag>=2 && starMag<3)
|
|
||||||
col=0.7;
|
|
||||||
else if (starMag>=3 && starMag<3.5)
|
|
||||||
col=0.5;
|
|
||||||
else
|
|
||||||
col=0.3;
|
|
||||||
|
|
||||||
g.setColor(col,col,col);
|
|
||||||
g.fillCircle(x, y, magnitude);
|
|
||||||
if (starMag<1 && settings.starnames)
|
|
||||||
g.drawString(starInfo[3],x,y+2);
|
|
||||||
g.flip();
|
|
||||||
|
|
||||||
}
|
|
||||||
linestart = lineend+1;
|
linestart = lineend+1;
|
||||||
lineend = f.indexOf("\n",linestart);
|
lineend = f.indexOf("\n",linestart);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (settings.constellations){
|
if (settings.constellations){
|
||||||
//Each star has a number (the position on the file (line number)). These are the lines
|
//First plot the extra stars for the constellations
|
||||||
//joining each star in the constellations.
|
fe=storage.read("planetarium.extra.csv","r");
|
||||||
constelations=[[[7,68],[10,53],[53,56],[28,68],"Orion"],[[13,172],[13,340],[293,340],[29,293],"Taurus"],
|
linenum=linestart = 0;
|
||||||
[[155,8],"Canis Menor"],[[36,81],[87,81],[235,87],[33,235],[33,75],[75,40],[36,235],"Ursa Major"],[[67,91],[74,67],[91,110],[110,252],"Cassiopeia"],[[23,166],[16,294],[294,44],[166,149],[230,149],[16,23],"Gemini"],[[88,218],[215,292],[218,292],[245,88],[292,245],[215,218],"Cepheus"],[[150,62],[150,175],[175,35],[403,62],[487,158],[384,487],[384,158],[35,158],[487,403],"Perseus"],[[19,65],[65,90],[65,147],[466,65],[466,189],[147,401],[213,90],"Cygnus"],[[6,42],[168,6],[168,113],[113,29],[104,29],[104,42],"Auriga"],[[1,47],[1,37],[37,22],[22,178],[37,89],"Can Maior"],[[3,118],[118,279],[279,286],[286,180],[180,316],[316,3],"Bootes"]];
|
lineend = fe.indexOf("\n");
|
||||||
g.setColor(0,255,0);
|
let starNumber = 0;
|
||||||
for (i=0;i<constelations.length;i++)
|
while (lineend>=0) {
|
||||||
{
|
line = fe.substring(linestart,lineend);
|
||||||
|
starNumber++;
|
||||||
|
starInfo = line.split(',');
|
||||||
|
drawStar(zeta,theta,z,julianDay,latitude,longitude,starInfo,"e_"+starNumber,starPositions);
|
||||||
|
linestart = lineend+1;
|
||||||
|
lineend = fe.indexOf("\n",linestart);
|
||||||
|
}
|
||||||
|
//End of ploting extra stars
|
||||||
|
|
||||||
|
linenum=linestart = 0;
|
||||||
|
fc=storage.read("planetarium.const.csv","r");
|
||||||
|
lineend = fc.indexOf("\n");
|
||||||
|
while (lineend>=0) {
|
||||||
|
linenum++;
|
||||||
|
//In this file, each constelation are two lines. The first one the name, the second the lines joining stars
|
||||||
|
var name = fc.substring(linestart,lineend);
|
||||||
|
linestart = lineend+1;
|
||||||
|
lineend = fc.indexOf("\n",linestart);
|
||||||
|
var lines = fc.substring(linestart,lineend).split(',');
|
||||||
|
linestart = lineend+1;
|
||||||
|
lineend = fc.indexOf("\n",linestart);
|
||||||
|
g.setColor(0,255,0);
|
||||||
|
|
||||||
constelationShowing=false;
|
constelationShowing=false;
|
||||||
for (j=0;j<constelations[i].length-1;j++){
|
|
||||||
positionStar1=starPositions[constelations[i][j][0]];
|
for (j=0;j<lines.length;j++){
|
||||||
positionStar2=starPositions[constelations[i][j][1]];
|
positions = lines[j].split(' ');
|
||||||
|
positionStar1=starPositions[positions[0]];
|
||||||
|
positionStar2=starPositions[positions[1]];
|
||||||
//Both stars need to be visible
|
//Both stars need to be visible
|
||||||
if (positionStar1 && positionStar2)
|
if (positionStar1 && positionStar2)
|
||||||
{
|
{
|
||||||
|
@ -131,13 +162,16 @@ function drawStars(lat,lon,date){
|
||||||
constelationShowing=false;
|
constelationShowing=false;
|
||||||
g.flip();
|
g.flip();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Write the name
|
//Write the name
|
||||||
if (constelationShowing && settings.consnames)
|
if (constelationShowing && settings.consnames)
|
||||||
g.drawString(constelations[i][constelations[i].length-1],positionStar2[0]+10,positionStar2[1]);
|
g.drawString(name,positionStar2[0]+10,positionStar2[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const size = 240; //Bangle size screen
|
||||||
|
|
||||||
Bangle.setGPSPower(1);
|
Bangle.setGPSPower(1);
|
||||||
|
|
||||||
var gps = { fix : 0};
|
var gps = { fix : 0};
|
||||||
|
@ -157,7 +191,7 @@ Bangle.on('GPS',function(gp) {
|
||||||
lon = gp.lon;
|
lon = gp.lon;
|
||||||
Bangle.setGPSPower(0);
|
Bangle.setGPSPower(0);
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
drawStars(lat,lon,new Date());},0);
|
plotSky(lat,lon,new Date());},0);
|
||||||
} else {
|
} else {
|
||||||
g.setFont("Vector",20);
|
g.setFont("Vector",20);
|
||||||
g.drawString("Waiting for position",120,120);
|
g.drawString("Waiting for position",120,120);
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
Orion
|
||||||
|
7 68,10 53,53 56,28 68
|
||||||
|
Taurus
|
||||||
|
13 172,13 340,293 340,29 293,340 276
|
||||||
|
Canis Menor
|
||||||
|
155 8
|
||||||
|
Ursa Major
|
||||||
|
36 81,87 81,235 87,33 235,33 75,75 40,36 235
|
||||||
|
Cassiopeia
|
||||||
|
67 91,74 67,91 110,110 252
|
||||||
|
Gemini
|
||||||
|
23 166,16 294,294 44,166 149,230 149,16 23
|
||||||
|
Cepheus
|
||||||
|
88 218,215 292,218 292,245 88,292 245,215 218
|
||||||
|
Perseus
|
||||||
|
150 62,150 175,175 35,403 62,487 158,384 487,384 158,35 158,487 e_3,e_3 403
|
||||||
|
Cygnus
|
||||||
|
19 65,65 90,65 147,466 65,466 189,147 401,213 90
|
||||||
|
Auriga
|
||||||
|
6 42,168 6,168 113,113 29,104 29,104 42
|
||||||
|
Can Maior
|
||||||
|
1 37,22 178,37 435,435 89,1 e_18,e_18 e_19,e_19 e_20,e_20 e_18,37 277,277 22,450 488,277 488,488 47,1 488,e_21 488,22 495
|
||||||
|
Bootes
|
||||||
|
3 118,118 279,279 286,286 180,180 316,316 3
|
||||||
|
Lupus
|
||||||
|
140 210,322 140,322 410,410 98,98 234,234 210,98 302,302 362,234 e_1,234 e_2
|
||||||
|
Leo
|
||||||
|
21 291,102 270,102 291,96 63,63 241,241 96,96 102,21 241,457 270,457 167
|
||||||
|
Lyra
|
||||||
|
5 e_4,e_4 e_5,e_5 221,221 274,274 e_4
|
||||||
|
Corona Borealis
|
||||||
|
69 353,353 e_6,69 429,429 e_7,e_7 e_8,e_8 e_9
|
||||||
|
Herculis
|
||||||
|
296 135,135 477,477 203,203 296,443 203,443 408,135 127,127 380,e_10 477,464 296,265 e_10,e_10 202
|
||||||
|
Ursa Minor
|
||||||
|
50 e_11,e_11 e_14,e_14 e_13,e_13 e_12,e_12 186,186 58,58 e_13
|
||||||
|
Draco
|
||||||
|
e_15 131,131 70,70 382,382 e_15,382 187,187 423,423 e_16,e_16 207,207 122,122 e_17,e_17 232,232 342,342 452,452 428
|
||||||
|
Pegasus
|
||||||
|
92 85,138 54,54 85,138 92,283 85,283 389,160 85,92 258,258 297,297 83
|
|
|
@ -421,7 +421,7 @@
|
||||||
3.874,-1.380,3.8,AL APS
|
3.874,-1.380,3.8,AL APS
|
||||||
4.745,0.502,3.8,OK HER
|
4.745,0.502,3.8,OK HER
|
||||||
5.184,1.226,3.8,EP DRA
|
5.184,1.226,3.8,EP DRA
|
||||||
1.172,0.279,43.8,TH1 TAU
|
1.172,0.279,3.8,TH1 TAU
|
||||||
2.272,-0.814,3.8,_
|
2.272,-0.814,3.8,_
|
||||||
2.335,-1.058,3.8,_
|
2.335,-1.058,3.8,_
|
||||||
2.781,-0.842,3.8,_
|
2.781,-0.842,3.8,_
|
||||||
|
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
1.394,-0.230,4.3,LA LEP
|
||||||
|
1.367,-0.226,4.4,KA LEP
|
||||||
|
0.825,0.866,4.0,JO PER
|
||||||
|
4.950,0.644,4.3,DE2 LYR
|
||||||
|
5.046,0.666,4.4,TH LYR
|
||||||
|
4.071,0.547,4.1,TH CRB
|
||||||
|
4.143,0.455,4.6,DE CRB
|
||||||
|
4.178,0.469,4.2,EP CRB
|
||||||
|
4.195,0.521,5.0,JO CRB
|
||||||
|
4.585,0.456,4.4,LA HER
|
||||||
|
4.591,1.511,4.4,DE UMI
|
||||||
|
4.265,1.322,5.0,ET UMI
|
||||||
|
4.119,1.358,4.3,ZE UMI
|
||||||
|
4.389,1.432,4.2,EP UMI
|
||||||
|
4.591,0.963,4.9,NY2 DRA
|
||||||
|
5.042,1.280,4.5,TA DRA
|
||||||
|
4.197,1.022,4.0,TH DRA
|
||||||
|
1.816,-0.298,4.4,JO CMA
|
||||||
|
1.849,-0.273,4.1,GA CMA
|
||||||
|
1.807,-0.210,4.1,TH CMA
|
||||||
|
1.724,-0.401,4.5,XI2 CMA
|
|
|
@ -1,6 +1,6 @@
|
||||||
// make sure to enclose the function in parentheses
|
// make sure to enclose the function in parentheses
|
||||||
(function(back) {
|
(function(back) {
|
||||||
let settings = require('Storage').readJSON('planetarium.json',1)||{};
|
let settings = require('Storage').readJSON('planetarium.json',1)||{"starnames":false,"constellations":true,"consnames":false};
|
||||||
function save(key, value) {
|
function save(key, value) {
|
||||||
settings[key] = value;
|
settings[key] = value;
|
||||||
require('Storage').write('planetarium.json',settings);
|
require('Storage').write('planetarium.json',settings);
|
||||||
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
'''
|
||||||
|
* This information is from the Yale Bright Star Catalog. First number is the RA (Right ascension) in radians. Careful because in all
|
||||||
|
* the catalogs this is in Hour angle. We have to convert it to degrees and then to radians.
|
||||||
|
* The second number is the DE (declination) in radians. In this case in the catalogs is in degrees, just convert to radians.
|
||||||
|
* Third number is the aparent magnitude
|
||||||
|
'''
|
||||||
|
|
||||||
|
import csv
|
||||||
|
import math
|
||||||
|
|
||||||
|
with open('starsoriginal.csv') as csv_file:
|
||||||
|
csv_reader = csv.reader(csv_file, delimiter=',')
|
||||||
|
for row in csv_reader:
|
||||||
|
data_read = [row for row in csv_reader]
|
||||||
|
|
||||||
|
stars=[]
|
||||||
|
for row in data_read:
|
||||||
|
hours = float(row[0])
|
||||||
|
min = float(row[1])
|
||||||
|
seg = float(row[2])
|
||||||
|
rahours = hours+(min+seg/60)/60
|
||||||
|
radegress = rahours*360/24
|
||||||
|
radradians = math.radians(radegress)
|
||||||
|
deg = float(row[3])
|
||||||
|
dem = float(row[4])
|
||||||
|
des = float(row[5])
|
||||||
|
if (deg<0):
|
||||||
|
desex = deg-(dem+des/60)/60
|
||||||
|
else:
|
||||||
|
desex = deg+(dem+des/60)/60
|
||||||
|
derad = math.radians(desex)
|
||||||
|
|
||||||
|
stars.append(['{:.3f}'.format(radradians),'{:.3f}'.format(derad),'{:.1f}'.format(float(row[6])),row[7].strip()])
|
||||||
|
|
||||||
|
with open("planetarium.stars.csv", "wt") as fp:
|
||||||
|
writer = csv.writer(fp, delimiter=",")
|
||||||
|
# writer.writerow(["your", "header", "foo"]) # write header
|
||||||
|
writer.writerows(stars)
|
|
@ -1,3 +1,4 @@
|
||||||
0.01: First published version of app
|
0.01: First published version of app
|
||||||
0.02: Added support for locale and 12H clock
|
0.02: Added support for locale and 12H clock
|
||||||
0.03: Added HR indication to clock
|
0.03: Added HR indication to clock
|
||||||
|
0.04: Update font size and alignment
|
|
@ -23,31 +23,29 @@
|
||||||
// Ssettings
|
// Ssettings
|
||||||
const settings = {
|
const settings = {
|
||||||
time: {
|
time: {
|
||||||
color: '#f0af00',
|
color: 0xD6ED17,
|
||||||
shadow: '#CF7500',
|
|
||||||
font: 'Vector',
|
font: 'Vector',
|
||||||
size: 60,
|
size: 60,
|
||||||
middle: screen.middle - 30,
|
middle: screen.middle,
|
||||||
center: screen.center,
|
center: screen.center,
|
||||||
},
|
},
|
||||||
date: {
|
date: {
|
||||||
color: '#f0af00',
|
color: 0xD6ED17,
|
||||||
shadow: '#CF7500',
|
|
||||||
font: 'Vector',
|
font: 'Vector',
|
||||||
size: 15,
|
size: 15,
|
||||||
middle: screen.height - 20, // at bottom of screen
|
middle: screen.height-17, // at bottom of screen
|
||||||
center: screen.center,
|
center: screen.center,
|
||||||
},
|
},
|
||||||
circle: {
|
circle: {
|
||||||
colormin: '#eeeeee',
|
colormin: 0x606060,
|
||||||
colorsec: '#bbbbbb',
|
colorsec: 0x656565,
|
||||||
width: 10,
|
width: 10,
|
||||||
middle: screen.middle,
|
middle: screen.middle,
|
||||||
center: screen.center,
|
center: screen.center,
|
||||||
height: screen.height
|
height: screen.height
|
||||||
},
|
},
|
||||||
hr: {
|
hr: {
|
||||||
color: '#333333',
|
color: 0x333333,
|
||||||
size: 10,
|
size: 10,
|
||||||
x: screen.center,
|
x: screen.center,
|
||||||
y: screen.middle + 45
|
y: screen.middle + 45
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
0.01: Initial version
|
0.01: Initial version
|
||||||
|
0.02: Fixed issues with entry in apps.json
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
var img = E.toArrayBuffer(atob("MDDCAP//Bv7m/RF8AAAAAAAAAAAAAAAAAAAAAP/AAAAAAAAAAAAAD//8AAAAAAAAAAAAP///AAAAAAAAAAAA////wAAAAAAAAAAA////wAAAAAAAAAAD/9X/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAA/1V/wAAAAAAAAAAA/1V/wAAAAAAAAAAAP1V/AAAAAAAAAAAAD1V8AAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVlQAAAAAAAAAAAAFVlVVQAAAAAAAAAAFVVVVVUAAAAAAAAAFVVVVVVQAAAAAAAAFVVVVVVQAAAAFYAAFVVVVVVUAAAAFWAAFVVVVVVUAAAAFVgAFVVVVVVUAAAAFVaAlVVVVVVUAAAABVWqlVVVVVVUAAAAAVVqlVVVVVVUAAAAAFValVVVVVVYAAAAABVWlVVVVVVoAAAAAAVVlVVVVVWoAAAAAAFVVVVVVVaoAAAAAAFVVVVVVVqoAAAAAABVVVVVVWqoAAAAAAAVVVVVVqqoAAAAAAAFVVVVWqqoAAAAAAABVVVVaqqoAAAAAAAAVVVVqqqgAAAAAAAAFVVWqqqgAAAAAAAABVVaqqqAAAAAAAAAAFVqqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"))
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
0.01: New App!
|
||||||
|
0.02: Tweaks for app loader
|
|
@ -0,0 +1 @@
|
||||||
|
E.toArrayBuffer(atob("MDDCAP//Bv7m/RF8AAAAAAAAAAAAAAAAAAAAAP/AAAAAAAAAAAAAD//8AAAAAAAAAAAAP///AAAAAAAAAAAA////wAAAAAAAAAAA////wAAAAAAAAAAD/9X/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAD/1V/8AAAAAAAAAAA/1V/wAAAAAAAAAAA/1V/wAAAAAAAAAAAP1V/AAAAAAAAAAAAD1V8AAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVAAAAAAAAAAAAAAFVlQAAAAAAAAAAAAFVlVVQAAAAAAAAAAFVVVVVUAAAAAAAAAFVVVVVVQAAAAAAAAFVVVVVVQAAAAFYAAFVVVVVVUAAAAFWAAFVVVVVVUAAAAFVgAFVVVVVVUAAAAFVaAlVVVVVVUAAAABVWqlVVVVVVUAAAAAVVqlVVVVVVUAAAAAFValVVVVVVYAAAAABVWlVVVVVVoAAAAAAVVlVVVVVWoAAAAAAFVVVVVVVaoAAAAAAFVVVVVVVqoAAAAAABVVVVVVWqoAAAAAAAVVVVVVqqoAAAAAAAFVVVVWqqoAAAAAAABVVVVaqqoAAAAAAAAVVVVqqqgAAAAAAAAFVVWqqqgAAAAAAAABVVaqqqAAAAAAAAAAFVqqqgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"))
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 85 KiB |