Astro-Nova

 view release on metacpan or  search on metacpan

libnova-0.15.0/doc/doxyfile.in  view on Meta::CPAN


# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
# plain latex in the generated Makefile. Set this option to YES to get a 
# higher quality PDF documentation.

USE_PDFLATEX           = NO

# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
# command to the generated LaTeX files. This will instruct LaTeX to keep 
# running if errors occur, instead of asking the user for help. 
# This option is also used when generating formulas in HTML.

LATEX_BATCHMODE        = NO

# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
# include the index chapters (such as File Index, Compound Index, etc.) 
# in the output.

LATEX_HIDE_INDICES     = NO

#---------------------------------------------------------------------------

libnova-0.15.0/src/dynamical_time.c  view on Meta::CPAN

    double TD,t;
    
    /* number of centuries from 1850 */
    t = (JD - 2396758.5) / 36525.0;
    
    TD = 22.5 * t * t;
    return TD;
}

/* Table 9.a pg 72 for years 1600..1992.*/
/* uses interpolation formula 3.3 on pg 25 */
static double get_dynamical_diff_table (double JD)
{
    double TD = 0;
    double a,b,c,n;
    int i;
    
    /* get no days since 1620 and divide by 2 years */
    i = (int)((JD - 2312752.5) / 730.5);
    
    /* get the base interpolation factor in the table */

libnova-0.15.0/src/dynamical_time.c  view on Meta::CPAN

	b = delta_t[i+2] - delta_t[i+1];
	c = a - b;
	n = ((JD - (2312752.5 + (730.5 * i))) / 730.5);
	
	TD = delta_t[i+1] + n / 2 * (a + b + n * c);

    return TD;
}

/* get the dynamical time diff in the near past / future 1992 .. 2010 */
/* uses interpolation formula 3.3 on pg 25 */
static double get_dynamical_diff_near (double JD)
{
    double TD = 0;
    /* TD for 1990, 2000, 2010 */
    double delta_T[3] = {56.86, 63.83, 70.0};
    double a,b,c,n;
         
    /* calculate TD by interpolating value */
    a = delta_T[1] - delta_T[0];
    b = delta_T[2] - delta_T[1];

libnova-0.15.0/src/dynamical_time.c  view on Meta::CPAN

*
* Calculates the dynamical time (TD) difference in seconds (delta T) from 
* universal time.
*/
/* Equation 9.1 on pg 73.
*/
double ln_get_dynamical_time_diff (double JD)
{
    double TD;

    /* check when JD is, and use corresponding formula */
    /* check for date < 948 A.D. */
    if ( JD < 2067314.5 )
        /* Stephenson and Houlden */
	    TD = get_dynamical_diff_sh1 (JD);
    else if ( JD >= 2067314.5 && JD < 2305447.5 )
	    /* check for date 948..1600 A.D. Stephenson and Houlden */
    	TD = get_dynamical_diff_sh2 (JD);
	else if ( JD >= 2312752.5 && JD < 2448622.5 )
		/* check for value in table 1620..1992  interpolation of table */
		TD = get_dynamical_diff_table (JD);

libnova-0.15.0/src/transform.c  view on Meta::CPAN

{
	long double H, ra, latitude, declination, A, Ac, As, h, Z, Zs;

	/* change sidereal_time from hours to radians*/
	sidereal *= 2.0 * M_PI / 24.0;

	/* calculate hour angle of object at observers position */
	ra = ln_deg_to_rad (object->ra);
	H = sidereal + ln_deg_to_rad (observer->lng) - ra;

	/* hence formula 12.5 and 12.6 give */
	/* convert to radians - hour angle, observers latitude, object declination */
	latitude = ln_deg_to_rad (observer->lat);
	declination = ln_deg_to_rad (object->dec);

	/* formula 12.6 *; missuse of A (you have been warned) */
	A = sin (latitude) * sin (declination) + cos (latitude) * cos (declination) * cos (H);
	h = asin (A);

	/* convert back to degrees */
	position->alt = ln_rad_to_deg (h);   

	/* zenith distance, Telescope Control 6.8a */
	Z = acos (A);

	/* is'n there better way to compute that? */

libnova-0.15.0/src/transform.c  view on Meta::CPAN

		else
			position->az = 0;
		if ((object->dec > 0 && observer->lat > 0)
		   || (object->dec < 0 && observer->lat < 0))
		  	position->alt = 90;
		else
		  	position->alt = -90;
		return;
	}

	/* formulas TC 6.8d Taff 1991, pp. 2 and 13 - vector transformations */
	As = (cos (declination) * sin (H)) / Zs;
	Ac = (sin (latitude) * cos (declination) * cos (H) - cos (latitude) * sin (declination)) / Zs;

	// don't blom at atan2
	if (Ac == 0 && As == 0) {
	        if (object->dec > 0)
			position->az = 180.0;
		else
			position->az = 0.0;
		return;



( run in 0.567 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )