Notifications
Clear all
News
1
Posts
1
Users
0
Reactions
1,628
Views
Topic starter
22/12/2019 4:15 pm
Version 1.01
- Fix OTAA
Rücksetzen der LORA Werte beim OTAA Join&& sendCommand("mac set rx2 0 869525000")
&& sendCommand("mac set dr 0")
&& sendCommand("mac set pwridx 1") - auto Licht ein/aus nur bei Dunkelheit
Sonnenuntergangberechnung via GPS//Sunset
if (params.getIsLastLat()!=0 and params.getIsLastLong()!=0){
int dayyear=rtc.getDay()+(rtc.getMonth()-1)*30;
double a= 3.14159 * (float)params.getIsLastLat()/10000000/180;
float e=0.4095*sin(0.016906*(dayyear-80.086));
float b=12*acos((sin(-0.0145) - sin(a)*sin(e)) / (cos(a)*cos(e)))/3.14159;
float f=-0.171*sin(0.0337*dayyear + 0.465) - 0.1299*sin(0.01787*dayyear - 0.168);
float c =12-b-f;
float sunon =c - (float)params.getIsLastLong()/10000000/15+1;
debugPrintln(sunon);
c=12+b-f;
float sunoff =c - (float)params.getIsLastLong()/10000000/15+1;
debugPrintln(sunoff);
This topic was modified 5 Jahren ago 3 times by Philipp Lüönd