title: Calculations with latitude and longitude
body: <p>I get my position using :</p>
  
  <pre><code>var myLat = position.coords.latitude;
  var myLng = position.coords.longitude;
  </code></pre>
  
  <p>I have to do some calculations with this 2 variables, but eclipse show me an error saying that myLat is NaN. I insert an alert: <code>alert(myLat)</code> but show me "myLat" instead the value of my coordinate. </p>
  
  <p>So, I can't do calculations. How can I convert myLat in a value that allows me perform calculations?</p>
  
  <p>I use MVC pattern, so myLat and myLng is declared like that in Model:</p>
  
  <pre><code>var posAttuale = function(){
      this.myLat = "myLat";
      this.myLng = "myLng";
      this.myComune = "myComune";
  };
  </code></pre>
  
  <p>In Controller:</p>
  
  <pre><code>var infoPos = new posAttuale();
  
  infoPos.myLat = position.coords.latitude;
  infoPos.myLng= position.coords.longitude;
  </code></pre>
  
  <p>I'm using eclipse and a Samsung Galaxy S4Mini.</p>