long in a TBuf?
| Fri, 2005-08-05 18:24 | |
|
I make standard gui application with borland c++ mobile.
Then I want to getAltitude e getLongitude from my motorola a1000 thru AGPS. The method getAltitude and getLongitude (located in a .dll and .lib in my a1000sdk) return a long value and I'll want to print it to screen. I put a long value in a TInt32 variables (I name it "longitude"). Then I make TBuf<255> buffer. And I write this code: buffer.AppendNum(longitude) Then I use the CCoeControl method draw in order to print the buffer. The problem is that the value is incorrect! Is there a problem with any method, with long format conversion to String? |
|






Forum posts: 142
yucca
Forum posts: 37
I tried TInt32, TInt, TUint but the value that I obtain is
wrong correct
longitude 84917085 rather 37.097466
latitude 222582096 rather 14.152998
Forum posts: 183
The numbers you seem to be dealing with are Real numbers not Integers.
Regards,
Isseyp
Forum posts: 37
I wrong on write 37.xxxx, The point is not pratical!! sorry!
I discover the problem.
My agps api (on motorola a1000) give me a latitude and longitude using arc minutes, but i wanted latitude and longitude in degrees:
Infact If we multiply the wrong value * 0.0166666667 then we obtain correct value!!
1 arc minutes = 0.0166666667 degree!!