-
Notifications
You must be signed in to change notification settings - Fork 0
/
examples.html
86 lines (66 loc) · 1.85 KB
/
examples.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"></meta>
<meta name="viewport" content="width=device-width"></meta>
<title>Astro Examples</title>
<script src="Astro.js"></script>
</head>
<body>
<script>
var lat = 34.05361
var lon = -118.24550
var sunpos = A.Get.sunPosition(new Date, lat, lon)
console.log('Sun Position')
console.log(sunpos)
console.log(' ')
var moonpos = A.Get.moonPosition(new Date, lat, lon)
console.log('Moon Position')
console.log(moonpos)
console.log(' ')
var distance = A.Get.lunarDistance(new Date, 1, true)
console.log('Moon Distance')
console.log(distance)
console.log(' ')
var illum = A.Get.moonIllumination(new Date)
console.log('Moon Illumination')
console.log(illum)
console.log(' ')
var coord = A.Get.moonCoordinates(new Date)
console.log('Moon Coordinates')
console.log(coord)
console.log(' ')
var times = A.Get.sunTimes(new Date, lat, lon)
console.log('Sun Times')
console.log(times)
console.log(' ')
A.Set.sunEvent(-18, 'astronomicalTwighlight' ,'astronomicalDawn')
console.log('Custom Sun Event Added')
console.log("-18, 'astronomicalTwighlight' ,'astronomicalDawn'")
console.log(' ')
var timesAll = A.Get.sunEvents(new Date(), lat, lon)
console.log('Sun Events')
console.log(timesAll)
console.log(' ')
var moontimes = A.Get.moonTimes(new Date, lat, lon)
console.log('Moon Times')
console.log(moontimes)
console.log(' ')
var ss = A.Get.summerSolstice(2021)
console.log('Summer Solstice')
console.log(ss)
console.log(' ')
var ws = A.Get.winterSolstice(2021)
console.log('Winter Solstice')
console.log(ws)
console.log(' ')
var ve = A.Get.vernalEquinox(2021)
console.log('Vernal Equinox')
console.log(ve)
console.log(' ')
var fe = A.Get.fallEquinox(2021)
console.log('Fall Equinox')
console.log(fe)
</script>
</body>
</html>