OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <VcstCmnGeo.h>

Collaboration diagram for VcstCmnGeo:
[legend]

Public Member Functions

 VcstCmnGeo ()
 
 ~VcstCmnGeo ()
 
int initialize (GRAN_SEQ_ENUM gran_seq)
 
int satPosAtt (const double inTAI, CmnGeoEAPointType &outPt, bool performOrbitCheck=false)
 
int vectorAtSat (const CmnGeoEAPointType &inPt, const int vecFlag, double vecSat[VEC_SIZE])
 
void calcSatAzmZen (const double inDLat, const double inLon, const double inSamp2Sat[VEC_SIZE], double &outSatAzm, double &outSatZen)
 
int ellipIntersect (const CmnGeoEAPointType &inPt, const double inRotMat[VEC_SIZE][VEC_SIZE], const double viewVec[VEC_SIZE], double &dLat, double &lon, double &satAzm, double &satZen, double &range)
 
int sunMoonAngles (const double inTAI, const double inLat, const double inLon, const int smFlag, double &sunAzm, double &sunZen, double &moonAzm, double &moonZen, double &moonPhase, double &moonIFrac)
 
int sunAngles (const double inTAI, const float inLat, const float inLon, float &sunAzm, float &sunZen)
 
int sunAngles (const double inTAI, const double inLat, const double inLon, double &sunAzm, double &sunZen)
 
int moonAngles (const double inTAI, const float inLat, const float inLon, float &moonAzm, float &moonZen, float &moonPhase, float &moonIFrac)
 
int getSAAIntensity (const float inLat, const float inLon, float &outIntensity)
 
int checkSolarEclipse (const double inTAI, const double inLat, const double inLon, bool &outEclipseOccurring)
 
int writeNavigation ()
 
int writeCmnGeo ()
 

Static Public Member Functions

static const std::string getManeuverStr (const BusCritTlmType *busCritTlm, const AdcsHskTlmType *adcsHskTlm)
 

Public Attributes

std::string platform_
 
int act_scans_
 
int sc_diary_records_
 
int scan_number_ [VIIRS_SCANS]
 
unsigned char ham_side_ [VIIRS_SCANS]
 
unsigned char sensor_mode_ [VIIRS_SCANS]
 
unsigned char se_a_anlg_pwr_on_ [VIIRS_SCANS]
 
unsigned char se_b_anlg_pwr_on_ [VIIRS_SCANS]
 
unsigned char dp_servo_in_use_ [VIIRS_SCANS]
 
unsigned char se_a_tele_pos_known_ [VIIRS_SCANS]
 
unsigned char se_b_tele_pos_known_ [VIIRS_SCANS]
 
unsigned char se_a_mtrs_stopped_ [VIIRS_SCANS]
 
unsigned char se_b_mtrs_stopped_ [VIIRS_SCANS]
 
unsigned char encoderFlag_ [VIIRS_SCANS]
 
unsigned char es_se_a_teleham_scansyn_ [VIIRS_SCANS]
 
unsigned char es_se_b_teleham_scansyn_ [VIIRS_SCANS]
 
unsigned char cp_blk_pwr_sel_ [VIIRS_SCANS]
 
unsigned char dp_nonrdt_fpie_pwr_ [VIIRS_SCANS]
 
unsigned short ham_start_enc_ [VIIRS_SCANS]
 
unsigned short tel_start_enc_ [VIIRS_SCANS]
 
unsigned short ham_encoder_ [VIIRS_SCANS][Encoder_Reading]
 
unsigned short tel_encoder_ [VIIRS_SCANS][Encoder_Reading]
 
short electronics_side_ [VIIRS_SCANS]
 
bool scan_sync_failure_ [VIIRS_SCANS]
 
bool tel_start_not_nominal_ [VIIRS_SCANS]
 
bool sensor_not_nominal_ [VIIRS_SCANS]
 
bool scan_data_missing_ [VIIRS_SCANS]
 
short scan_sync_failure_cnt_
 
int scanSyncFailCt_
 
double start_TAI93sec_ [VIIRS_SCANS]
 
double end_TAI93sec_ [VIIRS_SCANS]
 
double ev_mid_TAI93sec_ [VIIRS_SCANS]
 
double sv_mid_TAI93sec_ [VIIRS_SCANS]
 
double bb_mid_TAI93sec_ [VIIRS_SCANS]
 
double sd_mid_TAI93sec_ [VIIRS_SCANS]
 
double start_TAI58sec_ [VIIRS_SCANS]
 
