{"id":35727,"date":"2020-06-11T03:52:50","date_gmt":"2020-06-11T08:52:50","guid":{"rendered":"https:\/\/local.gasspringsshop.com\/?page_id=35727"},"modified":"2020-06-11T03:52:50","modified_gmt":"2020-06-11T08:52:50","slug":"am","status":"publish","type":"page","link":"https:\/\/www.gasspring.asia\/th\/am\/","title":{"rendered":"Angle measurement"},"content":{"rendered":"        <style>\n            .gthfullwidth {\n                width: 100%;\n            }\n            .videoWrapper {\n                position: relative;\n                padding-bottom: 56.25%; \/* 16:9 *\/\n                padding-top: 25px;\n                height: 0;\n            }\n            .videoWrapper iframe {\n                position: absolute;\n                top: 0;\n                left: 0;\n                width: 100%;\n                height: 100%;\n            }\n        <\/style>\n\n        <div class=\"videoWrapper\">\n            <!-- Copy & Pasted from YouTube -->\n            <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"https:\/\/www.youtube.com\/embed\/vE5atrMbndw?rel=0&hd=1\" frameborder=\"0\" allowfullscreen><\/iframe>\n        <\/div>\n\n        <div id=\"wrapper\" style=\"font-size: 30px;\">\n            <button onclick=\"reload()\" title=\"refresh\" style=\"background-color: white; color:darkgray; float: right; padding: 0px; font-size: 30px;\">&#8634;<\/button>\n\n            <div id='ijken1' style=\"\">\n                <button type=\"button\" id=\"ijkenhorbutton\" class=\"gthfullwidth\" onclick=\"ijken('hor')\">&#8660;<\/button>\n            <\/div><br>\n            <div id='ijken2' style=\"display:none\">\n                <button type=\"button\" class=\"gthfullwidth\" style=\"background-color: chartreuse;\" onclick=\"ijken('vert')\" >&#8661;<\/button>\n            <\/div><br>\n            <div id='ijken3' style=\"display:none\">\n                <center><h1 id=\"hoek1\" style=\"display:inline; font-size: 100px !important;\"><\/h1><h1 style=\"display:inline; font-size: 100px !important;\">&deg;<\/h1><\/center>\n            <\/div><br>\n        <\/div>\n\n        <script type=\"text\/javascript\">\n            function reload() {\n                location.reload();\n            }\n\n            window.onload = function () {\n                init();\n            };\n            gravity = 9.81;\n            corrfactorz = -1;\n            corrfactory = 1;\n            zcorrection = 0;\n            ycorrection = 0;\n            function init() {\n                if (typeof DeviceMotionEvent.requestPermission === 'function') {\n                    \/\/ permission nodig\n                    if (typeof DeviceOrientationEvent.requestPermission === 'function') {\n                        document.body.addEventListener('click', function () {\n                            DeviceOrientationEvent.requestPermission()\n                                    .then(function () {\n\/\/                                        alert('DeviceOrientationEvent, DeviceMotionEvent enabled');\n                                        window.addEventListener('devicemotion', meet, false);\n        \/\/                                        ijken('hor');\n                                    })\n                                    .catch(function (error) {\n\/\/                                        alert('t gaat fout 1');\n                                        document.getElementById('ijken1').innerHTML = '<h2 style=\"color:red;\">Only for smart phones and tablets :(<\/h2>';\n                                        document.getElementById('ijkenhorbutton').style.display = 'none';\n                                        \/\/                                        alert('DeviceOrientationEvent, DeviceMotionEvent not enabled');\n                                    });\n                        }, {once: true});\n                        return;\n                    }\n                } else {\n                    if (window.DeviceOrientationEvent) {\n                        window.addEventListener('devicemotion', meet, false);\n                    } else {\n\/\/                        alert('t gaat fout 2');\n                        document.getElementById('ijken1').innerHTML = '<h2 style=\"color:red;\">Only for smart phones and tablets :(<\/h2>';\n                        document.getElementById('ijkenhorbutton').style.display = 'none';\n                    }\n                }\n            }\n\n            myyaxis = 1;\n            myyfactor = 1;\n            myzaxis = 2;\n            myzfactor = 1;\n            horgeijkt = 0;\n            vertgeijkt = 0;\n            function ijken(orientation) {\n                \/\/iphone hoeken:\n                \/\/ horizontaal liggend scherm naar boven z = -1\n                \/\/ verticaal staand y = -1\n\n                \/\/                myyaxis = 1;\n                \/\/                myyfactor = 1;\n                \/\/                myzaxis = 2;\n                \/\/                myzfactor = 1;\n                \/\/                meet();\n\n                measuredx = Math.round(acceleration[0] * 10) \/ 10;\n                measuredy = Math.round(acceleration[1] * 10) \/ 10;\n                measuredz = Math.round(acceleration[2] * 10) \/ 10;\n                measuredlist = [measuredx, measuredy, measuredz];\n                maxabsmeaslist = Math.max.apply(Math, [Math.abs(measuredx), Math.abs(measuredy), Math.abs(measuredz)]);\n                measuredlistnorm = [Math.round(measuredx \/ maxabsmeaslist), Math.round(measuredy \/ maxabsmeaslist), Math.round(measuredz \/ maxabsmeaslist)];\n                switch (orientation) {\n                    case 'hor':\n                        if (measuredlistnorm.indexOf(-1) !== -1) {\n                            myzaxistemp = measuredlistnorm.indexOf(-1);\n                            myzfactortemp = 1;\n                            horgeijkt = 1;\n                            \/\/                            gravityhor = maxabsmeaslist; \/\/Math.abs(acceleration[myzaxistemp]);\n                        } else if (measuredlistnorm.indexOf(1) !== -1) {\n                            myzaxistemp = measuredlistnorm.indexOf(1);\n                            myzfactortemp = -1;\n                            horgeijkt = 1;\n                            \/\/                            gravityhor = maxabsmeaslist; \/\/Math.abs(acceleration[myzaxistemp]);\n                        } else {\n                            alert('Someting wrong');\n                        }\n                        document.getElementById('ijken1').style.display = 'none';\n                        document.getElementById('ijken2').style.display = '';\n                        break;\n                    case 'vert':\n                        if (measuredlistnorm.indexOf(-1) !== -1) {\n                            myyaxistemp = measuredlistnorm.indexOf(-1);\n                            myyfactortemp = 1;\n                            vertgeijkt = 1;\n                        } else if (measuredlistnorm.indexOf(1) !== -1) {\n                            myyaxistemp = measuredlistnorm.indexOf(1);\n                            myyfactortemp = -1;\n                            vertgeijkt = 1;\n                        } else {\n                            alert('Someting wrong');\n                        }\n                        document.getElementById('ijken2').style.display = 'none';\n                        document.getElementById('ijken3').style.display = '';\n                        break;\n                    default:\n                        break;\n                }\n\n                if (horgeijkt === 1 && vertgeijkt === 1) {\n                    myzaxis = myzaxistemp;\n                    myzfactor = myzfactortemp;\n                    myyaxis = myyaxistemp;\n                    myyfactor = myyfactortemp;\n                }\n            }\n\n            function handleOrientation(event) {\n                tiltFB = event.beta;\n                document.getElementById(\"doTiltFB\").innerHTML = Math.round(-tiltFB); \/\/ + '&deg;';\n            }\n\n            function meet(event) {\n                canHandleOrientation = event.accelerationIncludingGravity.x;\n                if (!canHandleOrientation) {\n                    document.getElementById(\"hoek1\").innerHTML = \"Helaas... Uw hoekmeter doet het niet.\";\n                } else {\n                    accelerationtemp = event.accelerationIncludingGravity;\n                    accelerationtemp = [accelerationtemp.x, accelerationtemp.y, accelerationtemp.z];\n                }\n                acceleration = [accelerationtemp[0], 0, 0];\n                acceleration[1] = accelerationtemp[myyaxis] * myyfactor;\n                acceleration[2] = accelerationtemp[myzaxis] * myzfactor;\n                verwerk();\n            }\n\n            function verwerk() {\n                zcor = -acceleration[2] \/ gravity;\n                ycor = acceleration[1] \/ gravity;\n                if (zcor > 1.0) {\n                    zcor = 1.0;\n                }\n                if (zcor < -1.0) {\n                    zcor = -1.0;\n                }\n                if (ycor < -1.0) {\n                    ycor = -1.0;\n                }\n                if (ycor > 1.0) {\n                    ycor = 1.0;\n                }\n\n                if (zcor > 0) {\n                    zang = Math.atan(ycor \/ Math.abs(zcor)) * 360.0 \/ 2.0 \/ Math.PI;\n                } else {\n                    if (ycor < 0) {\n                        zang = -Math.atan(ycor \/ Math.abs(zcor)) * 360.0 \/ 2.0 \/ Math.PI - 180;\n                    }\n                    if (ycor > 0) {\n                        zang = -Math.atan(ycor \/ Math.abs(zcor)) * 360.0 \/ 2.0 \/ Math.PI + 180;\n                    }\n                }\n\n                hoek1 = Math.round(zang);\n                document.getElementById(\"hoek1\").innerHTML = hoek1;\n                document.getElementById(\"hoek2\").innerHTML = hoek1;\n                document.getElementById(\"hoek3\").innerHTML = hoek1;\n                if (mber !== 0) {\n                    Fvoorspeld = (mber * (Math.cos(zang \/ 360 * 2 * Math.PI) * document.getElementById('lengte').value \/ 1000 \/ 2 + Hgber * Math.sin(zang \/ 360 * 2 * Math.PI))) \/ (document.getElementById('lengte').value \/ 1000);\n                    document.getElementById(\"voorspeldekracht\").innerHTML = Math.round(Fvoorspeld * 10) \/ 10;\n                }\n            }\n        <\/script>\n\n        \n<p>Open this page on mobile, click on the orange button and then the angle measurement tool will start. Play the YouTube-video if you need help.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open this page on mobile, click on the orange button an [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-35727","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Angle measurement - Gasspring.asia Thailand<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.gasspring.asia\/th\/am\/\" \/>\n<meta property=\"og:locale\" content=\"th_TH\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Angle measurement - Gasspring.asia Thailand\" \/>\n<meta property=\"og:description\" content=\"Open this page on mobile, click on the orange button an [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.gasspring.asia\/th\/am\/\" \/>\n<meta property=\"og:site_name\" content=\"Gasspring.asia Thailand\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/am\\\/\",\"url\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/am\\\/\",\"name\":\"Angle measurement - Gasspring.asia Thailand\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/#website\"},\"datePublished\":\"2020-06-11T08:52:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/am\\\/#breadcrumb\"},\"inLanguage\":\"th\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/am\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/am\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Angle measurement\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/#website\",\"url\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/\",\"name\":\"Gasspring.asia Thailand\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.gasspring.asia\\\/th\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"th\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Angle measurement - Gasspring.asia Thailand","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.gasspring.asia\/th\/am\/","og_locale":"th_TH","og_type":"article","og_title":"Angle measurement - Gasspring.asia Thailand","og_description":"Open this page on mobile, click on the orange button an [&hellip;]","og_url":"https:\/\/www.gasspring.asia\/th\/am\/","og_site_name":"Gasspring.asia Thailand","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.gasspring.asia\/th\/am\/","url":"https:\/\/www.gasspring.asia\/th\/am\/","name":"Angle measurement - Gasspring.asia Thailand","isPartOf":{"@id":"https:\/\/www.gasspring.asia\/th\/#website"},"datePublished":"2020-06-11T08:52:50+00:00","breadcrumb":{"@id":"https:\/\/www.gasspring.asia\/th\/am\/#breadcrumb"},"inLanguage":"th","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.gasspring.asia\/th\/am\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.gasspring.asia\/th\/am\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.gasspring.asia\/th\/"},{"@type":"ListItem","position":2,"name":"Angle measurement"}]},{"@type":"WebSite","@id":"https:\/\/www.gasspring.asia\/th\/#website","url":"https:\/\/www.gasspring.asia\/th\/","name":"Gasspring.asia Thailand","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.gasspring.asia\/th\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"th"}]}},"_links":{"self":[{"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/pages\/35727","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/comments?post=35727"}],"version-history":[{"count":0,"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/pages\/35727\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gasspring.asia\/th\/wp-json\/wp\/v2\/media?parent=35727"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}