久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    <tfoot id='XlelB'></tfoot>
    <i id='XlelB'><tr id='XlelB'><dt id='XlelB'><q id='XlelB'><span id='XlelB'><b id='XlelB'><form id='XlelB'><ins id='XlelB'></ins><ul id='XlelB'></ul><sub id='XlelB'></sub></form><legend id='XlelB'></legend><bdo id='XlelB'><pre id='XlelB'><center id='XlelB'></center></pre></bdo></b><th id='XlelB'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='XlelB'><tfoot id='XlelB'></tfoot><dl id='XlelB'><fieldset id='XlelB'></fieldset></dl></div>

    <small id='XlelB'></small><noframes id='XlelB'>

      <bdo id='XlelB'></bdo><ul id='XlelB'></ul>
    <legend id='XlelB'><style id='XlelB'><dir id='XlelB'><q id='XlelB'></q></dir></style></legend>

      1. 如何計算斜邊和方位

        How to compute hypotenuse and bearing(如何計算斜邊和方位)

        • <bdo id='TbUsh'></bdo><ul id='TbUsh'></ul>
          <i id='TbUsh'><tr id='TbUsh'><dt id='TbUsh'><q id='TbUsh'><span id='TbUsh'><b id='TbUsh'><form id='TbUsh'><ins id='TbUsh'></ins><ul id='TbUsh'></ul><sub id='TbUsh'></sub></form><legend id='TbUsh'></legend><bdo id='TbUsh'><pre id='TbUsh'><center id='TbUsh'></center></pre></bdo></b><th id='TbUsh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TbUsh'><tfoot id='TbUsh'></tfoot><dl id='TbUsh'><fieldset id='TbUsh'></fieldset></dl></div>
          <legend id='TbUsh'><style id='TbUsh'><dir id='TbUsh'><q id='TbUsh'></q></dir></style></legend>
        • <tfoot id='TbUsh'></tfoot>

            <small id='TbUsh'></small><noframes id='TbUsh'>

                <tbody id='TbUsh'></tbody>
                1. 本文介紹了如何計算斜邊和方位的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我在此鏈接從@DanS 獲得了以下代碼 如何顯示-a-map-still-image-file-with-a-moving-current-location

                  I got the below code from @DanS at this link how-to-display-a-map-still-image-file-with-a-moving-current-location

                  onCurrentPosition(Location current){
                      double hypotenuse = upperLeft.distanceTo(current);
                      double bearing = upperLeft.bearingTo(current);
                      double currentDistanceX = Math.cos(bearing) * hypotenuse;
                      //                     "percentage to mark the position"
                      double currentPixelX = (currentDistanceX / upperLeft.distanceTo(lowerRight) * Math.cos(upperLeft.bearingTo(lowerRight))) * mapWidth;
                  
                      moveIndicatorX(currentPixelX);
                  }
                  

                  以下是值:

                  • 當前:41.850033,-87.65005229999997
                  • 左上:41.866514127810355,-87.6720142364502
                  • 右下:41.83397145565242,-87.62824058532715
                  • 地圖寬度:512 x 512 像素

                  這是位置、斜邊(距離)、方位角(方位角)的在線計算器

                  Here are the calculator online for Location, hypotenuse(Distance), bearing(Azimuths)

                  • 將 LatLng 轉換為位置格式(例如 41° 51′ 59.45″ N 87° 40′ 19.25〃W)
                  • 計算距離&給定位置的方位角

                  我得到了以下結果:

                  • 斜邊 = 2581
                  • 軸承 = 135.21
                  • currentDistanceX = -2562
                  • currentPixelX = 311.9

                  想請大家:

                  1. 確認我的計算結果是否正確.
                  2. 如何計算 currentPixelY(另一點)?

                  順便說一句,我打算用它來計算給定現實生活 LatLng(current) 的位置,并與我的靜止圖像映射將靜止圖像的左上角和右下角結合到現實生活 LatLng 中.

                  By the way, I am planning to use that to compute the location of a given real life LatLng(current) against with my still image map which bonded the upperLeft and lowerRight corners of the still image into real life LatLng.

                  如果您想查看實際的 &預期的輸出,并希望輕松了解整個情況.請參考此鏈接-> 如何將當前位置標記為靜止圖像地圖

                  If you want to see the actual & expected output and want to easily understand the whole picture. Please refer to this link -> How to mark the current location into a still image map

                  推薦答案

                  這是我實際使用的代碼,不是之前貼的偽代碼:

                  This is the actual code I'm using, not pseudo code posted previously:

                  Location upperLeft = new Location("");
                  upperLeft.setLatitude(41.866514127810355);
                  upperLeft.setLongitude(-87.6720142364502);
                  Location lowerRight = new Location("");
                  lowerRight.setLatitude(41.83397145565242);
                  lowerRight.setLongitude(-87.62824058532715);
                  Location current = new Location("");
                  current.setLatitude(41.850033);
                  current.setLongitude(-87.65005229999997);
                  double hypotenuse = upperLeft.distanceTo(current);
                  double bearing = upperLeft.bearingTo(current);
                  double currentDistanceX = Math.cos(bearing * Math.PI / 180.0) * hypotenuse;
                  //                     "percentage to mark the position"
                  double totalHypotenuse = upperLeft.distanceTo(lowerRight);
                  double totalDistanceX = totalHypotenuse * Math.cos(upperLeft.bearingTo(lowerRight) * Math.PI / 180.0);
                  double currentPixelX = currentDistanceX / totalDistanceX * 512;
                  
                  System.out.println(currentPixelX); // 259.3345493341548
                  

                  您計算出來的答案看起來有點不對勁.要計算 Y 更改復制所有 X 標記的計算和變量以使用 Math.sin() 而不是 Math.cos().

                  Your calculated answer looks a bit off. To calculate Y change copy all the X marked calculations and variables to use Math.sin() instead of Math.cos().

                  這篇關于如何計算斜邊和方位的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Help calculating X and Y from Latitude and Longitude in iPhone(幫助從 iPhone 中的緯度和經度計算 X 和 Y)
                  Get user#39;s current location using GPS(使用 GPS 獲取用戶的當前位置)
                  IllegalArgumentException thrown by requestLocationUpdate()(requestLocationUpdate() 拋出的 IllegalArgumentException)
                  How reliable is LocationManager#39;s getLastKnownLocation and how often is it updated?(LocationManager 的 getLastKnownLocation 有多可靠,多久更新一次?)
                  CLLocation returning negative speed(CLLocation 返回負速度)
                  How to detect Location Provider ? GPS or Network Provider(如何檢測位置提供者?GPS 或網絡提供商)

                    <small id='jBHL4'></small><noframes id='jBHL4'>

                    <i id='jBHL4'><tr id='jBHL4'><dt id='jBHL4'><q id='jBHL4'><span id='jBHL4'><b id='jBHL4'><form id='jBHL4'><ins id='jBHL4'></ins><ul id='jBHL4'></ul><sub id='jBHL4'></sub></form><legend id='jBHL4'></legend><bdo id='jBHL4'><pre id='jBHL4'><center id='jBHL4'></center></pre></bdo></b><th id='jBHL4'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='jBHL4'><tfoot id='jBHL4'></tfoot><dl id='jBHL4'><fieldset id='jBHL4'></fieldset></dl></div>
                      <tbody id='jBHL4'></tbody>
                      <legend id='jBHL4'><style id='jBHL4'><dir id='jBHL4'><q id='jBHL4'></q></dir></style></legend>

                          <bdo id='jBHL4'></bdo><ul id='jBHL4'></ul>
                        • <tfoot id='jBHL4'></tfoot>
                          1. 主站蜘蛛池模板: 国产一级电影在线观看 | 黑人巨大精品欧美一区二区免费 | 国产亚洲精品综合一区 | 懂色中文一区二区在线播放 | 在线免费观看毛片 | 成人久久久久 | 欧美不卡一区二区三区 | av永久免费| 日韩在线免费看 | 久久精品国产一区二区电影 | 亚洲精品成人av久久 | 国产精品性做久久久久久 | 91久久视频 | 久久久久久亚洲精品不卡 | www免费视频| 伊人久久综合 | 日韩一区二区黄色片 | 国产精品久久久久久久久久尿 | 亚洲免费视频在线观看 | 一级黄色录像毛片 | 久久亚洲一区二区三区四区 | 日本一区二区不卡 | av免费电影在线 | 69性欧美高清影院 | 一区二区三区在线免费看 | 日本二区在线观看 | 欧美八区 | 超碰在线国产 | 午夜精品影院 | 免费在线观看一区二区三区 | 日屁网站 | 久久久久亚洲精品中文字幕 | 欧美中文一区 | 夫妻午夜影院 | 成人蜜桃av | 国产成人a亚洲精品 | 久久久网| 中文字幕免费视频 | 国产情侣久久 | 成人久久久 | 91精产国品一二三区 |