|
|
@ -29,6 +29,7 @@ typedef struct { |
|
|
|
float latitude; |
|
|
|
float longitude; |
|
|
|
float declination; |
|
|
|
float zenith; |
|
|
|
float elevation; |
|
|
|
float azimuth; |
|
|
|
} tSolar; |
|
|
@ -183,7 +184,8 @@ void loop() { |
|
|
|
sunpos(t, loc, &sunloc); |
|
|
|
|
|
|
|
sun.azimuth = sunloc.dAzimuth; |
|
|
|
sun.elevation = 90 - sunloc.dZenithAngle; |
|
|
|
sun.zenith = sunloc.dZenithAngle; |
|
|
|
sun.elevation = 90 - sun.zenith; |
|
|
|
|
|
|
|
// method 2 - using SolarPosition library
|
|
|
|
// sun.elevation = location.getSolarPosition(sun.epoch).elevation;
|
|
|
|