Correct acutal x coordinate and elevation in res2dinv

broken image
broken image

You can move to next point only if NEH is OK !!!Ĭheck atan2/atanxy operands order and also check goniometric functions units ( rad,deg) to avoid confusions.

broken image

It should look like on image, just different color for each axis. Just draw the 3 axises as lines of some length to validate if the result is correct.

broken image

I think atan2 in matlab has it in reverse.Īlways visually check all frames (especially NEH). Where atanxy is mine atan2 (4 quadrant atan) first is dx then dy. Both P0,P1 are in homogenous coordinates to allow multiplications with 4x4 matrix so you can compute azimut and elevation directly from it: Simply: P1=Inverse(NEH)*P0 where P1 is now in NEH LCS (Local coordinate system). Look here transform matrix anatomy and here Earth's NEH construction and change the position and radius to match your moving object.Ĭonvert point P0 from GCS (global coordinate system) to NEH This matrix/frame is called NEH (X=North,Y=East,Z=Height) or sometimes also ENU (X=East,Y=North,Z=Up). Note that you if you currently have a Geographic Coordinate System, and a reference is attached in one of the Geographic Referencing modes discussed in Section X. You must know position and at least two directions from North,East,Height(Up or Altitude) of the moving object otherwise is your problem unsolvable no matter what. Get the current NEH transform matrix for the moving object

broken image