Home »
Public Forums »
archive »
Extracting bits with IDL
Extracting bits with IDL [message #2597] |
Sat, 16 July 1994 21:03 |
dean
Messages: 55 Registered: March 1993
|
Member |
|
|
We are set up to routinely collect GOES-8 GVAR data. Like with most data
from satellites, they put information in the individual bits. Below is a C
structure that extracts the individual bits from part of the data header which
contains some time information. Extracting individual bits from data with IDL
is difficult. At first I consider building an IDL structure, but IDL is
unable to break down to bits.
The information can fit into LONARR(2). If anyone has any suggestion that
would allow IDL to extract the information from these LONARR(2), please
forward your comments to me or post them. I hope to use this information to
build a widget to navigate through this new and fine data set coming from
GOES-8.
============================================================ ===================
typedef struct
{
unsigned year_100 : 4;
unsigned year_1000 : 4;
unsigned year_1 : 4;
unsigned year_10 : 4;
unsigned day_10 : 4;
unsigned day_100 : 3;
unsigned time_code : 1;
unsigned hour_10 : 4;
unsigned day_1 : 4;
unsigned min_10 : 4;
unsigned hour_1 : 4;
unsigned sec_10 : 4;
unsigned min_1 : 4;
unsigned msec_100 : 4;
unsigned sec_1 : 4;
unsigned msec_1 : 4;
unsigned msec_10 : 4;
} BCD_TIME_T;
********************************************************** \ *****
Kelly Dean \
Cooperative Institute for Research in the Atmosphere ___\
Foothills Campus /|
Colorado State University / |\
Fort Collins, CO 80523 / | \
E-MAIL: DEAN@PHOBOS.CIRA.COLOSTATE.EDU | \
************************************************************ **************
|
|
|
Current Time: Wed Oct 08 14:32:56 PDT 2025
Total time taken to generate the page: 0.00511 seconds