$lng2 = set_post('lng'); //当前位置坐标
$lat2 = set_post('lat');

round((*ATAN2(SQRT(SIN((`gps`.`gps_lat`-$lat2)*PI()//)
*SIN((`gps`.`gps_lat`-$lat2)*PI()//)+
COS($lat2*PI()/)*COS(`gps`.`gps_lat`*PI()/)
*SIN((`gps`.`gps_lng`-$lng2)*PI()//)
*SIN((`gps`.`gps_lng`-$lng2)*PI()//)),
SQRT(-SIN((`gps`.`gps_lat`-$lat2)*PI()//)
*SIN((`gps`.`gps_lat`-$lat2)*PI()//)
+COS($lat2*PI()/)*COS(`gps`.`gps_lat`*PI()/)
*SIN((`gps`.`gps_lng`-$lng2)*PI()//)
*SIN((`gps`.`gps_lng`-$lng2)*PI()//))))*) < LIMIT