double end_TAI58sec_ [VIIRS_SCANS]
 
double mid_TAI58sec_ [VIIRS_SCANS]
 
double midGranTAI58sec_
 
float sc_solar_zenith_ [VIIRS_SCANS]
 
float sc_solar_azimuth_ [VIIRS_SCANS]
 
float solar_zenith_ [VIIRS_SCANS]
 
float solar_azimuth_ [VIIRS_SCANS]
 
float earth_sun_distance_ [VIIRS_SCANS]
 
float solar_j2000_ [VIIRS_SCANS][VEC_SIZE]
 
float solar_inst_ [VIIRS_SCANS][VEC_SIZE]
 
float att_quat_ev_ [VIIRS_SCANS][QUAT_SIZE]
 
float att_ang_ [VIIRS_SCANS][VEC_SIZE]
 
float orb_pos_ev_ [VIIRS_SCANS][VEC_SIZE]
 
float orb_vel_ev_ [VIIRS_SCANS][VEC_SIZE]
 
float att_quat_sd_ [VIIRS_SCANS][QUAT_SIZE]
 
float orb_pos_sd_ [VIIRS_SCANS][VEC_SIZE]
 
float orb_vel_sd_ [VIIRS_SCANS][VEC_SIZE]
 
float earth_moon_distance_ [VIIRS_SCANS]
 
float lunar_j2000_ [VIIRS_SCANS][VEC_SIZE]
 
float lunar_inst_ [VIIRS_SCANS][VEC_SIZE]
 
bool moon_in_sv_kob_ [VCST_BANDS][VIIRS_SCANS]
 
double earth_sun_distance_avg_
 
viirsCmnLutPtrs pLut_
 

Static Public Attributes

static constexpr double MSECPERDAY = 86400000000.0
 
static constexpr double TAI93_TAI58_SEC = 1104537627.0
 
static constexpr double RAD_TO_DEG = 180.0 / M_PI
 
static const std::string SN_APID_0
 
static const std::string SN_APID_8
 
static constexpr int ADSTATE_BYTE = 169
 
static constexpr int ADSTATE_BITS = 3
 
static constexpr int ADSTATE_NUM_OF_BITS = 3
 
static constexpr int ADMANDONE_BYTE = 255
 
static constexpr int ADMANDONE_BIT = 7
 
static constexpr int ADFFTID_BYTE = 339
 
static constexpr int SCAN_ALL = -1
 
static constexpr bool MEAN_SID = true
 
static constexpr bool APP_SID = false
 

Detailed Description

Definition at line 43 of file VcstCmnGeo.h.

Constructor & Destructor Documentation

◆ VcstCmnGeo()

◆ ~VcstCmnGeo()

~VcstCmnGeo ( )

Member Function Documentation

◆ calcSatAzmZen()

void calcSatAzmZen ( const double  inDLat,
const double  inLon,
const double  inSamp2Sat[VEC_SIZE],
double &  outSatAzm,
double &  outSatZen 
)

This function will calculate the satellite azimuth and zenith angles from the sample position

◆ checkSolarEclipse()

int checkSolarEclipse ( const double  inTAI,
const double  inLat,
const double  inLon,
bool outEclipseOccurring 
)

Check if a solar eclipse is occurring at the given time and ground location, using detailed NOVAS routines to verify local conditions.

◆ ellipIntersect()

int ellipIntersect ( const CmnGeoEAPointType inPt,
const double  inRotMat[VEC_SIZE][VEC_SIZE],
const double  viewVec[VEC_SIZE],
double &  dLat,
double &  lon,
double &  satAzm,
double &  satZen,
double &  range 
)

This function will calculate the geodetic latitude/longitude and satellite azimuth/zenith angles. It will combine the sensor exit vector with the roll, pitch, & yaw of the point.

◆ getManeuverStr()

static const std::string getManeuverStr ( const BusCritTlmType busCritTlm,
const AdcsHskTlmType adcsHskTlm 
)
static

Determine spacecraft maneuver state based on the information Bus Critical Telemetry data and ADCS Housekeeping Telemetry.

◆ getSAAIntensity()

int getSAAIntensity ( const float  inLat,
const float  inLon,
float &  outIntensity 
)

For a given location, estimate the number of single event upsets per year. A higher number indicates a greater danger of increased radiation within the South Atlantic Anomaly (SAA) causing earth location errors within optical encoders and false hits within detector arrays.

◆ initialize()

int initialize ( GRAN_SEQ_ENUM  gran_seq)

Initialize navigation based on granule sequence enum

