isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Constants.h
1 //
2 // Author: Joshua Cohen, Bryan Riel
3 // Copyright 2017-2018
4 //
5 
6 #pragma once
7 
8 #include <complex>
9 #include <cstdint>
10 #include <string>
11 
12 // Macro wrapper to check vector lengths (adds calling function and variable name information to the
13 // exception)
14 #define checkVecLen(v,l) isce3::core::checkVecLenDebug(v,l,#v,__PRETTY_FUNCTION__)
15 #define check2dVecLen(v,l,w) isce3::core::check2dVecLenDebug(v,l,w,#v,__PRETTY_FUNCTION__)
16 
17 // Macro wrapper to provide 2D indexing to a 1D array
18 #define IDX1D(i,j,w) (((i)*(w))+(j))
19 
20 namespace isce3 { namespace core {
21 
24  SINC_METHOD = 0,
25  BILINEAR_METHOD = 1,
26  BICUBIC_METHOD = 2,
27  NEAREST_METHOD = 3,
28  BIQUINTIC_METHOD = 4
29 };
30 
32 const int SINC_HALF = 4;
33 const int SINC_LEN = 8;
34 const int SINC_ONE = 9;
35 const int SINC_SUB = 8192;
36 
38 dataInterpMethod parseDataInterpMethod(const std::string & method);
39 
41 const double EarthSemiMajorAxis = 6378137.0;
42 
44 const double EarthEccentricitySquared = 0.0066943799901;
45 
47 constexpr static double speed_of_light = 299792458.0;
48 
50 const double GLOBAL_MIN_HEIGHT = -500.0;
51 
53 const double GLOBAL_MAX_HEIGHT = 9000.0;
54 
56 struct FixedString {
57  char str[50];
58 };
59 
61 const short SHADOW_VALUE = 1;
62 const short LAYOVER_VALUE = 2;
63 
66 const float AREA_PROJECTION_MIN_VALID_SAMPLES_RATIO = 0.75;
67 
69 double inline decimaldeg2meters(double deg) { return deg * (M_PI/180.0) * 6.37e6; }
70 
72 template<typename T> struct double_promote;
73 
75 template<> struct double_promote<float> { using type = double; };
76 
78 template<> struct double_promote<double> { using type = double; };
79 
81 template<> struct double_promote<std::complex<float>> { using type = std::complex<double>; };
82 
84 template<> struct double_promote<std::complex<double>> { using type = std::complex<double>; };
85 
86 }}
dataInterpMethod
Enumeration type to indicate interpolation method.
Definition: Constants.h:23
Struct with fixed-length string for serialization.
Definition: Constants.h:56
const short SHADOW_VALUE
Layover and shadow values.
Definition: Constants.h:61
const double EarthEccentricitySquared
Eccentricity^2 for WGS84.
Definition: Constants.h:44
const double EarthSemiMajorAxis
Semi-major axis for WGS84.
Definition: Constants.h:41
dataInterpMethod parseDataInterpMethod(const std::string &method)
Convert string to dataInterpMethod.
Definition: Constants.cpp:11
const double GLOBAL_MIN_HEIGHT
Global minimum height.
Definition: Constants.h:50
const double GLOBAL_MAX_HEIGHT
Global maximum height.
Definition: Constants.h:53
Precision-promotion to double/complex&lt;double&gt;
Definition: Constants.h:72
double decimaldeg2meters(double deg)
Convert decimal degrees to meters approximately.
Definition: Constants.h:69
const int SINC_HALF
Default sinc parameters.
Definition: Constants.h:32
const int AREA_PROJECTION_RADAR_GRID_MARGIN
Area projection algorithm radar grid margin.
Definition: Constants.h:65

Generated for ISCE3.0 by doxygen 1.8.5.