NASA Logo
Ocean Color Science Software

ocssw V2022
libnav.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int crossp_ (float *v1, float *v2, float *v3)
 
void sunangs_ (int *year, int *day, float *gmt, float *lon, float *lat, float *sunz, float *suna)
 
void get_zenaz (float *pos, float lon, float lat, float *zenith, float *azimuth)
 
void compute_alpha (float lon[], float lat[], float senz[], float sena[], double mnorm[3], int npix, float alpha[])
 
void l_sun_ (int *iyr, int *idoy, double *sec, float sunr[3], float *rs)
 
void ocorient_ (float *pos, float *vel, float *att, float(*)[3], float *coef)
 
double esdist_ (int *year, int *day, int *msec)
 
void cdata_ ()
 
void nav_get_vel (float ilat, float mlat, float ilon, float mlon, float *vel)
 
void nav_get_pos (float lat, float lon, float alt, float *p)
 
void nav_gd_orient (float *pos, float *vel, float *att, float *smat[], float *coef)
 
void nav_get_geonav (float *sunr, float *pos, float *pview, float *coef, float *smat[], float *xlon, float *xlat, float *solz, float *sola, float *senz, float *sena)
 
double angular_distance (double lat1, double lon1, double lat2, double lon2)
 
double deg2rad (double deg)
 
double rad2deg (double rad)
 

Function Documentation

◆ angular_distance()

double angular_distance ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
)

Definition at line 537 of file read_prism.c.

◆ cdata_()

void cdata_ ( )

◆ compute_alpha()

void compute_alpha ( float  lon[],
float  lat[],
float  senz[],
float  sena[],
double  mnorm[3],
int  npix,
float  alpha[] 
)

Definition at line 8 of file compute_alpha.c.

◆ crossp_()

int crossp_ ( float *  v1,
float *  v2,
float *  v3 
)

computes cross product v3 = v1 x v2

Parameters
v1first vector
v2second vector
v3result
Returns

Definition at line 13 of file crossp.c.

◆ deg2rad()

double deg2rad ( double  deg)

Definition at line 550 of file read_prism.c.

◆ esdist_()

double esdist_ ( int *  iyr,
int *  iday,
int *  msec 
)

c This subroutine computes the earth-sun distance in AU. It uses the model c referenced in The Astronomical Almanac for 1984, Section S (Supplement).

c Subprograms referenced: c c JD Computes Julian day from calendar date c c Coded by: Frederick S. Patt, GSC, November 2, 1992 c Adapted from sun2000 to esdist by B. Franz, Oct 2003.

Parameters
year
day
msec
Returns

c Compute floating point days since Jan 1.5, 2000 c Note that the Julian day starts at noon on the specified date

Definition at line 21 of file esdist.c.

◆ get_zenaz()

void get_zenaz ( float *  pos,
float  lon,
float  lat,
float *  zenith,
float *  azimuth 
)

Definition at line 28 of file get_zenaz.c.

◆ l_sun_()

void l_sun_ ( int *  iyr,
int *  iday,
double *  sec,
float  sunr[3],
float *  rs 
)

c Computes unit Sun vector in geocentric rotating coodinates, using c subprograms to compute inertial Sun vector and Greenwich hour angle c Subprograms referenced: c c SUN2000 Computes inertial Sun vector c GHA2000 Computes Greenwich sidereal angle c c Coded by: Frederick S. Patt, GSC, September 29, 1992 c c Modification History: c c Modifified to use new Sun and hour angle routines c Frederick S. Patt, November 3, 1992 c c Removed internal jd() function, since it is available as an c independent module. B. A. Franz, GSC, November 14, 1997.

Parameters
iyrinput Year, four digits (i.e, 1993)
idoyinput Day of year (1-366)
secinput Seconds of day
sunroutput Unit Sun vector in geocentric rotating coordinates
rsEarth-to-Sun distance (AU)

Definition at line 28 of file l_sun.c.

◆ nav_gd_orient()

void nav_gd_orient ( float *  pos,
float *  vel,
float *  att,
float *  smat[],
float *  coef 
)

Definition at line 160 of file get_zenaz.c.

◆ nav_get_geonav()

void nav_get_geonav ( float *  sunr,
float *  pos,
float *  pview,
float *  coef,
float *  smat[],
float *  xlon,
float *  xlat,
float *  solz,
float *  sola,
float *  senz,
float *  sena 
)

Definition at line 310 of file get_zenaz.c.

◆ nav_get_pos()

void nav_get_pos ( float  lat,
float  lon,
float  alt,
float *  p 
)

Definition at line 134 of file get_zenaz.c.

◆ nav_get_vel()

void nav_get_vel ( float  ilat,
float  mlat,
float  ilon,
float  mlon,
float *  vel 
)

Definition at line 105 of file get_zenaz.c.

◆ ocorient_()

void ocorient_ ( float *  pos,
float *  vel,
float *  att,
float(*)  [3],
float *  coef 
)

◆ rad2deg()

double rad2deg ( double  rad)

Definition at line 32 of file compute_dist.c.

◆ sunangs_()

void sunangs_ ( int *  iyr,
int *  iday,
float *  gmt,
float *  xlon,
float *  ylat,
float *  sunz,
float *  suna 
)

$brief c Given year, day of year, time in hours (GMT) and latitude and c longitude, returns an accurate solar zenith and azimuth angle. c Based on IAU 1976 Earth ellipsoid. Method for computing solar c vector and local vertical from Patt and Gregg, 1993, Int. J. c Remote Sensing.c c Subroutines required: sun2000 c gha2000 c jd c

Parameters
year
day
gmt
lon
lat
sunz
suna

Definition at line 25 of file sunangs.c.