16.08.2013 Views

Some Geodetic Applications of Clenshaw Summation

Some Geodetic Applications of Clenshaw Summation

Some Geodetic Applications of Clenshaw Summation

SHOW MORE
SHOW LESS

Transform your PDFs into Flipbooks and boost your revenue!

Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.

C.C. TSCHERNlNG - K. PODER<br />

*<br />

<strong>Some</strong> <strong>Geodetic</strong> <strong>Applications</strong> <strong>of</strong> <strong>Clenshaw</strong><br />

<strong>Summation</strong><br />

ESTRATTO DAL e BOLLETTINO D1 GEODESIA E SCIENZE AFFZNI D<br />

RIVISTA DELL' ISTITUTO GEOGRAFICO MILITARE<br />

ANNO XL1 - N. 4 - OTTOBRE - NOVEMBRE - DICEMBRE 1982


AKNO XL1 - BOLLETTINO D1 GEODESIX E SCIENZE AFFINI - N. 4, L982<br />

<strong>Some</strong> <strong>Geodetic</strong> <strong>Applications</strong> <strong>of</strong> <strong>Clenshaw</strong><br />

<strong>Summation</strong> (*)<br />

C.C. TSCHERNING - I


1. - INTRODUCTION<br />

C.C. TSCHERNING - K. PODER<br />

It is well known, cf. e.g. Davis (1963, Theorem 10.1.1), that real orthonormal<br />

polynomials, P,(%), satisfy a three-term recurrence relationship,<br />

where a,(%) = a, .r + a,', and a,, a,' and bn are real numbers.<br />

Also other polynomials, or functions (real, complex or <strong>of</strong> several variables)<br />

fulfil such relations. Furthermore we frequently find recurrence relations between<br />

the polynomials and their derivatives or integrals.<br />

If P, depends on several variables, x = (x,, ..., xk), then both a, and b, in<br />

eq. (1) may depend (in a not necessarily linear manner) on one or more <strong>of</strong> the va-<br />

riables.<br />

In geodesy polynomials or functions, nhich fulfil recurrence relations are in<br />

frequent use. Most important are ordinary real or complex polynomials, Legendre<br />

polynomials, associated Legendre functions, solid spherical harnlonics, Chebychev<br />

polynomials and the trigonometric polynomials sin (WZ) , cos (m=), where z is real<br />

or complex and m an integer.<br />

We may take advantage <strong>of</strong> recurrence relations like eq. (l), when computing<br />

sums, derivatives 01- integrals <strong>of</strong> sums <strong>of</strong> series. This technique is called <strong>Clenshaw</strong><br />

summation and it is described in section 2. The technique has been extensively<br />

used in physical geodesy for the computation <strong>of</strong> sums or derivatives <strong>of</strong> sums <strong>of</strong><br />

Legendre series ( (Tscherning and Rapp, 1974), (Tscherning, 1976a)) and for the<br />

computation <strong>of</strong> double-sums <strong>of</strong> series <strong>of</strong> surface spherical harmonics (Gerstl, 1978).<br />

In section 3 we describe some new applications, namely for the summation <strong>of</strong><br />

series <strong>of</strong> solid spherical harmonics and for the computation <strong>of</strong> integrals <strong>of</strong> (double)<br />

sums <strong>of</strong> surface spherical harmonics.<br />

<strong>Clenshaw</strong> summation may also be applied in the computation <strong>of</strong> sums <strong>of</strong><br />

(complex) trigonometric polynomials, which frequently are used in geometrical geo-<br />

desy or in the evaluation <strong>of</strong> conformal mapprojections. <strong>Some</strong> <strong>of</strong> these applic a t'<br />

ions<br />

are described in section 4.<br />

The use <strong>of</strong> <strong>Clenshaw</strong> summation may result in considerable computational<br />

savings. However, even more important is the very favorable numerical properties<br />

<strong>of</strong> the method, see <strong>Clenshaw</strong> (1959), Smith (1967), Deuflhard (1976) and Gerstl


SOME GEODETIC APPLICATIOXS OF CLEKSHAW SUMMATION 35 1<br />

(1978). The fact, that the <strong>Clenshaw</strong> summation starts by summing the high order<br />

terms makes it especially well suited for most geodetic applications, because the<br />

higher order terms in general are small compared to the lower order terms.<br />

Notation : i, j, k, n, m will be integers, letters like x, y, p, s will be vectors<br />

with elements (e.g. X,, X,, ..., .zk), D! = aj/#, A, C, D, E will be matrices.<br />

2. - CLENSHAW SUNIMATION<br />

Let now P,(x) = P, be a general polynomial or function <strong>of</strong> one or more real<br />

or complex variables. For a series with real or complex coeficients y,,, we put<br />

where L! is the set <strong>of</strong> integration and<br />

The very simple idea behind <strong>Clenshaw</strong> summation is best illustrated (cf. (Deuflhard,<br />

1975)), if we express the evaluation <strong>of</strong> S on matrix form. Let us here for<br />

the sake <strong>of</strong> simplicity suppose, that for n = m + l we ha* bm+l = 0 in eq.<br />

(l), i.e.<br />

(The following is easily modified, if (5) does not hold). Then with


C.C. TSCHERNING - K. PODER<br />

and from eq. (2), since A has determinant equal to 1 and hence is invertible,<br />

