Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculation error in tropmapf -> mapf ? #9

Open
jonathanmuller opened this issue Jul 29, 2024 · 0 comments
Open

Calculation error in tropmapf -> mapf ? #9

jonathanmuller opened this issue Jul 29, 2024 · 0 comments

Comments

@jonathanmuller
Copy link

Hi,

There is a common pattern I see in all implementations of the Niell tropo across github :

The implementation is always the same :

(1+a / ... ) / (sinel +b / ...) while I believe it should be (sinel +b / ...) / (1+a / ... ) (the opposite)

For example :

return (1.0 + a / (1.0 + b / (1.0 + c))) / (sinel + (a / (sinel + b / (sinel + c))))

def mapf(el, a, b, c):
    """ simple tropospheric mapping function """
    sinel = np.sin(el)
    return (1.0 + a / (1.0 + b / (1.0 + c))) / (sinel + (a / (sinel + b / (sinel + c))))

However, original paper ( https://safe.nrao.edu/wiki/pub/Main/RefBendDelayCalc/Niell_Global.pdf ) list "equation 4" as :

image
So the form is (1/(1+a / ... )) / (1+1/(sinel +b / ...))
As (1/y)/(1/x) can be rewritten as x/y
Then the calculation above can be simplified as (sinel +b / ...) /(1+a / ... )
There can be no ambiguity as later it is used directly as follow, without further division or calculation directly as mapf :

dm = (1.0 / np.sin(el) - mapf(el, aht[0], aht[1], aht[2])) * pos[2] * 1e-3

image

This is the same (wrong?) implementation as RTKLib and any other commonly used RTK library I could find on github.
Am I just wrong about the understanding of the calculation, or is everyone copy-pasting the same error ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant