Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • There is a way to increase accuracy? Commented May 26, 2016 at 18:56
  • 1
    @Lipsyor: Sure. Do not drop the last digit, uint32_t fraction = atol(s+3) * 10 / 6;, and now fraction is in units of 1e-6 deg. Commented May 26, 2016 at 19:34
  • Thank you Edgar. I'm sorry but don't understand the operation in the code. I removed the line that drop the last digit (s[8] = '\0';) and used uint32_t fraction = atol(s+3) * 10 / 6; instead of uint16_t fraction = atoi(s + 3); fraction /= 6; but I have a great translation on the map. May you explain me? Commented May 27, 2016 at 13:12
  • 1
    @Lipsyor: You probably failed to properly write the number as ASCII. Since it's now in units of 1e-6 deg, you have to write six digits instead of four. C.f. the amended answer. Commented May 27, 2016 at 16:02