افزونه پلاگین اوقات شرعی - M30 OgateShar- E 1.0

MahmoodM30

مدیر <A href="http://forum.majidonline.com/forums/
سلام به همه دوستان اینم از پلاگین اوقات شرعی که براتون اماده کردم

خودم چندین بار تست کردم به خوبی کار میکنه البته برای استان آذربایجان شرقی تست کردم

حتما باید مختصات جغرافیایی ( طول و عرض جغرافیایی ) و منطقه زمانی رو بدرستی وارد کنید

من برای تهران رو نتونستم پیدا کنم که تست کنم دوستان خواهش تست کنن ببینن درست نشون میده یا نه

من برای اذربایجان شرقی رو تست کردم کاملا درست بود با اوقات شرعی موسسه ژئوفیزیک مقایسه کردم

برای تهران رو چند تا مختصات پیدا کردم ولی جواب نداد باز یکی از دوستان یه نگاهی بندازه نتیجه رو بگه

و یه چیز دیگه در مورد اون دوستمون که گفته بودن مدیرای اینجا بی سوادن و .... باید بگم اصلا اینطور نیست

بلکه موقعیتش جور نبوده و وقت ازاد نداشتن والا یه اوقات شرعی براشون کاری نداره

OgateSharE.png
 

پیوست ها

  • OgateSharE PlugIn.rar
    43.3 کیلوبایت · بازدیدها: 240

nazary2009

Member
باتشكرويژه ازمحمودآقا بابت اين پلاگين اگه ميشه توضيح بديد چطور مختصات رودر برنامه ذخيره كنيم تاكاربرباكليك بروي شهرموردنظر اوقات شرعي رومشاهده كنه
 

MahmoodM30

مدیر <A href="http://forum.majidonline.com/forums/
خب مثلا دو تا شهر داریم تهران و تبریز کد هایی که براشون باید تعریف کنید به شکل زیر هست

برای تهران مثلا

کد:
Set$='30.0524675|42.2849927|+3.30'
RunScript("Script")
برای تبریز هم مثلا


کد:
Set$='38.0524675|46.2849927|+2.5'
RunScript("Script")
حالا بعدش تو اسکریپت کد زیر رو مینویسید

کد:
PluginSet("PlugIn-OgateSharE","Set$")
PluginRun("PlugIn-OgateSharE","OgateSharE")
PluginGet("PlugIn-OgateSharE","Get$")
For i=1 To 5
  Ogat$[i]=GetArrayItem(Get$,|,i)
Next i
**------------------------------
LoadText("T1","Ogat$[1]")
LoadText("T2","Ogat$[2]")
LoadText("T3","Ogat$[3]")
LoadText("T4","Ogat$[4]")
LoadText("T5","Ogat$[5]")

برای باقی شهر ها هم به همین شکل
 

diberater

Member
با سلام خدمت MahmoodM30 استاد بزرگ.
من همیشه کارهای شما رو میبینم و حیرت زده میشم،اینم یکی از اون کارها.
اما یه موضوعی برام مفهوم نیست،اونم اینه که اوقات هر روز مثل هم نیست مثلا طلوع آفتاب امروز 07.02.25 است فردا 07.07.10 است.خب چطور میشه مشخص کرد؟
با تشکر
 

nazary2009

Member
باسلام مي خواستم بدونم ميشه زمان نيمه شب شرعي رو هم نشون داد چه كدي لازمه؟ من تونستم مختصات استانهاروگيربيارم امامنطقه زماني روبايدازكجاپيداكنم؟
 
آخرین ویرایش:

Amit13

Well-Known Member
ممنون از پلاگين عاليت :rose:

من برای تهران رو نتونستم پیدا کنم که تست کنم دوستان خواهش تست کنن ببینن درست نشون میده یا نه

داخل همون پست يك سورس جاوا اسكريپت پيوست شده بود كه تمام مختصات شهرها رو نوشته بود.اگه خواستي ميتوني اعدادش رو كپي كني.
 

