Replies: 8 comments 3 replies
-
For this particular example, make sure that the Time library is installed. |
Beta Was this translation helpful? Give feedback.
-
sorry. |
Beta Was this translation helpful? Give feedback.
-
I have tested the library as it comes and it works fine, but if I change the date and time to manual and enter the data myself the azimuth and altitude results are very very wrong with respect to the NOAA ones (about 30º). |
Beta Was this translation helpful? Give feedback.
-
CODIGO:#include <SolarCalculator.h> // Location void setup() double transit, sunrise, sunset; // Event times, in hours (UTC) // Set system time to compile time // Set time manually (hr, min, sec, day, mo, yr) // Get current time SALIDA: Salida NOAA |
Beta Was this translation helpful? Give feedback.
-
if setTime(14,00,00,15,10,2023) |
Beta Was this translation helpful? Give feedback.
-
the latter is quite consistent with the NOAA output. |
Beta Was this translation helpful? Give feedback.
-
it is evident that the error was in not setting the setTime in UTC |
Beta Was this translation helpful? Give feedback.
-
thank you for your work |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hello.
I have a little problem:
all the examples where "time_t" appears give the following error:
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:68:1: error: 'time_t' does not name a type; did you mean 'size_t'?
time_t toUtc(time_t local)
^~~~~~
size_t
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:79:1: error: 'time_t' does not name a type; did you mean 'size_t'?
time_t compileTime()
^~~~~~
size_t
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino: In function 'void setup()':
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:27:17: error: 'compileTime' was not declared in this scope
setTime(toUtc(compileTime()));
^~~~~~~~~~~
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:27:11: error: 'toUtc' was not declared in this scope
setTime(toUtc(compileTime()));
^~~~~
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:27:3: error: 'setTime' was not declared in this scope
setTime(toUtc(compileTime()));
^~~~~~~
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:33:3: error: 'time_t' was not declared in this scope
time_t utc = now();
^~~~~~
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:33:3: note: suggested alternative: 'size_t'
time_t utc = now();
^~~~~~
size_t
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:35:22: error: 'utc' was not declared in this scope
calcEquationOfTime(utc, eq);
^~~
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:35:22: note: suggested alternative: 'putc'
calcEquationOfTime(utc, eq);
^~~
putc
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino: At global scope:
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:68:1: error: 'time_t' does not name a type; did you mean 'size_t'?
time_t toUtc(time_t local)
^~~~~~
size_t
/home/xose/PROXECTOS/SeguidorSolar/SolarCalculator-main(!!)/examples/SolarCalculatorTimeLib/SolarCalculatorTimeLib.ino:79:1: error: 'time_t' does not name a type; did you mean 'size_t'?
time_t compileTime()
^~~~~~
size_t
exit status 1
Compilation error: 'time_t' does not name a type; did you mean 'size_t'?
how could i solve it?
Beta Was this translation helpful? Give feedback.
All reactions