# to log:
# RAILS_DEFAULT_LOGGER.error("Args: #{args[0]}, #{args[1]}, #{args[2]}, #{args[3]}")
# to log:
# RAILS_DEFAULT_LOGGER.error("Args: #{args[0]}, #{args[1]}, #{args[2]}, #{args[3]}")
sql="SELECT gps_points.latitude*0.000001 AS lat,gps_points.longitude*0.000001 AS lon,gpx_files.id AS fileid,UNIX_TIMESTAMP(gps_points.timestamp) AS ts "+
sql="SELECT gps_points.latitude*0.000001 AS lat,gps_points.longitude*0.000001 AS lon,gpx_files.id AS fileid,UNIX_TIMESTAMP(gps_points.timestamp) AS ts "+
" AND (gps_points.longitude BETWEEN #{xminr} AND #{xmaxr}) "+
" AND (gps_points.latitude BETWEEN #{yminr} AND #{ymaxr}) "+
" AND (gps_points.timestamp IS NOT NULL) "+
" AND (gps_points.longitude BETWEEN #{xminr} AND #{xmaxr}) "+
" AND (gps_points.latitude BETWEEN #{yminr} AND #{ymaxr}) "+
" AND (gps_points.timestamp IS NOT NULL) "+