kohan20

Member
چند سوال

اگه میشه فرمول محاسبات رو بزارین خوب میشه منظورم سورس پلاگین نیست منظورم منطق و فرمولیه که باهاش حساب کتاب میکنه ممنون میشم من برای بسکام می خوام باید فرمول تا حد ممکن ساده باشه

34.41
51.24

این ساعات طبق کدام فرمول است
مجمع جهانی اسلامی که درجه خورشید 18.000 است درجه افق 00.833

یا

موسسه ژئوفیزیک دانشگاه تهران

درجه خورشید در هنگام اذان صبح 17.700است درجه اذان مغرب 04.500



شیعه اثنی عشری موسسه لوا ی قم
درجه خورشید در هنگام اذان صبح 16.700است درجه اذان مغرب 04.000


جامعه اسلامی آمریکا شمالی
درجه خورشید در هنگام اذان صبح 15.000است درجه اذان مغرب 00.833

مرجع عمومی ممیزی مصر

درجه خورشید در هنگام اذان صبح 19.500است درجه اذان مغرب 00.833

دانشگاه ام القرا مکه

درجه خورشید در هنگام اذان صبح 18.500است درجه اذان مغرب 00.833

دانشگاه علوم اسلامی کراچی

درجه خورشید در هنگام اذان صبح 18.000است درجه اذان مغرب 00.833
 

kohan20

Member
چرا کسی پاسخی نمیده

راستی مقیاس تقریبی شهرها تو لینک زیره

http://forum.majidonline.com/threads/198460-%D9%81%D8%B1%D9%85%D9%88%D9%84-%D9%85%D8%AD%D8%A7%D8%B3%D8%A8%D9%87-%D8%A7%D9%88%D9%82%D8%A7%D8%AA-%D8%B4%D8%B1%D8%B9%DB%8C-%D9%88-%D9%86%D9%85%D8%A7%D8%B2%D9%87%D8%A7

MahmoodM30 جان اگه میشه کد اصلی این محاسبات رو بزار ما هم فیضی ببریم من از ابتدای ایجاد این پست گفتم سورسش رو برای بسکام می خوام وگرنه ویژال بیسیکشم بود
 

kohan20

Member
عیدی ما سورس برنامه ممنون

اگه شد کد محاسباتی رو بزارین با زبان ساده یعنی بشه مثلا تو بیسکام کد ویژن یا متلب استفادش کرد ممنون

اونایی که با من موافقن تشکر یادشون نره
 

MahmoodM30

مدیر <A href="http://forum.majidonline.com/forums/
من نمیدونم شما سورس چی رو میخوایین سورس پلاگین یا .....!!!!؟ اگه پلاگین منطورتون باشه نمیتونم
اگرم دلفیش رو نیاز دارید کامپوننتش توی اینتنت هست میتونید پیدا کنید.
 

kohan20

Member
نه منظورم کد اصلی برنامه است

یعنی همون سینوس کسینوسها و ... که هنگام نماز صبح و ظهر مشخص میشه چیه

یا بهتر بگم الگوریتم اوقات شرعی برای بسکام می خوام

یعنی شما فرمول خود محاسبات اوقات شرعی رو بزارین ممنون میشم

من دانشجوی کارشناسی ترم آخرم و برای ساخت تابلوی اوقات شرعی یه چیزی تو مایه های ساعت حرم می خوام که در واقع هنگام اذان خودش اذان بگه یعنی کلا کد اوقات شرعی رو می خوام که چطور محاسبه میشه

البته به زبان ساده و لطفا سایت معرفی نکنیین همه رو گشتم بدردم نخورد

مثلا تو لینک زیر یه الگوریتمی هست برای محاسبات هست اگه الگوریتم برنامه شما هم این است یه توضیح و مثالی برای اون بدین ممنون میشم

سایتی که گفتم>>>>>>>>>>>>>>http://praytimes.org/calculation<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

