<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=WeMOS%3A_D1_R1_mini_Prayer_Time_Indonesia</id>
	<title>WeMOS: D1 R1 mini Prayer Time Indonesia - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://lms.onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=WeMOS%3A_D1_R1_mini_Prayer_Time_Indonesia"/>
	<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=WeMOS:_D1_R1_mini_Prayer_Time_Indonesia&amp;action=history"/>
	<updated>2026-04-25T16:01:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://lms.onnocenter.or.id/wiki/index.php?title=WeMOS:_D1_R1_mini_Prayer_Time_Indonesia&amp;diff=68311&amp;oldid=prev</id>
		<title>Unknown user: Created page with &quot; /*   * Calculate Prayer Time   */    int Y = 2023;  int M = 4;  int D = 4;  int H = 16;  int m = 25;  int s = 0;  int Z = 7;  // # define PI           = 3.14159265359;  float...&quot;</title>
		<link rel="alternate" type="text/html" href="https://lms.onnocenter.or.id/wiki/index.php?title=WeMOS:_D1_R1_mini_Prayer_Time_Indonesia&amp;diff=68311&amp;oldid=prev"/>
		<updated>2023-04-04T11:20:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; &lt;span class=&quot;autocomment&quot;&gt;* Calculate Prayer Time: &lt;/span&gt;    int Y = 2023;  int M = 4;  int D = 4;  int H = 16;  int m = 25;  int s = 0;  int Z = 7;  // # define PI           = 3.14159265359;  float...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; /*&lt;br /&gt;
  * Calculate Prayer Time&lt;br /&gt;
  */&lt;br /&gt;
 &lt;br /&gt;
 int Y = 2023;&lt;br /&gt;
 int M = 4;&lt;br /&gt;
 int D = 4;&lt;br /&gt;
 int H = 16;&lt;br /&gt;
 int m = 25;&lt;br /&gt;
 int s = 0;&lt;br /&gt;
 int Z = 7;&lt;br /&gt;
 // # define PI           = 3.14159265359;&lt;br /&gt;
 float LAT                = -6.16858549901122;&lt;br /&gt;
 float LONG               = 106.865053367193;&lt;br /&gt;
 float FAJR_ANGLE         = 20;&lt;br /&gt;
 float ISHA_ANGLE         = 18; &lt;br /&gt;
 float SF                 = 1;      // Imam Safii&lt;br /&gt;
 float DESCEND_CORRECTION = 2/60;&lt;br /&gt;
  &lt;br /&gt;
 float FAJR;&lt;br /&gt;
 float SUNRISE;&lt;br /&gt;
 float ZUHR;&lt;br /&gt;
 float ASR;&lt;br /&gt;
 float MAGHRIB;&lt;br /&gt;
 float ISHA;&lt;br /&gt;
 &lt;br /&gt;
 void setup() {&lt;br /&gt;
   Serial.begin(9600);&lt;br /&gt;
   delay(500);&lt;br /&gt;
   calcPrayerTime();&lt;br /&gt;
   Serial.println( &amp;quot;\n&amp;quot; );&lt;br /&gt;
   PrintFloatToHour( FAJR );&lt;br /&gt;
   PrintFloatToHour( SUNRISE );&lt;br /&gt;
   PrintFloatToHour( ZUHR );&lt;br /&gt;
   PrintFloatToHour( ASR );&lt;br /&gt;
   PrintFloatToHour( MAGHRIB );&lt;br /&gt;
   PrintFloatToHour( ISHA );&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 void loop() {&lt;br /&gt;
   // put your main code here, to run repeatedly:&lt;br /&gt;
 }&lt;br /&gt;
  &lt;br /&gt;
 &lt;br /&gt;
 void PrintFloatToHour( float prayertime ) {&lt;br /&gt;
   int hh;&lt;br /&gt;
   int mm; &lt;br /&gt;
 &lt;br /&gt;
   hh = int( prayertime );&lt;br /&gt;
   mm = int( ( prayertime - hh )*60 );&lt;br /&gt;
   if( hh&amp;lt;9 ) Serial.print( String( &amp;quot;0&amp;quot; ) );&lt;br /&gt;
   Serial.print( String(hh) + &amp;quot;:&amp;quot; );&lt;br /&gt;
   if( mm&amp;lt;9 ) Serial.print( String( &amp;quot;0&amp;quot; ) );&lt;br /&gt;
   Serial.println( String(mm) ); &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 void calcPrayerTime() {&lt;br /&gt;
   int A = Y/100 ;&lt;br /&gt;
   int B = 2 + int(A/4) - A;&lt;br /&gt;
   float JD = 1720994.5 + int(365.25*Y) + int(30.6001*(M + 1)) + B + D + ((H*3600 + m*60 + s) / 86400) - (Z / 24 );&lt;br /&gt;
   float T = 2 * PI * (JD - 2451545) / 365.25;&lt;br /&gt;
   float DELTA = 0.37877 + 23.264 * sin( (57.297*T - 79.547) * PI/180 ) + 0.3812 * sin( (2*57.297*T - 82.682) * PI/180 ) + 0.17132 * sin( (3*57.297*T - 59.722) * PI/180 );&lt;br /&gt;
   &lt;br /&gt;
   float U = (JD - 2451545) / 36525;&lt;br /&gt;
   float L0 = 280.46607 + 36000.7698*U;&lt;br /&gt;
   float ET1000 = -(1789 + 237*U) * sin(L0 * PI/180) - (7146 - 62*U) * cos(L0 * PI/180) + (9934 - 14*U) * sin(2*L0 * PI/180) - (29 + 5*U) * cos(2*L0 * PI/180) + (74 + 10*U) * sin(3*L0 * PI/180) + (320 - 4*U) * cos(3*L0 * PI/180) - 212*sin(4*L0 * PI/180);&lt;br /&gt;
   float ET = ET1000 / 1000;&lt;br /&gt;
   float TT = 12 + Z - (LONG / 15) - (ET / 60);&lt;br /&gt;
 &lt;br /&gt;
   float SA_FAJR = -(FAJR_ANGLE);&lt;br /&gt;
   float SA_MAGHRIB = -0.8333 - (0.0347 * sqrt(H));&lt;br /&gt;
   float SA_SUNRISE = SA_MAGHRIB;&lt;br /&gt;
   // acot(A) = atan(1/A)&lt;br /&gt;
   // float SA_ASR = acot(SF + tan(abs(DELTA-LAT)*PI/180))*180/PI;&lt;br /&gt;
   float SA_ASR = atan(1/(SF + tan(abs(DELTA-LAT)*PI/180)))*180/PI;&lt;br /&gt;
   float SA_ISHA = -(ISHA_ANGLE);&lt;br /&gt;
    &lt;br /&gt;
   float COSHA_FAJR = (sin(SA_FAJR *PI/180) - sin(LAT*PI/180) * sin(DELTA*PI/180)) / (cos(LAT*PI/180) * cos(DELTA*PI/180));&lt;br /&gt;
   float COSHA_MAGHRIB = (sin(SA_SUNRISE*PI/180) - sin(LAT*PI/180) * sin(DELTA*PI/180)) / (cos(LAT*PI/180) * cos(DELTA*PI/180));&lt;br /&gt;
   float COSHA_SUNRISE = COSHA_MAGHRIB;&lt;br /&gt;
   float COSHA_ASR = (sin(SA_ASR*PI/180) - sin(LAT*PI/180) * sin(DELTA*PI/180)) / (cos(LAT*PI/180) * cos(DELTA*PI/180));&lt;br /&gt;
   float COSHA_ISHA = (sin(SA_ISHA*PI/180) - sin(LAT*PI/180) * sin(DELTA*PI/180)) / (cos(LAT*PI/180) * cos(DELTA*PI/180));&lt;br /&gt;
  &lt;br /&gt;
   float HA_FAJR = acos(COSHA_FAJR)*180/PI;&lt;br /&gt;
   float HA_MAGHRIB = acos(COSHA_SUNRISE)*180/PI;&lt;br /&gt;
   float HA_SUNRISE = HA_MAGHRIB;&lt;br /&gt;
   float HA_ASR = acos(COSHA_ASR)*180/PI;&lt;br /&gt;
   float HA_ISHA = acos(COSHA_ISHA)*180/PI;&lt;br /&gt;
   &lt;br /&gt;
   FAJR = TT - HA_FAJR / 15;&lt;br /&gt;
   SUNRISE = TT - HA_SUNRISE / 15;&lt;br /&gt;
   ZUHR = TT + DESCEND_CORRECTION;&lt;br /&gt;
   ASR = TT + HA_ASR / 15;&lt;br /&gt;
   MAGHRIB = TT + HA_MAGHRIB / 15;&lt;br /&gt;
   ISHA = TT + HA_ISHA / 15;  &lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Unknown user</name></author>
	</entry>
</feed>