{"id":25289,"date":"2015-08-06T16:45:03","date_gmt":"2015-08-06T11:15:03","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=25289"},"modified":"2022-01-11T15:27:06","modified_gmt":"2022-01-11T09:57:06","slug":"indoor-positioning-systemtrilateration","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/indoor-positioning-systemtrilateration\/","title":{"rendered":"Indoor Positioning System(Trilateration)"},"content":{"rendered":"<p>In <a href=\"http:\/\/en.wikipedia.org\/wiki\/Geometry\">geometry<\/a>, <b>trilateration<\/b> is the process of determining absolute or relative locations of points by measurement of distances, using the geometry of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Circle\">circles<\/a>, <a href=\"http:\/\/en.wikipedia.org\/wiki\/Sphere\">spheres<\/a> or <a href=\"http:\/\/en.wikipedia.org\/wiki\/Triangle\">triangles<\/a>.<\/p>\n<p>In addition to its interest as a geometric problem, trilateration does have practical applications in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Surveying\">surveying<\/a> and <a href=\"http:\/\/en.wikipedia.org\/wiki\/Navigation\">navigation<\/a>, including <a href=\"http:\/\/en.wikipedia.org\/wiki\/Global_positioning_system\">global positioning systems<\/a> (GPS). In contrast to <a href=\"http:\/\/en.wikipedia.org\/wiki\/Triangulation\">triangulation<\/a>, it does not involve the measurement of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Angle\">angles<\/a>.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-25291\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/08\/Untitled.jpg\" alt=\"Untitled\" width=\"245\" height=\"218\" \/>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-25292\" src=\"\/blog\/wp-ttn-blog\/uploads\/2015\/08\/index.jpeg\" alt=\"index\" width=\"217\" height=\"221\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>The major disadvantage of GPS navigation is that it does&#8217;nt work inside, i.e., inside any building, mall, theatre, mueseums etc.<\/p>\n<p>With the <a title=\"mobile app development service\" href=\"http:\/\/www.tothenew.com\/mobile-application-development-services\">help of Beacons<\/a>, Indoor positioning can be implemented.<br \/>\nWe are assuming here that three Beacons are placed at (0,0), (5.28,0), (0,6.5) points respectively.<br \/>\nThe distance to the device is say, 1.2, 2.1, 2.1. All figures in metres.<\/p>\n<p>[code language=&#8221;java&#8221;]<\/p>\n<p>\/**<br \/>\n* Calculates the distance from Beacon to device.<br \/>\n**\/<\/p>\n<p>private void calculateBeaconDistance(Beacon beacon) {<\/p>\n<p>\tfloat txPower = -74.0; \/\/ Manufacture set this power in the device<br \/>\n\tif (beacon .rssi == 0){<\/p>\n<p>\t\treturn -1.0; \/\/ if we cannot determine accuracy, return -1.<\/p>\n<p>\t}<\/p>\n<p>\tdouble ratio = beacon.rssi*1.0 \/ txPower;<br \/>\n\tif (ratio &lt; 1.0){<br \/>\n\t\treturn pow(ratio,10);<\/p>\n<p>\t}<br \/>\n\telse{<br \/>\n\t\tdouble accuracy = (0.89976)*pow(ratio,7.7095) + 0.111;<br \/>\n\t\treturn accuracy;<br \/>\n\t}<br \/>\n}<\/p>\n<p>\/**<br \/>\n* It needs distanceA, distanceB, distanceC, pointA1, pointA2, pointB1, pointB2, pointC1, pointC2<br \/>\n*\/<\/p>\n<p>private void getMeetingPoints(distanceA, distanceB, distanceC, pointA1, pointA2, pointB1, pointB2, pointC1, pointC2) {<\/p>\n<p>\tdouble w,z,x,y,y2;<br \/>\n\tw = distanceA * distanceA &#8211;\tdistanceB * distanceB &#8211; pointA1 * pointA1 &#8211; pointA2* pointA2 + pointB1 * pointB1 + pointB2 * pointB2;<\/p>\n<p>\tz = distanceB * distanceB &#8211; distanceC * distanceC &#8211; pointB1* pointB1 &#8211; pointB2 * pointB2 + pointC1 * pointC1 + pointC2 * pointC2;<\/p>\n<p>\tx = (w * ( pointC2 &#8211; pointB2) &#8211; z * ( pointB2 &#8211; pointA2)) \/ (2 * (( pointB1 &#8211; pointA1) * ( pointC1 &#8211; pointB2) &#8211; ( pointC1 &#8211; pointB1) * ( pointB2 &#8211; pointA2)));<\/p>\n<p>\ty = (w &#8211; 2 * x * (pointB1 &#8211; pointA1)) \/ (2 * ( pointB2 &#8211; pointA2));<\/p>\n<p>\ty2 = (z &#8211; 2 * x * ( pointC1 -pointB1)) \/ (2 * ( pointC1 &#8211; pointB2));<\/p>\n<p>\ty = (y + y2) \/ 2;<\/p>\n<p>}<\/p>\n<p>[\/code]<\/p>\n<p><span id=\"hs-cta-wrapper-eb235ec9-785f-4205-9d54-fc88423e9655\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-eb235ec9-785f-4205-9d54-fc88423e9655\" class=\"hs-cta-node hs-cta-eb235ec9-785f-4205-9d54-fc88423e9655\"><a href=\"http:\/\/insights.tothenew.com\/mobility-beacons-proximity-solutions\"><img decoding=\"async\" id=\"hs-cta-img-eb235ec9-785f-4205-9d54-fc88423e9655\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"\/blog\/wp-ttn-blog\/uploads\/2022\/01\/79.jpg\" alt=\"Beacons - Building Proximity based Solutions for Brands\" \/><\/a><br \/>\n<\/span><br \/>\n<\/span><br \/>\n<!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In geometry, trilateration is the process of determining absolute or relative locations of points by measurement of distances, using the geometry of circles, spheres or triangles. In addition to its interest as a geometric problem, trilateration does have practical applications in surveying and navigation, including global positioning systems (GPS). In contrast to triangulation, it does [&hellip;]<\/p>\n","protected":false},"author":164,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":21},"categories":[518,446,1772,1],"tags":[2184,2842,3953],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/25289"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=25289"}],"version-history":[{"count":1,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/25289\/revisions"}],"predecessor-version":[{"id":54572,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/25289\/revisions\/54572"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=25289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=25289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=25289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}