اگه آقایی کنی و اگر از فرمول زیر چیزی سردر آوردی یه مثال کامل ازش بزن ممنونتان

d = jd - 2451545.0; // jd is the given Julian date
مثلا jd رو چطور و به چه فرمتی باید نوشت
g = 357.529 + 0.98560028* d;
q = 280.459 + 0.98564736* d;
L = q + 1.915* sin(g) + 0.020* sin(2*g);

R = 1.00014 - 0.01671* cos(g) - 0.00014* cos(2*g);
e = 23.439 - 0.00000036* d;
RA = arctan2(cos(e)* sin(L), cos(L))/ 15;

مثلا خط بالا چطوریه و چی میشه منظورم اون ,علامت < , > نقشش چیه

D = arcsin(sin(e)* sin(L)); // declination of the Sun
EqT = q/15 - RA; // equation of time

[h=2]Calculating Prayer Times[/h]To calculate the prayer times for a given location, we need to know the latitude (L) and the longitude (Lng) of the location, along with the local Time Zone for that location. We also obtain the equation of time (EqT) and the declination of the Sun (D) for a given date using the algorithm mentioned in the previous section.
[h=3]Dhuhr[/h]Dhuhr can be calculated easily using the following formula:
Dhuhr = 12 + TimeZone - Lng/15 - EqT.
The above formula indeed calculates the midday time, when the Sun reaches its highest point in the sky. A slight margin is usually considered for Dhuhr as explained in this note.
[h=3]Sunrise/Sunset[/h]The time difference between the mid-day and the time at which sun reaches an angle α below the horizon can be computed using the following formula:





Astronomical sunrise and sunset occur at α=0. However, due to the refraction of light by terrestrial atmosphere, actual sunrise appears slightly before astronomical sunrise and actual sunset occurs after astronomical sunset. Actual sunrise and sunset can be computed using the following formulas:
Sunrise = Dhuhr - T(0.833),
Sunset = Dhuhr + T(0.833).

If the observer's location is higher than the surrounding terrain, we can consider this elevation into consideration by increasing the above constant 0.833 by 0.0347 × sqrt(h), where h is the observer's height in meters.
[h=3]Fajr and Isha[/h]There are differing opinions on what angle to be used for calculating Fajr and Isha. The following table shows several conventions currently in use in various countries (more information is available at this page).
ConventionFajr AngleIsha Angle
Muslim World League 18 17
Islamic Society of North America (ISNA) 15 15
Egyptian General Authority of Survey 19.5 17.5
Umm al-Qura University, Makkah 18.5 90 min after Maghrib
120 min during Ramadan
University of Islamic Sciences, Karachi 18 18
Institute of Geophysics, University of Tehran 17.7 14*
Shia Ithna Ashari, Leva Research Institute, Qum 16 14
* Isha angle is not explicitly defined in Tehran method.
For example, according to Muslim World League convention, Fajr = Dhuhr - T(18) and Isha = Dhuhr + T(17).
[h=3]Asr[/h]There are two main opinions on how to calculate Asr time. The majority of schools (including Shafi'i, Maliki, Ja'fari, and Hanbali) say it is at the time when the length of any object's shadow equals the length of the object itself plus the length of that object's shadow at noon. The dominant opinion in the Hanafi school says that Asr begins when the length of any object's shadow is twice the length of the object plus the length of that object's shadow at noon.
The following formula computes the time difference between the mid-day and the time at which the object's shadow equals t times the length of the object itself plus the length of that object's shadow at noon:





