Arduino stuff

Joined
Jun 15, 2023
Messages
4
Reaction score
0
Hello everyone, I have a small problem. I need precision, but all I can obtain are the first 6 decimals, and I need 19. Does anyone know how to achieve this?
D = String(latitude,6) + "," + String(longitude,6);
I need a final result as a String.
 
Joined
Jul 4, 2023
Messages
474
Reaction score
58
Joined
Mar 31, 2023
Messages
95
Reaction score
8
Thank you for the quick response! Chese is my other account. In fact, the fact that they are large numbers works very well, and I manage to have all my decimals when my number is in Float. The problem is that if I want to convert it to a string, it only gives me the first 6 decimals.

Serial.print(latitude, 19);
Floating-point real number: -62.4277725219726562500

D = String(longitude,19);
Number as a String: -62.4277730000000000000

Thank you for any possible response!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top