This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am lukewilkins on github. | |
* I am lukewilkins (https://keybase.io/lukewilkins) on keybase. | |
* I have a public key whose fingerprint is D485 640F 3D6B 35DE 17DF 9FA4 DDC3 2819 37F3 7CF2 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git config pack.threads 1 | |
git config pack.deltaCacheSize 1 | |
git config core.packedGitWindowSize 16m | |
git config core.packedGitLimit 128m | |
git config pack.windowMemory 512m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static function geo_events($d = 25, $location = null) | |
{ | |
if (is_null($location)) $location = Locate::get(); | |
$r = 3959; | |
$lat_n = rad2deg(asin(sin(deg2rad($location['lat'])) * cos($d / $r) + cos(deg2rad($location['lat'])) * sin($d / $r) * cos(deg2rad(0)))); | |
$lat_s = rad2deg(asin(sin(deg2rad($location['lat'])) * cos($d / $r) + cos(deg2rad($location['lat'])) * sin($d / $r) * cos(deg2rad(180)))); | |
$lng_e = rad2deg(deg2rad($location['lng']) + atan2(sin(deg2rad(90)) * sin($d / $r) * cos(deg2rad($location['lat'])), cos($d / $r) - sin(deg2rad($location['lat'])) * sin(deg2rad($lat_n)))); | |
$lng_w = rad2deg(deg2rad($location['lng']) + atan2(sin(deg2rad(270)) * sin($d / $r) * cos(deg2rad($location['lat'])), cos($d / $r) - sin(deg2rad($location['lat'])) * sin(deg2rad($lat_n)))); |