Thus, in the first four schools of thought, Asr = Dhuhr + A(1), and in Hanafi school, Asr = Dhuhr + A(2).
[h=3]Maghrib[/h]In the Sunni's point of view, the time for Maghrib prayer begins once the Sun has completely set beneath the horizon, that is, Maghrib = Sunset (some calculators suggest 1 to 3 minutes after Sunset for precaution). In the Shia's view, however, the dominant opinion is that as long as the redness in the eastern sky appearing after sunset has not passed overhead, Maghrib prayer should not be performed. It is usually taken into consideration by assuming a twilight angle like Maghrib = Dhuhr + T(4).
[h=3]Midnight[/h]Midnight is generally calculated as the mean time from Sunset to Sunrise, i.e., Midnight = 1/2(Sunrise - Sunset). In Shia point of view, the juridical midnight (the ending time for performing Isha prayer) is the mean time from Sunset to Fajr, i.e., Midnight = 1/2(Fajr - Sunset).
[h=2]Higher Latitudes[/h]In locations at higher latitude, twilight may persist throughout the night during some months of the year. In these abnormal periods, the determination of Fajr and Isha is not possible using the usual formulas mentioned in the previous section. To overcome this problem, several solutions have been proposed, three of which are described below.
Middle of the Night In this method, the period from sunset to sunrise is divided into two halves. The first half is considered to be the "night" and the other half as "day break". Fajr and Isha in this method are assumed to be at mid-night during the abnormal periods. One-Seventh of the Night In this method, the period between sunset and sunrise is divided into seven parts. Isha begins after the first one-seventh part, and Fajr is at the beginning of the seventh part. Angle-Based Method This is an intermediate solution, used by some recent prayer time calculators. Let α be the twilight angle for Isha, and let t = α/60. The period between sunset and sunrise is divided into t parts. Isha begins after the first part. For example, if the twilight angle for Isha is 15, then Isha begins at the end of the first quarter (15/60) of the night. Time for Fajr is calculated similarly. In case Maghrib is not equal to Sunset, we can apply the above rules to Maghrib as well to make sure that Maghrib always falls between Sunset and Isha during the abnormal periods.

در کل مظورم همون الگوریتم کلی محاسبات زمان شرعی هست

خیلی ممنون


ذکات علم آموختن آن به دیگران است با این کار نتنها از علمتان کم نمی شود بلکه به یاری ایزد دادار بر آموخته هایتان بیشتر و بیشتر می شود
 

MahmoodM30

مدیر <A href="http://forum.majidonline.com/forums/
دوست عزیز من که گفتم از کامپوننتش استفاده کردم و از توابعش برای فراخوانی اوقات شرعی و تبیدل به پلاگین

من اصلا کاری با رابطه ها وسینوس کوسینوس نداشتم در این مورد هم نمیتونم توضیحاتی بدم
 

kohan20

Member
ببخشید محمود جان فکر کنم اون time zon یه فرمول داره که با طول و عرض جغرافیایی کار میکنه من تو پروژه های حرفه ای چیزی به این نام ندیدم فقط منطقه زمانی ایران را می زدیم که +3.5 است اما من این کارو با پروژه شما کردم 20 دقیقه اختلاف پیش اومد
اما در کل یکم اختلاف ساعت دارهم مثلا
برای همین الان
اذان صبح دقیقش 5.28.06
هست و ساعت شما
5.30.54
رو نشون میده
و اذان مغرب دقیق
18,17,22
و برنامه شما
18,36,57
فکر کنم باید تو کد که زمان مقارنه خورشید و قبله است اشتباه کرده باشین
اما اگر از برنامه وِیژال سر در بیارین و برای mmb بسازین عالیه اگه تونستین کدشرو برای منم بفرستید
[email protected]
 

aryana2500

Active Member
منم با جدولی که دانشگاه شهرمون برای اوقات شرعی منتشر کرده امتحان کردم یه کم اختلاف داشت . با تشکر از زحمات شما
 

MahmoodM30

مدیر <A href="http://forum.majidonline.com/forums/
توی نسخه های بعدی سعی میکنم مشکلات رو رفع کنم فعلا به خاطر پروژه هایی که دستمه اصلا وقت آزاد برای کار روی پلاگین ندارم
 

جدیدترین ارسال ها

بالا