AT is an upper triangular matrix, for which the solution vector (A'r)-ly easily<br />

can be found. If we put sT = (S,, ..., sN), and<br />

then we have with SN+I = SN+Z = 0,<br />

and<br />

S = ~ r n . Pm(x).<br />

We get the first order derivative DiS by differentiating the matrix equation<br />

('7). However for the sake <strong>of</strong> simplicity we will now suppose that a,(%) is linear<br />

in xi and that b, is independent <strong>of</strong> xi, i.e.<br />

(The following is easily modified if this is not true). Then<br />

DiS = yT (Di(A-l) $0 $ A-' Di($o))<br />

YT A-1 (- Di (A) A-' $0 +<br />

Di ($0))<br />

= sT (- Di(A) A-' $0 + Di ($0)) .


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION 353<br />

Because in this case<br />

we have with<br />

and S;+, = S;+, = 0,<br />

and then<br />

1<br />

0 0 o.... 0<br />

l<br />

a,+, 0 0<br />

0' a 2 0 0<br />

It is easily seen, that the recurrence formulae for higher order derivatives,<br />

DDecomes<br />

This equation is slightly more general that eq. (17) <strong>of</strong> Cmith (1964).<br />

b<br />

Let us now suppose, that we for the integrals PI. = /a Pn(x) dx,, have a<br />

recurrence relationship <strong>of</strong> the following form,<br />

where C and E are matrices <strong>of</strong> the same simple form as the matrix A-I, so that


354<br />

and<br />

Then<br />

then<br />

C.C. TSCHERNING - K. PODER<br />

= siT pio - gT (p3 (b) - (a)),<br />

Let us fin all^ regard a series <strong>of</strong> complex polynomials, Pn(z) = PR, $ i . PI,,<br />

where i is the imaginary unit, with coefficients yn -- yf, + i . yh. We must evalu-<br />

ate the real part <strong>of</strong> the sum Re(S) and the imaginary part <strong>of</strong> the sum Iln(S) inde-<br />

pendently,<br />

Let us put a,(z) = a: + i . a;, b, = b: $ i . bg in eq. (1) and S, = S: + i - S;.<br />

Then from eq. (8)


and<br />

SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION 35 5<br />

Re (S) = S; . Re (P,,) - ~ h, . Im (Pm)<br />

Im(S) = S& . Im(P,,) + si . Re(Pm).<br />

3. - CLENSHAW SUMR'IATIOiV IN PHYSICAL GEODESY<br />

3.1. - EVALUATION OF (LOCAL) ISOTROPIC COVARIANCE FUNCTIOXS<br />

A (nearly) standard technique for the representation <strong>of</strong> local isotropic cora-<br />

riance functions uses a closed expression, F(r, Y', +), which is modified by a sum<br />

<strong>of</strong> a finite Legendre series, see (Tscherning Sr Rapp, 1974, section g),<br />

C (P, Q) = F (Y, Y', +) -<br />

P~(COS<br />

l+! ,<br />

where P, Q are points in space, 4 is the spherical distance between the points,<br />

r, r' are the radial distances <strong>of</strong> P, respectively Q from the origin, on are constants<br />

and P, are the Legendre polynomials. With s = R"(Y~') and t = cos +, the sun1<br />

<strong>of</strong> the series can be expressed as<br />

We put p, (t, S) = sl'l P, (t) and we have<br />

i.e. an = - (212 - 1) st,'"r~ and b, = (1% - l)s2/~z. Eq. (8) and (9) can then be used<br />

for the evaluation <strong>of</strong> G(s, t) and eq. (12) and (13) for the evaluation <strong>of</strong> derivatives<br />

with respect to t.<br />

A normal potential <strong>of</strong> the Soniigliana-Pizzetti type (see Heiskanen & Moritz<br />

(1967, section 2-9)) may be expressed as the sum <strong>of</strong> a Legendre series plus the<br />

centrifugal potential. The sum and the derivatives <strong>of</strong> the sum can be calculated


356 C.C. TSCHERNING - K. PODER<br />

as discussed above in 3.1 using s = a/r and t = sin cp, where a is the semimajor<br />

axis <strong>of</strong> the reference ellipsoid and 9 is the geocentric latitude, see Tscherning (1976a).<br />

When computing gravimetric geoid undulations or deflections <strong>of</strong> the vertical<br />

using Stokes or Vening Meinesz integral formulae, the integration is in many cases<br />

only carried out over a spherical cap. In this case, the result may be improved<br />

in a least-squares sense by modifying the kernels by a function,<br />

N<br />

S (t) - CLo (2% + 1)/2 h, P, (t), (25)<br />

where h, are constants, see e.g. Jekeli (1980, eq. (73)). S(t) or its derivatives may<br />

easily be computed using a, = - (212 - l)t/n and b, = (n - l)/%.<br />

The external gravity potential <strong>of</strong> the earth, V, (or its corresponding anomalous<br />

potential, T) may be approximated by the sum <strong>of</strong> a series in solid spherical har-<br />

monics,<br />

G a<br />

V(?, A, Y) = C:=,U_, - %=, pm (sin 9) [COS<br />

( ; (mh) C," + sin(mA) S,"], (26)<br />

where A is the longitude, GJf the product <strong>of</strong> the gravitational constant and the<br />

mass ot the earth, P," the associated Legendre functions and C,", S," the coeffi-<br />

cients <strong>of</strong> the series. The conlputation <strong>of</strong> V ('2, A, r = a), i.e. for surface spherical<br />

harmonics, has been discussed by Gerstl (1978). We will here describe how Clen-<br />

shaw summation may be applied for solid spherical harmonic series and for the<br />

derivatives <strong>of</strong> the series. Note, that similar results easily may be obtained for<br />

internal solid spherical harmonics.<br />

It may <strong>of</strong> numerical reasons be <strong>of</strong> advantage to work with fully normalized<br />

or quasi-normalized associated Legendre functions. The latter will be denoted P,",<br />

with corresponding coefficients C:, S;, and we will here present results for these<br />

functions also. We now put q = air, t = sin cp, %L = cos cp and W = GM/r.


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

We first rearrange the double sum eq. (26),<br />

W<br />

V(+, h, r) =<br />

K XL, P;(t) [cos (mh) Cm + sin (ml) S:] qll ,<br />

Y<br />

W<br />

Eq. (27) should be used when evaluating V in points with varying latitude,<br />

while eq. (28) should be used if is evaluated in many points with identical lati-<br />

tude and Y-value, because the sums<br />

then only need to be evaluated one time. (This idea is e.g. used in Rizos (1979))<br />

The associated Legendre functions fulfil the well known recurrence relations<br />

(2n - 1) 12 + m - l<br />

it-m n-m<br />

F;-- t $ P;-:_,<br />

Correspondingly we have p; = P: . qn , p, = P: . qm ,<br />

= 0, p:-, = 0 ,<br />

The quasi-normalized Legendre functions are related to the un-normalized by<br />

P; = p; [ :-m)! l', pm = p; qn<br />

n + m)!


hence<br />

C.C. TSCHERNING - K. PODER<br />

The values <strong>of</strong> a, and b, derived from these equations must then be used, when<br />

series with quasi-normalized coefficients are used. The reader may easily derive<br />

the corresponding equations for fully-normalized coefficients. For un-normalized<br />

coefficients I/:, may be evaluated using eq. (g), (9) with<br />

and<br />

The sum<br />

2n - 1 + m-1 q2,a;= cm .-2<br />

an = - tq, bn = *, urn - S:,<br />

n-m n - ~ 12<br />

V = C:=, W (V; cos (mh) + T'k sin (11th)) = C:=o W (S; cos (mh) + S; sin (mi,)) pm,<br />

can then be evaluated again using eq. (g), (9) with<br />

a, = - (21n - 1) z~q, b, = 0, v, = S; cos (W.) f S: sin (mh). (35)<br />

(<strong>Clenshaw</strong> summation degenerates here to the well-known Horner's schema for the<br />

computation <strong>of</strong> the value <strong>of</strong> a usual polynomial).<br />

However, when evaluating V, we inay take advantage <strong>of</strong> the recurrence rela-<br />

tions<br />

cos (mh) = 2 cos h . cos ((m - 1)k) - cos ((m - 2)h) (36)<br />

sin (mh) = 2 cos i, . sin ((m - 1)h) - sin ((m - 2)L) , (37)


ecause<br />

In this case<br />

SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

pm cos (nzh) = (2wz - 1) .uq . $,, , . 2 cos A . cos ((m - 1)A)<br />

- (2m - 1) (2m - 3) ~t v2 $mpa . COS ((m - 2)A)<br />

$ sin (mh) = (2m - 1) uq . 9,-, . 2 cos h . sin ((m - 1)A)<br />

- (2% - 1) (2m - 3) uZ q2 $,M . sin ((m - 2)h) .<br />

a; = - (2% - 1) uq 2 cos h, b; = (2% - I) (2m - 3) uv2,<br />

and v; is given by eq. (33).<br />

However, it is in general more convenient to use eq. (36) and (37) for the<br />

direct computation <strong>of</strong> cos (m),) and sin (mh) and then eq. (35).<br />

Derivatives with respect to v are most easily computed using for<br />

The derivatives with respect to h are found by computing 1'; as in eq. (33),<br />

(34) and the using<br />

a - = C;=, m (V: COS (m),) - V; sin (7%~)) Q, , (42)<br />

The first and second derivative <strong>of</strong> V:, with respect to t and the second order deri-<br />

vative <strong>of</strong> Tf:, with respect to t and v may be computed using eq. (33) combined<br />

with eq. (12) c?i (13) iY- (40). The mixed derivative with respect to A and t may<br />

be computecl using eq. (12), (13) & (42), and the mixed derivative with respect


360 C.C. TSCHERXING - I 90.<br />

3.5. - COMPUTATION OF MEAN VALUES OF GEOID UNDULATIONS, GRAVITY ANOMA-<br />

LIES OR DEFLECTIONS OF THE VERTICAL<br />

Let the anomalous gravity potential, T, be given by a series expansion like<br />

eq. (26). However, the summation will start from TZ = 2. \Ye will here consider the<br />

computation <strong>of</strong> mean values over blocks where Q. q


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION 361<br />

with PI:-, = 0, PI: = to -t,, t, 7= sin (cp,), to = sin (qo), 11, = COS ((p,), U,, = COS ((P,,).<br />

Hence, from eq. (14) we get<br />

(n. +<br />

- 1) (n. - 2)<br />

c: = 0, a: = - (fi + l) (72 - ,m)<br />

which can be used for the first sum with respect to n. For the second sum, with<br />

respect to 772 we need<br />

e,, = 0,fn, = t /(~ + l), h - 0 . (474<br />

Hence, using eq. (16) - (18) tmo times, the integral <strong>of</strong> the series is computed.<br />

Mean geoid undulations are obtained using Bruns formula, i.e. the anomalous po-<br />

tential divided by the mean gravity. Mean free-air gravity anomalies are com-<br />

puted using coefficients multiplied by the factor - (7% - 1)lR. Mean values <strong>of</strong> de-<br />

flections <strong>of</strong> the vertical are computed using the fact, that they are (in linear ap-<br />

proximation) equal to the derivatives <strong>of</strong> T with respect to W and A, (multiplied<br />

by l/(ry) and l/(ryzs), respectively, where y is the reference gravity).<br />

4. - CLENSHAIIJ SURIMATION IN GEOMETRICAL GEODESY AND MAP-<br />

PROJECTIONS<br />

The fundamental work by Konig and Weise (1950) still forms the basis for<br />

the use <strong>of</strong> <strong>Clenshaw</strong> summation in connection with the ellipsoid and its mapping.<br />

This work, here referred to as KW, provides a wealth <strong>of</strong> series expansions, mo-<br />

stly in a standard form based upon the quantity (a + 11)/2, the half sum <strong>of</strong> the<br />

two semiaxes <strong>of</strong> the ellipsoid and n. = (a - b)/(a + h), the (( third flattening 1). It<br />

is therefore very easy to compute the actual coefficients at crun time)) from the<br />

actual ellipsoid used (instead <strong>of</strong> inserting numerical values in a programme or<br />

subroutine).<br />

'


362 C.C. TSCHERNING - K. PODER<br />

A single problem not handled by KW is the computing <strong>of</strong> the Gaussian curvature<br />

<strong>of</strong> the ellipsoid as a function <strong>of</strong> Gauss-Kriiger (UTM) northings instead <strong>of</strong><br />

the latitude (which not necessarily is available at run time).<br />

It is a remarkable fact, that the curvature needed in arc-to-chord corrections<br />

or scale corrections (see e.g. Bomford (1971, section 2.66) on transverse mercator<br />

projections), should not be computed at the latitude <strong>of</strong> the point, but at the latitude<br />

giving a meridian arc le~gth (from equator) equal to the northing on an ellipsoid<br />

scaled by the central scale <strong>of</strong> the projection - for UTM 0.9996.<br />

Therefore, one can find a series giving the Gaussian curvature <strong>of</strong> the form<br />

where T, are the Chebychef polynomials, 19 is a parametric northing varying from<br />

- 1 to + 1, when the actual northing varies e.g. from equator to the pole. The<br />

coefficients may be found at run time by numerical Chebychef analysis. As<br />

<strong>Clenshaw</strong> summation is applicable as discussecl in section 2.<br />

Kl4' gives all usual curvature radii and curvatures as trigonometric series in<br />

cosine <strong>of</strong> multiples <strong>of</strong> the double latitude. These formulae may be (and are) used<br />

if one wants to take advantage <strong>of</strong> the fact that the (( ellipsoidal )) terms are 2 -3<br />

magnitudes smaller than the main ((( spherical a) terms, but in many cases closed<br />

formulae based upon V = sq~t (1 + (e')Qos2B), where B is the geodetic latitude,<br />

are preferable.<br />

The length <strong>of</strong> the meridian arc as a function <strong>of</strong> latitude and its inverse function<br />

may be evaluated with 12 - 14 &git computing precision from series <strong>of</strong> the<br />

form<br />

G = B + C:=, p, sin (2kB) , (48)<br />

B = G + C:=, sin (2kG') (49)<br />

given in KWr page 51 and 53, where G is the meridian arc length in units <strong>of</strong> the<br />

meridian quadrant.<br />

These formulae extended to complex variables are the basis for a remarkably<br />

good set <strong>of</strong> formulae for transforming between geographical coordinates and trans-<br />

versal mercator coordmates as described in the next subsection.


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION 363<br />

The isometric latitude (defined by dq = dB/cos B for the sphere) and the lon-<br />

gitude are frequently used as the basis for map-projections because <strong>of</strong> its simple<br />

form, but problems arize the nearer the one approaches the poles. Obviously a kind<br />

<strong>of</strong> isometric longitude cos B dL might cure the problem. Considering the fact, that<br />

eq. (48) and (49) have no singularity at the poles and taking G and B as complex<br />

variables,<br />

G=N+~E and BZBr+iBi, (50)<br />

then we have for a sphere where 0, that B, = &' and B, = E . N and E<br />

become northing and easting. AT and E, when they are scaled by the meridian<br />

q~~acirant length.<br />

The formulae given in KPT7 for transformations between (ellipsoidal) geographical<br />

coordmates and transverse mercator coordinates are based upon the generalization<br />

<strong>of</strong> eq. (48) and (19) to complex variables, thus avoiding the singularity<br />

<strong>of</strong> the isometric latitude at the poles. IThen using summation to the fourth order,<br />

1 mm precision is obtained up to distances <strong>of</strong> 4000 km from the central meridian,<br />

and 1 - 2 mm from the pole. The undefined longitude at the pole is <strong>of</strong> course unavoidable.<br />

A parametric sphere (not to be confused ~ ~ith the osculating sphere - Schmiegungskugel<br />

in the Gauss-Schreiber approach) is used to ease the problems with<br />

the imaginary latitude on the ellipsoid. The full set <strong>of</strong> transformations both ways<br />

are two pairs each <strong>of</strong> a real trigonometric series and a complex one. Appendix<br />

2 lists a procedure (capable <strong>of</strong> transforming both ways) for this purpose and the<br />

initialization procedure for the constants <strong>of</strong> the transformation.<br />

5. - CONCLUSIONS<br />

We have here pointed out a number <strong>of</strong> applications <strong>of</strong> <strong>Clenshaw</strong> summation In<br />

geodesy. Its use gives many numerical as well as computational savings.<br />

However, other applications are possible, because the only condition is the<br />

existence <strong>of</strong> an equation like (1). Note, that such an equation may involve more<br />

terms, which only will make the algorithm as given by eq. (8) and (9) sljghtly<br />

more complicated.<br />

Acknoudedgement : It was Torben Krarup, who many years ago pointed out<br />

to us the many advantages <strong>of</strong> <strong>Clenshaw</strong> summation.


C.C. TSCHERNING - K. PODER<br />

REFERENCES<br />

G. BOMPORD, Geodesy. Third Ed., Oxford at the Clarendon Press, 1971.<br />

C.W. CLENSHAW, Lq note on the summatio~ <strong>of</strong> Chebyshev sevies. MThC. Vol. 9, pp. 118-120,<br />

1955.<br />

P. J. DAVIS, Inte@olation and Afifivoximation. Blaisdell, Waltham, Mass., 1963.<br />

P. DEUFLHARD, On Algovithins f o ~ the sufnmalion <strong>of</strong> Certain Seecial Fz~nctions. Computing,<br />

Vol. 17, pp. 37-48, 1976.<br />

M. GERSTL, Ve7,gleich von A-llgo~&nen 311, Szinznzation v077 Kz~gelfliichenfunkiione~z. Ver<strong>of</strong>f. d.<br />

Bayer. Komm. f.d. Int. Erdemssung, Heft ATr. 38, ~Miinchen, 1978.<br />

M. GERSTL, 0 7% the veczwsiue concputatiow <strong>of</strong> the integvals <strong>of</strong> the associafed Legendve f~lnctions.<br />

Manuscripta Geodaetica, Vol. 5, pp. 181-199, 1980.<br />

1V.A. HEISKANEX and H. XIo~r.rz, Physical Geodesy. Freemann, St. Francisco, 1967.<br />

C. JEKELI, Reducing fhe ewov <strong>of</strong> geoid undulation concpz~tafio.izs by modifying Stokes' function.<br />

Rep. Dep. Goedetic Science no. 301, Columbus, 1980.<br />

R. KONIG und K.H. \\'EISE, Mathematzsche GYzt?idlagen dev Hiiheveu Geodiisie und Kavfogvafihze.<br />

Erster Band. Sprmgel--Verlag, 1951.<br />

C. R~zos, An e-fficieilt co~z@utev iechvziqne for the evaluatiolz <strong>of</strong> ge<strong>of</strong>iotential fvoin sphevical havmonics.<br />

Austr. J. Geod. Surv., So. 31, pp. 161-169, 1979.<br />

F. J. SMITH, A-ln algoritlm -fov sunzming orti~ogo~zal polynomial se14es and theiv derivalives with<br />

applicafions to cuwe;iitting and intei/polalion. Math. Comp., Vol. 21, pp. 629-638, 1967.<br />

C.C. TSCHERNING, Con~fiutation <strong>of</strong> seconrl-ovdev devivati~~es <strong>of</strong> the novmal poteiltial based 071 the<br />

repvesentatioiz a Legend9.e se7 les. Manuscripta Geodnetica, Vol. 1 pp. 71-92, 1976a.<br />

C.C. TSCHERNING, On the Chain-Rde Method fov Covnpztting P<strong>of</strong>entinl Llevivatives. Nanuscripta<br />

Geodaetica, Vol. 1, pp. 125-141, 1976b.<br />

C.C. TSCHERNIXG and R.H. RAPP, Closed covaviance expvessions fov v~avity anovn,alies, geoid<br />

und~~dations, and deflections 0-f fhe vevtical implied by anomaly degvee va~iai~ce nzodels. Rep.<br />

Dep. <strong>Geodetic</strong> Science no. 208, Columbus, 1974.


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

appendix-l * page 1 17 08 81, 9.58;<br />

external real procedure apotdr(por C/ su, NI opderr G);<br />

value HI order; integer 14, order; array vo, G, C, sui<br />

comment 61 reg-no. 81013, programmed by C.r.Tscherningt july 1981.<br />

References:<br />

(1) Tscherniny, C.C.: On the Chain-rule method for Computing PO-<br />

- tential Derivdtives. 'Ianuscripte Geodaeticar Vol.lt<br />

- pp. 125-141, 1916.<br />

(2) This paper.<br />

The procedure computes the value and up to the second order derivatives<br />

<strong>of</strong> the potential <strong>of</strong> the Earth ( W ) or <strong>of</strong> i t s CorresPondiny<br />

anomalous ~~otentia! (T).<br />

The potential i s represented uy a series i n solid spherical her-<br />

monicst with un-nornalised or ouasl-normalized coefficfents.<br />

The ci~ain-rule i s used combined with the <strong>Clenshaw</strong> algorithm.<br />

The array C must hold the coefficients, C(O, U) L 1.0 for W and<br />

0.0 for T, C(1) = C(1, C(2) = C(?, l), C(3) = S(IP 1) etc. up<br />

to C((N+1)**2-l) = S(N* NI.<br />

Parameters:<br />

(a) CalL values:<br />

N The aDsolute va111e <strong>of</strong> 4 i s equal to the maximal desree and<br />

- order <strong>of</strong> the series. N negative indicatesr that the coeffi-<br />

- cients are cjiiasinori~~alized.<br />

order The maximal order <strong>of</strong> the derivatives (< 3 p.t.).<br />

PO Array holdirlg position information. Rounds (1:6).<br />

-<br />

oo(l) = n, the distdnce from the Z (rotation) axis,<br />

oo(2; = rn the distance from rhe oriqinr<br />

po(5)r po(4) cos and sin <strong>of</strong> the geocentric poLar angler<br />

P PO(;), ~o(6) sin and cos <strong>of</strong> the longitude.<br />

C Must oe declarei with hounds I-3: (N+1)**2-11 when the coef-<br />

- f l cients are un-norn~alised znd with bounds (-3: (N+3)**2-2)<br />

uiien the coeffCcients are qussf-normalized. C(1) to<br />

- C((li+l)**2-1) contains the coeiftciente sod we must have<br />

- C(-31 2 GM (the uroduct <strong>of</strong> the slass and the aravitatlonal<br />

constant,<br />

-<br />

C(-2) = a, the semi-major axis <strong>of</strong> the used ref. ellipsoidr<br />

C(-l) = the angular velocity (= 0, when dealing with T).<br />

C((N+I>**2+k) = sqrtck), k < 2*(N+1), when N < 0.<br />

(b) Qeturn values:<br />

6<br />

-<br />

-<br />

The result i s stored i n G as follows:<br />

G(Ot 1) = dGldxr G(U, 2) = dwldyr G(9r 3) = dwldzr<br />

G(?, 1) = dd14lddxr G(lr 2) = G(2, l! = dduldxdyr<br />

G(1, 3) = G(3, 1) = ddwldxdz, G(2r 2) ddWlddy~<br />

G(2, 3) = G(3, 2) = ddW1dydz and G(3, 3) = ddilddz.<br />

'where W may he interchenaed witn T and the variables<br />

.<br />

X, y, z are tile Cartesian coordinates i n a LocaL (fixed)<br />

fra~ne with origin i n the poiit <strong>of</strong> cvaluationt x oosi-<br />

E<br />

-<br />

tivet North, y positive East and z positive i n the dlrection<br />

<strong>of</strong> the radius- vector^ (cf. ref.(?)! es. (4) and (5)ls<br />

The values <strong>of</strong> LJ or T rill be returned in gnotdr.


C.C. TSCHERNING - K. PODER<br />

comment appendi x-l * oage 2 17 08 81r 9.58;<br />

cornmerit cont i~iued:<br />

(C) Call and return values:<br />

sm<br />

-<br />

- 8rray <strong>of</strong> dimension (fl;K*(N+I)-l), where K = case order <strong>of</strong><br />

(2) 6, IU). Here are stored the partial sumsr cf. ref.(2)r eq.<br />

( 2 9 ) ~ <strong>of</strong> P(n, m)*(a/r)**(n+l-m)/p(m, m)*(C(nr m) or Stnr m)<br />

from rl=m to n=N, and the derivatives <strong>of</strong> tnese sums. This makes<br />

it unnecessary to recalculate these qdsntitier, i f the procedure<br />

is cdlled sut~sequently with the same value <strong>of</strong> t ana r,<br />

ar~d tne same oroer;<br />

comment ue use nohr that own booleans are initialised with the<br />

value false, first time tue ~rocedure is called in a proqrarn:<br />

if -r first then<br />

begin<br />

first:= true; oldt:= ?.Q;<br />

j:= abs(bJ): : I 1 i 2 2 i 3 : ~ 3*i; 1 4 : ~ 4*i;<br />

i5:= hi; ib:=<br />

end;<br />

6*i; i7:- 7*i; i8:x 8*i; i9:a 9*i:<br />

new:= abs(o1dr-r) > '-3 or abscoldt-t) > '-9 or oldord order<br />

or pole;<br />

i f ne* then<br />

beq i n<br />

oidr:= r; oldt:= t; oLdord:= order;<br />

end;<br />

quasi:= PI 0; i f qUdsi then N:= -11; nax:= (M+<br />

S : - 2 / r ; sZ:= S*S; cmL(O):= 1.0; snil(D):=<br />

derivl:: order > U; deriv2:= order > 1;<br />

comment sml(m), cni(rn) dre the sln and cos <strong>of</strong> m*<br />

for m:= 1 steu 1 dntil ii do<br />

begin<br />

snilim) := smL(n1 )*cltcml(ml )*S[;<br />

cml(m):= cml(rnl)*cl-s~nl(ml)*si; ml:= m;<br />

end;<br />

1 ) **2<br />

u.0;<br />

(long<br />

NZ?:= 2*N+1; vm:= vxm:= vym:= vzm:= 0.3: sanrnl:= sqnnml:= 1.0;<br />

i f deriv2 then vxxm:= vyym:= vzzm:' vxva:= vxzrn:. vyzrn:= 0.0:<br />

km:= max; max:= i f quasi tnen Ntrnax else N;<br />

maxZ:= max+ri+l;


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

comment apoendix-l * oaqe 3 17 Oa 81, 9.58;<br />

comment we now use the <strong>Clenshaw</strong> algorithm, cf. ref.(2)r eq.(8<br />

- (13)r modified in an obvious way fqlloring ref.(l);<br />

for m:= N step -1 untii O do<br />

begin<br />

k:= km:= k~-(if T=O then 1 else 2); n2l!= N21;<br />

vs:= VC:= vsl:= vcl:= vxs1:= vxcl:= vzs:= vzc:= vzsl:= vzcl:=<br />

vxc:= vxs:= 0.0;<br />

if deriv2 then vxxc:= vxxs:= vxxcl:= vxxs1:s vzzc:=<br />

vzzs:= vzzcl:= vzzsI:= vxzc:= vxzs:= vxzcl:= vxzsl:= 0.0:<br />

cm:= cml(m); sm:= smlh);<br />

nnl := max-mt2; nl != lit?; npml := maxtmt2;<br />

i f deriv7 tnen sn2:= m*m;<br />

if new then<br />

for n:= N steu -1 until m do<br />

beain<br />

comment note that if -,quasi then nm2:rn-m+2r nml:=n-m+lr<br />

npml:= rltnltlr else the sametmax. Furthermore sqnpm2:=<br />

sqrt(ntm+Z)t etc.. Also note, that the values at the end <strong>of</strong> the<br />

LOOP are dsed later on (npml:= 2*m+lr sqnpml:= sart(2*mtl)r<br />

for examole):<br />

nm2:= nml; nml:= n,nl-l; npml := nnml-1;<br />

comment cf. ref.(2)t eo.(40);<br />

i f quasi then<br />

besi n<br />

comment cf. ref.(Z), eq.(30b);<br />

sqnm7:= sqnml; sqnml:= C(nrn1);<br />

sqnpmZ:= sqn~rnl; sqnpml:= C(npm1);<br />

sql := sqnn~l *sqnprnl; a1 := s*nZl /sql;<br />

hd:= -sl*sql/ (sqn1112*sqnpm2);<br />

end else<br />

heqin<br />

comment c<br />

a1 := s*n2<br />

e 11 d ;<br />

comment cf. ref .(2),<br />

vL:= vc1; vcl:= VC;<br />

v2:= vs?; vsl:: vs;<br />

if derivl tlien<br />

heqin<br />

ckz:= ck*nl; cklz<br />

comm~nt cf. ref.(Z<br />

v2:= vxc1; vxcl:=<br />

v2:= vxs1; vxs1:=<br />

v2:= vzc1; vzcl:=<br />

v2:= vzs1; vzs1:=<br />

ea. (53);<br />

= C k t k:= k-n21:<br />

, eq.(lOj;<br />

vxc; vxc:= vxcl*alttvcl*alu+v2*b2;<br />

vxs; vxs:= vxsl*al ttvsl*alu+v2*b2;<br />

vzc; vzc:= vzcl*alttv2*b2-ckz;<br />

vzs; vzs:= vzsl*alt+vZ*bZ-cklz; nl:= n;


368 C.C. TSCHERNING - K. PODER<br />

comment auoendi X-l * page 4 17 08 87,<br />

i f deriv2 theri<br />

begin n2:= nt2;<br />

comment cf. ref.(2), eq.(41);<br />

v2:= vzzc1; vzscl:= vzzc;<br />

vzzc:= vzzcl*a7t+v2*b2+n2*ckz;<br />

vL:= vzrsl; YZZS~:= VZZS;<br />

vzzs:= vzzsl*alt+v2*b2tn2*cklz:<br />

comment cf. ref.(Z), eq.(12). The second order deriva-<br />

tive with respect to latitude;<br />

v2:= vxxcq; vxxc1:= vxxc;<br />

vxxc:= alt*(vxxcl-vcl)+2*alu*vxcltv2*b2;<br />

v2:= vxxs1; vxxsl:= vxxs;<br />

vxxs:= alt*(vxxsl-vsl)+2*alu*vxsl+v~*b2;<br />

erid;<br />

eornment cf. ref.(2), ea.(ln) end eq.(iO)r the derivative<br />

with respect to r and the latitude;<br />

v2:= vxrcl; vxzcl:= vxze;<br />

vxzc:= ~xzcl*al t+vzcl*alu+v2*bZ;<br />

v?:= vxrsl: vxzsl:~ vxzs;<br />

vxzs:= vxzsl*alt+vzsl*alu+v~*b2;<br />

end second order deriv.;<br />

end derivl; .<br />

end;<br />

If new then<br />

hegin<br />

su(rn);= VC; su(m+il):= vs:<br />

i f dcrivl then<br />

begin<br />

su(mti2):- vxc: su(m+i3):= vxs;<br />

su(mti4):= vzc; su(m+IS):= vzs;<br />

i f deriv2 then<br />

begin<br />

su(lnti6)::<br />

su(niti8):end;<br />

end;<br />

end else<br />

beqi n<br />

vzzc;<br />

vxzc;<br />

su(rnti7):;: vzzs;<br />

su(mti9) := vxzs;<br />

VC:= su(m); VS:= su(rnti1);<br />

if quasi theri<br />

begin<br />

sqnpml:=<br />

erid;<br />

C(mak2): sqnDrn2:= C(mex2+1);<br />

npml := nlax2; mak2:: max2-2;<br />

i f derivl then<br />

beq i n<br />

vxc:= su(n1ti2); vxs:= su(mti3);<br />

vzc:= su(mti4); vzs:= su(mti5);<br />

i f d ~ r i v ? then<br />

beqin<br />

vrzc:= su(mtl6); vzzs:= su(mti7);<br />

vxzc:=<br />

end;<br />

end;<br />

end;<br />

su(mti.5); vxzs:= su(rnti9);


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

appendix-2 * page 1 17 OU B<br />

References for all procedl~res are:<br />

(1) Pouer, Kwu anJ Frede NadSen: Status <strong>of</strong> the neu adjustment<br />

in Gree~land an3 tlle adjustment system <strong>of</strong> the Danish <strong>Geodetic</strong><br />

Institute. Proceedings 2'Int. Sy:ncl. on Probl. Rel. Redefinition<br />

<strong>of</strong> North dmericdn <strong>Geodetic</strong> ldetworks,<br />

(2) This od~er.<br />

PD. 9-19/ 1978.<br />

(3) binsen Hansen, Mans (Ed.): ALGOL h. Users Menuall RCSL NO:<br />

31-D522, .ed, 197r.<br />

Fielu variahles dre used i n the brocedures. They are described<br />

in ref.(3), sectiorl 5.7. I n short# they act as pointers on<br />

elerents <strong>of</strong> an array, dhich then may he treated as booleanst<br />

inte~ers, lol>a (inteyers) reals or the first ekements <strong>of</strong> en array.<br />

.................................<br />

external lona procedure U-t-q<br />

- hi, E, Lit L, sat direct);<br />

value<br />

array sa;<br />

i geo hhen direct is true and the reverse otherwise.<br />

An alarm is produced when the check by the inverse transforrna-<br />

tion exceeds the toterance <strong>of</strong> 1.2 mm or an other vakue set by<br />

the user in sa(19) for utm->qeo or sa(2U) for aeo->utm. The<br />

alarm action uebends on the vdlue <strong>of</strong> tr-stetl~st a syetem verlable.<br />

tr-status >= 0 -> alarm exit, vrosrav termination<br />

tr-status, leftmost bit=l -> tr-status := tr-status + 1<br />

tr-status, 2 Leftm. bit=l -> report on diff. on cur r. outp.<br />

and tr-status := tr-status + 1<br />

The value <strong>of</strong> the procedure is the transformed tJ or<br />

in jeotype units, (see ref.(l)t p.15),<br />

L, t (call) lona<br />

The utm- or geoyranhical coordinetes input for transformation<br />

i n qeoty~e bnits.<br />

letltude<br />

At L (return) Lons<br />

The geoyraphical or utv-coordinates output from the procedure<br />

as transformed and checked coordinat~s in aeotvpe unlts.<br />

s a (call) arrey<br />

Transformation cor~stai~ts for direct and inverse transf.<br />

See fields in sa or set-utm-const for a descriatlon<br />

direct (cali) oooleen<br />

direct = t r u ~ => transformation utm, itn~, sb -> geogr.<br />

direct = false => transformation geogr -> utm, itm,<br />

external constarlts and procedures:<br />

c ten-sir?, clon-csin, t r -status:


C.C,. TSCHERNING - K. I'ODER<br />

comment appendix-2 *page2 170881,12.20;<br />

heqin<br />

Inteqer ir sr h;<br />

Long Rjr Lgr M-check, ~,checFi N-dlfr E-dif,<br />

- E-dcosr tol;<br />

real. Nor Ep, Rg-r, Lg-rt cos-BN, dN, dE:<br />

lony field 4-nr L@, E@, tol-f:<br />

array field hg-fr au-f. uta-f, ytu-f:<br />

hoolean utmr tod, neg-utm;<br />

ho6lean field utm-f;<br />

real urocedure arc-tan-h (X);<br />

value X; real X:<br />

arc-tanh := i f abs X < 0.95 then<br />

- (ln((1 t x)/(l - x?)lL.O?<br />

- else '300;<br />

comment fields i n sat see set-utm-const for details;<br />

Q-n<br />

E 0<br />

L 0<br />

b g - f<br />

qb-f<br />

atu-f<br />

utg-f<br />

to!-f<br />

-<br />

utm-f<br />

: =<br />

:= U-1)<br />

:= E0<br />

:= L0<br />

. -<br />

.- bq-f<br />

:= gb-f<br />

:= ytu-f<br />

:= uty-f<br />

t ( i f<br />

:= utg-f<br />

ii rect<br />

+ 28;<br />

comment transiormation seuuence;<br />

i := if direct then 1 else 3;<br />

h :c 4 - j; S := - i;<br />

comment check-va lues:<br />

utm := sa-utm-f;<br />

N-check := 14; €-check := E;<br />

tol := sa.tol-f;<br />

cohnNet\t transformation cases;<br />

<br />

<br />

s~h. NI E;<br />

Np := Np + clen-csin(sa.utg-f, 4, ?*Npr ~ * E D , dN, dk);<br />

Fp :c Fp + LIE;<br />

Comment sph. N, E = compl. soh. lat -> soh latr lna;<br />

cos-B14 := cos(Np?;<br />

Lg-r := arqtcos-RN, 91nh(Ep));<br />

R := ara(cos-B!dr sin(Npl*cos (Lg-r) 1;<br />

comn,ent sph. lat, Lng -> ell. lat, lng;<br />

By-r := Ry-r t clen-sin(sa.gb-fr 4, 2*Rg-r);<br />

€g := Ry-rlrg;<br />

Lg := Lg-rlrg; L j := Lg + sa.LO;<br />

end case 1;


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

commer~t aunendi X-2 * oaqe 3 17 98 81) 12.ZU;<br />

comment case 2, trarlsf results:<br />

beqin<br />

U-t-q := 9 := 14 := By;<br />

- L := L := 1.g;<br />

end case 2:<br />

comment case 3, qeo -> utm) itm;<br />

beoin<br />

c* NE3 Nu NR: a,L refers to northinq and casting,<br />

- N,E refers to latitudr and longitude*><br />

comment ell. [at) lng -> sph. tat, lng;<br />

neq-utm := I4 < O and utm;<br />

Rg-r := N*rq;<br />

Rg-r := Og-r + clen-sin(sa.bg-f, 4, Z*Bg-r);<br />

Ly-r := (E - sa.LO)*rg;<br />

comment sph. lat, Lng -> compl. sph. tat sph NI E;<br />

comment sph. normalized NI E -> ell. NJ E;<br />

Nv := Np + clen_csi~~(sa.qtu-f, 4, 2*Npr<br />

Ep := FP + dE;<br />

Rg := sa.U-ir*Nu; <br />

:= sa.U-n*Eu + sa.E0; <br />

:7 neg-utm then<br />

pg := + 20 ouo non ooo ouo;<br />

7*Epr d ~ dE); u<br />

end case 3;<br />

end transf cases;<br />

comment inlrev-dif for check;<br />

N-dif := Rg - N-check:<br />

E-di f :=<br />

E-dcos := Ly - t-check;<br />

I f -I direct then E- COS := E-dcoS*cos(rg*N-check)i<br />

-<br />

comment error actions;<br />

if abs N-dif > to1 or abs E-dcos > to1 then<br />

begin<br />

comment output <strong>of</strong> N-check, E-check, N-dif, E-dif<br />

and the error-exit not shown here;<br />

tr-status := tr-status + 1;<br />

end error actions;<br />

end U-t-g;<br />

end;


C.C. TSCHERNING - K. PODER<br />

external real procedure clen-csin<br />

(a, a, arg-r, arq-it R, I):<br />

value q, ary-r, arg-4;<br />

array a; inteaer g; real ary-rt arg-i, R, I;<br />

comment G1 r~g-no. YID14t pro~rammed by K.Poderr 1978.<br />

c ten-csin (call and return) real urocedure<br />

Comput~s the sun, <strong>of</strong> a series a(i)*sin(i*ara-r * i*i*arQ-l)<br />

(where 1 i s the in~~giriary unit) by <strong>Clenshaw</strong> summation<br />

from g down to 1. The coefficients are here real and<br />

the argument <strong>of</strong> sin i s complex. The real pert <strong>of</strong> the<br />

sum i s the value <strong>of</strong> the procedure.<br />

The procedure finds i n complex arithmetic an array h<br />

so that h(i) := a(?) + 2*cos(arg-r+j*ary,i)*h(i+?) - h(i+2)<br />

with li(y+l) = h(qt2) = U, see ref.(2), eq.(19) - (23).<br />

Then l(l)*sin(arq-r+j*arq-i) becomes the sum <strong>of</strong> the series.<br />

a (call) array<br />

The cuefficinent <strong>of</strong> the series to be summed deelerea<br />

as a(l:g) at least.<br />

Q (value call) integer<br />

The number <strong>of</strong> coefficients i n the series.<br />

arg-r, arg-i (vdlue call) real<br />

The real anu imaqinary vart <strong>of</strong> the argument <strong>of</strong> sine i n<br />

R, I (return) real<br />

The real and imdqinar) part <strong>of</strong> the sum;<br />

beq i n<br />

real r, it hr, hrl, hr2, hir hilt hi2r<br />

- sin-ary-r, cos-arq-rt sinh-ara-i, cosh-erg-i;<br />

integer t:<br />

<br />

sin-arq-r := sin(arq-r); cos-arg-r := cos(arg-r);<br />

sinh-arg-i<br />

r<br />

:= sinh(ary-i); cosh-arg-i<br />

. = 2*cos,drj,r*cosh-arg-i;<br />

:= cosh(ary,i):<br />

i := -2*si n-arg-r+sinh,a rq-i;<br />

<br />

hrl := hi1 := hi := U:<br />

hr := a(g);<br />

for t :- y - 1 step -1 until l do<br />

beain<br />

hr7 := hrl; hrl := hr:<br />

hi7 := hil; hi1 := hi;<br />

hr := -hr2 + r*hrl - i*hil + a(t):<br />

hi := -hi7 + ikhrl + r*hil;<br />

end;<br />

<br />

clerl-csin :=<br />

R := r*hr - i*hi;<br />

I := r*hi + i*hr:<br />

end c len-csi n;<br />

end


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

external real procedure clen-sin<br />

- (ar j r 8rq);<br />

value J, arg;<br />

array a;<br />

inteqer g;<br />

real arrl;<br />

romment G1 reg-no. 81015, programmed by ~.Podert 1978.<br />

e len-sir (call and return) real procedure<br />

Computes the sum <strong>of</strong> a series <strong>of</strong> a(i)*sin(i*ary) by clenshaw<br />

sumnistion from g doin to l.<br />

The sum i s the value <strong>of</strong> the ~rocedure.<br />

The ~rocedure finds the elements <strong>of</strong> an array h<br />

so that h({) := a(i) t 2*cos(arq)*h(l+l) - h(i+Z)<br />

with h(gt1) = h(at2) = 0.<br />

Then h(l)*sin(arq) becomes the sum <strong>of</strong> the series.<br />

8 (csll) ilrray<br />

The coefficients <strong>of</strong> the series to be summed declared<br />

as a(l:y) at ledst.<br />

4 (value call) integer<br />

The number <strong>of</strong> coefficients i n the series.<br />

arq (value cdll) real<br />

The arqument <strong>of</strong> sine i n the series i n radians.<br />

hegin<br />

real hrr hrl, hr2t cos-ara;<br />

inteaer t;<br />

<br />

cos-arq := Z*cos(ary);<br />

<br />

hrl := d;<br />

hr := a(g);<br />

<br />

for t := g - 1 step -1 until 1 do<br />

beqi n<br />

<br />

hr2 := hrl:<br />

hrl := hr;<br />

<br />

br := -hrZ t cos-dry*hrl t e(t);<br />

end;<br />

<br />

elen-sin := hr*sin(arg);<br />

end clen-sin:<br />

end


C.C. TSCHERNING - K. PODER<br />

apoendi X-; * paae b 17 08 81, '12.20;<br />

exterr~al integer brocedure set-utm-const(reg-laot sal;<br />

array reg-lab, sa;<br />

comment G1 reg.rio. 81910, programmed by Y.Poderr / nov. 1977.<br />

The procedure nroduces the constants needed I n the transformations<br />

bet~een transversal mercator and geoaraphical coordinates<br />

and the tolerances needed for then check <strong>of</strong> the transforqations.<br />

The transformation constants are qenerated from a<br />

req-label defininy a transversal mercator system. The formulae<br />

are taken frorn hO!dIG und WFISE : Mathematische Grundlaaen der<br />

hoheren Gendzsie und Kartoqr*phie, Erster Randr Berlin 1951.<br />

parameters<br />

set-utm-const (return) inteqer<br />

The lenyth <strong>of</strong> the array in pytes <strong>of</strong> the array needed for holding<br />

the11 constants.<br />

req-lab (call) array<br />

an array <strong>of</strong> 0 elements <strong>of</strong> which here are used the followina:<br />

req-lab(?) integer, here = i for i t m and = 4 for utmr<br />

rea-Lab(&)<br />

-<br />

Lonqr for utm zone number,<br />

<strong>of</strong> central qeridianr<br />

for i t m longitude<br />

reg-lah(6) geotypet seni-major axis <strong>of</strong> ellipsoidr<br />

req-lah(7) real, flattening/<br />

req-lab(8) real, scale deviation from unity at central line,<br />

reo-lah(9) geotyne, ~astino parameter.<br />

S a (return) arrav<br />

The constants needeJ in the transformation.<br />

sa(1) = normalized neridian auadrant (lonot yeotype),<br />

sa(L) = pastinn at the central meridian (Lona, geotype),<br />

sac31 = Longitude <strong>of</strong> the central meridian (tonot qeotype),<br />

sa(4) - sa(7) = const for ell. geo -> sph. yeo (real)<br />

sa(8) - sa(l1) = const for sph. yeo -> ~ll. geo (real),<br />

sa(l2) - sa(15) = const for sph. 14, e -> ell. NI E (r@al),<br />

sa(l6) - sa(l9) = const for ell. 14, E -> sph. E (real),<br />

sa(2fl) = toler. for utm ii,put, 1.2'-10 mer quadr. (lonar yeotyoe),<br />

sa(21) = toler. for qeo input, 0.0fl0040 3x (loner yeotyve)r<br />

sa(22) = LooLeall for utmlitrnr true for utv (lonq),<br />

- utg uses only the Last byte as a boolean<br />

the user may cbdnje sa(Zn) - sa(22) for speciai checks.<br />

extrn. constants an3 procedures<br />

tr-status, rg (conversion factor from radians to d~yrees),<br />

conv-t-geo (which w i l l convert a real variable to seotype):<br />

heq i n<br />

inteoer r; real n, m; long W; boolean utm;<br />

array field bq-fr gb-f, gtu-fr utc-f;<br />

l onq field U-rr, EUL Ldr q-tol-f, u-tot-fr utm-f:<br />

comment fields i q sat oointiny at Individual variables or at<br />

first elelnents <strong>of</strong> arrays holding transformation constants;<br />

Q-n . - 4; <br />

E 0 . - U-I) + L; <br />

L 0 := EI) + L; <br />

bg-f := L0 ; soh. qeo *><br />

qb-f := ba-f + 16; t* soh. geo -> ell. geo *><br />

atu-f := gb-f + 16; ell. VtE *><br />

utg-f := gtu-f t 16; soh. lea *><br />

U-tot-f := uty-f t 20;


SOME GEODETIC APPLICATIONS OF CLENSHAW SUMMATION<br />

comment appenuix-L * nane 7 17 06 81, 12.2U;<br />

comment Lenyth <strong>of</strong> sa;<br />

set-utm-const := utm-f;<br />

comment test <strong>of</strong> coord system;<br />

r := r@g-Lab(2) extract 12:<br />

if r = 3 or r = 4 then<br />

beqin<br />

comment utmt lorig used as boolean;<br />

utm . .- - r = 4;<br />

sa.utm-f := if utni then (-1) else 0;<br />

Comment normalized meridian quadrant<br />

see K0niq und Weise p.50 (96)t p.19 (38b)r p.5 (2);<br />

n := req-lab(7)/(2 - rea-lab(7));<br />

m := ~**2*(1/4 + n**2/64);<br />

U := (Lonq rep_lab(6))*(-n - req-lab(8)<br />

- + m*(l - rea,lab(8)))/(1 + n):<br />

sa.Q-n := Long reg-lab(6) + W;<br />

comment central eastinq and longitude;<br />

sa.EO := Long reg-lab(9);<br />

sa.Lo := if utrn the11 (((((lonj reg-lab(4) - 30)*2 - l)<br />

- shift 41)//15) shift 4)<br />

- else Lons req-Lab(4):<br />

cor,rnent chgck-to1 for transformstion:<br />

sa.v-tol-f := pi/2*1.Z1-1U*sa.q-n; <br />

9a.y-tot-f := conv-t-yeo(exteng 401<br />

- false add (1 shift 6 + 6)): <br />

comment coef <strong>of</strong> trig series;<br />

for r:=l step 1 untiL 4 do<br />

beg~n<br />

comment ell. yeo -> sph. geo., kW 0186 - 187 (51) - (52<br />

sa.bg,f(r):=case r <strong>of</strong> (<br />

n *(-2 + n*(2/3 + n*(4/3 + n*(-82/45)))<br />

na*2*(5/3 + n*(-76/15 + n*(-73/91)),<br />

n**3*(-26/15 + n*34/21)~<br />

comment sph. yeo - ell. qeo., KW p<br />

sa-yb-f(r)!=case r <strong>of</strong> (<br />

n * ( Z + n*(-2/3 + n*(-2<br />

n**2*(7/3 + n*(-815 + n*(-22<br />

n**3*(56/15 + n*(-136) 1351,<br />

comment sph. NI E -> e l l<br />

sa.gtu-f(r):=cese r <strong>of</strong> (<br />

n *(1/2 + n*(-2/3<br />

n**2*(13/48 + n*(-3/5<br />

n**3*(61/240 + n*(-1U3/<br />

n**4*(4956l lI6l28U) 1:<br />

comment ell. ii, E -> sph<br />

sa.utg-f(r):=case r <strong>of</strong> (<br />

n *(-l12 + n*(2/3<br />

n**Z*(-1/48 + n*(-1/15<br />

n**3*(-17/480 + n*37/d4UIr<br />

n**4*(-4397l161280));<br />

end;<br />

end else ;<br />

end set-utm;<br />

end;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!