title: Convert location units from miles to meters Android
body: <p>i want to convert miles to meters? and other units to metric?
  I tried many variants to change values but its didn't help me,please someone can do it? if it's neccessary i can share all my code, and yes sorry for my English.</p>
  
  <p>There is my code please help.</p>
  
  <pre><code>Double speedInMilesPerHour = location.getSpeed()* 3.6; //inMeters
      requestParams.put("speed",  Integer.toString(speedInMilesPerHour.intValue()));
  
      try {
          requestParams.put("date", URLEncoder.encode(dateFormat.format(date), "UTF-8"));
      } catch (UnsupportedEncodingException e) {}
  
      requestParams.put("locationmethod", location.getProvider());
  
      if (totalDistanceInMeters &gt; 0) {
          requestParams.put("distance", String.format("%.1f", totalDistanceInMeters / 1609)); // in miles,
      } else {
          requestParams.put("distance", "0.0"); // in miles
      }
  
      requestParams.put("username", sharedPreferences.getString("userName", ""));
      requestParams.put("phonenumber", sharedPreferences.getString("appID", "")); // uuid
      requestParams.put("sessionid", sharedPreferences.getString("sessionID", "")); // uuid
  
      Double accuracyInFeet = location.getAccuracy()* 3.28;
      requestParams.put("accuracy",  Integer.toString(accuracyInFeet.intValue()));
  
      Double altitudeInFeet = location.getAltitude() * 3.28;
      requestParams.put("extrainfo",  Integer.toString(altitudeInFeet.intValue()));
  </code></pre>