根据经纬度获取地理位置
public function car_source_location($lng,$lat,$log){
$sql = "select a.*, ROUND(6378.138*2*ASIN(SQRT(
POW(SIN(({$lat}*PI()/180-lat*PI()/180)/2),2)
+COS({$lat}*PI()/180)
*COS(lat*PI()/180)
*POW(SIN(({$lng}*PI()/180-lng*PI()/180)/2),2)
))*1000) AS distance
FROM `tp_group` a
HAVING distance <= {$log}";
// Log::record("car_source_location: ".$sql)." -- ".time();
$group= M("group");
$location = $group->query($sql);
return $location;
}