Академический Документы
Профессиональный Документы
Культура Документы
//------------------------------------------
/*Macro Function */
//Constanta
// Main Function
void sholatCal()
float Decl=Dql(EJD);
float EqOfTime=EqT(EJD);
if (Month <= 2)
{
Year -= 1;
Month += 12;
float A = floor(((float)Year/100.0));
float B = 2 - A + floor(A/4.0);
- 2451545
+ (float)Days + B
- 1524.5
-CLong;
return JD;
//Sun Declination
float Eq =(q/15-fix_hour(RA));
return Eq;
return dd;
float rn =acos(
(-sin(d2r(Alfa))-sin(d2r(Latitude))*sin(d2r(Declination)))
(cos(d2r(Latitude))*cos(d2r(Declination)))
)/15;
return r2d(rn);
void Pray_Time(float TimeZone, float Latitude, float Longitude,float Altitude,float Declination, float
EquationOfTime )
// Dzuhur
// Ashr
float HA = HourAngle(alfa,Declination,Latitude);
// Maghrib
alfa = 0.8333f+0.0347f*sqrt(Altitude);
HA = HourAngle(alfa,Declination,Latitude);
// Terbit
// Isya
HA = HourAngle((float)18,Declination,Latitude);
HA = HourAngle((float)20,Declination,Latitude);
// Imsak
sholatT[0] = sholatT[1]-(float)10/60;
// Dhuha
HA = HourAngle((float)-4.5,Declination,Latitude);
char buff[100];
float fix_hour(float a)
return a;
float fix_angle(float a)
return a;
}
//------------------------------------------
//------------------------------------------
if (M < 3)
Y -= 1;
M +=12;
Y = Y - 2000;
return ndays;
Y = Y - 1420;
hijir_date toHijri(uint16_t Y, uint8_t M, uint8_t D,uint8_t cor) // core --> corection date today=0
yesterday=-1 tomorrow=1
hijir_date BuffDate;
long bulan = 1;
long harike = 1;
tahun--;
bulan--;
BuffDate.hD = harike;
BuffDate.hM = bulan;
BuffDate.hY = tahun;
return BuffDate;
/*
hijir_date toHijri(int g_y, int g_m, int g_d,int cor )
hijir_date BuffDate;
int zyr;
int zd;
int zm;
int zy;
float zjd;
int zl;
int zn;
int zj;
year = g_y;
month = g_m;
day = g_d;
zyr = year;
zd = day;
zm = month;
zy = zyr;
if((zy > 1582) || ((zy == 1582) && (zm > 10)) || ((zy == 1582) && (zm == 10) && (zd > 14)))
else
zn = ((zl - 1) / 10631);
zl = zl - 10631 * zn + 354;
zy = 30 * zn + zj - 30;
BuffDate.hD = zd;
BuffDate.hM = zm;
BuffDate.hY = zy;
return BuffDate;
} */