(49g 50g) Theoretical Earth gravity g = g(latitude, height), WGS84, GRS80/67

09212021, 01:31 PM
Post: #3




RE: HP4950G : —>g gravity calculation = g(latitude, height) with WGS84
You are perfectly correct — and in a way I am wrong.
The truth is the following : the formula in Wikipedia showed some wrong digits at the end, as well as the Chinese page. To check, I used the a and f exact values of WGS84 and cut the decimals points and added zeros accordingly to operate with integers (see my program: \<< "Version 5.2 1 single Arg like \[]'7/3*' \[] or {'7/3*' 300} for 300 digits " DROP DUP TYPE 5 == IF THEN OBJ\> DROP ELSE 100 "Put above 200 if you want by default 200 digits & not 100" DROP END SWAP DUP UNROT 0 0 0 RCLF \> digit x1 x2 x21 num f \<< RAD STD 3 CF 105 CF digit \>STR "." "" SREPL DROP OBJ\> 'digit' STO x1 \>STR "." "" SREPL 0 == IF THEN DROP ELSE OBJ\> 'x2' STO x2 x1 / \>NUM LOG DUP FP 0 \=/ IF THEN DROP "Instead of decimals (ab.c), Try fractions ('abc/10') !" DOERR END \>STR "." "" SREPL DROP OBJ\> ALOG 'x21' STO IF x21 1 > THEN x2 x21 / ELSE IF x21 1 < THEN x2 x21 INV * ELSE x2 END END \>STR "." "" SREPL DROP OBJ\> END DUP EXPAND DUP2 SAME DROPN DUP \>NUM DUP 'num' STO num ABS 100000000000 > num FP 0 \=/ OR IF THEN OVER 10 digit ^ * PROPFRAC PROPFRAC 105 SF DUP TYPE 9 == IF THEN OBJ\> 3 DROPN END ELSE DROP END f STOF \>> \>> and get then the most accurate value for b. I did the same when calculating the constants k and e². So that the digits shown on the English and Chinese page for the WGS84 gformulae are now all "correct", though meaningless, as you noticed. The problem was : suppose I have an "effective")result 123456789012.6 Should I cut it into 123456789012 (the first 12 digits are correct) Or prefer to have something printed incorrectly 123456789013 But that is nearer of the true value (and "better" for further calculations [on my calculator]). I chose the second solution and decided to give the most complete values of k and e², leaving the choice for the reader to cut where it's the most "convenient" for him. As I am limited on the digits of the values entered on my HP (for nonintegers), you will see that the constant k and e² in my programs do approximate correctly the theorical values (with many digits) of k and e². But I could not decently write the initial values, for checking purposes, to be 123456789013. In fact, I cut the final digits of the k and e² values in Wikipedia, being sure that the first cut digit from the left was less than 5. 1234567890123456. Could be cut to 1234567890123 × 10³ (because after the last digit 3 there is a digit < 5, here 4). But not to 12345678901234 × 10², as 12345678901235 × 10² would be better (but not "nice looking", as the digit after 123 is a 4 and not a 5 as shown). 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)