Browse Source

added variable to store zenith

master
Luis Rodil-Fernandez 2 years ago
parent
commit
9ffcafd66b
  1. 4
      src/main.cpp

4
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;

Loading…
Cancel
Save