-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolarPanelTracking.ic10
39 lines (32 loc) · 1.04 KB
/
SolarPanelTracking.ic10
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
# Defines in which direction (on the compass) the solarpanel port is looking
define CONFIG_PanelPortAngle 180
# Defines in which direction (on the compass) the daylight sensor data port is looking
define CONFIG_SensorPortAngle 180
# horizontal angles of panels and sensor misalign by -90 degrees
define CorrectionAngle -90
define DaylightSensor 1076425094
define SolarPanel -2045627372
define SolarPanelDual -539224550
define SolarPanelHeavy -934345724
define SolarPanelHeavyDual -1545574413
alias angle r15
Main:
#Horizontal
lb angle DaylightSensor Horizontal Average
sub angle angle CONFIG_PanelPortAngle
add angle angle CONFIG_SensorPortAngle
add angle angle CorrectionAngle
mod angle angle 360
sb SolarPanel Horizontal angle
sb SolarPanelDual Horizontal angle
sb SolarPanelHeavy Horizontal angle
sb SolarPanelHeavyDual Horizontal angle
#Vertical
lb angle DaylightSensor Vertical Average
sub angle 90 angle
sb SolarPanel Vertical angle
sb SolarPanelDual Vertical angle
sb SolarPanelHeavy Vertical angle
sb SolarPanelHeavyDual Vertical angle
yield
j Main