GeographicLib: JacobiConformal.hpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#if !defined(GEOGRAPHICLIB_JACOBICONFORMAL_HPP)

14#define GEOGRAPHICLIB_JACOBICONFORMAL_HPP 1

15

17

19namespace experimental {

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

47 real _a, _b, _c, _ab2, _bc2, _ac2;

49 static void norm(real& x, real& y) {

50 using std::hypot;

51 real z = hypot(x, y); x /= z; y /= z;

52 }

53 public:

54

55

56

57

58

59

60

61

62

63

64

66 : _a(a), _b(b), _c(c)

67 , _ab2((_a - _b) * (_a + _b))

68 , _bc2((_b - _c) * (_b + _c))

69 , _ac2((_a - _c) * (_a + _c))

70 , _ex(_ab2 / _ac2 * Math::sq(_c / _b), -_ab2 / Math::sq(_b),

71 _bc2 / _ac2 * Math::sq(_a / _b), Math::sq(_a / _b))

72 , _ey(_bc2 / _ac2 * Math::sq(_a / _b), +_bc2 / Math::sq(_b),

73 _ab2 / _ac2 * Math::sq(_c / _b), Math::sq(_c / _b))

74 {

75 using std::isfinite;

76 if (!(isfinite(_a) && _a >= _b && _b >= _c && _c > 0))

77 throw GeographicErr("JacobiConformal: axes are not in order");

78 if (!(_a > _c))

80 ("JacobiConformal: use alternate constructor for sphere");

81 }

82

83

84

85

86

87

88

89

90

91

92

93

94

95

97 : _a(a), _b(b), _c(c)

98 , _ab2(ab * (_a + _b))

99 , _bc2(bc * (_b + _c))

100 , _ac2(_ab2 + _bc2)

101 , _ex(_ab2 / _ac2 * Math::sq(_c / _b),

102 -(_a - _b) * (_a + _b) / Math::sq(_b),

103 _bc2 / _ac2 * Math::sq(_a / _b), Math::sq(_a / _b))

104 , _ey(_bc2 / _ac2 * Math::sq(_a / _b),

105 +(_b - _c) * (_b + _c) / Math::sq(_b),

106 _ab2 / _ac2 * Math::sq(_c / _b), Math::sq(_c / _b))

107 {

108 using std::isfinite;

109 if (!(isfinite(_a) && _a >= _b && _b >= _c && _c > 0 &&

110 ab >= 0 && bc >= 0))

111 throw GeographicErr("JacobiConformal: axes are not in order");

112 if (!(ab + bc > 0 && isfinite(_ac2)))

113 throw GeographicErr("JacobiConformal: ab + bc must be positive");

114 }

115

116

117

119

120

121

122

123

124

125

127 real somg1 = _b * somg, comg1 = _a * comg; norm(somg1, comg1);

129 * _ex.Pi(somg1, comg1, _ex.Delta(somg1, comg1));

130 }

131

132

133

134

135

136

137

138

140 real somg, comg;

143 }

144

145

146

148

149

150

151

152

153

154

156 real sbet1 = _b * sbet, cbet1 = _c * cbet; norm(sbet1, cbet1);

158 * _ey.Pi(sbet1, cbet1, _ey.Delta(sbet1, cbet1));

159 }

160

161

162

163

164

165

166

167

169 real sbet, cbet;

172 }

173 };

174

175}

176}

177

178#endif

Header for GeographicLib::EllipticFunction class.

Elliptic integrals and functions.

Math::real Delta(real sn, real cn) const

Exception handling for GeographicLib.

Mathematical functions needed by GeographicLib.

static void sincosd(T x, T &sinx, T &cosx)

Jacobi's conformal projection of a triaxial ellipsoid.

Definition JacobiConformal.hpp:45

Math::real x(real omg) const

Definition JacobiConformal.hpp:139

Math::real y(real bet) const

Definition JacobiConformal.hpp:168

Math::real y(real sbet, real cbet) const

Definition JacobiConformal.hpp:155

Math::real y() const

Definition JacobiConformal.hpp:147

Math::real x() const

Definition JacobiConformal.hpp:118

JacobiConformal(real a, real b, real c)

Definition JacobiConformal.hpp:65

Math::real x(real somg, real comg) const

Definition JacobiConformal.hpp:126

JacobiConformal(real a, real b, real c, real ab, real bc)

Definition JacobiConformal.hpp:96

Namespace for GeographicLib.