![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
12-21-10, 04:46 AM
|
#11 | |
|
Lieutenant
![]() Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 73
Uploads: 0
|
Quote:
Incredible and thank you!I've noticed an error in naut time calculation though. On the screenshot coords are 72deg W - that is -5 GMT, not -4 GMT: 72/15 = 4.8; round(4.8) = 5. Probably the script just cuts the fractional part so it rounds down the number (int() function?). It should however round the number 'half away from zero' (0.5-0.9 rounded to 1, 0.1-0.4 rounded to 0 - that is round() function in python as I remember). It is my fault, shame on me. I am so sorry for not making it clear enough! ![]() Here is the formula again just to check: tz_raw = 'number of degrees of long' / 15; tz = round(tz_raw); if (long is Western) then tz = (-1) * tz; |
|
|
|
| Tags |
| dbrn, favorite, new ui |
| Thread Tools | |
| Display Modes | |
|
|
