Coverage for pygeodesy/auxilats/_CX_4.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.2.2, created at 2024-06-10 14:08 -0400

1 

2# -*- coding: utf-8 -*- 

3 

4u'''Coeficients for C{_AUXLATITUDE_ORDER} 4 from I{Karney}'s C++ class U{AuxLatitude 

5<https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1AuxLatitude.html>} 

6trancoded to a double, uniquified Python C{dict[auxout][auxin]}. 

7 

8Copyright (C) Charles Karney (2022-2023) Karney@Alum.MIT.edu> and licensed under the 

9MIT/X11 License. For more information, see <https:#GeographicLib.SourceForge.io>. 

10''' 

11# make sure int/int division yields float quotient 

12from __future__ import division as _; del _ # PYCHOK semicolon 

13 

14from pygeodesy.auxilats.auxily import Aux, _Ufloats 

15from pygeodesy.constants import _0_0, _0_25, _0_5, _1_0, _N_1_0, \ 

16 _1_5, _2_0, _N_2_0, _4_0 

17 

18__all__ = () 

19__version__ = '23.08.19' 

20 

21_f, _u = float, _Ufloats() 

22_coeffs_4 = _u._Coeffs(4, { # GEOGRAPHICLIB_AUXLATITUDE_ORDER == 4 

23 Aux.PHI: { 

24 # C[phi,phi] skipped 

25 Aux.BETA: _u( # C[phi,beta]; even coeffs only 

26 _0_0, _1_0, 

27 _0_0, _0_5, 

28 1 / _f(3), 

29 _0_25,), 

30 Aux.THETA: _u( # C[phi,theta]; even coeffs only 

31 _N_2_0, _2_0, 

32 -_4_0, _2_0, 

33 8 / _f(3), 

34 _4_0,), 

35 Aux.MU: _u( # C[phi,mu]; even coeffs only 

36 -27 / _f(32), _1_5, 

37 -55 / _f(32), 21 / _f(16), 

38 151 / _f(96), 

39 1097 / _f(512),), 

40 Aux.CHI: _u( # C[phi,chi] 

41 116 / _f(45), _N_2_0, -2 / _f(3), _2_0, 

42 -227 / _f(45), -8 / _f(5), 7 / _f(3), 

43 -136 / _f(35), 56 / _f(15), 

44 4279 / _f(630),), 

45 Aux.XI: _u( # C[phi,xi] 

46 -2582 / _f(14175), -16 / _f(35), 4 / _f(45), 4 / _f(3), 

47 -11966 / _f(14175), 152 / _f(945), 46 / _f(45), 

48 3802 / _f(14175), 3044 / _f(2835), 

49 6059 / _f(4725),) 

50 }, 

51 Aux.BETA: { 

52 Aux.PHI: _u( # C[beta,phi]; even coeffs only 

53 _0_0, _N_1_0, 

54 _0_0, _0_5, 

55 -1 / _f(3), 

56 _0_25,), 

57 # C[beta,beta] skipped 

58 Aux.THETA: _u( # C[beta,theta]; even coeffs only 

59 _0_0, _1_0, 

60 _0_0, _0_5, 

61 1 / _f(3), 

62 _0_25,), 

63 Aux.MU: _u( # C[beta,mu]; even coeffs only 

64 -9 / _f(32), _0_5, 

65 -37 / _f(96), 5 / _f(16), 

66 29 / _f(96), 

67 539 / _f(1536),), 

68 Aux.CHI: _u( # C[beta,chi] 

69 38 / _f(45), -1 / _f(3), -2 / _f(3), _1_0, 

70 -7 / _f(9), -14 / _f(15), 5 / _f(6), 

71 -34 / _f(21), 16 / _f(15), 

72 2069 / _f(1260),), 

73 Aux.XI: _u( # C[beta,xi] 

74 -1082 / _f(14175), -46 / _f(315), 4 / _f(45), 1 / _f(3), 

75 -338 / _f(2025), 68 / _f(945), 17 / _f(90), 

76 1102 / _f(14175), 461 / _f(2835), 

77 3161 / _f(18900),) 

78 }, 

79 Aux.THETA: { 

80 Aux.PHI: _u( # C[theta,phi]; even coeffs only 

81 _2_0, _N_2_0, 

82 -_4_0, _2_0, 

83 -8 / _f(3), 

84 _4_0,), 

85 Aux.BETA: _u( # C[theta,beta]; even coeffs only 

86 _0_0, _N_1_0, 

87 _0_0, _0_5, 

88 -1 / _f(3), 

89 _0_25,), 

90 # C[theta,theta] skipped 

91 Aux.MU: _u( # C[theta,mu]; even coeffs only 

92 -23 / _f(32), -1 / _f(2), 

93 -5 / _f(96), 5 / _f(16), 

94 1 / _f(32), 

95 283 / _f(1536),), 

96 Aux.CHI: _u( # C[theta,chi] 

97 4 / _f(9), -2 / _f(3), -2 / _f(3), _0_0, 

98 -23 / _f(45), -4 / _f(15), 1 / _f(3), 

99 -24 / _f(35), 2 / _f(5), 

100 83 / _f(126),), 

101 Aux.XI: _u( # C[thet),a,xi] 

102 -2102 / _f(14175), -158 / _f(315), 4 / _f(45), -2 / _f(3), 

103 934 / _f(14175), -16 / _f(945), 16 / _f(45), 

104 922 / _f(14175), -232 / _f(2835), 

105 719 / _f(4725),) 

106 }, 

107 Aux.MU: { 

108 Aux.PHI: _u( # C[mu,phi]; even coeffs only 

109 9 / _f(16), -3 / _f(2), 

110 -15 / _f(32), 15 / _f(16), 

111 -35 / _f(48), 

112 315 / _f(512),), 

113 Aux.BETA: _u( # C[mu,beta]; even coeffs only 

114 3 / _f(16), -1 / _f(2), 

115 1 / _f(32), -1 / _f(16), 

116 -1 / _f(48), 

117 -5 / _f(512),), 

118 Aux.THETA: _u( # C[mu,theta]; even coeffs only 

119 13 / _f(16), _0_5, 

120 33 / _f(32), -1 / _f(16), 

121 -5 / _f(16), 

122 -261 / _f(512),), 

123 # C[mu,mu] skipped 

124 Aux.CHI: _u( # C[mu,chi] 

125 41 / _f(180), 5 / _f(16), -2 / _f(3), _0_5, 

126 557 / _f(1440), -3 / _f(5), 13 / _f(48), 

127 -103 / _f(140), 61 / _f(240), 

128 49561 / _f(161280),), 

129 Aux.XI: _u( # C[mu,xi] 

130 -1609 / _f(28350), 121 / _f(1680), 4 / _f(45), -1 / _f(6), 

131 16463 / _f(453600), 26 / _f(945), -29 / _f(720), 

132 449 / _f(28350), -1003 / _f(45360), 

133 -40457 / _f(2419200),) 

134 }, 

135 Aux.CHI: { 

136 Aux.PHI: _u( # C[chi,phi] 

137 -82 / _f(45), 4 / _f(3), 2 / _f(3), _N_2_0, 

138 -13 / _f(9), -16 / _f(15), 5 / _f(3), 

139 34 / _f(21), -26 / _f(15), 

140 1237 / _f(630),), 

141 Aux.BETA: _u( # C[chi,beta] 

142 -16 / _f(45), _0_0, 2 / _f(3), _N_1_0, 

143 19 / _f(45), -2 / _f(5), 1 / _f(6), 

144 16 / _f(105), -1 / _f(15), 

145 17 / _f(1260),), 

146 Aux.THETA: _u( # C[chi,theta] 

147 -2 / _f(9), 2 / _f(3), 2 / _f(3), _0_0, 

148 43 / _f(45), 4 / _f(15), -1 / _f(3), 

149 2 / _f(105), -2 / _f(5), 

150 -55 / _f(126),), 

151 Aux.MU: _u( # C[chi,mu] 

152 1 / _f(360), -37 / _f(96), 2 / _f(3), -1 / _f(2), 

153 437 / _f(1440), -1 / _f(15), -1 / _f(48), 

154 37 / _f(840), -17 / _f(480), 

155 -4397 / _f(161280),), 

156 # C[chi,chi] skipped 

157 Aux.XI: _u( # C[chi,xi] 

158 -2312 / _f(14175), -88 / _f(315), 34 / _f(45), -2 / _f(3), 

159 6079 / _f(14175), -184 / _f(945), 1 / _f(45), 

160 772 / _f(14175), -106 / _f(2835), 

161 -167 / _f(9450),) 

162 }, 

163 Aux.XI: { 

164 Aux.PHI: _u( # C[xi,phi] 

165 538 / _f(4725), 88 / _f(315), -4 / _f(45), -4 / _f(3), 

166 -2482 / _f(14175), 8 / _f(105), 34 / _f(45), 

167 -898 / _f(14175), -1532 / _f(2835), 

168 6007 / _f(14175),), 

169 Aux.BETA: _u( # C[xi,beta] 

170 34 / _f(675), 32 / _f(315), -4 / _f(45), -1 / _f(3), 

171 74 / _f(2025), -4 / _f(315), -7 / _f(90), 

172 2 / _f(14175), -83 / _f(2835), 

173 -797 / _f(56700),), 

174 Aux.THETA: _u( # C[xi,theta] 

175 778 / _f(4725), 62 / _f(105), -4 / _f(45), 2 / _f(3), 

176 12338 / _f(14175), -32 / _f(315), 4 / _f(45), 

177 -1618 / _f(14175), -524 / _f(2835), 

178 -5933 / _f(14175),), 

179 Aux.MU: _u( # C[xi,mu] 

180 1297 / _f(18900), -817 / _f(10080), -4 / _f(45), 1 / _f(6), 

181 -29609 / _f(453600), -2 / _f(35), 49 / _f(720), 

182 -2917 / _f(56700), 4463 / _f(90720), 

183 331799 / _f(7257600),), 

184 Aux.CHI: _u( # C[xi,chi] 

185 2458 / _f(4725), 46 / _f(315), -34 / _f(45), 2 / _f(3), 

186 3413 / _f(14175), -256 / _f(315), 19 / _f(45), 

187 -15958 / _f(14175), 248 / _f(567), 

188 16049 / _f(28350),) # PYCHOK exported 

189 # C[xi,xi] skipped 

190 } 

191}) 

192# _ptrs_4 = (0, 0, 6, 12, 18, 28, 38, 44, 44, 50, 56, 66, 

193# 76, 82, 88, 88, 94, 104, 114, 120, 126, 132, 132, 142, 

194# 152, 162, 172, 182, 192, 192, 202, 212, 222, 232, 242, 252, 

195# 252) # PYCHOK exported 

196del _f, _u 

197 

198# **) MIT License 

199# 

200# Copyright (C) 2023-2024 -- mrJean1 at Gmail -- All Rights Reserved. 

201# 

202# Permission is hereby granted, free of charge, to any person obtaining a 

203# copy of this software and associated documentation files (the "Software"), 

204# to deal in the Software without restriction, including without limitation 

205# the rights to use, copy, modify, merge, publish, distribute, sublicense, 

206# and/or sell copies of the Software, and to permit persons to whom the 

207# Software is furnished to do so, subject to the following conditions: 

208# 

209# The above copyright notice and this permission notice shall be included 

210# in all copies or substantial portions of the Software. 

211# 

212# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 

213# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 

214# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 

215# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 

216# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 

217# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 

218# OTHER DEALINGS IN THE SOFTWARE.