Getting started
Firstly download the latest dll or if you wish compile the source code.
Add a reference to the dll in the normal manner.

Convert Right Ascension described as hours, minutes and seconds to decimal Right Ascension

Coordinates.RightAscension ra = new Coordinates.RightAscension();

ra.Hour = 11;
ra.Minute = 49;
ra.Second = 3;

double decimalRA = Coordinates.RightAscensionMinutesSecondsToDecimalRightAscension(ra.Hour, ra.Minute, ra.Second);

Convert Declination described as degrees, minutes and seconds to decimal Declination

Coordinates.Declination dec = new Coordinates.Declination();
dec.Degree = 14;
dec.Minute = 34;
dec.Second = 19;

double decimalDec = Coordinates.DeclinationMinutesSecondsToDecimalDeclination(dec.Degree, dec.Minute, dec.Second);

Calculate Azimuth of an object in the sky

1. Convert the Universal Time to Local Sidereal Time

DateTime dt = new DateTime(2010, 9, 22, 15, 30, 0);

//UniversalTimeToLocalSiderealTime(DateTime, Longitude, EastWest)
DateTime LST = Time.UniversalTimeToLocalSiderealTime(dt, 3, Coordinates.Cardinal.West);

2. Create a Latitude object

Coordinates.Latitude latitude = new Coordinates.Latitude();

latitude.Degree = 53;
latitude.Minute = 23;
latitude.Second = 0;

3. Call CalculateAzimuth method on Azimuth object passing in the Right Ascension, Declination, Local Siderial Time and Lattitude

var azimuth = Azimuth.CalculateAzimuth(ra, dec, LST2, latitude);

Calculate Julian Date dependant on DateTime object

DateTime dt = new DateTime(2010, 9, 22, 15, 30, 0);

var jd = JulianDate.CalculateJulianDate(dt);

Calculate Axial Precession
CalculateAxialPrecession(RightAscension, Declination, currentEpoch, oldEpoch)

For example:
Coordinates.RightAscension ra = new Coordinates.RightAscension();
ra.Hour = 13;
ra.Minute = 42;
ra.Second = 11;

Coordinates.Declination dec = new Coordinates.Declination();
dec.Degree = 28;
dec.Minute = 22;
dec.Second = 38;

Coordinates.Coordinate axialPrecession = Precession.CalculateAxialPrecession(ra, dec, 2000, 1875);

The Coordinates.Coordinate class exposes Right Ascension and Declination properties


Other small helper functions
Universal Time to Local Siderial Time
Time.UniversalTimeToLocalSiderealTime(DateTime, Logitude, EastWest)

Greenwich Siderial Time to Local Siderial Time
Time.GreenwichSiderealTimeToLocalSiderealTime(DateTime, Longitude, EastWest)

Universal Time to Greenwich Siderial Time
Time.UniversalTimeToGreenwichSiderealTime(DateTime)

Last edited May 10, 2011 at 11:37 AM by capgpilk, version 8

Comments

No comments yet.