◆ moonAngles()

int moonAngles ( const double  inTAI,
const float  inLat,
const float  inLon,
float &  moonAzm,
float &  moonZen,
float &  moonPhase,
float &  moonIFrac 
)

This function will calculate the azimuth and zenith angles to the Moon from the intersection on the ellipsoid. It will also calculate the Moon phase and Moon illumination.

◆ satPosAtt()

int satPosAtt ( const double  inTAI,
CmnGeoEAPointType outPt,
bool  performOrbitCheck = false 
)

This function will find a point in the ephatt_ points map field for a specified time. The point that is found is used to determine the location on the earth. The Roll, Pitch, and Yaw produced by this method are in arcseconds.

◆ sunAngles() [1/2]

int sunAngles ( const double  inTAI,
const double  inLat,
const double  inLon,
double &  sunAzm,
double &  sunZen 
)

◆ sunAngles() [2/2]

int sunAngles ( const double  inTAI,
const float  inLat,
const float  inLon,
float &  sunAzm,
float &  sunZen 
)

This function will calculate the azimuth and zenith angles to the Sun from the intersection on the ellipsoid.

◆ sunMoonAngles()

int sunMoonAngles ( const double  inTAI,
const double  inLat,
const double  inLon,
const int  smFlag,
double &  sunAzm,
double &  sunZen,
double &  moonAzm,
double &  moonZen,
double &  moonPhase,
double &  moonIFrac 
)

Compute solar and lunar angles at lat and lon

◆ vectorAtSat()

int vectorAtSat ( const CmnGeoEAPointType inPt,
const int  vecFlag,
double  vecSat[VEC_SIZE] 
)

This function calculates the x, y, z vector to the Sun or Moon in spacecraft frame at the location of the satellite.

◆ writeCmnGeo()

int writeCmnGeo ( )

Write geolocation data to netcdf file

◆ writeNavigation()

int writeNavigation ( )

Write navigation data to netcdf file

Member Data Documentation

◆ act_scans_

int act_scans_

Global data used by geolocation

Definition at line 74 of file VcstCmnGeo.h.

◆ ADFFTID_BYTE

constexpr int ADFFTID_BYTE = 339
staticconstexpr

Definition at line 58 of file VcstCmnGeo.h.

◆ ADMANDONE_BIT

constexpr int ADMANDONE_BIT = 7
staticconstexpr

Definition at line 57 of file VcstCmnGeo.h.

◆ ADMANDONE_BYTE

constexpr int ADMANDONE_BYTE = 255
staticconstexpr

Definition at line 56 of file VcstCmnGeo.h.

◆ ADSTATE_BITS

constexpr int ADSTATE_BITS = 3
staticconstexpr

Definition at line 54 of file VcstCmnGeo.h.

◆ ADSTATE_BYTE

constexpr int ADSTATE_BYTE = 169
staticconstexpr

Definition at line 53 of file VcstCmnGeo.h.

◆ ADSTATE_NUM_OF_BITS

constexpr int ADSTATE_NUM_OF_BITS = 3
staticconstexpr

Definition at line 55 of file VcstCmnGeo.h.

◆ APP_SID

constexpr bool APP_SID = false
staticconstexpr

Definition at line 62 of file VcstCmnGeo.h.

◆ att_ang_

float att_ang_[VIIRS_SCANS][VEC_SIZE]

Definition at line 128 of file VcstCmnGeo.h.

◆ att_quat_ev_

float att_quat_ev_[VIIRS_SCANS][QUAT_SIZE]

Definition at line 127 of file VcstCmnGeo.h.

◆ att_quat_sd_

float att_quat_sd_[VIIRS_SCANS][QUAT_SIZE]

Definition at line 132 of file VcstCmnGeo.h.

◆ bb_mid_TAI93sec_

double bb_mid_TAI93sec_[VIIRS_SCANS]

Definition at line 110 of file VcstCmnGeo.h.

◆ cp_blk_pwr_sel_

unsigned char cp_blk_pwr_sel_[VIIRS_SCANS]

Definition at line 90 of file VcstCmnGeo.h.

◆ dp_nonrdt_fpie_pwr_

unsigned char dp_nonrdt_fpie_pwr_[VIIRS_SCANS]

Definition at line 91 of file VcstCmnGeo.h.

◆ dp_servo_in_use_

unsigned char dp_servo_in_use_[VIIRS_SCANS]

Definition at line 82 of file VcstCmnGeo.h.

◆ earth_moon_distance_

float earth_moon_distance_[VIIRS_SCANS]

