Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php add km to longitude

<?php
$distance = 100;
$earthRadius = 6371;
$lat1 = -26.4853239150483;
$lon1 = -49.075927734375;
$bearing = 0;

$lat2 = asin(sin($lat1) * cos($distance / $earthRadius) + cos($lat1) * sin($distance / $earthRadius) * cos($bearing));
$lon2 = $lon1 + atan2(sin($bearing) * sin($distance / $earthRadius) * cos($lat1), cos($distance / $earthRadius) - sin($lat1) * sin($lat2));

echo 'LAT: ' . $lat2 . '<br >';
echo 'LNG: ' . $lon2;
?>
Comment

PREVIOUS NEXT
Code Example
Php :: php print array key and value 
Php :: php send POST request same folder 
Php :: php bcdiv 
Php :: termii curl otp 
Php :: check if valid date format entered inside the excel import php 
Php :: siteurl 
Php :: comment_info 
Php :: phpunit exception message contains string 
Php :: laravel length validation 
Php :: Insert Data using modal 
Php :: Change initial country + add top countiries on Caldera forms 
Php :: Downward half-Pyramid Pattern of Star 
Php :: auth guard (admin) is not defined laravel 8 
Php :: if data come from foreach loop and if there are same value then sum of this same value and pass it to variable in php 
Php :: laravel {{variable}} not being rendered 
Php :: array.diff solution 
Php :: Extract all audio tracks / streams 
Php :: wc php get order get coupon discount amount 
Php :: php set 404 page 
Php :: read an email with php 
Php :: php api call with headers 
Php :: change email to username laravel login 
Php :: provide difference between interface and abstract class php 
Php :: wp-admin File not found (404 error) 
Php :: active class php 
Java :: javafx center node in gridpane 
Java :: setting up javafx in eclipse vm argument 
Java :: javafx dependency 
Java :: default code of java 
Java :: java string to boolean 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =