title: Calculate distance in meters when you know longitude and latitude in java
body: <blockquote>
  <p><strong>Possible Duplicate:</strong><br />
  <a href="https://stackoverflow.com/questions/120283/working-with-latitude-longitude-values-in-java">Working with latitude/longitude values in Java</a></p>
  </blockquote>
  
  <h3>Duplicate:</h3>
  <ul>
  <li><a href="https://stackoverflow.com/questions/120283/">Working with latitude/longitude values in Java</a></li>
  <li><a href="https://stackoverflow.com/questions/27928/">How do I calculate distance between two latitude longitude points?</a></li>
  </ul>
  <p>I need to calculate the distance between two points given by two coordinates. The project I am working on is a Java-project, so Java-code will be great, but pseudo-code can also be given, then I can implement it myself :)</p>
  <p>As you probably know, there are three ways to represent coordinates:</p>
  <ul>
  <li>Degrees:Minutes:Seconds (49°30'00&quot;N, 123°30'00&quot;W)</li>
  <li>Degrees:Decimal Minutes (49°30.0', -123°30.0'), (49d30.0m,-123d30.0')</li>
  <li>Decimal Degrees (49.5000°,-123.5000°), generally with 4-6 decimal numbers.</li>
  </ul>
  <p>It's the third way my coordinates are given in, so the code for this values will be preferred :)</p>