CPP Code Sun Position
CPP Code Sun Position
//
//
//
C++ program
the current
Jarmo Lammi
Last update
#include <iostream.h>
#include <math.h>
#include <time.h>
#define pi 3.14159
//extern double pi;
double tpi = 2 * pi;
double degs = 180.0/pi;
double rads = pi/180.0;
double L,g,daylen;
double SunDia = 0.53;
// Sunradius degrees
double FNrange
double b =
double a =
if (a < 0)
return a;
};
(double x) {
x / tpi;
tpi * (b - (long)(b));
a = tpi + a;
double tzone=2.0;
cout << "Input latitude, longitude and timezone and month\n";
cin >> latit;
cin >> longit;
cin >> tzone;
// testing
// m=6; day=10;
double d = FNday(y, m, day, h);
//
//