3 ms·
I actually used HTM in a project a few years back. I had a 360x180 sphere of values, and I needed to rotate the sphere in some combination of translations. I
by acemarke 8y ago
I actually used HTM in a project a few years back.
I had a 360x180 sphere of values, and I needed to rotate the sphere in some combination of translations. I did this by converting the az/el/value triplets to Cartesian XYZ and multiplying by a rotation matrix.
However, when I tried to convert the translated values back to a rotated az/el/value result, the results broke due to what was effectively lat/lon narrowing (ie, 1x1-degree cells are smaller nearer the "poles", so the rotations didn't map evenly).
After research, I settled on using HTM. I was able to borrow the C code from some MySQL extension that implemented HTM (looks like it's at https://github.com/smonkewitz/scisql https://github.com/smonkewitz/scisql ), then use that math to more reliably convert the rotated values back to an appropriate az/el/value result.
Still one of the neatest problems I ever solved.