Repository navigation
Conversation
Both are pure thin-shell geometry whose only dependencies are header-level (constants, SQR, VectorPos, AzEl). In their own translation unit they can be unit tested without linking the rest of pea; ionModels.cpp alone pulls in about 130 of pea's objects. No behaviour change.
ionmapf() with the single layer model must equal the slant factor ionppp() returns for the same layer, since both describe the same thin-shell geometry; ionppp() is called with the Earth radius and the layer height in km, as every caller in pea does. The modified single layer model is checked against its closed form (Schaer 1999: alpha 0.9782, H 506.7 km, R 6371 km), and the factor must fall as the layer rises and be 1 at zenith. On main these fail: at 10 deg elevation SLM gives 5.744 where ionppp() gives 2.441, MSLM gives 4.904 where the closed form gives 2.374, and moving the layer from 350 km to 506.7 km changes the factor by 0.0045.
Fixes GeoscienceAustralia#127. RE_MEAN is in metres while hion, mapping_function_layer_height, is in km (506.7 by default), so RE_MEAN / (RE_MEAN + hion) was 0.99992 instead of 0.926 and the factor collapsed to 1 / cos(z'), ignoring the layer height. With the default MSLM the slant factor was 2.07 times too large at 10 deg elevation (4.904 instead of 2.374) and 3.27 times at 5 deg. The radius is now taken in km, as at every ionppp() call site. This affects the SLM, MSLM and MLM mapping functions wherever ionmapf() is used: the IONEX (TEC grid) correction, and the VTEC that ppp_obs.cpp restores from the slant delay for the higher-order ionosphere terms. The Klobuchar mapping returns before this line and is unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #127
ionmapf() computed RE_MEAN / (RE_MEAN + hion) with RE_MEAN in metres and hion in km,
so the SLM/MSLM/MLM factor ignored the layer height. With the default MSLM at 10 deg
it gave 4.904 instead of 2.374. The radius is now taken in km, as at every ionppp() call site.
Affects the IONEX/TEC correction and the VTEC recovered in ppp_obs.cpp. Klobuchar is unchanged.
Commits: move ionmapf/ionppp to common/ionMapping.cpp (no functional change), unit tests
(fail on main), the fix.