Definition at line 136 of file VcstCmnGeo.h.

◆ earth_sun_distance_

float earth_sun_distance_[VIIRS_SCANS]

Definition at line 123 of file VcstCmnGeo.h.

◆ earth_sun_distance_avg_

double earth_sun_distance_avg_

Definition at line 141 of file VcstCmnGeo.h.

◆ electronics_side_

short electronics_side_[VIIRS_SCANS]

Definition at line 98 of file VcstCmnGeo.h.

◆ encoderFlag_

unsigned char encoderFlag_[VIIRS_SCANS]

Definition at line 87 of file VcstCmnGeo.h.

◆ end_TAI58sec_

double end_TAI58sec_[VIIRS_SCANS]

Definition at line 114 of file VcstCmnGeo.h.

◆ end_TAI93sec_

double end_TAI93sec_[VIIRS_SCANS]

Definition at line 107 of file VcstCmnGeo.h.

◆ es_se_a_teleham_scansyn_

unsigned char es_se_a_teleham_scansyn_[VIIRS_SCANS]

Definition at line 88 of file VcstCmnGeo.h.

◆ es_se_b_teleham_scansyn_

unsigned char es_se_b_teleham_scansyn_[VIIRS_SCANS]

Definition at line 89 of file VcstCmnGeo.h.

◆ ev_mid_TAI93sec_

double ev_mid_TAI93sec_[VIIRS_SCANS]

Definition at line 108 of file VcstCmnGeo.h.

◆ ham_encoder_

unsigned short ham_encoder_[VIIRS_SCANS][Encoder_Reading]

Definition at line 95 of file VcstCmnGeo.h.

◆ ham_side_

unsigned char ham_side_[VIIRS_SCANS]

Definition at line 78 of file VcstCmnGeo.h.

◆ ham_start_enc_

unsigned short ham_start_enc_[VIIRS_SCANS]

Definition at line 92 of file VcstCmnGeo.h.

◆ lunar_inst_

float lunar_inst_[VIIRS_SCANS][VEC_SIZE]

Definition at line 138 of file VcstCmnGeo.h.

◆ lunar_j2000_

float lunar_j2000_[VIIRS_SCANS][VEC_SIZE]

Definition at line 137 of file VcstCmnGeo.h.

◆ MEAN_SID

constexpr bool MEAN_SID = true
staticconstexpr

Definition at line 61 of file VcstCmnGeo.h.

◆ mid_TAI58sec_

double mid_TAI58sec_[VIIRS_SCANS]

Definition at line 115 of file VcstCmnGeo.h.

◆ midGranTAI58sec_

double midGranTAI58sec_

Definition at line 116 of file VcstCmnGeo.h.

◆ moon_in_sv_kob_

bool moon_in_sv_kob_[VCST_BANDS][VIIRS_SCANS]

Definition at line 139 of file VcstCmnGeo.h.

◆ MSECPERDAY

constexpr double MSECPERDAY = 86400000000.0
staticconstexpr

Definition at line 47 of file VcstCmnGeo.h.

◆ orb_pos_ev_

float orb_pos_ev_[VIIRS_SCANS][VEC_SIZE]

Definition at line 129 of file VcstCmnGeo.h.

◆ orb_pos_sd_

float orb_pos_sd_[VIIRS_SCANS][VEC_SIZE]

Definition at line 133 of file VcstCmnGeo.h.

◆ orb_vel_ev_

float orb_vel_ev_[VIIRS_SCANS][VEC_SIZE]

Definition at line 130 of file VcstCmnGeo.h.

◆ orb_vel_sd_

float orb_vel_sd_[VIIRS_SCANS][VEC_SIZE]

Definition at line 134 of file VcstCmnGeo.h.

◆ platform_

std::string platform_

VIIRS platform identification string

Definition at line 68 of file VcstCmnGeo.h.

◆ pLut_

Definition at line 145 of file VcstCmnGeo.h.

◆ RAD_TO_DEG

constexpr double RAD_TO_DEG = 180.0 / M_PI
staticconstexpr

Definition at line 49 of file VcstCmnGeo.h.

◆ sc_diary_records_

int sc_diary_records_

Definition at line 75 of file VcstCmnGeo.h.

◆ sc_solar_azimuth_

float sc_solar_azimuth_[VIIRS_SCANS]

Definition at line 119 of file VcstCmnGeo.h.

◆ sc_solar_zenith_

float sc_solar_zenith_[VIIRS_SCANS]

Definition at line 118 of file VcstCmnGeo.h.

◆ SCAN_ALL

constexpr int SCAN_ALL = -1
staticconstexpr

Definition at line 59 of file VcstCmnGeo.h.

◆ scan_data_missing_

bool scan_data_missing_[VIIRS_SCANS]

Definition at line 102 of file VcstCmnGeo.h.

◆ scan_number_

int scan_number_[VIIRS_SCANS]

Definition at line 77 of file VcstCmnGeo.h.

◆ scan_sync_failure_

bool scan_sync_failure_[VIIRS_SCANS]

Definition at line 99 of file VcstCmnGeo.h.

◆ scan_sync_failure_cnt_

short scan_sync_failure_cnt_

Definition at line 103 of file VcstCmnGeo.h.

◆ scanSyncFailCt_

int scanSyncFailCt_

Definition at line 104 of file VcstCmnGeo.h.

◆ sd_mid_TAI93sec_

double sd_mid_TAI93sec_[VIIRS_SCANS]

Definition at line 111 of file VcstCmnGeo.h.

◆ se_a_anlg_pwr_on_

unsigned char se_a_anlg_pwr_on_[VIIRS_SCANS]

Definition at line 80 of file VcstCmnGeo.h.

◆ se_a_mtrs_stopped_

unsigned char se_a_mtrs_stopped_[VIIRS_SCANS]

Definition at line 85 of file VcstCmnGeo.h.

◆ se_a_tele_pos_known_

unsigned char se_a_tele_pos_known_[VIIRS_SCANS]

Definition at line 83 of file VcstCmnGeo.h.

◆ se_b_anlg_pwr_on_

unsigned char se_b_anlg_pwr_on_[VIIRS_SCANS]

Definition at line 81 of file VcstCmnGeo.h.

◆ se_b_mtrs_stopped_

unsigned char se_b_mtrs_stopped_[VIIRS_SCANS]

Definition at line 86 of file VcstCmnGeo.h.

◆ se_b_tele_pos_known_

unsigned char se_b_tele_pos_known_[VIIRS_SCANS]

Definition at line 84 of file VcstCmnGeo.h.

◆ sensor_mode_

unsigned char sensor_mode_[VIIRS_SCANS]

Definition at line 79 of file VcstCmnGeo.h.

◆ sensor_not_nominal_

bool sensor_not_nominal_[VIIRS_SCANS]

Definition at line 101 of file VcstCmnGeo.h.

◆ SN_APID_0

const std::string SN_APID_0
static

Definition at line 51 of file VcstCmnGeo.h.

◆ SN_APID_8

const std::string SN_APID_8
static

Definition at line 52 of file VcstCmnGeo.h.

◆ solar_azimuth_

float solar_azimuth_[VIIRS_SCANS]

Definition at line 122 of file VcstCmnGeo.h.

◆ solar_inst_

float solar_inst_[VIIRS_SCANS][VEC_SIZE]

Definition at line 125 of file VcstCmnGeo.h.

◆ solar_j2000_

float solar_j2000_[VIIRS_SCANS][VEC_SIZE]

Definition at line 124 of file VcstCmnGeo.h.

◆ solar_zenith_

float solar_zenith_[VIIRS_SCANS]

Definition at line 121 of file VcstCmnGeo.h.

◆ start_TAI58sec_

double start_TAI58sec_[VIIRS_SCANS]

Definition at line 113 of file VcstCmnGeo.h.

◆ start_TAI93sec_

double start_TAI93sec_[VIIRS_SCANS]

Definition at line 106 of file VcstCmnGeo.h.

◆ sv_mid_TAI93sec_

double sv_mid_TAI93sec_[VIIRS_SCANS]

Definition at line 109 of file VcstCmnGeo.h.

◆ TAI93_TAI58_SEC

constexpr double TAI93_TAI58_SEC = 1104537627.0
staticconstexpr

Definition at line 48 of file VcstCmnGeo.h.

◆ tel_encoder_

unsigned short tel_encoder_[VIIRS_SCANS][Encoder_Reading]

Definition at line 96 of file VcstCmnGeo.h.

◆ tel_start_enc_

unsigned short tel_start_enc_[VIIRS_SCANS]

Definition at line 93 of file VcstCmnGeo.h.

◆ tel_start_not_nominal_

bool tel_start_not_nominal_[VIIRS_SCANS]

Definition at line 100 of file VcstCmnGeo.h.


The documentation for this class was generated from the following file:
  • /gfs-oceanweb/web/ocssw/ocssw_src/include/ViirsCmn/VcstCmnGeo.h