How to read a binary file and write a text file with that data?
Posted on 2006-06-28
I have a binary file with uint32 values. i need to read those,convert them to scaled floating point (3 places) and write to a text file. For example:
00 01 23 4F 00 01 24 4D...
is 2 values: 001234F (74575 int) and 0012244D (74829 int), each of 4 bytes and the whole file contains such values. I need to scale these in such a way:
(74575 - 65000)/22500
which is: 0.423
and write them to a file as csv values.Can someone tell me how to do that