summaryrefslogtreecommitdiff
path: root/software/include/sun.h
diff options
context:
space:
mode:
authorEric Dao <eric@erickhangdao.com>2022-07-09 22:38:28 -0400
committerEric Dao <eric@erickhangdao.com>2022-07-09 22:38:28 -0400
commitcb234a53f606de8bd136b596a316e912ddf15185 (patch)
treec5f4bf00e4e7e038c24f4ff79f3c5f7af9474ca9 /software/include/sun.h
parent9dd37009b3dc7d4d155f5c1a529ace46e55c8e0d (diff)
downloadmotorized_blinds-master.tar.gz
motorized_blinds-master.tar.bz2
motorized_blinds-master.zip
added licenseHEADmaster
Diffstat (limited to 'software/include/sun.h')
-rw-r--r--software/include/sun.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/software/include/sun.h b/software/include/sun.h
new file mode 100644
index 0000000..33f4eb7
--- /dev/null
+++ b/software/include/sun.h
@@ -0,0 +1,18 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdbool.h>
+#include <math.h>
+#include <sys/time.h>
+#include <time.h>
+
+#define LOCAL_OFFSET -4
+
+#define LONGITUDE -79.3832
+#define LATITUDE 43.6532
+
+#define _USE_MATH_DEFINES
+
+double deg_to_rad(double angle);
+double rad_to_deg(double angle);
+
+double sun_calculation(struct tm curr_time, double longitude, double latitude);