OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

> What's This Format?
Frederic Bergero...
post 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"?
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
dhns
post 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
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"?
No idea what it really is. But some observations:

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
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st December 2014 - 02:16 PM