Exemple #1
0
	public void PopulateStarPositionsDictionary(){
		foreach (StarModel star in stars) {
			DegreesAngle dec = new DegreesAngle (star.dec);
			HourAngle ra = new HourAngle (star.ra);

			EquatorialCoords eq = new EquatorialCoords (ra, dec);

			starPositionsDictionary [eq] = star.starID - 1;

		}			
	}
    public void Log()
    {
        HourAngle    ra  = equatorialCoords.RA;
        DegreesAngle dec = equatorialCoords.Declination;
        DegreesAngle az  = localCoords.Azimuth;
        DegreesAngle alt = localCoords.Altitude;

        Debug.Log(string.Format("AR: {0}", ra.ToString()));
        Debug.Log(string.Format("Dec: {0}", dec.ToString()));
        Debug.Log(string.Format("Azimuth: {0}", az.ToString()));
        Debug.Log(string.Format("Alt: {0}", alt.ToString()));
    }
Exemple #3
0
    private void CalculateEquatorialPosition()
    {
        DegreesAngle ecLon = new DegreesAngle(AASMoon.EclipticLongitude(jd));
        DegreesAngle ecLat = new DegreesAngle(AASMoon.EclipticLatitude(jd));

        double epsilon = AASNutation.TrueObliquityOfEcliptic(jd);

        AAS2DCoordinate eq = AASCoordinateTransformation.Ecliptic2Equatorial(ecLon.Get(), ecLat.Get(), epsilon);

        equatorialCoords.RA          = new HourAngle(eq.X);
        equatorialCoords.Declination = new DegreesAngle(eq.Y);
    }
    protected void CalculateTopocentricPosition()
    {
        double theta0Apparent = AASSidereal.ApparentGreenwichSiderealTime(jd);

        //hour angle in hours
        localHourAngle = theta0Apparent - location.longitude / 15d - equatorialCoords.RA.Get();

        AAS2DCoordinate local = AASCoordinateTransformation.Equatorial2Horizontal(localHourAngle, equatorialCoords.Declination.Get(), location.latitude);


        localCoords.Azimuth  = DegreesAngle.FromDecimalTo0To360Range(180.0f + local.X);
        localCoords.Altitude = new DegreesAngle(local.Y);
    }