For example, under gcc for Linux, compile as follows:
gcc -o twobasc twobasc.c
To convert the binary file from the FLASH card to ASCII engineering units, run the following 2 programs. The twobswab program gets the various multi-byte binary values into the "little-endian" byte order expected by a PC; an intermediate byte-swapped binary file is created. This byte-swapped file is then converted to ASCII and formatted into comma-separated columns, one record per line.
For the example, the original FLASH card binary file is called ozone2.bin and all operations are assumed to run in the same directory as the conversion program executables.
The format of each line (record) in the ASCII file corresponds to the order of values in the record format shown in the documentation, except that the "spare1", "spare2" and "used" values are not included.
To convert the HEX dump file captured from the R command to ASCII engineering units, run the following program. The xxd program is a Linux utility to convert HEX dump files to binary. The binary file is then converted as above.
For the example, the original HEX dump file is called ozone2.hex and all operations are assumed to run in the same directory as the conversion program executables.
The format of each line (record) in the ASCII file corresponds to the order of values in the record format shown in the documentation, except that the "spare2" and "used" values are not included.