removed deprecated JS
This commit is contained in:
parent
0304307b8d
commit
acface76fb
7 changed files with 0 additions and 320809 deletions
1418
js/old/actions.js
1418
js/old/actions.js
File diff suppressed because it is too large
Load diff
316824
js/old/airports.json
316824
js/old/airports.json
File diff suppressed because it is too large
Load diff
279
js/old/astro.js
279
js/old/astro.js
|
|
@ -1,279 +0,0 @@
|
|||
function findNewMoon( ts ) {
|
||||
var today = new moment.unix(ts);
|
||||
var year = parseFloat(today.format('YYYY'));
|
||||
var ydays = 365;
|
||||
var spd = 86400;
|
||||
if (today.isLeapYear() ) ydays++;
|
||||
var decimal = parseFloat(today.format('DDD')) / ydays * spd;
|
||||
var secs = parseFloat(today.format('H')) * 3600 + parseFloat(today.format('m')) * 60 + parseFloat(today.format('s'));
|
||||
decimal = (decimal + secs) / spd;
|
||||
var Y = year + decimal;
|
||||
// k is an integer for new moon incremented by 0.25 for first quarter 0.5 for new etc.
|
||||
var k=Math.floor((parseFloat(today.format('YYYY'))+((parseFloat(today.format('M'))-1)+parseFloat(today.format('D'))/30)/12-2000)*12.3685);
|
||||
// Time in Julian centuries since 2000.0
|
||||
var T=k/1236.85;
|
||||
// Sun's mean anomaly
|
||||
var M=rev(2.5534+29.10535669*k-0.0000218*T*T);
|
||||
// Moon's mean anomaly (M' in Meeus)
|
||||
var MP=rev(201.5643+385.81693528*k+0.0107438*T*T+0.00001239*T*T*T-0.00000011*T*T*T);
|
||||
var E=1-0.002516*T-0.0000074*T*T;
|
||||
// Moons argument of latitude
|
||||
var F=rev(160.7108+390.67050274*k-0.0016341*T*T-0.00000227*T*T*T+0.000000011*T*T*T*T);
|
||||
// Longitude of ascending node of lunar orbit
|
||||
var Omega=rev(124.7746-1.56375580*k+0.0020691*T*T+0.00000215*T*T*T);
|
||||
// The full planetary arguments include 14 terms, only used the 7 most significant
|
||||
var B = new Array();
|
||||
B[1]=rev(299.77+ 0.107408*k-0.009173*T*T);
|
||||
B[2]=rev(251.88+ 0.016321*k);
|
||||
B[3]=rev(251.83+26.651886*k);
|
||||
B[4]=rev(349.42+36.412478*k);
|
||||
B[5]=rev( 84.88+18.206239*k);
|
||||
B[6]=rev(141.74+53.303771*k);
|
||||
B[7]=rev(207.14+ 2.453732*k);
|
||||
|
||||
// New moon
|
||||
var JDE0=2451550.09765+29.530588853*k+0.0001337*T*T-0.000000150*T*T*T+0.00000000073*T*T*T*T;
|
||||
// Correct for TDT since 1 July 2015
|
||||
JDE0=JDE0-58.184/(24*60*60);
|
||||
var JDE=JDE0 -0.40720*sind(MP) +0.17241*E*sind(M) +0.01608*sind(2*MP) +0.01039*sind(2*F)
|
||||
+0.00739*E*sind(MP-M) -0.00514*E*sind(MP+M) +0.00208*E*E*sind(2*M) -0.00111*sind(MP-2*F)
|
||||
-0.00057*sind(MP+2*F) +0.00056*E*sind(2*MP+M) -0.00042*sind(3*MP) +0.00042*E*sind(M+2*F)
|
||||
+0.00038*E*sind(M-2*F) -0.00024*E*sind(2*MP-M) -0.00017*sind(Omega) -0.00007*sind(MP+2*M);
|
||||
|
||||
var F=0.000325*sind(B[1])+0.000165*sind(B[2])+0.000164*sind(B[3])+0.000126*sind(B[4])
|
||||
+0.000110*sind(B[5])+0.000062*sind(B[6])+0.000060*sind(B[7]);
|
||||
var newmoon = new moment(A.JulianDay.jdToDate(JDE + F)).subtract(2, 'h').unix();
|
||||
if ( ts < newmoon ) newmoon = findNewMoon( new moment.unix(ts).subtract(1, 'h').unix());
|
||||
return newmoon;
|
||||
} //End calcMoonPhase
|
||||
|
||||
function getZodiac(deg, sidereal = false) {
|
||||
if ( sidereal == true ) {
|
||||
deg += 27.74;
|
||||
if ( deg > 360 ) deg =- 360;
|
||||
}
|
||||
var obj = {
|
||||
sign: Math.ceil(deg / 30),
|
||||
decan: Math.ceil(deg / 10)
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function getLunarMansion(deg, sidereal = false) {
|
||||
// global variable def needs to be declared before using this function
|
||||
if (!sidereal) var mansion = def.moon.mansion.tropical;
|
||||
else var mansion = def.moon.mansion.constellational;
|
||||
var i = 1;
|
||||
var m;
|
||||
while ( deg > zodToDeg(mansion[i]) ) i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
function sunRiseSet(ts, coord) {
|
||||
// calculate sunrise and sunset
|
||||
var today = new moment.unix(ts).startOf('d');
|
||||
var tomorrow = new moment.unix(ts).startOf('d').add(1, 'd');
|
||||
//var todaySolarSecs = A.Solar.times(new A.JulianDay(today.toDate()), coord);
|
||||
//var tomorrowSolarSecs = A.Solar.times(new A.JulianDay(tomorrow.toDate()), coord);
|
||||
|
||||
// fixed MeeusJS bug with working Peter Hayes code
|
||||
var todayHayes = SunRiseSet(parseFloat(today.format('YYYY')),parseFloat(today.format('M')),parseFloat(today.format('D')),parseFloat($('#lat').val()),parseFloat($('#lon').val()));
|
||||
var tomorrowHayes = SunRiseSet(parseFloat(tomorrow.format('YYYY')),parseFloat(tomorrow.format('M')),parseFloat(tomorrow.format('D')),parseFloat($('#lat').val()),parseFloat($('#lon').val()));
|
||||
var todaySolarSecs = {};
|
||||
var tomorrowSolarSecs = {};
|
||||
todaySolarSecs.rise = todayHayes[0] * 3600;
|
||||
todaySolarSecs.set = todayHayes[1] * 3600;
|
||||
tomorrowSolarSecs.rise = tomorrowHayes[0] * 3600;
|
||||
tomorrowSolarSecs.set = tomorrowHayes[1] * 3600;
|
||||
// end bugfix
|
||||
|
||||
var todayPlanetDayStart = new moment.unix(ts).startOf('day').unix() + todaySolarSecs.rise;
|
||||
var todayPlanetNightStart = new moment.unix(ts).startOf('day').unix() + todaySolarSecs.set;
|
||||
var tomorrowPlanetDayStart = new moment.unix(ts).add(1, 'd').startOf('day').unix() + tomorrowSolarSecs.rise;
|
||||
var tomorrowPlanetNightStart = new moment.unix(ts).add(1, 'd').startOf('day').unix() + tomorrowSolarSecs.set;
|
||||
|
||||
var planetaryDayHourSecs = (todayPlanetNightStart - todayPlanetDayStart) / 12;
|
||||
var planetaryNightHourSecs = (tomorrowPlanetDayStart - todayPlanetNightStart) / 12;
|
||||
|
||||
var sol = {
|
||||
day : {
|
||||
start : Math.floor(todayPlanetDayStart),
|
||||
hourSecs : Math.round(planetaryDayHourSecs),
|
||||
end : Math.floor(todayPlanetNightStart - 1)
|
||||
},
|
||||
night : {
|
||||
start: Math.floor(todayPlanetNightStart),
|
||||
hourSecs : Math.round(planetaryNightHourSecs),
|
||||
end : Math.floor(tomorrowPlanetDayStart - 1)
|
||||
}
|
||||
}
|
||||
return sol;
|
||||
}
|
||||
|
||||
function planetaryMoment(lat, lon, ts) {
|
||||
|
||||
var sidereal = false;
|
||||
var coord = A.EclCoord.fromWgs84(lat, lon, 0);
|
||||
var today = new moment.unix(ts);
|
||||
var tomorrow = new moment.unix(ts).add(1, 'd');
|
||||
var yesterday = new moment.unix(ts).subtract(1, 'd');
|
||||
var date = today.toDate();
|
||||
var jdo = new A.JulianDay(date);
|
||||
var suneq = A.Solar.apparentEquatorial(jdo);
|
||||
var mooneq = A.Moon.apparentEquatorial(jdo);
|
||||
var suntp = A.Solar.topocentricPosition(jdo, coord, true);
|
||||
var moontp = A.Moon.topocentricPosition(jdo, coord, true);
|
||||
var obliquity = A.Nutation.trueObliquity(jdo) * 180 / Math.PI;
|
||||
|
||||
// get sun rise and set times
|
||||
var sol = sunRiseSet(ts, coord);
|
||||
var ps = sol;
|
||||
|
||||
// calculate planetary hour of ts and when it starts and ends
|
||||
var phour = 0;
|
||||
var phstart;
|
||||
var phend;
|
||||
|
||||
if ( ts >= ps.day.start && ts < ps.night.start ) {
|
||||
phour = (ts - ps.day.start) / ps.day.hourSecs;
|
||||
phstart = ps.day.start + phour * ps.day.hourSecs;
|
||||
phend = phstart + ps.day.hourSecs - 1;
|
||||
}
|
||||
else {
|
||||
if ( ts < ps.day.start ) {
|
||||
ps = sunRiseSet(yesterday.unix(), coord);
|
||||
}
|
||||
phour = (ts - ps.night.start) / ps.night.hourSecs + 12;
|
||||
phstart = ps.night.start + (phour - 12) * ps.night.hourSecs;
|
||||
phend = phstart + ps.night.hourSecs - 1;
|
||||
}
|
||||
|
||||
// calculate planetary day of ts
|
||||
var pday = parseFloat(new moment.unix(ps.day.start).format('d'));
|
||||
|
||||
// planet longitudes
|
||||
var pldate = {
|
||||
year: parseFloat(today.format('YYYY')),
|
||||
month: parseFloat(today.format('M')),
|
||||
day: parseFloat(today.format('D')),
|
||||
hours: parseFloat(today.format('H')),
|
||||
minutes: parseFloat(today.format('m')),
|
||||
seconds: 0};
|
||||
$const.tlong = lon // longitude
|
||||
$const.tlat = lat // latitude
|
||||
$processor.init ();
|
||||
var mars = $moshier.body.mars;
|
||||
var mercury = $moshier.body.mercury;
|
||||
var jupiter = $moshier.body.jupiter;
|
||||
var venus = $moshier.body.venus;
|
||||
var saturn = $moshier.body.saturn;
|
||||
$processor.calc (pldate, mars);
|
||||
$processor.calc (pldate, mercury);
|
||||
$processor.calc (pldate, jupiter);
|
||||
$processor.calc (pldate, venus);
|
||||
$processor.calc (pldate, saturn);
|
||||
|
||||
// calculate lunar day
|
||||
var lastNewMoon = findNewMoon(ts);
|
||||
var nextNewMoon = findNewMoon(new moment.unix(lastNewMoon).add(31, 'd').unix());
|
||||
var startDate = new moment.unix(lastNewMoon).startOf('d');
|
||||
var endDate = new moment.unix(nextNewMoon).startOf('d');
|
||||
var cal = [];
|
||||
cal[0] = lastNewMoon;
|
||||
var daycount = 0;
|
||||
var rise = lastNewMoon + 1;
|
||||
while ( rise < nextNewMoon && rise < ts ) {
|
||||
var day = new moment(startDate.toDate()).add(daycount, 'd');
|
||||
var jdr = new A.JulianDay(day.toDate());
|
||||
var moontimes = A.Moon.times(jdr, coord);
|
||||
var hrs = MoonRise(parseFloat(day.format('YYYY')),parseFloat(day.format('M')),parseFloat(day.format('D')),0,parseFloat(lat),parseFloat(lon));
|
||||
if ( hrs[0] > 0 ) {
|
||||
var mt = hrs[0] * 60 * 60;
|
||||
var rise = day.add(mt, 's').unix();
|
||||
if ( rise > lastNewMoon && rise < nextNewMoon ) {
|
||||
cal.push(rise);
|
||||
}
|
||||
}
|
||||
daycount++;
|
||||
}
|
||||
var lday = 0;
|
||||
cal.forEach(function(lts, i, o) {
|
||||
if ( ts >= lts ) {
|
||||
lday = i;
|
||||
}
|
||||
});
|
||||
var luna = {
|
||||
day: lday + 1,
|
||||
start: cal[lday]
|
||||
}
|
||||
|
||||
var suncoords = eqToEclDeg(suneq, obliquity);
|
||||
var sunlng = suncoords.lng;
|
||||
|
||||
var mooncoords = eqToEclDeg(mooneq.eq, obliquity);
|
||||
var moonlng = mooncoords.lng;
|
||||
|
||||
// calculate lunar phase
|
||||
var i = A.MoonIllum.phaseAngleEq2(moontp.eq, suntp.eq);
|
||||
var k = A.MoonIllum.illuminated(i);
|
||||
var chi = A.MoonIllum.positionAngle(moontp.eq, suntp.eq);
|
||||
var angle = i * 180 / Math.PI;
|
||||
if ( chi < 0 ) angle = 360 - angle;
|
||||
var sphase;
|
||||
if ( angle < 10 ) sphase = 5;
|
||||
else if ( angle < 80 ) sphase = 6;
|
||||
else if ( angle < 95 ) sphase = 7;
|
||||
else if ( angle < 170 ) sphase = 8;
|
||||
else if ( angle < 190 ) sphase = 1;
|
||||
else if ( angle < 260 ) sphase = 2;
|
||||
else if ( angle < 280 ) sphase = 3;
|
||||
else if ( angle < 350 ) sphase = 4;
|
||||
else sphase = 5;
|
||||
|
||||
var phase = {
|
||||
simple: sphase,
|
||||
phase: angle,
|
||||
angle: chi,
|
||||
illumination : Math.round(k * 100)
|
||||
}
|
||||
|
||||
var obj = {
|
||||
ts: ts,
|
||||
planetary : {
|
||||
hour : {
|
||||
number: Math.round(phour),
|
||||
begin : phstart,
|
||||
end : phend
|
||||
},
|
||||
day : pday
|
||||
},
|
||||
solar : {
|
||||
day : sol,
|
||||
lng : Math.round(sunlng * 100) / 100
|
||||
},
|
||||
lunar : {
|
||||
day : luna,
|
||||
lng : Math.round(moonlng * 100) / 100,
|
||||
phase : phase,
|
||||
lastnew : lastNewMoon
|
||||
},
|
||||
planet : {
|
||||
mars : {
|
||||
lng : Math.round(mars.position.apparentLongitude * 100) / 100
|
||||
},
|
||||
mercury : {
|
||||
lng : Math.round(mercury.position.apparentLongitude * 100) / 100
|
||||
},
|
||||
jupiter : {
|
||||
lng : Math.round(jupiter.position.apparentLongitude * 100) / 100
|
||||
},
|
||||
venus : {
|
||||
lng : Math.round(venus.position.apparentLongitude * 100) / 100
|
||||
},
|
||||
saturn : {
|
||||
lng : Math.round(saturn.position.apparentLongitude * 100) / 100
|
||||
}
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
|
@ -1,446 +0,0 @@
|
|||
var timestamp;
|
||||
|
||||
function getLocation() {
|
||||
navigator.geolocation.getCurrentPosition(function(position){
|
||||
setCoords(position);
|
||||
}, function () {
|
||||
setCoords({coords: { latitude: latitude, longitude: longitude }});
|
||||
});
|
||||
}
|
||||
|
||||
function getAirportLocation() {
|
||||
$.getJSON( "https://raw.githubusercontent.com/mwgg/Airports/master/airports.json", function( data ) {
|
||||
$('#iata input').addClass('loading');
|
||||
var iatacode = $('#iata input').val();
|
||||
Defiant.getSnapshot(data, function(snapshot) {
|
||||
var found = JSON.search(snapshot, '//*[iata="'+iatacode.toUpperCase()+'"]');
|
||||
/*
|
||||
var minlat = Math.floor($('#lat').val()) - 2;
|
||||
var maxlat = Math.ceil($('#lat').val()) + 2;
|
||||
var minlon = Math.floor($('#lon').val()) - 2;
|
||||
var maxlon = Math.ceil($('#lon').val()) + 2;
|
||||
var foundlat = JSON.search(snapshot, '//*[lat<'+maxlat+' and lat>'+minlat+']');
|
||||
var found = JSON.search(foundlat, '//*[lon<'+maxlon+' and lon>'+minlon+']');
|
||||
var distances = [];
|
||||
for (index = 0; index < found.length; ++index) {
|
||||
distances.push(getDistance($('#lat').val(), $('#lon').val(), found[index].lat, found[index].lon));
|
||||
}
|
||||
var idx = distances.indexOf(Math.min.apply(Math,distances));
|
||||
var airport = found[idx];
|
||||
*/
|
||||
var airport = found[0];
|
||||
$.getJSON( "https://raw.githubusercontent.com/dmfilipenko/timezones.json/master/timezones.json", function( zones ) {
|
||||
var off = JSON.search( zones, '//*[utc="'+airport.tz+'"]');
|
||||
$('#lat').val(airport.lat);
|
||||
$('#lon').val(airport.lon);
|
||||
$('#offset').val(off[0].offset);
|
||||
$('#iata-info').text(airport.name+', '+airport.city+', '+airport.country+' (Timezone: '+airport.tz+')');
|
||||
$('#iata input').removeClass('loading');
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function setCoords(location) {
|
||||
$('#lat').val(location.coords.latitude);
|
||||
$('#lon').val(location.coords.longitude);
|
||||
var now = new Date()
|
||||
var off = now.getTimezoneOffset();
|
||||
$('#offset').val(off/60*-1);
|
||||
}
|
||||
|
||||
function generate() {
|
||||
$('#grid').empty();
|
||||
var data = generateJSON((Math.floor($('#lat').val())+'-'+Math.floor($('#lon').val())), new moment().unix(), $('#offset').val(), ($('#days').val()-1), $('#lat').val(), $('#lon').val());
|
||||
var j = 0;
|
||||
function makePHour(j) {
|
||||
if ( j == data.planetaryhours.length-1 ) {
|
||||
clearTimeout(everyday);
|
||||
NProgress.done();
|
||||
var now = moment().subtract($('#offset').val(), 'h').unix();
|
||||
$('.planetaryhour').each( function( idx, element ) {
|
||||
if ( $(element).attr('ts') < now && now < $(element).next().attr('ts') ) {
|
||||
$(element).addClass('now');
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
var m = data.planetaryhours[j];
|
||||
var localTime = new moment.unix(m.ts).add($('#offset').val(), 'h');
|
||||
var zodiac = getZodiac(m.solar.lng);
|
||||
var moonsign = getZodiac(m.lunar.lng);
|
||||
var mansion = getLunarMansion(m.lunar.lng);
|
||||
var hygromanteia = getActions(matrix.planetary.day[m.planetary.day].hour[m.planetary.hour.number].for, action, 'hygromanteia');
|
||||
var lunarday = getActions(matrix.lunar.day[m.lunar.day.day], action, 'lunarday');
|
||||
var lunarsign = getActions(matrix.lunar.sign[zodiac.sign].for, action, 'lunarsign');
|
||||
var lunarmansion = getActions(matrix.lunar.mansion[mansion], action, 'lunarmansion');
|
||||
var claviculaday = getActions(matrix.clavicula[m.planetary.day+1], action, 'clavicula');
|
||||
var claviculahour = getActions(matrix.clavicula[matrix.planetary.day[m.planetary.day].hour[m.planetary.hour.number].planet], action, 'clavicula');
|
||||
var clavicula = [claviculaday.actions.string, claviculahour.actions.string];
|
||||
$('<div/>').loadTemplate($("#tpl-planetaryhour"), {
|
||||
ruler : def.planet.symbol[m.planetary.day+1],
|
||||
date : new moment.unix(m.ts).format('D/M'),
|
||||
lunarday : '☾'+m.lunar.day.day+'☽',
|
||||
hourstart : new moment.unix(m.planetary.hour.begin).add($('#offset').val(), 'h').format('HH:mm'),
|
||||
hournumber : (m.planetary.hour.number+1)+'<br />'+def.planet.symbol[matrix.planetary.day[m.planetary.day].hour[m.planetary.hour.number].planet],
|
||||
hourend : new moment.unix(m.planetary.hour.end).add($('#offset').val(), 'h').format('HH:mm'),
|
||||
moonsign : def.zodiac.symbol[moonsign.sign],
|
||||
moonphase : def.moon.phase.symbol[m.lunar.phase.simple]+' <small>'+m.lunar.phase.illumination+'%</small>',
|
||||
moonmansion : '|'+mansion+'|'
|
||||
})
|
||||
.addClass(hygromanteia.actions.string)
|
||||
.addClass($.unique(clavicula.join(" ").split(' ')).join(" "))
|
||||
.addClass(lunarday.actions.string)
|
||||
.addClass(lunarsign.actions.string)
|
||||
.addClass(lunarmansion.actions.string)
|
||||
.addClass(addPlanetClasses(m.solar.lng, 'sun'))
|
||||
.addClass(addPlanetClasses(m.lunar.lng, 'moon'))
|
||||
.addClass(addPlanetClasses(m.planet.mars.lng, 'mars'))
|
||||
.addClass(addPlanetClasses(m.planet.mercury.lng, 'mercury'))
|
||||
.addClass(addPlanetClasses(m.planet.jupiter.lng, 'jupiter'))
|
||||
.addClass(addPlanetClasses(m.planet.venus.lng, 'venus'))
|
||||
.addClass(addPlanetClasses(m.planet.saturn.lng, 'saturn'))
|
||||
.addClass('col-md-2 centered planetaryhour')
|
||||
.attr('id', 'c'+j+'d'+m.planetary .day+'h'+m.planetary.hour.number )
|
||||
.attr('day', m.planetary.day)
|
||||
.attr('hour', m.planetary.hour.number)
|
||||
.attr('ts', m.ts)
|
||||
.attr('ts-end', new moment.unix(m.planetary.hour.end).add($('#offset').val(), 'h').unix())
|
||||
.attr('sun-lng', m.solar.lng)
|
||||
.attr('moon-lng', m.lunar.lng)
|
||||
.attr('moon-day', m.lunar.day.day)
|
||||
.attr('moon-phase', m.lunar.phase.simple)
|
||||
.attr('moon-angle', Math.round(m.lunar.phase.angle *100) / 100 )
|
||||
.attr('moon-illumination', m.lunar.phase.illumination)
|
||||
.attr('mars-lng', m.planet.mars.lng)
|
||||
.attr('mercury-lng', m.planet.mercury.lng)
|
||||
.attr('jupiter-lng', m.planet.jupiter.lng)
|
||||
.attr('venus-lng', m.planet.venus.lng)
|
||||
.attr('saturn-lng', m.planet.saturn.lng)
|
||||
.appendTo('#grid');
|
||||
if ( $('#c'+j+'d'+m.planetary .day+'h'+m.planetary.hour.number).attr('hour') > 11 ) {
|
||||
$('#c'+j+'d'+m.planetary .day+'h'+m.planetary.hour.number).addClass('night-hour');
|
||||
}
|
||||
NProgress.set(j/data.planetaryhours.length);
|
||||
}
|
||||
for (var i = 0, len = data.planetaryhours.length; i < len; i++) {
|
||||
var everyday = setTimeout( makePHour, 10, i);
|
||||
}
|
||||
}
|
||||
|
||||
function generateJSON(iata, timestamp, timeoffset, days, latitude, longitude) {
|
||||
var caldata = [];
|
||||
var queryday = new moment.unix(timestamp).startOf('day');
|
||||
var j = 0;
|
||||
while ( j <= days ) {
|
||||
var m = planetaryMoment(latitude, longitude, queryday.unix());
|
||||
var sol = m.solar.day;
|
||||
var h = 0;
|
||||
var interval;
|
||||
var start;
|
||||
var m;
|
||||
while ( h < 24 ) {
|
||||
if ( h < 12 ) {
|
||||
interval = sol.day.hourSecs;
|
||||
start = sol.day.start;
|
||||
m = h;
|
||||
} else {
|
||||
interval = sol.night.hourSecs;
|
||||
start = sol.night.start;
|
||||
m = h - 12;
|
||||
}
|
||||
var hm = start + m * interval;
|
||||
pm = planetaryMoment(latitude, longitude, hm);
|
||||
caldata.push(pm);
|
||||
h++;
|
||||
}
|
||||
queryday.add(1, 'd');
|
||||
j++;
|
||||
};
|
||||
console.log(caldata);
|
||||
var data = {
|
||||
iata: iata,
|
||||
time: {
|
||||
starttime: timestamp,
|
||||
days: days,
|
||||
offset: timeoffset
|
||||
},
|
||||
coords: {
|
||||
lat: latitude,
|
||||
lng: longitude
|
||||
},
|
||||
planetaryhours: caldata
|
||||
};
|
||||
return data;
|
||||
}
|
||||
|
||||
function createFilterModal(id, getFunction) {
|
||||
var items = getFunction();
|
||||
var title = $('#navigation a[data-target="#'+id+'"]').clone();
|
||||
var tagfilters = "";
|
||||
var actions = "";
|
||||
for (var i = 0, len = items.tags.length; i < len; i++) {
|
||||
tagfilters += '<li><input type="checkbox" class="actiontag" value=".'+items.tags[i]+'" id="'+id+'-'+items.tags[i]+'" /> '+items.tags[i]+'</li>';
|
||||
}
|
||||
for (var i = 0, len = items.actions.length; i < len; i++) {
|
||||
actions += '<li class="operation '+items.actions[i].tags+'"><input type="checkbox" value=".'+id+'-'+items.actions[i].id+'" id="'+id+'-'+items.actions[i].id+'" /> '+items.actions[i].action+'</li> ';
|
||||
}
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : 'Filter by'+title[0].innerText,
|
||||
left : '<h4>Tags</h4><ul class="option-set">'+tagfilters+'</ul>',
|
||||
right : '<h4>Operations</h4><ul class="option-set">'+actions+'</ul>'
|
||||
}) .appendTo('#modals').attr('id', id).attr('tabindex', '-1').attr('role', 'dialog').addClass('modal fade')
|
||||
.find('.col-sm-4')
|
||||
.addClass('actionlistfilter')
|
||||
.find('ul')
|
||||
.attr('id', id+'-tags' )
|
||||
.attr('data-group', id )
|
||||
.parents('.modal-body')
|
||||
.find('.col-sm-8')
|
||||
.addClass('filteroptions')
|
||||
.find('ul')
|
||||
.attr('id', id+'-actions')
|
||||
.attr('data-group', id+'-actions' );
|
||||
}
|
||||
|
||||
function createInfoModal() {
|
||||
$('<div/>').loadTemplate($("#tpl-modal"), {
|
||||
title : 'Planetary Hour <span id="p-hour"></span>',
|
||||
left : '<div id="p-info"></div>',
|
||||
right : '<div id="p-actions"></div>'
|
||||
}) .appendTo('#modals').attr('id', 'hourinfo').attr('tabindex', '-1').attr('role', 'dialog').addClass('modal fade').modal({ show: false});
|
||||
}
|
||||
|
||||
function getHourInfo() {
|
||||
var ts = $(this).attr('ts');
|
||||
var tsend = $(this).attr('ts-end');
|
||||
var day = parseFloat($(this).attr('day'));
|
||||
var hour = parseFloat($(this).attr('hour'));
|
||||
var sunlng = parseFloat($(this).attr('sun-lng'));
|
||||
var moonlng = parseFloat($(this).attr('moon-lng'));
|
||||
var marslng = parseFloat($(this).attr('mars-lng'));
|
||||
var mercurylng = parseFloat($(this).attr('mercury-lng'));
|
||||
var jupiterlng = parseFloat($(this).attr('jupiter-lng'));
|
||||
var venuslng = parseFloat($(this).attr('venus-lng'));
|
||||
var saturnlng = parseFloat($(this).attr('saturn-lng'));
|
||||
var zodiac = getZodiac(sunlng);
|
||||
var moonsign = getZodiac(moonlng);
|
||||
var marssign = getZodiac(marslng);
|
||||
var mercurysign = getZodiac(mercurylng);
|
||||
var jupitersign = getZodiac(jupiterlng);
|
||||
var venussign = getZodiac(venuslng);
|
||||
var saturnsign = getZodiac(saturnlng);
|
||||
var mansion = getLunarMansion(moonlng);
|
||||
var moonday = parseFloat($(this).attr('moon-day'));
|
||||
var phase = parseFloat($(this).attr('moon-phase'));
|
||||
var angle = parseFloat($(this).attr('moon-angle'));
|
||||
var illumination = parseFloat($(this).attr('moon-illumination'));
|
||||
var hygromanteia = getActions(matrix.planetary.day[day].hour[hour].for, action);
|
||||
var lunarday = getActions(matrix.lunar.day[lunarday], action);
|
||||
var lunarsign = getActions(matrix.lunar.sign[moonsign.sign].for, action);
|
||||
var lunarmansion = getActions(matrix.lunar.mansion[mansion], action);
|
||||
var claviculaday = getActions(matrix.clavicula[day+1], action);
|
||||
var claviculahour = getActions(matrix.clavicula[matrix.planetary.day[day].hour[hour].planet], action);
|
||||
$('#p-hour').html((hour+1));
|
||||
$('#p-info').html(
|
||||
$('<ul/>').append(
|
||||
'<li><h4>Data</h4></li>'+
|
||||
'<li>Day: '+def.planet.day[day+1]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[day+1]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Hour: '+(hour+1)+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[matrix.planetary.day[day].hour[hour].planet]+'</li>'+
|
||||
'<li>Angel: '+matrix.planetary.day[day].hour[hour].angel+'</li>'+
|
||||
'<li>Demon: '+matrix.planetary.day[day].hour[hour].demon+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Zodiac Sign: '+def.zodiac.name[zodiac.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[zodiac.sign]]+'</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(sunlng * 100) / 100+'°</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Decan: '+zodiac.decan+'</li>'+
|
||||
'<li>Greek: '+def.decan.greek[zodiac.decan]+'</li>'+
|
||||
'<li>Latin: '+def.decan.latin[zodiac.decan]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[zodiac.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Lunar Day: '+moonday+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>'+def.moon.phase.symbol[phase]+' '+def.moon.phase.name[phase]+'</li>'+
|
||||
'<li>Angle: '+Math.round(angle * 180 / Math.PI * 100) / 100+'°</li>'+
|
||||
'<li>Illumination: '+illumination+'%</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Lunar Sign: '+def.zodiac.name[moonsign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[moonsign.sign]]+'</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(moonlng * 100) / 100+'°</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Lunar Mansion: '+mansion+'</li>'+
|
||||
'<li>Arabic: '+def.moon.mansion.arabic[mansion]+'</li>'+
|
||||
'<li>Latin: '+def.moon.mansion.latin[mansion]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Lunar Decan: '+moonsign.decan+'</li>'+
|
||||
'<li>Greek: '+def.decan.greek[moonsign.decan]+'</li>'+
|
||||
'<li>Latin: '+def.decan.latin[moonsign.decan]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[moonsign.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Mars</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(marslng * 100) / 100+'°</li>'+
|
||||
'<li>Zodiac: '+def.zodiac.name[marssign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[marssign.sign]]+'</li>'+
|
||||
'<li>Decan: '+marssign.decan+' ('+def.decan.greek[marssign.decan]+')</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[marssign.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Mercury</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(mercurylng * 100) / 100+'°</li>'+
|
||||
'<li>Zodiac: '+def.zodiac.name[mercurysign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[mercurysign.sign]]+'</li>'+
|
||||
'<li>Decan: '+mercurysign.decan+' ('+def.decan.greek[mercurysign.decan]+')</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[mercurysign.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Jupiter</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(jupiterlng * 100) / 100+'°</li>'+
|
||||
'<li>Zodiac: '+def.zodiac.name[jupitersign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[jupitersign.sign]]+'</li>'+
|
||||
'<li>Decan: '+jupitersign.decan+' ('+def.decan.greek[jupitersign.decan]+')</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[jupitersign.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Venus</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(venuslng * 100) / 100+'°</li>'+
|
||||
'<li>Zodiac: '+def.zodiac.name[venussign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[venussign.sign]]+'</li>'+
|
||||
'<li>Decan: '+venussign.decan+' ('+def.decan.greek[venussign.decan]+')</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[venussign.sign]]+'</li>'+
|
||||
'<li> </li>'+
|
||||
'<li>Saturn</li>'+
|
||||
'<li>Ecliptic Lng.: '+Math.round(saturnlng * 100) / 100+'°</li>'+
|
||||
'<li>Zodiac: '+def.zodiac.name[saturnsign.sign]+'</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.zodiac.ruler[saturnsign.sign]]+'</li>'+
|
||||
'<li>Decan: '+saturnsign.decan+' ('+def.decan.greek[saturnsign.decan]+')</li>'+
|
||||
'<li>Ruler: '+def.planet.name[def.decan.ruler[saturnsign.sign]]+'</li>'
|
||||
)
|
||||
);
|
||||
$('#p-actions').html(
|
||||
$('<ul/>').append(
|
||||
'<li><h4>Operations</h4></li>'+
|
||||
'<li><b>Key of Solomon</b></li>'+
|
||||
'<li><ul class="kos-actions"></ul></li>'+
|
||||
'<li><b>Hygromanteia</b></li>'+
|
||||
'<li><ul class="hyg-actions"></ul></li>'+
|
||||
'<li><b>Lunar Day</b></li>'+
|
||||
'<li><ul class="lud-actions"></ul></li>'+
|
||||
'<li><b>Moon Sign</b></li>'+
|
||||
'<li><ul class="mos-actions"></ul></li>'+
|
||||
'<li><b>Lunar Mansion</b></li>'+
|
||||
'<li><ul class="lum-actions"></ul></li>'
|
||||
)
|
||||
);
|
||||
$('<li/>').text('All Day:').appendTo('ul.kos-actions');
|
||||
$.each(claviculaday.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(claviculaday.actions.list[i].action).appendTo('ul.kos-actions');
|
||||
});
|
||||
$('<li/>').html(' ').appendTo('ul.kos-actions');
|
||||
$('<li/>').text('This Hour:').appendTo('ul.kos-actions');
|
||||
$.each(claviculahour.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(claviculahour.actions.list[i].action).appendTo('ul.kos-actions');
|
||||
});
|
||||
$('<li/>').html(' ').appendTo('ul.kos-actions');
|
||||
$.each(hygromanteia.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(hygromanteia.actions.list[i].action).appendTo('ul.hyg-actions');
|
||||
});
|
||||
$('<li/>').html(' ').appendTo('ul.hyg-actions');
|
||||
$.each(lunarday.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(lunarday.actions.list[i].action).appendTo('ul.lud-actions');
|
||||
});
|
||||
$('<li/>').html(' ').appendTo('ul.lud-actions');
|
||||
$.each(lunarsign.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(lunarsign.actions.list[i].action).appendTo('ul.mos-actions');
|
||||
});
|
||||
$('<li/>').html(' ').appendTo('ul.mos-actions');
|
||||
$.each(lunarmansion.actions.list.sort(function (a, b) { return a.action.localeCompare( b.action ); }), function(i) {
|
||||
$('<li/>').text(lunarmansion.actions.list[i].action).appendTo('ul.lum-actions');
|
||||
});
|
||||
if ( !$('.addtocalendar').length ) $('<button/>').attr('type', 'button').addClass('btn btn-default').append($('<span/>').addClass('addtocalendar addeventatc')).prependTo('#hourinfo .modal-footer');
|
||||
var desc = $('#p-info').html()+'\n\n'+$('#p-actions').html();
|
||||
$('.addtocalendar').empty().loadTemplate('#tpl-atc', {
|
||||
start : new moment.unix(ts).format('YYYY-MM-DD HH:mm:ss'),
|
||||
end : new moment.unix(tsend).format('YYYY-MM-DD HH:mm:ss'),
|
||||
timezone : 'UTC',
|
||||
title : 'Planetary Hour '+$('#p-hour').text(),
|
||||
description : toMarkdown(desc),
|
||||
location : $('#lat').val()+', '+$('#lon').val(),
|
||||
organizer : 'http://www.sublunar.space',
|
||||
email : 'calendar@sublunar.space'
|
||||
});
|
||||
if (window.addtocalendar)if(typeof window.addtocalendar.start == "function")return;
|
||||
window.addtocalendar.load();
|
||||
$('#hourinfo').modal('show');
|
||||
}
|
||||
|
||||
function addPlanetClasses(lng, planet) {
|
||||
var zodiac = getZodiac(lng);
|
||||
var zodiacClass = planet + '-zodiac-' + zodiac.sign;
|
||||
var decanClass = planet + '-decan-' + zodiac.decan;
|
||||
return zodiacClass + ' ' + decanClass;
|
||||
}
|
||||
|
||||
function getActions(array, action, idstring = "") {
|
||||
var tags = [];
|
||||
var actions = [];
|
||||
var tagstring = "";
|
||||
var actionstring = "";
|
||||
if ( idstring != "" ) idstring += "-";
|
||||
if (array) {
|
||||
if (Array.isArray(array)) {
|
||||
for (var i = 0, len = array.length; i < len; i++) {
|
||||
if (action[array[i]].tags) tags.push(action[array[i]].tags);
|
||||
if (action[array[i]].action) actions.push(action[array[i]]);
|
||||
}
|
||||
if (tags) tagstring = $.unique(tags.join(" ").split(' ')).sort().join(" ");
|
||||
actionstring = array.sort().map(function(el) { return idstring + el; }).join(" ");
|
||||
actions.sort();
|
||||
}
|
||||
else if (action[array].tags) {
|
||||
tagstring = action[array].tags;
|
||||
actionstring = idstring + array;
|
||||
actions.push(action[array]);
|
||||
}
|
||||
}
|
||||
var obj = {
|
||||
tags : {
|
||||
string : tagstring,
|
||||
list : $.unique(tags.join(" ").split(' ')).sort()
|
||||
},
|
||||
actions : {
|
||||
string : actionstring,
|
||||
list : actions
|
||||
}
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
// from https://codepen.io/desandro/pen/MebyMR
|
||||
function getComboFilter() {
|
||||
var combo = [];
|
||||
for ( var prop in filters ) {
|
||||
var group = filters[ prop ];
|
||||
if ( !group.length ) {
|
||||
// no filters in group, carry on
|
||||
continue;
|
||||
}
|
||||
// add first group
|
||||
if ( !combo.length ) {
|
||||
combo = group.slice(0);
|
||||
continue;
|
||||
}
|
||||
// add additional groups
|
||||
var nextCombo = [];
|
||||
// split group into combo: [ A, B ] & [ 1, 2 ] => [ A1, A2, B1, B2 ]
|
||||
for ( var i=0; i < combo.length; i++ ) {
|
||||
for ( var j=0; j < group.length; j++ ) {
|
||||
var item = combo[i] + group[j];
|
||||
nextCombo.push( item );
|
||||
}
|
||||
}
|
||||
combo = nextCombo;
|
||||
}
|
||||
var comboFilter = combo.join(', ');
|
||||
return comboFilter;
|
||||
}
|
||||
|
|
@ -1,372 +0,0 @@
|
|||
var definitions = {
|
||||
"manuscripts" : [
|
||||
"void",
|
||||
"Harleianus 5596",
|
||||
"Gennadianus 45",
|
||||
"Atheniensis"
|
||||
],
|
||||
"moon" : {
|
||||
"phase" : {
|
||||
"symbol" : [
|
||||
"void",
|
||||
"🌑",
|
||||
"🌒",
|
||||
"🌓",
|
||||
"🌔",
|
||||
"🌕",
|
||||
"🌖",
|
||||
"🌗",
|
||||
"🌘"
|
||||
],
|
||||
"name" : [
|
||||
"void",
|
||||
"new",
|
||||
"waxing crescent",
|
||||
"first quarter",
|
||||
"waxing gibbous",
|
||||
"full",
|
||||
"waning gibbous",
|
||||
"last quarter",
|
||||
"waning crescent"
|
||||
]
|
||||
},
|
||||
"mansion" : {
|
||||
"tropical" : [
|
||||
"void",
|
||||
"12 Aries 51",
|
||||
"25 Aries 42",
|
||||
"8 Taurus 34",
|
||||
"21 Taurus 25",
|
||||
"4 Gemini 17",
|
||||
"17 Gemini 8",
|
||||
"0 Cancer 0",
|
||||
"12 Cancer 51",
|
||||
"25 Cancer 42",
|
||||
"8 Leo 34",
|
||||
"21 Leo 25",
|
||||
"4 Virgo 17",
|
||||
"17 Virgo 8",
|
||||
"0 Libra 0",
|
||||
"12 Libra 51",
|
||||
"25 Libra 42",
|
||||
"8 Scorpio 34",
|
||||
"21 Scorpio 25",
|
||||
"4 Sagittarius 17",
|
||||
"17 Sagittarius 8",
|
||||
"0 Capricorn 0",
|
||||
"12 Capricorn 51",
|
||||
"25 Capricorn 42",
|
||||
"8 Aquarius 34",
|
||||
"21 Aquarius 25",
|
||||
"4 Pisces 17",
|
||||
"17 Pisces 8",
|
||||
"360 Aries 0"
|
||||
],
|
||||
"constellational" : [
|
||||
"9 Aries 0",
|
||||
"0 Taurus 0",
|
||||
"3 Taurus 0", // Number 28
|
||||
"18 Taurus 0", // Number 1
|
||||
"29 Taurus 0",
|
||||
"10 Gemini 0",
|
||||
"24 Gemini 0",
|
||||
"9 Cancer 0",
|
||||
"20 Cancer 0",
|
||||
"7 Leo 0",
|
||||
"18 Leo 0",
|
||||
"28 Leo 0",
|
||||
"12 Virgo 0",
|
||||
"22 Virgo 0",
|
||||
"27 Virgo 0",
|
||||
"24 Libra 0",
|
||||
"4 Scorpio 0",
|
||||
"15 Scorpio 0",
|
||||
"3 Sagittarius 0",
|
||||
"10 Sagittarius 0",
|
||||
"24 Sagittarius 0",
|
||||
"13 Capricorn 0",
|
||||
"16 Capricorn 0",
|
||||
"4 Aquarius 0",
|
||||
"12 Aquarius 0",
|
||||
"23 Aquarius 0",
|
||||
"4 Pisces 0",
|
||||
"23 Pisces 0",
|
||||
],
|
||||
"arabic" : [
|
||||
"void",
|
||||
"Al-Sharatain",
|
||||
"Al-Butain",
|
||||
"Al-Thuraiya",
|
||||
"Al-Dabaran",
|
||||
"Al-Haqa",
|
||||
"Al-Hana",
|
||||
"Al-Dhira",
|
||||
"Al-Nathrah",
|
||||
"Al-Tarf",
|
||||
"Al-Jabhah",
|
||||
"Al-Zubrah",
|
||||
"Al-Sarfah",
|
||||
"Al-Awwa",
|
||||
"Al-Simak",
|
||||
"Al-Ghafr",
|
||||
"Al-Zubana",
|
||||
"Al-Iklil",
|
||||
"Al-Qalb",
|
||||
"Al-Shaulah",
|
||||
"Al-Naaim",
|
||||
"Al-Baldah",
|
||||
"Sa’d al-Dhabih",
|
||||
"Sa’d Bula",
|
||||
"Sa’d al Suud",
|
||||
"Sa’d al-Akhbiyah",
|
||||
"Al Fargh al-Awwal",
|
||||
"Al Fargh al-Thani",
|
||||
"Batn al-Hut"
|
||||
],
|
||||
"latin" : [
|
||||
"void",
|
||||
"Alnath",
|
||||
"Albotain",
|
||||
"Azoraya",
|
||||
"Aldebaran",
|
||||
"Almices",
|
||||
"Athaya",
|
||||
"Aldira",
|
||||
"Annathra",
|
||||
"Atarf",
|
||||
"Algebha",
|
||||
"Azobra",
|
||||
"Acarfa",
|
||||
"Alahue",
|
||||
"Azimech",
|
||||
"Algarfa",
|
||||
"Azubene",
|
||||
"Alichil",
|
||||
"Alcalb",
|
||||
"Exaula",
|
||||
"Nahaym",
|
||||
"Elbelda",
|
||||
"Caadaldeba",
|
||||
"Caaddebolach",
|
||||
"Caddacohot",
|
||||
"Caadalhacbia",
|
||||
"Almiquedam",
|
||||
"Algarf almuehar",
|
||||
"Arrexhe"
|
||||
]
|
||||
}
|
||||
},
|
||||
"planet": {
|
||||
"name" : [
|
||||
"void",
|
||||
"Sun",
|
||||
"Moon",
|
||||
"Mars",
|
||||
"Mercury",
|
||||
"Jupiter",
|
||||
"Venus",
|
||||
"Saturn"
|
||||
],
|
||||
"symbol" : [
|
||||
"void",
|
||||
"☉",
|
||||
"☽",
|
||||
"♂",
|
||||
"☿",
|
||||
"♃",
|
||||
"♀",
|
||||
"♄"
|
||||
],
|
||||
"day" : [
|
||||
"void",
|
||||
"Sunday",
|
||||
"Monday",
|
||||
"Tuesday",
|
||||
"Wednesday",
|
||||
"Thursday",
|
||||
"Friday",
|
||||
"Saturday"
|
||||
]
|
||||
},
|
||||
"zodiac": {
|
||||
"name" : [
|
||||
"void",
|
||||
"Aries",
|
||||
"Taurus",
|
||||
"Gemini",
|
||||
"Cancer",
|
||||
"Leo",
|
||||
"Virgo",
|
||||
"Libra",
|
||||
"Scorpio",
|
||||
"Sagittarius",
|
||||
"Capricorn",
|
||||
"Aquarius",
|
||||
"Pisces"
|
||||
],
|
||||
"symbol" : [
|
||||
"void",
|
||||
"♈",
|
||||
"♉",
|
||||
"♊",
|
||||
"♋",
|
||||
"♌",
|
||||
"♍",
|
||||
"♎",
|
||||
"♏",
|
||||
"♐",
|
||||
"♑",
|
||||
"♒",
|
||||
"♓"
|
||||
],
|
||||
"ruler" : [
|
||||
"void",
|
||||
3,
|
||||
6,
|
||||
4,
|
||||
2,
|
||||
1,
|
||||
4,
|
||||
6,
|
||||
3,
|
||||
5,
|
||||
7,
|
||||
7,
|
||||
5
|
||||
]
|
||||
},
|
||||
"decan" : {
|
||||
"greek" : [ // Le Livré Sacre sur les Décans
|
||||
"void",
|
||||
"Chenlachori",
|
||||
"Chontaret",
|
||||
"Siket",
|
||||
"Soou",
|
||||
"Aron",
|
||||
"Rhomenos",
|
||||
"Xocha",
|
||||
"Ouari",
|
||||
"Pepisoth",
|
||||
"Sotheir",
|
||||
"Ouphisit",
|
||||
"Chnouphos",
|
||||
"Chnoumos",
|
||||
"Ipi",
|
||||
"Phatiti",
|
||||
"Athoum",
|
||||
"Brysous",
|
||||
"Amphatham",
|
||||
"Sphoukou",
|
||||
"Nephthimes",
|
||||
"Phou",
|
||||
"Name",
|
||||
"Oustichos",
|
||||
"Aphebis",
|
||||
"Sebos",
|
||||
"Teuchmos",
|
||||
"Chthisar",
|
||||
"Tair",
|
||||
"Epitek",
|
||||
"Epichnaus",
|
||||
"Isi",
|
||||
"Sosomo",
|
||||
"Chonoumous",
|
||||
"Tetimo",
|
||||
"Sopphi",
|
||||
"Syro"
|
||||
],
|
||||
"latin" : [ // Liber Hermetis
|
||||
"void",
|
||||
"Aulathamas",
|
||||
"Sabaoth",
|
||||
"Disornafais",
|
||||
"Jaus",
|
||||
"Sarnotois",
|
||||
"Erchmubris",
|
||||
"Manuchos",
|
||||
"Samurois",
|
||||
"Azuel",
|
||||
"Seneptois",
|
||||
"Somachalmais",
|
||||
"Charmine",
|
||||
"Zaloias",
|
||||
"Zachor",
|
||||
"Frich",
|
||||
"Zamendres",
|
||||
"Magois",
|
||||
"Michulais",
|
||||
"Psineus",
|
||||
"Chusthisis",
|
||||
"Psamiatois",
|
||||
"Necbeuos",
|
||||
"Turmantis",
|
||||
"Psermes",
|
||||
"Clinothois",
|
||||
"Thursois",
|
||||
"Renethis",
|
||||
"Renpsois",
|
||||
"Manethois",
|
||||
"Marcois",
|
||||
"Ularis",
|
||||
"Luxois",
|
||||
"Crauxes",
|
||||
"Fambais",
|
||||
"Flugmois",
|
||||
"Piatris"
|
||||
],
|
||||
"egyptian" : [ // Bennu Society
|
||||
"void",
|
||||
"Qd",
|
||||
"Sasa Qd",
|
||||
"A'rt",
|
||||
"Khaw",
|
||||
"Msdjr Sah",
|
||||
"Rmn Khr Sah",
|
||||
"A'sah",
|
||||
"Sah",
|
||||
"Spdt",
|
||||
"Dpa'knmwt",
|
||||
"Knmt",
|
||||
"Khr Khp Knmwt",
|
||||
"Hadjat",
|
||||
"Phwy Djat",
|
||||
"Thmat Hrt",
|
||||
"Thmat Khrt",
|
||||
"Wasthy",
|
||||
"Bakathy",
|
||||
"Dpa'Khntt",
|
||||
"Khntt Hrt",
|
||||
"Khntt Khrt",
|
||||
"Thmsn Khntt",
|
||||
"Sapt Khnnw",
|
||||
"Hr Ab Wya",
|
||||
"Shsmw",
|
||||
"Knmw",
|
||||
"Smdt",
|
||||
"Dpa'smdt",
|
||||
"Srt",
|
||||
"Sasa Srt",
|
||||
"Khr Khpt Srt",
|
||||
"Khw Khw",
|
||||
"Ba Ba",
|
||||
"Khnt Hrw",
|
||||
"Hr Ab Khtw",
|
||||
"Khnt Khrw"
|
||||
],
|
||||
"ruler" : [
|
||||
"void",
|
||||
3, 1, 6,
|
||||
4, 2, 7,
|
||||
5, 3, 1,
|
||||
6, 4, 2,
|
||||
7, 5, 3,
|
||||
1, 6, 4,
|
||||
2, 7, 5,
|
||||
3, 1, 6,
|
||||
4, 2, 7,
|
||||
5, 3, 1,
|
||||
6, 4, 2,
|
||||
7, 5, 3
|
||||
]
|
||||
}
|
||||
};
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
function round2( x ) { return ( Math.round( 100*x )/100.0 );}
|
||||
function normalize( v ) { v = v - Math.floor( v ); if( v < 0 ) v = v + 1; return v;}
|
||||
|
||||
function radToDeg(ra, neg = true) {
|
||||
var deg = ra * 180 / Math.PI;
|
||||
if( deg < 0 ) deg = deg + 360;
|
||||
return deg;
|
||||
}
|
||||
|
||||
function eqToEclDeg(eqobj, epsilon) {
|
||||
// https://en.wikipedia.org/wiki/Celestial_coordinate_system#Equatorial_.E2.86.94_ecliptic
|
||||
// not sure why longitude is 90° off, so i fixed it, but it works :)
|
||||
var delta = eqobj.dec * 180 / Math.PI;
|
||||
var alpha = eqobj.ra * 180 / Math.PI;
|
||||
var x = sind(alpha) * cosd(epsilon) + tand(delta) * sind(epsilon);
|
||||
var y = cosd(alpha);
|
||||
var z = sind(delta) * cosd(epsilon) - cosd(delta) * sind(epsilon) * sind(alpha);
|
||||
var obj = {
|
||||
lng : 90 - atan2d(y, x),
|
||||
lat : asind(z)
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
function zodToDeg(zcoord) {
|
||||
var zdef = def.zodiac; // global variable needs to be declared before using this function
|
||||
var z = zcoord.split(" ");
|
||||
var m = 0;
|
||||
for (var i = 0, len = 13; i < len; i++) {
|
||||
if (zdef.name[i] == z[1] || zdef.symbol[i] == z[1] ) m = i-1;
|
||||
}
|
||||
return parseFloat(z[0]) + m * 30 + parseFloat(z[2]) / 60;
|
||||
}
|
||||
|
||||
function getDistance(lat1,lon1,lat2,lon2) {
|
||||
var R = 6371; // Radius of the earth in km
|
||||
var dLat = (lat2-lat1) * (Math.PI/180); // deg2rad below
|
||||
var dLon = (lon2-lon1) * (Math.PI/180);
|
||||
var a =
|
||||
Math.sin(dLat/2) * Math.sin(dLat/2) +
|
||||
Math.cos( lat1 * (Math.PI/180) ) * Math.cos(lat2 * (Math.PI/180) ) *
|
||||
Math.sin(dLon/2) * Math.sin(dLon/2)
|
||||
;
|
||||
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
|
||||
var d = R * c; // Distance in km
|
||||
return d;
|
||||
}
|
||||
1423
js/old/matrix.js
1423
js/old/matrix.js
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue