Help - Search - Members - Calendar
Full Version: What's This Format?
OESF Forums > General Forums > General Support and Discussion > Software
Frederic Bergeron
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"?
sdjf
Not an expert on this sort of thing, but you might look at documentation around the web for the "od" (octal dump) command that IIRC talks about various format options.

It is included in the arm utilities package:
http://quickening.zapto.org/ZaurusFeed/Non-IPKs/armutils.tgz

May not work if the C1000 isn't an arm processor, but there should be other flavors around, it's a classic.

sdjf
dhns
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.