ufrgs-gnss-lab / geo-alhazen

Modeling of reflection on a sphere
1 stars 0 forks source link

Support deep vectorization #14

Open fgnievinski opened 2 years ago

fgnievinski commented 2 years ago

push the loop over points deeper into the code, down at the quartic roots solver, replacing roots.m for mroots.m (attached) mroots.zip

fgnievinski commented 2 years ago

numerical algorithms will still require a shallow loop over points.

background: https://www.mathworks.com/help/matlab/matlab_prog/vectorization.html

fgnievinski commented 2 years ago

care is needed with elevations below spherical horizon (hint: discard upfront, returning NaN)