Back to index

radiance  4R0+20100331
Defines | Functions | Variables
sun.c File Reference
#include <math.h>

Go to the source code of this file.

Defines

#define PI   3.141592653589793

Functions

int jdate (int month, int day)
double stadj (int jd)
double sdec (int jd)
double salt (double sd, double st)
double sazi (double sd, double st)

Variables

static const char RCSid [] = "$Id: sun.c,v 2.5 2009/06/06 20:18:32 greg Exp $"
double s_latitude = 0.66
double s_longitude = 2.13
double s_meridian = 2.0944

Define Documentation

#define PI   3.141592653589793

Definition at line 16 of file sun.c.


Function Documentation

int jdate ( int  month,
int  day 
)

Definition at line 25 of file sun.c.

{
       static short  mo_da[12] = {0,31,59,90,120,151,181,212,243,273,304,334};
       
       return(mo_da[month-1] + day);
}

Here is the caller graph for this function:

double salt ( double  sd,
double  st 
)

Definition at line 57 of file sun.c.

{
       return( asin( sin(s_latitude) * sin(sd) -
                     cos(s_latitude) * cos(sd) * cos(st*(PI/12)) ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

double sazi ( double  sd,
double  st 
)

Definition at line 68 of file sun.c.

{
       return( -atan2( cos(sd)*sin(st*(PI/12)),
                     -cos(s_latitude)*sin(sd) -
                     sin(s_latitude)*cos(sd)*cos(st*(PI/12)) ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

double sdec ( int  jd)

Definition at line 48 of file sun.c.

{
       return( 0.4093 * sin( (2*PI/368) * (jd - 81) ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

double stadj ( int  jd)

Definition at line 37 of file sun.c.

{
       return( 0.170 * sin( (4*PI/373) * (jd - 80) ) -
              0.129 * sin( (2*PI/355) * (jd - 8) ) +
              12 * (s_meridian - s_longitude) / PI );
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

const char RCSid[] = "$Id: sun.c,v 2.5 2009/06/06 20:18:32 greg Exp $" [static]

Definition at line 2 of file sun.c.

double s_latitude = 0.66

Definition at line 19 of file sun.c.

double s_longitude = 2.13

Definition at line 20 of file sun.c.

double s_meridian = 2.0944

Definition at line 21 of file sun.c.