/* @(#)arcdr.h MgnAlt 2.1 (MIT/CSR) 1/31/92 Function: Define binary ARCDR structures System: Magellan Altimetry Data Reduction Phase: LIB Module: arcdr.h Revision: 2.1 Date: 1/31/92 Author: pgf@space.mit.edu Created: Thu Apr 14 11:42:33 EDT 1988 Control: SCCS */ #define uchar unsigned char #define ushort unsigned short #define ulong unsigned long #ifdef THINK_C #define DOUBLE short double #else #define DOUBLE double #endif /* ** SFDU Header (Generic SFDO Header) */ /* Begin sfdu.h */ #define SFDU_CCSD "CCSD" /* CCSDS Control Authority Header */ #define SFDU_NJPL "NJPL" /* JPL Control Authority Header */ #define SFDU_ASCII '1' /* ASCII length field */ #define SFDU_BINARY '2' /* Binary length field */ #define SFDU_VOLSTOP 'A' /* Volume terminator */ #define SFDU_START 'B' /* Logical collection Start */ #define SFDU_CATALOG 'C' /* Catalog/index tables */ #define SFDU_DDREC 'D' /* Data definition */ #define SFDU_DICT 'E' /* Element/Parameters Dictionary */ #define SFDU_DATA 'I' /* Information/Data Object */ #define SFDU_KEYWORD 'K' /* Keyword (Secondary Header) */ #define SFDU_PROGRAM 'P' /* Programming Data Object */ #define SFDU_SUP 'S' /* Supplementary Object */ #define SFDU_TEXT 'T' /* Text Data (and/or Fill) Object */ #define SFDU_VOLSTART 'V' /* Volume Label (Aggregate Start) */ #define SFDU_STOP 'X' /* Logical Collection Stop */ #define SFDU_AGGREGATE 'Z' /* Non-Classified Aggregation */ typedef struct { /* mgm.h 1.21 9/14/90 */ char sf_ctrl[4], /* Control authority */ sf_vers, /* 1/2=ASCII/binary */ sf_class, /* SFDU type */ sf_spare[2], /* Spares: 00 */ sf_ddid[4]; /* Data definition ID */ union { ushort sf_qlen[4]; /* Quad integer aggregate length */ char sf_clen[8]; /* ASCII aggregate length */ } sf_length; } sfdu; /* End sfdu.h */ /* ** MIT DDID Values */ #define MGM_ALL_DDID "0177" /* Collection of MIT data */ #define MGM_OHF_DDID "0178" /* Orbit header record */ #define MGM_ADF_DDID "0179" /* Altimetry data record */ #define MGM_RDF_DDID "0180" /* Radiometry data record */ /* ** Project Magellan MIT data structures */ #define OHF_SFDU_LABEL "NJPL1I000178" #define ADF_SFDU_LABEL "NJPL1I000179" #define RDF_SFDU_LABEL "NJPL1I000180" /* ** Orbit element structure */ /* Begin oe_rec.h */ typedef struct { /* arcdr.h 2.2 3/6/91 */ DOUBLE oe_scet, /* epoch (SCET seconds) */ oe_sma, /* Semi-major axis (km) */ oe_ecc, /* Eccentricity */ oe_incl, /* Inclination (deg) */ oe_long, /* Longitude of Ascending Node (deg) */ oe_arg; /* Argument (deg) */ } oe_rec; /* End oe_rec.h */ /* ** Orbit header record */ /* Begin oh_rec.h */ typedef struct { /* arcdr.h 2.2 3/6/91 */ sfdu oh_sfdu; /* SFDU label and length */ ulong oh_norbit, /* Orbit number */ oh_nalt, /* Number of Altimetry Data Records */ oh_nrad; /* Number of Radiometry Data Records */ DOUBLE oh_alt_start, /* First Altimetry Footprint Time (SCET) */ oh_alt_end, /* Last Altimetry Footprint Time (SCET) */ oh_rad_start, /* First Radiometer Footprint Time (SCET) */ oh_rad_end; /* Last Radiometer Footprint Time (SCET) */ oe_rec oh_avg; /* Average Predicted Orbit elements */ } oh_rec; /* End oh_rec.h */ /* ** ARCDR Type 4: ADF - Altimetry Record - ** one per altimeter footprint */ /* Begin ar_rec.h */ #define AR_FIT 0x0001 /* Values inserted by MGMTAC */ #define AR_EPHC 0x0002 /* Orbital geometry corrected */ #define AR_RHOC 0x0004 /* ar_rhocor computed from SAR */ #define AR_RS2 0x0008 /* Range-sharpened to 2nd order */ #define AR_NRS2 0x0010 /* Non-range-sharpened to 2nd order */ #define AR_BAD 0x0020 /* Ignore this record entirely */ #define AR_RBAD 0x0040 /* Ignore ar_radius and ar_rsprof[] */ #define AR_CBAD 0x0080 /* Ignore ar_slope, ar_rho and ar_prof[] */ #define AR_TMARK 0x0100 /* Temporary ar_radius marker flag */ #define AR_CMARK 0x0200 /* Temporary ar_slope marker flag */ #define AR_FMARK 0x0400 /* Temporary ar_rho marker flag */ #define AR_HAGFORS 0x0800 /* ar_slope is Hagfors's C-parameter */ #define AR_BADALTA 0x1000 /* ALTA offset too large to correct */ #define AR_SLOPEBAD 0x2000 /* Ignore ar_slope and ar_prof[] */ #define AR_RHOBAD 0x4000 /* Ignore ar_rho */ #define AR_RAD2 0x8000 /* ar_radius2 and ar_rhofact are used */ #define AR_RAD2BAD 0x10000 /* ar_radius2 is incorrect */ #define AR_AMBIG 0x20000 /* ar_radius shifted by ambiguity factor */ #define AR_AMBIG2 0x40000 /* ar_radius2 shifted by ambiguity factor */ typedef struct { /* arcdr.h 2.2 3/6/91 */ sfdu ar_sfdu; /* SFDU aggregate header label and length */ long ar_nfoot; /* Footprint number */ ulong ar_flag, /* Flag fields */ ar_flag2; /* Flag fields (unused) */ DOUBLE ar_scet, /* S/C Altimetry Footprt Time (SCET secs) */ ar_pos[3], /* S/C Position Vector (km, J2000) */ ar_vel[3]; /* S/C Velocity Vector (km sec-1, J2000) */ float ar_lon, /* Footprint Longitude (deg, VBF85) */ ar_lat, /* Footprint Latitude (deg, VBF85) */ ar_xfoot, /* Along-track Footprint Size (km) */ ar_yfoot, /* Cross-track Footprint Size (km) */ ar_rcal, /* Receiver Noise Calibration (km-sq) */ ar_range, /* Uncorrected range to nadir (km) */ ar_atmos, /* Atmospheric correction to range (km) */ ar_radius, /* Derived Planetary Radius (km) */ ar_slope, /* Derived RMS Surface Slope (deg) */ ar_rho, /* Derived Fresnel Reflectivity */ ar_rhocor, /* Rho Diffuse Scattering Corrn Factor */ ar_error[3], /* Formal errors in Radius, Slope, Rho */ ar_correl[6], /* Formal correlations in same */ ar_drad, /* Ephemeris Radius Correction (km) */ ar_dlon, /* Ephemeris Longitude Corrn. (deg, VBF85) */ ar_dlat, /* Ephemeris Latitude Corrn. (deg, VBF85) */ ar_partl[3][6], /* Partials of rad/lon/lat wrt pos & vel */ ar_fit, /* Non-range-sharpened goodness of fit */ ar_scale; /* Scaling factors for fit and prof */ ulong ar_looks, /* Number of non-range-sharpened looks */ ar_nprof0; /* ar_prof element matching ar_tmpl[0] */ uchar ar_prof[302], /* Non-range-sharpened Echo Profile */ ar_tmpl[50]; /* Best non-range-sharp Model Template */ float ar_rsfit, /* Range-sharpened goodness-of-fit */ ar_rsscale; /* Scaling factors for rsfit and rsprof */ ulong ar_rslooks, /* Number of range-sharpened looks */ ar_rsnprof0; /* ar_rsprof element matching ar_rstmpl[0] */ uchar ar_rsprof[302], /* Range-sharpened Echo Profile */ ar_rstmpl[50]; /* Best range-sharpened Model Template */ float ar_rhofact, /* Multi-peak correction applied to ar_rho */ ar_radius2, /* Radius from Threshold Detector (km) */ ar_sqi; /* Signal Quality Indicator (dB) */ long ar_thresh, /* Threshold Detector Index */ ar_spare[7]; /* Unused */ } ar_rec; /* End ar_rec.h */ /* ** ARCDR Type 5: RDF - Radiometry Record - ** one per radiometer burst */ /* Begin rr_rec.h */ #define RR_GEOC 0x0001 /* Orbital geometry corrected */ #define RR_RADC 0x0002 /* Radius corrected from ALT-EDR */ #define RR_NOS1 0x0004 /* rr_sar[0] value missing */ #define RR_NOS2 0x0008 /* rr_sar[1] value missing */ #define RR_BAD 0x0010 /* Ignore the radiometry values */ #define RR_CAL 0x0020 /* rr_lon, rr_lat are RA, Dec calibration */ #define RR_NRAD 0x0040 /* no radius information from topo model */ #define RR_RAD2 0x8000 /* rr_dedrad through rr_acr are used */ typedef struct { /* arcdr.h 2.2 3/6/91 */ sfdu rr_sfdu; /* SFDU aggregate header label and length */ long rr_burst; /* Radar Burst Number (periapsis=0) */ ulong rr_flag, /* Flag fields */ rr_flag2; /* Flag fields (unused) */ DOUBLE rr_scet, /* S/C Radiometry Epoch (SCET seconds) */ rr_pos[3], /* S/C Position Vector (km, J2000) */ rr_vel[3]; /* S/C Velocity Vector (km sec-1, J2000) */ float rr_lon, /* Footprint Longitude (deg, VBF85) */ rr_lat, /* Footprint Latitude (deg, VBF85) */ rr_xfoot, /* Along Track Radiom Footprint Size (km) */ rr_yfoot, /* Cross Track Radiom Footprint Size (km) */ rr_sfoot[2], /* SAR Footprint Diameters (km) */ rr_sar[2], /* SAR Average Backscatter Values (dB) */ rr_angle, /* Incidence Angle (deg) */ rr_bright, /* Brightness Temperature (K) */ rr_radius, /* Average Planetary Radius (km) */ rr_anttemp, /* System Temperature of Antenna (K) */ rr_skytemp, /* Sky Temperature at Surface (K) */ rr_rcvrtemp, /* System Temperature of Receiver (K) */ rr_surftemp, /* Surface Emission Temperature (K) */ rr_emiss, /* Surface Emissivity */ rr_partl[3][6], /* Partials of Lat,Lon,Radius wrt Pos,Vel */ rr_dedrad, /* Partial of Emissivity wrt Radius */ rr_phystemp, /* Physical Surface Temperature (K) */ rr_antval, /* Radiometer Antenna Value */ rr_loadval; /* Radiometer Load Value */ uchar rr_askip[2], /* Altimeter Skip Factor */ rr_again[2]; /* Altimeter Gain Factor */ long rr_acr, /* Altimeter Coarse Resolution */ rr_spare[4]; /* Unused */ } rr_rec; /* End rr_rec.h */