Aug 18 2007, 06:58 PM
Post
#1
|
|
![]() Group: Members Posts: 149 Joined: 25-February 06 From: Nagoya, Japan Member No.: 9,232 |
Hi,
When I go to the gym, I took the habit of keeping some data like my blood pressure, pulse and weight. I store the data using the Database application that came with my Zaurus. The About dialog says : "Database Ver 1.1.3 - © 2003 Sharp Corporation". Now I'm considering to use another database program so I would like to export my data. There is an option to export to a CSV file. It works but I don't know how the float number data is encoded. CODE "T","attribute","created time","modified time","sync id","category","date","pressureHigh","pressureLow","pulse","weight" "D"," ","20061106091718","20061106091718","00000001",,"20061106 ","1a0a9lL0LLL0LLL0LLL0","1;0alLLKLLL0LLL0LLL0","1;0auLLKLLL0LLL0LLL0","1;0anLLSLLL0LLL0LLL0" So this means that : 1a0a9lL0LLL0LLL0LLL0 = 122 1;0alLLKLLL0LLL0LLL0 = 60 1;0auLLKLLL0LLL0LLL0 = 69 1;0anLLSLLL0LLL0LLL0 = 62.8 What's this format? Anyone has a clue about the transformation I need to do to "1a0a9lL0LLL0LLL0LLL0" to get "122"? |
|
|
|
![]() |
Aug 19 2007, 02:37 AM
Post
#2
|
|
|
Group: Members Posts: 699 Joined: 26-February 04 From: near Munich, Germany Member No.: 2,043 |
QUOTE(Frederic Bergeron @ Aug 19 2007, 03:58 AM) 1a0a9lL0LLL0LLL0LLL0 = 122 No idea what it really is. But some observations:1;0alLLKLLL0LLL0LLL0 = 60 1;0auLLKLLL0LLL0LLL0 = 69 1;0anLLSLLL0LLL0LLL0 = 62.8 What's this format? Anyone has a clue about the transformation I need to do to "1a0a9lL0LLL0LLL0LLL0" to get "122"? Looks like 20 ASCII characters are used to encode a float. Could therefore be something like base64 using a 5:4 code (i.e. each 4x4 bits give 5 characters) Binary would be 122 = 0.953125 * 2^7 = 0.1110100100000000000 exp 000111 60 = 0.9375 * 2^6 = 0.11110000000000000 exp 000110 69 = 0.5390625 * 2^7 = 0.100001001000000000 exp 000111 62.8 = 0.98125 * 2^6 = 0.111110110011001100110011001100110011... exp 000110 Ok, 62.8 is an infinite fraction in Binary float, => your format is most probably a Decimal representation. 1a0a => exponent 10^2 Mantissa 1.22 -> 9IL0 1;0a => exponent 10^1 Mantissa 6.0 -> ILLK and 6.9 ULLK and 6.28 NLLS If you find two values that differ by 1 only (e.g. 60 and 61) you can see which bit changes. -- hns |
|
|
|
Frederic Bergeron What's This Format? Aug 18 2007, 06:58 PM
sdjf Not an expert on this sort of thing, but you might... Aug 18 2007, 11:24 PM![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 05:11 AM |