matlab - Azimuth and Elevation from one moving object to another, relative to first object's orientation -



matlab - Azimuth and Elevation from one moving object to another, relative to first object's orientation -

i have 2 moving objects position , orientation info (euler angles, quaternions) relative eci coordinate frame. calculate az/el i'm guessing "body frame" of first object. have attempted convert both objects body frame through rotation matrices (x-y-z , z-y-x rotation sequence) , calculate target vector az/el way have not had success. i've tried body frame positions , calculate body axis/angles , convert eulers (relative body frame). i'm never sure how coordinate scheme axes i'm supposedly creating aligned along object.

i have found couple other questions answered quaternion solutions may best path take, quaternion background weak @ best , fail see how computations given result in target vector.

any advice much appreciated , i'm happy share progress/experiences going forward.

get current neh transform matrix moving object

you must know position , @ to the lowest degree 2 directions north,east,height(up or altitude) of moving object otherwise problem unsolvable no matter what this matrix/frame called neh (x=north,y=east,z=height) or enu (x=east,y=north,z=up) look here: transform matrix anatomy and here: earth's neh construction , alter position , radius match moving object

convert point p0 gcs (global coordinate system) neh

simply: p1=inverse(neh)*p0 p1 in neh lcs (local coordinate system) both p0,p1 in homogenous coordinates { x,y,z,w=1 } allow multiplications 4x4 matrix so can compute azimut , elevation straight it so: azimut=atanxy(p1.x,p1.y); atanxy mine atan2 (4 quadrant atan) first dx dy think atan2 in matlab reverse elevation=atan(p1.z/sqrt((p1.x*p1.x)+(p1.y*p1.y)));

[notes]

always visually check frames (especially neh) just draw 3 axises lines of length validate if result correct it should on image, different color each axis you can move next point if neh ok !!! check atan2/atanxy operands order check goniometric functions units (rad,deg) avoid confusions

matlab math 3d quaternions coordinate-transformation

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -