My class function is not seeing GET url paramaters

As I said, I was just missing the declaration to use the global $wp_query, so it wasn’t accessing my filters.

Here’s what worked incase it helps:

global $wp_query;
// pull variable from url
    if (isset($wp_query->query_vars['country']))
        {
        $this->user_country = $wp_query->query_vars['country'];
        }
        else { $this->user_country = 'your country'; }


    if (isset($wp_query->query_vars['lat']))
        {
        $this->user_lat = $wp_query->query_vars['lat'];
        }
        else { $this->user_lat="52.5"; }

        if (isset($wp_query->query_vars['lon']))
            {
            $this->user_lon = $wp_query->query_vars['lon'];
            }
            else { $this->user_lon = '13.4'; }

error code: 523