## Title

## RFM

When you meet your physics teacher 30 years after the school, and old man told that he dose not remember how did you study physics in his class, it mean only one – needs to be careful with anything related to a physics. Specifically needs to RFM old lectures – gravitational potential is a scalar value, to get force from gravitational potential needs to get partial derivative. Particularly:

U (gravitational potential) = sum of Unk = fm/r (r0/r)**n Pnk(sinTetta) [Cnk*cos(k*lambda) + Snk*sin(k*lambda). Where Tetta is a latitude and lambda is longitude. Cnk/Snk is a constants from a model. fm= G*M, and r0 is equatorial radius. Partial derivative is (page 90 from Akesenov’s lectures http://vadimchazov.narod.ru/lepa_zov/lesat.pdf):

Then: Unk separates into 3 parts:

(part 1) Rn(1/r) = fm/r *(r0/r)**n

derivative => Rn(1/r)' = (n+1) * fm * r0**n * (1/r)**n = (n+1) * fm * (r0/r)**n)

on a page 12 is (it is kind of hard to write formulas in C code)

Pnk(sinTetta) = (1-sinTetta**2) ** (k/2) * dk (Pn(sinTetta))/ d(sinTetta)**k

= cosTetta **k * dK(Pn(sinTetta))/ d(sinTtta)**k

now cosTetta**k separated from Pnk(sinTetta) to get clear part 2 and CosTetta**k will end up at part 3.

(part 2) Znk(z/r) = dK(Pn(sinTetta)/ d(sinTetta)**k =

= Pnk’[n][k]

Derivative => Znk(z/r)' = Pnk’[n][k+1]

also in (part 2) for K == 0 is:

Zn0 = Pn(sinTetta)

Finally cosTetta goes to a last part:

(part 3) Qnk(x/r,y/r) = cosTetta**k * [Cnk*cos(k*lambda) + Snk * sin(k*lambda)]

= [Cnk*cosTetta**k * cos(k*lambda) + Snk * cosTetta**k * sin(k*lambda)]

= [Cnk* Xk + Snk*Yk] and

Xk = (cosTetta)**k * cos(k*Lambda) Yk = (costetta)**k * sin(k*Lambda)

or recurcevly:

X0 =1, Y0 = 0

X1 = cosTeatta * Cos(Lambda) = x/r; Y1 = cosTetta * sin(Lambda) = y/r

X[k+1] = Xk * x/r - Yk* y/r Y[k+1] = Yk* x/r + Xk * y/r

D(Unk)/D(x) = d(Rn) / d(1/r) * D(1/r)/D(x) * Znk * Qnk + Rn * d(Znk)/d(z/r) * D(z/r)/D(x) * Qnk + Rn * Znk * [D(Qnk)/D(x/r) * D(x/r)/D(x) + D(Qnk)/D(y/r)*D(y/r)/D(x)]

D(Unk)/D(y) = d(Rn) / d(1/r) * D(1/r)/D(y) * Znk * Qnk + Rn * d(Znk)/d(z/r) * D(z/r)/D(y) * Qnk + Rn * Znk * [D(Qnk)/D(x/r) * D(x/r)/D(y) + D(Qnk)/D(y/r)*D(y/r)/D(y)]

D(Unk)/D(z) = d(Rn) / d(1/r) * D(1/r)/D(z) * Znk * Qnk + Rn * d(Znk)/d(z/r) * D(z/r)/D(z) * Qnk + Rn * Znk * [D(Qnk)/D(x/r) * D(x/r)/D(z) + D(Qnk)/D(y/r)*D(y/r)/D(z)]

All Rnk, Qnk and it’s derivatives calculates recursively, on page 91-92 presents formulas to get partial derivatives for D(1/r)/D(x) and etc. At the end needs to move out of brackets for each partial derivative values fm * x/r**3, fm * y/r**3, fm*z/r**3. And explanation of a stupidity of Alex Dobrianski shines up – in a C code J2 constant really bigger 10 times for 75 degree(just coincident normally it bigger 3 times), in Fx,Fy presents sin(co-latitude), in Fz presents cos(latitude)**2 / sin(latitude), and error drops from 30km to 685m. Needs to read (couple of times) manual (lectures) does not matter how many pages in it.