doushih06137 2015-09-03 21:54
浏览 63

GPS POI和观点

Thanks to Cosines or Haversine formulas, I get a list of POIs ordered by there distance from where I am.

How can I get to the next level and select the POIs that correspond to the direction I'm looking at (let's say 15°+/-5°, 0=North, 90=East)?

There is not much code already. We could use an exemple like this

$gps_pos = array (
                 'lat'=>48.845364, 
                 'lng'=>2.406628, 
                 'distance'=>20);
$pois = GetPOIsFromGPS($gps_pos);

There $pois looks like

Array
(
    [0] => Array
        (
            [id] => 336047
            [gps_lat] => 48.84528500
            [gps_lng] => 2.40663900
            [gps_alt] => 0.0000
            [distance_in_kms] => 0.0088094293255129
        )
    [1] => Array
        (
            [id] => 955092
            [gps_lat] => 48.84520700
            [gps_lng] => 2.40657700
            [gps_alt] => 0.0000
            [distance_in_kms] => 0.017828309444397
        )

    [2] => Array
        (
            [id] => 1022839
            [gps_lat] => 48.84515700
            [gps_lng] => 2.40644600
            [gps_alt] => 0.0000
            [distance_in_kms] => 0.026556875382492
        )
)

The trick is now to make de GetPOIsInPOV function.

$pov = array ('hdegres' => 15, 'range'=>5);

$pois_in_pov = GetPOIsInPOV($pois, $pov);

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 划分vlan后不通了
    • ¥15 GDI处理通道视频时总是带有白色锯齿
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)
    • ¥15 自适应 AR 模型 参数估计Matlab程序
    • ¥100 角动量包络面如何用MATLAB绘制
    • ¥15 merge函数占用内存过大
    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大