Longitude / Latitude to quaternion

前端 未结 3 1903
灰色年华
灰色年华 2021-01-05 15:53

I\'ve got a longitude and latitude and want to convert this to a quaternion and wondering how I can do this? I want to use this, because I\'ve got an app which projects the

3条回答
  •  不知归路
    2021-01-05 16:35

    Maybe you could look into how the boost C++ library implements it. (or perhaps even using it) http://www.boost.org/doc/libs/1_46_0/libs/math/doc/quaternion/html/boost_quaternions/quaternions/create.html

    Longitude and lattitude are pretty much analogous to the azimuth (theta - [0, 2*PI]) and inclination (rho? [0,PI]) angles in spherical coordinates (radius r=1 of course for surface). Boost has a function for spherical to quaternion in the link i posted.

提交回复
热议问题