{"id":67023,"date":"2025-02-22T03:01:00","date_gmt":"2025-02-21T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=67023"},"modified":"2025-02-22T07:47:11","modified_gmt":"2025-02-21T21:47:11","slug":"php-geographicals-coriolis-effect-revisit-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-geographicals-coriolis-effect-revisit-tutorial\/","title":{"rendered":"PHP Geographicals Coriolis Effect Revisit Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"PHP Geographicals Coriolis Effect Revisit Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_effect_revisit.gif\" title=\"PHP Geographicals Coriolis Effect Revisit Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP Geographicals Coriolis Effect Revisit Tutorial<\/p><\/div>\n<p>Today we&#8217;re revisiting our inhouse Coriolis Effect calculator, further to work at <a title='PHP Geographicals Makeover Primer Tutorial' href='#phpgmpt'>PHP Geographicals Makeover Primer Tutorial<\/a>, for a couple of reasons &#8230;<\/p>\n<ol>\n<li>we wanted to not show iframe that used to house the weather information any more when that information comes, these days, from a Google search engine query popup window &#8230; and &#8230;<\/li>\n<li>where it used to give a result such as &#8230;<br \/>\n<blockquote><p>\nEarth Coriolis Force for Latitude,Longitude below represents a 6.84e-5 ms-2 deflection from \u2192 West to \u2192 East for each ms-1 of Southerly \u2191 wind\n<\/p><\/blockquote>\n<p> &#8230; it used to be possible for the dropdowns below that to not reflect the Latitude,Longitude entered in by the user via the clicking of links mentioning &#8220;Coriolis&#8221; &#8230; very annoying &#8230;<\/li>\n<\/ol>\n<p> &#8230; and, <a target=\"_blank\" title=\"?\" href='https:\/\/www.youtube.com\/watch?v=e9_7GcQeiqw&#038;t=2m37s' rel=\"noopener\">yet again<\/a>, we found it useful to use &#8230;<\/p>\n<ul>\n<li><font color=blue>new<\/font> HTML iframe &#8230;<br \/>\n<code><br \/>\n&lt;iframe id=\"weather\" frameborder=0 <font color=purple>onerror=nochkit(this); <\/font><font color=blue>onload=chkit(this); <\/font>style=\"background-color: lightgray; display: BLOCK; height: 460px; width: 500px;\" src=\"javascript: false;\"&gt;&lt;\/iframe&gt;<br \/>\n<\/code><br \/>\n<i>onload<\/i> event logic &#8230; as well as &#8230;<\/li>\n<li><font color=purple>new<\/font> HTML iframe <i>onerror<\/i> event logic &#8230; Javascript &#8230;<br \/>\n<code><br \/>\n<font color=purple>function nochkit(iois) {<br \/>\n             setTimeout(function(){ parent.document.getElementById('weather').style.display='none'; }, 1000);<br \/>\n             setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000); onealert=true;  parent.document.getElementById('weather').style.display='none';  if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); } } }, 2000);<br \/>\n}<\/font><br \/>\n<br \/>\nfunction sichkit() {<br \/>\n   if (aconto) {<br \/>\n         if (aconto.body.innerHTML.trim() != '') {<br \/>\n           if (aconto.body.innerHTML.indexOf('&gt;Not Found') != -1) {<br \/>\n             parent.document.getElementById('weather').style.display='none';<br \/>\n             aconto.body.innerHTML='';<br \/>\n           }<br \/>\n         } else {<br \/>\n           parent.document.getElementById('weather').style.display='none';<br \/>\n           aconto.body.innerHTML='';<br \/>\n         }<br \/>\n   }<br \/>\n}<br \/>\n<br \/>\n<font color=blue>function chkit(iois) {<br \/>\n  var allthere=false;<br \/>\n  if (iois != null) { \/\/ check out window.svgDocument<br \/>\n    aconto = (iois.contentWindow || iois.contentDocument);<br \/>\n    if (aconto != null) {<br \/>\n       if (aconto.document) {<br \/>\n         aconto = aconto.document;<br \/>\n         if (notyet) { notyet=false; parent.document.getElementById('weather').style.backgroundColor='transparent';  return ''; }<br \/>\n         if (aconto.body.innerHTML.trim() != '') {<br \/>\n           if (aconto.body.innerHTML.indexOf('&gt;Not Found') == -1) {<br \/>\n             iois.style.backgroundColor='lightgray';<br \/>\n             allthere=true;<br \/>\n             parent.document.getElementById('weather').style.display='block';<br \/>\n           } else if (1 == 3) {<br \/>\n             setTimeout(function(){ parent.document.getElementById('weather').style.display='none'; }, 1000);<br \/>\n             setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000);  onealert=true;  parent.document.getElementById('weather').style.display='none';   if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); }  } }, 2000);<br \/>\n           } else {<br \/>\n             aconto.body.innerHTML='';<br \/>\n             parent.document.title+='4';<br \/>\n             setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000);  onealert=true;  parent.document.getElementById('weather').style.display='none';   if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); }  } }, 2000);<br \/>\n             nochkit(iois);<br \/>\n           }<br \/>\n         } else {<br \/>\n           setTimeout(function(){ if (!onealert) { setInterval(sichkit, 1000);  onealert=true;  parent.document.getElementById('weather').style.display='none';   if (document.URL.indexOf('rjmprogramming.com.au') == -1) { alert('Sorry, the weather interfacing URL was Not Found.'); }  } }, 2000);<br \/>\n           nochkit(iois);<br \/>\n         }<br \/>\n       }<br \/>\n    }<br \/>\n  } else {<br \/>\n    if (notyet) { notyet=false;  parent.document.getElementById('weather').style.backgroundColor='transparent'; return ''; }<br \/>\n  }<br \/>\n  if (!allthere) {<br \/>\n    parent.document.getElementById('weather').style.display='none';<br \/>\n  }<br \/>\n}<\/font><br \/>\n<\/code>\n<\/li>\n<\/ul>\n<p> &#8230; as contributors to making this happen better with <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php------GETME' rel=\"noopener\">coriolis_force_at.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php------GETME' rel=\"noopener\">this way<\/a> as a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php\" rel=\"noopener\">Coriolis Effect<\/a> web application you can also try below &#8230;<\/p>\n<p><iframe style=\"width:100%;height:800px;\" src=\"\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php\"><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=\"_blank\" href='\/\/www.rjmprogramming.com.au\/ITblog\/php-geographicals-coriolis-effect-revisit-tutorial\/' rel=\"noopener\">PHP Geographicals Coriolis Effect Revisit Tutorial<\/a>.<\/p-->\n<hr>\n<p id='phpgmpt'>Previous relevant <a target=\"_blank\" title='PHP Geographicals Makeover Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/php-geographicals-makeover-primer-tutorial\/' rel=\"noopener\">PHP Geographicals Makeover Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"PHP Geographicals Makeover Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/geographicals_makeover.jpg\" title=\"PHP Geographicals Makeover Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP Geographicals Makeover Primer Tutorial<\/p><\/div>\n<p>A couple of days ago, when we added <a target=\"_blank\" title='PHP Earth Rotational Speed Primer Tutorial' href='#perspt' rel=\"noopener\">PHP Earth Rotational Speed Primer Tutorial<\/a> as shown below, to our blogroll mix, it got us relooking at our Geographicals Suite of Web Applications at this blog that use this <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/\" title='Click picture' rel=\"noopener\">live run<\/a> interface.<\/p>\n<p>Perhaps you remember the last member of the Geographicals Suite we added, the <a target=\"_blank\" title='PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-coriolis-effect-calculation-tutorial\/' rel=\"noopener\">PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial<\/a>?<\/p>\n<p>We found that, this time around, we wanted to &#8230;<\/p>\n<ul>\n<li>rework how the weather information is gleaned &#8230; we now use a Google Search of a place name + &#8221; weather&#8221;<\/li>\n<li>get rid of a PHP warning regarding &#8220;header has already been sent&#8221; &#8230; a bug<\/li>\n<li>make the interface look a bit better with some CSS for ul-&gt;li styling involving emojis a lot like talked about at <a target=\"_blank\" title='WordPress Bullet Point CSS Styling Emoji Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-bullet-point-css-styling-emoji-tutorial\/' rel=\"noopener\">WordPress Bullet Point CSS Styling Emoji Tutorial<\/a> and the oft-used CSS H1 <a target=\"_blank\" title='CSS Embossed Text Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/css-embossed-text-primer-tutorial\/' rel=\"noopener\">CSS Embossed Text Primer Tutorial<\/a><\/li>\n<li>make the <a target=\"_blank\" title='Google Maps' href='http:\/\/maps.google.com' rel=\"noopener\">Google Maps<\/a> &#8220;saddr=&#8221; and &#8220;daddr=&#8221; type calls work for mobile platform scenarios<\/li>\n<\/ul>\n<p>Below is the list of changed parts of the suite &#8230;<\/p>\n<ul>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/index.php---------GETME' rel=\"noopener\">index.php<\/a> Geographical Suite supervisor changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/index.php---------GETME' rel=\"noopener\">this way<\/a>  &#8230; supervising &#8230;<\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php----GETME' rel=\"noopener\">sun_angle_now_at.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php----GETME' rel=\"noopener\">this way<\/a><\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php----GETME' rel=\"noopener\">moon_angle_now_at.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php----GETME' rel=\"noopener\">this way<\/a><\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php----GETME' rel=\"noopener\">coriolis_force_at.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php----GETME' rel=\"noopener\">this way<\/a><\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php---GETME' rel=\"noopener\">place_latlong.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php---GETME' rel=\"noopener\">this way<\/a><\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/HTML_CSS\/get_weather.php--GETME' rel=\"noopener\">get_weather.php<\/a> changed in <a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/HTML_CSS\/get_weather.php--GETME' rel=\"noopener\">this way<\/a><\/li>\n<li><a target=\"_blank\" title='Part of RJM Programming Geographical Suite web applications' href='http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.php_GETME' rel=\"noopener\">rotational_speed_at.php<\/a><\/li>\n<\/ul>\n<p>It is often good to revisit software and see what can be improved with fresh eyes.<\/p>\n<hr>\n<p id='perspt'>Previous relevant <a target=\"_blank\" title='PHP Earth Rotational Speed Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-earth-rotational-speed-primer-tutorial\/' rel=\"noopener\">PHP Earth Rotational Speed Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.php\" rel=\"noopener\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"PHP Earth Rotational Speed Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.jpg\" title=\"PHP Earth Rotational Speed Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">PHP Earth Rotational Speed Primer Tutorial<\/p><\/div>\n<p>We discovered a way to calculate the Earth&#8217;s rotational speed for a given latitude.  When you see how fast we&#8217;re moving relative to somebody still in space you&#8217;ll be amazed and think gravity is pretty cool.  Even if you&#8217;re standing on your head right now, you&#8217;d have to agree with me that &#8220;ytivarg&#8221; is not such a bad concept also &#8230; <i>&#8220;can tell you it saved my bacon back in &#8217;66 when that boar from yonder ridge fell on me when I was stuck practising them thar cartwheely thingos, and got stuck not the right way up &#8230; if youse knows what ah mean&#8221;<\/i> &#8230; but we digress.<\/p>\n<p>The Earth is like a ball with a rod through it coming out at the North and South poles, and if you can imagine this, then you can probably imagine that the rotational speeds are the biggest near the Equator and get a lot smaller near the Poles.<\/p>\n<p>Still and all, at pretty big latitudes like for Archangel, in Russia, the rotational speeds get up with what we were taught was the speed of a Jumbo jet &#8230; back in the day.  As for Singapore &#8230; wow &#8230; take a look at our <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.jpg\" rel=\"noopener\">tutorial picture<\/a> or try a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.php\" title='click picture' rel=\"noopener\">live run<\/a> for yourself, and this is our PHP source code you could call <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/RotationalSpeed\/rotational_speed_at.php_GETME\" title='rotational_speed_at.php' rel=\"noopener\">rotational_speed_at.php<\/a><\/p>\n<p>Ahhhh &#8230; the &#8220;where&#8221; of life &#8230; so interesting?!<\/p>\n<p>Believe it or not, the equation to calculate this we found in <i>&#8220;New Century Maths 9 (second edition) Stages 5.2\/5.3&#8221;<\/i> so thanks.  It goes like &#8230;<\/p>\n<p><code><br \/>\nEarth Rotational Speed (in km\/h) = ( 2 x &#928; x 6371 x cos(latitude) ) \/ 24<br \/>\n<\/code><\/p>\n<p> &#8230; where <i>6371<\/i> will do as radius of Earth in kilometres and <i>24<\/i> is the number of hours in an Earth day and <i>latitude<\/i> (for most functionalities such as Javascript&#8217;s Maths.cos() function) should be expressed in radians (where 1 degree = ( 1 x &#928; ) \/ 180 radians), and &#928; is, well, <a target=\"_blank\" title='PI information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Pi' rel=\"noopener\">&#928;<\/a><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d19998' onclick='var dv=document.getElementById(\"d19998\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/geographicals\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d19998' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d20075' onclick='var dv=document.getElementById(\"d20075\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/geographicals\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d20075' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d67023' onclick='var dv=document.getElementById(\"d67023\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/iframe\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d67023' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we&#8217;re revisiting our inhouse Coriolis Effect calculator, further to work at PHP Geographicals Makeover Primer Tutorial, for a couple of reasons &#8230; we wanted to not show iframe that used to house the weather information any more when that &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-geographicals-coriolis-effect-revisit-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[4482,3349,5116,266,5117,481,576,587,652,684,719,1922,870,932,997,1319],"class_list":["post-67023","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-background-color","tag-client-pre-emptive-iframe","tag-coriolis","tag-coriolis-effect","tag-frameborder","tag-geographicals","tag-html","tag-iframe","tag-javascript","tag-latitude","tag-longitude","tag-onerror","tag-onload","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67023"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=67023"}],"version-history":[{"count":7,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67023\/revisions"}],"predecessor-version":[{"id":67032,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/67023\/revisions\/67032"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=67023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=67023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=67023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}