Skip to content
Snippets Groups Projects
Commit ff3f97ad authored by am0ebe's avatar am0ebe
Browse files

parse moonmap and skyglowdict from skyglow Project sources, integrate skyglow project as submodule

parent ae3f1483
No related branches found
No related tags found
No related merge requests found
......@@ -5,3 +5,4 @@ test/*
*skyglow.log
__pycache__
temp
skyglow.log
\ No newline at end of file
......@@ -9,8 +9,6 @@
############################
# rewrite conf.json structure to reflect projects > [conf, blox]
# > ecotrack time is in CEST (both track and temp) => UTC+2 => C'est une problème?
# > parse moonmap and skyglowdict from skyglow Project sources
# -> maybe integrate skyglow project as submodule
# > integrate with ST
# > ST-Filenames should include 'unit-X'!
# > how to process skylog error in merge()
......@@ -31,6 +29,18 @@ from pprint import pp as p
from datetime import datetime as dt
import dataFilter
skyglow_submodule_path=os.path.dirname(os.path.realpath(__file__)) + os.sep + "skyglow"
sys.path.append(skyglow_submodule_path)
# print(sys.path)
try:
from skyglow import moon as moonMap
except ModuleNotFoundError as e:
print(f"caught: {e}")
print(moonMap)
exit(1223)
TIME_FMT='%Y-%m-%d %H:%M:%S'
noTime = dt.fromtimestamp(0)
TAG_LEN=len("04B94A7F7288588022")
......@@ -145,85 +155,8 @@ def initFileStructure():
COL_TAG=8
#mlx (idx is also dmx-byte value)
moonMap = [ 1.409,
8.369,
12.333,
16.210,
20.563,
24.716,
28.907,
33.363,
36.843,
41.137,
46.527,
50.880,
54.727,
59.617,
63.967,
67.817,
73.173,
77.213,
82.827,
87.037,
91.033,
95.320,
99.470,
104.366,
108.833,
113.667, #25
123.733,
128.567,
133.2,
138.3,
143.367,
148.233,
152.233,
156.933,
162.5,
167.5,
172.1,
176.767,
181.567,
187,
192.067,
196.433,
201.467,
206.5,
211.733,
216.4,
221.033,
226,
231.1,
235.733,
240.4, #50
245.6,
250.433,
254.567,
259.5,
263.933,
268.3,
272.6, #274 == new max
277.267,
281.433,
287.467, #60
]
#Mapping skyglow dmx+nled to lux
skyglowDict = {
15: 0.08,
54: 0.3,
4: 1,
19: 0.1,
0: 0,
1: 0.01,
5: 0.03,
0: 0,
40: 10,
12: 3,
123: 30,
123: 30,
}
def hasLight():
return PROJ == "ecolux"
......
Subproject commit 8e11c79aa0a71769d4332a8fc90750fd3bb1bc3c
Subproject commit 4076189110e3cbd75146a335c8954923e3959d27
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment