Note that there are some explanatory texts on larger screens.

plurals
  1. POLocation.getLatitude method returns non-precisioned double which is bad for GPS cordinates
    primarykey
    data
    text
    <p><strong>Status:</strong> Accepted best available answer with thanks after a week or so. Awaiting / inviting more answers with citations </p> <p>This matter was complex. I am really thankful to ALL commentators and specially asciimo,Gabe Sechan,AlexWien. Please vote and/or answer further after due study.</p> <p><strong>Senario:</strong></p> <p>The <code>Location.getLatitude()</code> in android <strong>returns double</strong> which has <strong>low precision</strong>. </p> <pre><code>Api http://developer.android.com/reference/android/location/Location.html </code></pre> <p><strong>Example:</strong></p> <p>Edit-2 begin</p> <p>I just tried to send GPS cordinates by emulator and 111.422006 auto converted to 111.422004999999998 in <code>Double dlongi = loc.getLongitude(); String longi = dlati.toString(); System.out.println(longi);</code></p> <p>Edit-2 end</p> <p>Edit-3 begin</p> <p>I sent the coordinates by emulator (by GPS device in reality) as 111.422006, the android API received it as double value of 111.42004999999998 </p> <p>Edit-3 end</p> <p><strong>Too late for:</strong> BigDecimal class is too late for that as it already gives a d/Double.</p> <p><strong>Question:</strong> What if full accuracy is required.</p> <p>What is a way to get it with good precision or in another form other than doubles?</p> <p>Just thought to share and make others notice this too.</p> <p><strong>Requests:</strong> Please do not answer until you are sure of a good answer with <strong><code>citation</code></strong> . This would help the communtiy.</p> <p><strong>Edit:</strong></p> <p>Looks like Gps coordinats by normal GPS devices are them self not 100% FULLY accurate near to 3 meter for example but looks like <strong>doubles further decrease the accuracy</strong>. that was my question actually.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload