{"id":5738,"date":"2013-12-31T05:09:29","date_gmt":"2013-12-30T18:09:29","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5738"},"modified":"2013-12-31T05:09:29","modified_gmt":"2013-12-30T18:09:29","slug":"phpjavascripthtml-coriolis-effect-calculation-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-coriolis-effect-calculation-tutorial\/","title":{"rendered":"PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/Coriolis.jpg\" title=\"PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial\" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript\/HTML Coriolis Effect Calculation Tutorial<\/p><\/div>\n<p>Lame alert!   One of the things I&#8217;ve always wanted to do was to be on either a plane, or better still, a ship before and after it crosses the Equator.   And which room do you think would be best?   For me, this is obvious &#8230; the bathroom, if it has a sink.   Want to see what happens to the water as it swirls down the sink, because given a long enough time in the bathroom (on the ship have somebody tell the rest you have dysentery &#8230; perhaps also check ahead of time that the ship has no padded cells) you should see the water change direction in the way it goes down the sink.   The cause of this is the <a target=_blank title='Coriolis Effect information via Wikipedia' href='http:\/\/en.wikipedia.org\/wiki\/Coriolis_effect'>Coriolis Effect<\/a>.<\/p>\n<p>This tutorial becomes part of the various functionalities, optionally using placename lookups, of Latitude and Longitude, as presented on this blog.  That is discussed in the tutorial shown below called <a target=_blank href=\"#pjhgpit\">PHP\/Javascript\/HTML Geographical Placename Integration Tutorial<\/a>.<\/p>\n<p>The Javascript embellishments in this tutorial mainly revolve around:<\/p>\n<ul>\n<li><a target=_blank title='window.open' href='http:\/\/www.w3schools.com\/jsref\/met_win_open.asp'>window.open<\/a><\/li>\n<\/ul>\n<p>The use of window.open can sometimes be blocked by web browsers depending on their settings and you can read a bit more about such issues <a target=_blank title='pop-up windows' href='http:\/\/en.wikipedia.org\/wiki\/Pop-up_ad'>here<\/a>.<\/p>\n<p>Useful tutorials that helped, and we give thanks to, were:<\/p>\n<ul>\n<li><a target=_blank title='Chapter_8_txtb.pdf' href='http:\/\/www.msrc.sunysb.edu\/~chang\/atm205\/Notes\/Chapter_8_txtb.pdf'>Chapter_8_txtb.pdf<\/a><\/li>\n<li><a target=_blank title='ATM205 Homework 1 solution' href='http:\/\/www.somas.stonybrook.edu\/~chang\/atm205\/HWsolutions\/Homework_7_sol.htm'>ATM205 Homework 1 solution<\/a><\/li>\n<li><a target=_blank title='0.chapter1.doc - ch1.pdf' href='http:\/\/homepage.ntu.edu.tw\/~suizx\/course\/HS6053_9301\/ch1.pdf'>0.chapter1.doc &#8211; ch1.pdf<\/a><\/li>\n<li><a target=_blank title='Coriolis effect - Wikipedia, the free encyclopedia' href='http:\/\/en.wikipedia.org\/wiki\/Coriolis_effect'>Coriolis effect &#8211; Wikipedia, the free encyclopedia<\/a><\/li>\n<li><a target=_blank title='Character Entity Reference Chart' href='http:\/\/dev.w3.org\/html5\/html-author\/charref'>Character Entity Reference Chart<\/a><\/li>\n<li><a target=_blank title='JavaScript toPrecision() Method' href='http:\/\/www.w3schools.com\/jsref\/jsref_toprecision.asp'>JavaScript toPrecision() Method<\/a><\/li>\n<li><a target=_blank title='JavaScript toExponential() Method' href='http:\/\/www.w3schools.com\/jsref\/jsref_toexponential.asp'>JavaScript toExponential() Method<\/a><\/li>\n<\/ul>\n<p>Here is a link to some downloadable PHP supervisory <i>&#8220;parent&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='place_latlong.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php_GETME\">place_latlong.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code (in the top of three iframes &#8230; others help show differences to the Sun Angle code, which was the basis for this program) which you may want to rename to <a target=_blank title='coriolis_force_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Coriolis\/coriolis_force_at.php-GETME\">coriolis_force_at.php<\/a><\/p>\n<p><b>Did you know (PHP-wise)?<\/b><\/p>\n<blockquote><p>if ( basename(__FILE__) == basename($_SERVER[&#8220;SCRIPT_FILENAME&#8221;]) ) {<br \/>\n  echo &#8220;This will only happen when called directly, not when used with require_once nor include_once&#8221;;<br \/>\n}<\/p><\/blockquote>\n<hr \/>\n<p id='pjhgpit'>Previous relevant <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5478\">PHP\/Javascript\/HTML Geographical Placename Integration 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\/GeographicalIntegration.png\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP\/Javascript\/HTML Geographical Placename Integration Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/GeographicalIntegration.png\" title=\"PHP\/Javascript\/HTML Geographical Placename Integration Tutorial\" \/><\/a><p class=\"wp-caption-text\">PHP\/Javascript\/HTML Geographical Placename Integration Tutorial<\/p><\/div>\n<p>Here is a tutorial that presents various functionality via placename lookups of Latitude and Longitude.  The inhouse functionality was applied in a centralized way when we did <a target=_blank title='PHP\/Javascript\/HTML Moon Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5403'>PHP\/Javascript\/HTML Geographicals By Placename Tutorial<\/a> but for this tutorial, <a target=_blank title='as promised' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5403#aspromised'>as promised<\/a>, we  add individual forms of the functionality to each of that <i>&#8220;parent&#8221;<\/i> application <i>&#8220;child&#8221;<\/i> functions in <a target=_blank title='PHP\/Javascript\/HTML Sun Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5353'>Sun Angles<\/a>, <a target=_blank title='PHP\/Javascript\/HTML Moon Angle Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5383'>Moon Angles<\/a> and <a target=_blank title='PHP\/Javascript\/HTML Great Circle Distance Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=5339'>Great Circle Distances<\/a> so that they can also sit independently of their parents with their own geographical placename dropdowns included.  Am hoping it can give some pointers to ideas to do with supervision and automation, in that you can have an idea that works well (which is very important) but is not so user-friendly.   Sometimes in this scenario a supervisory layer can improve things and make the application easier to use.   Asking the question <i>&#8220;What would make this easier to use?&#8221;<\/i> is a good thing to step back and ask after you have created an application.  And, of course, with all things, there is the <i><a target=_blank title='why' href='http:\/\/www.youtube.com\/watch?v=VB5yrPl2a_I'>&#8220;why&#8221;<\/a><\/i>?  Doing that here made me realise what was needed to improve the application was a data source that linked geographicals to placenames.<\/p>\n<p>The Javascript embellishments in this tutorial mainly revolve around:<\/p>\n<ul>\n<li><a target=_blank title='window.open' href='http:\/\/www.w3schools.com\/jsref\/met_win_open.asp'>window.open<\/a><\/li>\n<\/ul>\n<p>The use of window.open can sometimes be blocked by web browsers depending on their settings and you can read a bit more about such issues <a target=_blank title='pop-up windows' href='http:\/\/en.wikipedia.org\/wiki\/Pop-up_ad'>here<\/a>.<\/p>\n<p>Useful tutorials that helped, and we give thanks to, were:<\/p>\n<ul>\n<li><a target=_blank title='Placename geographicals' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AFGHANISTAN'>Placename geographicals<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Subsolar Point' href='http:\/\/en.wikipedia.org\/wiki\/Subsolar_point'>Subsolar Point<\/a><\/li>\n<li><a target=_blank title='Subsolar Point calculator helper' href='http:\/\/www.timeanddate.com\/worldclock\/sunearth.html'>Subsolar Point calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Sun Angle formulae' href='http:\/\/www.google.com.au\/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;ved=0CC8QFjAA&#038;url=http%3A%2F%2Fgeoalliance.asu.edu%2Fazga_site%2Fsites%2Fdefault%2Ffiles%2FLessonFiles%2FDorn%2FPulse%2FDornPulse.ppt&#038;ei=QTGRUuiXEcGtiAfwlIGICw&#038;usg=AFQjCNEYL6f1yBLg5hdC5qgYnnfWS00nOg&#038;sig2=2kQ25M8OoDltE6baNCRlnQ&#038;bvm=bv.56988011,d.aGc'>Sun Angle formulae<\/a><\/li>\n<li><a target=_blank title='Sydney positioning' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AUSTRALIA'>Sydney positioning<\/a><\/li>\n<li><a target=_blank title='CSS Border Radius' href='http:\/\/www.css3.info\/preview\/rounded-border\/'>CSS Border Radius<\/a><\/li>\n<li><a target=_blank title='CSS 2D Transformation Rotations' href='http:\/\/www.w3schools.com\/css\/css3_2dtransforms.asp'>CSS 2D Transformation Rotations<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Sublunary Point' href='http:\/\/translate.google.com.au\/translate?hl=en&#038;sl=de&#038;u=http:\/\/de.wikipedia.org\/wiki\/Sublunarer_Punkt&#038;prev=\/search%3Fq%3D%2522Sublunarer%2522%2Bwikipedia%26client%3Dfirefox-a%26hs%3D3co%26rls%3Dorg.mozilla:en-US:official%26biw%3D1213%26bih%3D619'>Sublunary Point<\/a><\/li>\n<li><a target=_blank title='Sublunary Point calculator helper' href='http:\/\/www.timeanddate.com\/worldclock\/sunearth.html'>Sublunary Point calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Moon Phase calculator helper' href='http:\/\/www.zodiacarts.com\/Calendar.shtml'>Moon Phase calculator helper<\/a> via <a target=_blank title='cURL in PHP and command line' href='http:\/\/php.net\/manual\/en\/book.curl.php'>cURL<\/a><\/li>\n<li><a target=_blank title='Sun Angle formulae applied to the case of the Moon Sublunary Point' href='http:\/\/www.google.com.au\/url?sa=t&#038;rct=j&#038;q=&#038;esrc=s&#038;source=web&#038;cd=1&#038;ved=0CC8QFjAA&#038;url=http%3A%2F%2Fgeoalliance.asu.edu%2Fazga_site%2Fsites%2Fdefault%2Ffiles%2FLessonFiles%2FDorn%2FPulse%2FDornPulse.ppt&#038;ei=QTGRUuiXEcGtiAfwlIGICw&#038;usg=AFQjCNEYL6f1yBLg5hdC5qgYnnfWS00nOg&#038;sig2=2kQ25M8OoDltE6baNCRlnQ&#038;bvm=bv.56988011,d.aGc'>Sun Angle formulae applied to the case of the Moon Sublunary Point<\/a><\/li>\n<li><a target=_blank title='Sydney positioning' href='http:\/\/stutzfamily.com\/mrstutz\/LatLong\/latlonglist.htm#AUSTRALIA'>Sydney positioning<\/a><\/li>\n<li><a target=_blank title='CSS 2D Transformation Rotations' href='http:\/\/www.w3schools.com\/css\/css3_2dtransforms.asp'>CSS 2D Transformation Rotations<\/a><\/li>\n<li>\n<hr \/>\n<\/hr>\n<\/li>\n<li><a target=_blank title='Great Circle Distance formulae' href='http:\/\/en.wikipedia.org\/wiki\/Great-circle_distance'>Great Circle Distance formulae<\/a><\/li>\n<li><a target=_blank title='Javascript rounding' href='http:\/\/stackoverflow.com\/questions\/11832914\/round-up-to-2-decimal-places-in-javascript'>Javascript rounding<\/a><\/li>\n<li><a target=_blank title='Javascript commas for thousands' href='http:\/\/www.mredkj.com\/javascript\/nfbasic.html'>Javascript commas for thousands<\/a><\/li>\n<li><a target=_blank title='Katmandu positioning via a Google search' href='https:\/\/www.google.com.au\/search?q=%22katmandu%22&#038;ie=utf-8&#038;oe=utf-8&#038;rls=org.mozilla:en-US:official&#038;client=firefox-a&#038;gfe_rd=ctrl&#038;ei=hk-QUriHM8qN8QeQzIDoDQ&#038;gws_rd=cr#q=%22katmandu+latitude%22&#038;rls=org.mozilla:en-US%3Aofficial '>Katmandu positioning via a Google search<\/a><\/li>\n<\/ul>\n<p><!--p>Here is a link to some downloadable PHP supervisory <i>\"parent\"<\/i> programming source code which you may want to rename to <a target=_blank title='place_latlong.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php_GETME\">place_latlong.php<\/a><\/p-->\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php--GETME\">distance.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php-GETME\">distance_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='distance.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php_GETME\">distance_old.php<\/a> (for comparison purposes).<\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php--GETME\">sun_angle_now_at.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php-GETME\">sun_angle_now_at_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php_GETME\">sun_angle_now_at_old.php<\/a> (for comparison purposes).<\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;independent child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='moon_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php--GETME\">moon_angle_now_at.php<\/a><\/p>\n<p>Here is a new link to some downloadable PHP <i>&#8220;child&#8221;<\/i> programming source code which you may want to rename to <a target=_blank title='moon_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php-GETME\">moon_angle_now_at_lessold.php<\/a><\/p>\n<p>Here is an old link to some downloadable PHP programming source code which you may want to rename to <a target=_blank title='sun_angle_now_at.php' href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php_GETME\">moon_angle_now_at_old.php<\/a> (for comparison purposes).<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Distance\/distance.php\" title='Live run'>Distance<\/a> application.<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/SunAngle\/sun_angle_now_at.php\" title='Live run'>Sun Angle<\/a> application.<\/p>\n<p>Live link to <i>&#8220;independent child&#8221;<\/i> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/MoonAngle\/moon_angle_now_at.php\" title='Live run'>Moon Angle<\/a> application.<\/p>\n<p>These new <i>&#8220;independent child&#8221;<\/i> applications still work with the link to a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/place_latlong.php\" title='Live run'>live run<\/a> of that <i>&#8220;parent&#8221;<\/i> supervisory application.<\/p>\n<p><b>Did you know (PHP-wise)?<\/b><\/p>\n<blockquote><p>if ( basename(__FILE__) == basename($_SERVER[&#8220;SCRIPT_FILENAME&#8221;]) ) {<br \/>\n  echo &#8220;This will only happen when called directly, not when used with require_once nor include_once&#8221;;<br \/>\n}<\/p><\/blockquote>\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='#d5478' onclick='var dv=document.getElementById(\"d5478\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=59\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5478' 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='#d5738' onclick='var dv=document.getElementById(\"d5738\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?cat=59\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d5738' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Lame alert! One of the things I&#8217;ve always wanted to do was to be on either a plane, or better still, a ship before and after it crosses the Equator. And which room do you think would be best? For &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/phpjavascripthtml-coriolis-effect-calculation-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,37],"tags":[266,481,576,652,932,997,1319],"class_list":["post-5738","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-coriolis-effect","tag-geographicals","tag-html","tag-javascript","tag-php","tag-programming","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5738"}],"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=5738"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/5738\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=5738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=5738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=5738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}