PHP code example of prbdias / trilateration
1. Go to this page and download the library: Download prbdias/trilateration library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prbdias / trilateration example snippets
use Prbdias\Trilateration\Trilateration;
$trilateration = new Trilateration();
//Make all the measurements in miles, by default it's in Kms.
$trilateration->setMiles(true);
//Define the 3 points to make the intersection
$trilateration->setPoint1(51.740480, -1.325897, 4);
$trilateration->setPoint2(51.812820, -1.208926, 5);
$trilateration->setPoint3(51.743257, -1.229532, 2);
//Get the intersection point
$point = $trilateration->getIntersectionPoint();
echo $point['lat'].', '.$point['lng'];