next up previous contents index
Next: ELLIPSE Up: CONVERT Previous: CONVERT   Contents   Index


CONVERT EXAMPLES

    * Converting relative coordinates to absolute:

    Say  one  wants  to  convert the RADIO-projected coordinates (+100,+200)
    arcseconds from Eq.2000  center  (01:23:45.67,76:54:32.10)  to  absolute
    Eq.2000 coordinates:

      ! Define input offsets
      define double myx myy
      let myx +100
      let myy +200
      ! Define output system of coordinates
      set system eq 2000
      ! Define output projection. NONE means CONVERT output will be absolute
      ! spherical coordinates
      projection /type none
      ! Convert offsets given their input description
      convert 01:23:45.67 76:54:32.10 /type radio /syste eq 2000 /var myx myy /u
      ! Variables are now absolute spherical coordinates (radian unit)
      exa myx myy
      ! Convert from radians to RA-DEC sexagesimal strings
      define char*23 chra chdec
      let chra  myx /sexa h r
      let chdec myy /sexa d r
      exa chra chdec

    * Converting offsets from one projection to another:

    Say one wants to convert the RADIO-projected offsets (+100,+200) arcsec-
    onds away from Eq.2000 center (01:23:45.67,76:54:32.10) to GNOMONIC-pro-
    jected offsets (same projection center):

      ! Define input offsets
      define double myx myy
      let myx +100
      let myy +200
      ! Define output system of coordinates
      set system eq 2000
      ! Define output projection
      projection 01:23:45.67 76:54:32.10 /type gnomonic
      ! Convert offsets given their input description
      convert 01:23:45.67 76:54:32.10 /type radio /syste eq 2000 /var myx myy /u
      ! Variables are now offsets in the new projection (radians)
      exa myx myy


Gildas manager 2024-03-29