I’m using an asset tracker with the Electron. When I use sprintf to take the latitude and longitude from their returned floats and send them to publish. It gives me a number that that has the decimal place shifted to the right. IE 35.4865 > 3548.65. Any ideas? I know Arduino doesn’t have a float to string ability in its implementation of sprintf but I thought the Particle did. I am using that method for other float values and it’s fine.
Okay so I figured it out. Using the asset tracker library I was using the function readLatLon() which returns a string. I switch to readLat and readLon which return floats. I thought theyd just be the two parts of the GPS coordinate but split. Nope they are some unadjusted part of figuring out the lat and lon. What I wanted was readLatDegrees. That gives me what I was getting with readLatLon. Sprintf was always working I was just asking for the wrong data