nidas  v1.2-1520
Static Public Member Functions | List of all members
nidas::dynld::isff::GOES Class Reference

Support for a GOES transmitter, implemented as an IOChannel. More...

#include <GOES.h>

Static Public Member Functions

static void float_encode_5x6 (float f, char *enc)
 Encode a single precision float for transfer over GOES. More...
 
static float float_decode_5x6 (const char *enc)
 Decode 5x6 bit value back into a floating point. More...
 
static void float_encode_4x6 (float f, char *enc)
 Encode a 32 bit single precision float for transfer over GOES. More...
 
static float float_decode_4x6 (const char *enc)
 Decode 4x6 bit value back into a floating point. More...
 

Detailed Description

Support for a GOES transmitter, implemented as an IOChannel.

Member Function Documentation

float GOES::float_decode_4x6 ( const char *  enc)
static

Decode 4x6 bit value back into a floating point.

Referenced by nidas::dynld::isff::PacketParser::parseData().

float GOES::float_decode_5x6 ( const char *  enc)
static

Decode 5x6 bit value back into a floating point.

void GOES::float_encode_4x6 ( float  f,
char *  enc 
)
static

Encode a 32 bit single precision float for transfer over GOES.

The encoded value occupies 4 bytes. The 2 most significant bits each encoded byte are of 01 (hex 0x40) in order to fit in the restricted GOES tranmission character set. The other 6 bits in each byte used to store the floating point value. The least significant 8 bits of the mantissa are discarded (resulting in a 15 bit mantissa), in order to code the number into 24 bits total: 4 bytes X 6 data bits/byte. The resulting precision is 1 part in 32768 (2^15). The nan value is encoded and decoded correctly.

Referenced by nidas::dynld::isff::SE_GOESXmtr::transmitDataSE110(), and nidas::dynld::isff::SE_GOESXmtr::transmitDataSE120().

void GOES::float_encode_5x6 ( float  f,
char *  enc 
)
static

Encode a single precision float for transfer over GOES.

The encoded value occupies 5 bytes. The 2 most significant bits each encoded byte are of 01 (hex 0x40) in order to fit in the restricted GOES tranmission character set. The other 6 bits in each byte used to store the floating point value. The least significant 2 bits of the mantissa are discarded (resulting in a 21 bit mantissa), in order to code the number into 30 bits total: * 5 bytes X 6 data bits/byte. The resultant precision is 1 part in 2 million (2^21), reduced from 1 part in 8 million (2^23). The nan value is encoded and decoded correctly.


The documentation for this class was generated from the following files: