noxil / gpsdistance
经纬度工具箱 - 距离
v1.0.0
2022-08-05 01:45 UTC
README
用于检查GPS纬度、经度之间的距离。
安装使用包管理器 composer 安装 Simple Line Alert。
composer i noxil/gpsdistance
如何使用
<?php .... use noxil\gpsdistance; .... # returns 'resulut from Line Notify' $gpsdistance = new GpsDistance(); //From GPS Point data $lat1 = 18.775445029895085; $lng1 = 99.04841364382438; //To GPS Point data $lat2 = 18.756997228217532; $lng2 = 99.02579725845277; $gpsdistance->setGpsPoint1($lat1, $lng1); // Set From GPS Point $gpsdistance->setGpsPoint2($lat2, $lng2); // Set To GPS Point $result_km = $gpsdistance->distancePoint(); // Distance (Km) $result_mi = $gpsdistance->distancePoint('mi'); // Distance (Mile) ....