1 | /*
|
2 | * Sunpath.h
|
3 | *
|
4 | * Created on: 25.11.2013
|
5 | * Author: luoc
|
6 | */
|
7 |
|
8 | #ifndef SUNPATH_H_
|
9 | #define SUNPATH_H_
|
10 |
|
11 | #include "Arduino.h"
|
12 | #include <Time.h>
|
13 |
|
14 | #define AXIAL_TILT 23.44
|
15 |
|
16 | class Sunpath {
|
17 | private:
|
18 | float longitude;
|
19 | float latitude;
|
20 | boolean leapYear(time_t t); // returns true if the given year is a leap year
|
21 | public:
|
22 | Sunpath(float longitude, float latitude);
|
23 | double getAzimuth(time_t currentTimeUTC); // returns the horizontal angle of the sun related to north (clockwise)
|
24 | double getElevationAngle(time_t currentTimeUTC); // returns the vertical angle of the sun related to the horizon
|
25 | time_t getTimeSolar(time_t currentTime); // returns the solar Time for the set Longitude
|
26 | virtual ~Sunpath();
|
27 | };
|
28 |
|
29 | #endif /* SUNPATH_H_ */
|