CoordinateTransform Object
ACP Coordinate Transformation Object
Remarks
This object implements coordinate transformations between equatorial (RA/Dec) and topocentric (Alt/Az) coordinates. The transformation is valid for a particular latitude and sidereal time. When you create a CoordinateTransform object (using the Util.NewCT() or Util.NewCTHereAndNow() methods), the object is set for the specified latitude and sidereal time. You can then repeatedly set coordinates of one type then retrieve the transformed coordinates of the other type.
Note: Whenever you change one of the coordinate properties, the transformation is recalculated. For example, if you change the Altitude property, the RightAscension, HourAngle, and Declination properties are immediately recalculated.
The transformations are very easy to do with this object. For example, to transform between thses systems using your current geographic location and time:
- Use Util.NewCThereAndNow() to get a new CoordinateTransform object set up for your current geographic location and time.
- Set the coordinate properties you know, for example RA/Dec
- Get the coordinate properties you don't know, for example Az/El
For example:
Set ct = Util.NewCThereAndNow()
ct.RightAscension = 8.32658
ct.Declination = 21.41097
Console.PrintLine "Azimuth = " & ct.Azimuth
Console.PrintLine "Elevation = & ct.Elevation
You can also get a "blank" CoordinateTransform object and initialize it with any arbitrary geographic position and time.
This does not do corrections for atmospheric refraction. The equatorial coordinates are for the local posiition and epoch -- they not corrected for precession and/or nutation. Use the NOVAS-Com object (shipped with ACP) for working with J2000 coordiantes, and use ASCOM's refraction method for refractivity corrections.
Copyright © 2000-2016, Robert B. Denny, Mesa, AZ