I believe this trick is documented in one of the papers by Guttman (but I can't find the reference). Or perhaps I was told by him directly.
If you already have a guess of the solution, you can compute the polar angle of the points of one scan in the new position. If the polar angle is not a monotone function of the readings index, it means that the surface is not visible in the next position. If it is not visible, then we don't use it for matching.
This is confusing without a picture! To understand what's going on, make a drawing in which a surface is not visible in one of the poses.
Implemented in the function visibilityTest().
Parameters describing a simple adaptive algorithm for discarding. 1) Order the errors. 2) Choose the percentile according to outliers_adaptive_order. (if it is 0.7, get the 70% percentile) 3) Define an adaptive threshold multiplying outliers_adaptive_mult with the value of the error at the chosen percentile. 4) Discard correspondences over the threshold.
This is useful to be conservative; yet remove the biggest errors.
If 1, the field "true_alpha" is used to compute the incidence beta, and the factor (1/cos^2(beta)) used to weight the impact of each correspondence. This works fabolously if doing localization, that is the first scan has no noise. If "true_alpha" is not available, it uses "alpha".