Go to the documentation of this file.
31 float ref, bscale, dscale;
38 if (!(ifld = calloc(ndpts,
sizeof(
g2int))))
40 fprintf(stderr,
"Could not allocate space in simunpack.\n "
41 "Data field NOT upacked.\n");
49 gbits(cpack, ifld, 0, nbits, 0, ndpts);
50 for (j = 0; j < ndpts; j++)
51 fld[j] = (((
float)ifld[j] * bscale) + ref) * dscale;
55 for (j = 0; j < ndpts; j++)
#define G2_NO_ERROR
Function succeeded.
void rdieee(g2int *rieee, float *a, g2int num)
This subroutine reads a list of real values in 32-bit IEEE floating point format.
double int_power(double x, g2int y)
Function similar to C pow() power function.
Header file with internal function prototypes NCEPLIBS-g2c library.
int64_t g2int
Long integer type.
g2int simunpack(unsigned char *cpack, g2int *idrstmpl, g2int ndpts, float *fld)
This subroutine unpacks a data field that was packed using a simple packing algorithm as defined in t...
void gbits(unsigned char *in, g2int *iout, g2int iskip, g2int nbits, g2int nskip, g2int n)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
#define G2_JPCUNPACK_MEM
In jpcunpack() or other unpack function: out of memory.