Menu

#8 Error in conversion between SPH coordinates and RLL coordinates

v1.0_(example)
closed-fixed
nobody
None
5
2020-05-28
2019-10-02
AaronH
No

There is an error in the conversion from spherical geocentric coordinates and RLL coordinates. To see this in action, consider the following simple example:

onera_desp_lib_rotate(onera_desp_lib_rotate([1,45,60],'SPH2RLL'),'RLL2SPH')

Expected output

This should print the following:

[ 1 45 60]

While the conversion to geodetic coordinates is not strictly exact, we should expect that the conversion to and from RLL coordinates should return roughly the same initial vector. This is not the case, however

Actual output

[75.007 45.19 60]

Clearly there is a serious error in this conversion process, as the final coordinate is starkly different from the input coordinate. I have traced the culprit to the following code from CoordTrans.f, on line 1853:

           xOUT(1)=SQRT(xIN(1)*xIN(1)+xIN(2)*xIN(2)+xIN(3)*xIN(3))

I seems that the RLL radius is being calculated from the norm of the spherical geocentric coordinate rather than the cartesian geocentric coordinate. I believe that line 1853 should be replaced by something like:

            xOUT(1)=xIN(1)

i.e., setting it to the geocentric radius of the input point.

Discussion

  • Steve Morley

    Steve Morley - 2020-04-03

    Change made in r619.

    I don't think I have permissions close this ticket though...

     

    Last edit: Steve Morley 2020-04-03
  • Paul OBrien

    Paul OBrien - 2020-05-28
    • status: open --> closed-fixed
     
  • Paul OBrien

    Paul OBrien - 2020-05-28

    closing for Steve.

     

Log in to post a comment.

MongoDB Logo MongoDB