diff --git a/src/main.cpp b/src/main.cpp index 7da7cf3..b038daf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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;