lofar-astron / RMextract

extract TEC, vTEC, Earthmagnetic field and Rotation Measures from GPS and WMM data for radio interferometry observations
GNU General Public License v3.0
31 stars 22 forks source link

azimulth elevation change needed #8

Closed twillis449 closed 3 months ago

twillis449 commented 6 years ago

From my July 2017 e-mail

Basically you need to get rid of calls using AZEL and replace with calls using AZELGEO and also remove calls to GeodeticToGeocentricLat which converts geodetic to geocentric latitude.

Hi Maaijke

I've discovered a bug in my use of CASA measures which (probably) affects PosTools.py in RMextract.

Code such as p = me.position('ITRF',str(pos[0])+'m',str(pos[1])+'m',str(pos[2])+'m') defines a geodetic position equivalent to defining something in WGS84 lat, long and height. BUT that means that we should be using AZELGEO to define az and el relative to geodetic coordinates rather that AZEL which is defined relative to geocentric coordinates. The differences in positions can be up to ~ 12 arcmin, which probably doesn't matter much for ionospheric work , but one might as well be as accurate as possible. I discovered this error when I compared Measures output compared to where JPL said the Sun should be. When I used AZEL I got errors up to about 15 arcmin in difference. When I used AZELGEO, over 24 hours the maximum difference in position was about 0.74 arcsec!!

Since Wim is infallible, as both Oleg and I said last week ... !

But he does give opportunities for the user to get confused as he provides 6 different options for az el .

//

  • MDirection::AZEL --- topocentric Azimuth and Elevation (N through E) //
  • MDirection::AZELSW - topocentric Azimuth and Elevation (S through W) //
  • MDirection::AZELNE - topocentric Azimuth and Elevation (N through E) //
  • MDirection::AZELGEO --- geodetic Azimuth and Elevation (N through E) //
  • MDirection::AZELSWGEO - geodetic Azimuth and Elevation (S through W) //
  • MDirection::AZELNEGEO - geodetic Azimuth and Elevation (N through E)

    Cheers

    Tony

  • twillis449 commented 5 years ago

    You still have one left-over 'azel' at about line 398 of PosTools. Change the 'azel' to AZELGEO and then ALBUS and RMextract Az and El positions agree to within a few thousands of a degree.

    maaijke commented 5 years ago

    thank you. Should be fixed now

    gmloose commented 3 months ago

    I guess with this last comment from @maaijke, we can close this issue.