#include "stdlib.h"
#include "stdio.h"
#include "string.h"
#include "stdbool.h"
#include "math.h"
#include <stdint.h>
Go to the source code of this file.
|
double | norm (const double *vec, size_t n) |
|
double | square (const double *vec, size_t n) |
|
double | dot (const double *vec1, const double *vec2, size_t n) |
|
double | dmod (double a, double p) |
|
int32_t | jd (int32_t i, int32_t j, int32_t k) |
|
double | julian (double tin[2]) |
|
void | jdate (int jd, int *i, int *k) |
|
void | jddate (int jd, int *i, int *j, int *k) |
|
void | ymdhms2jul (int32_t year, int32_t month, int32_t day, int32_t hour, int32_t minute, double sec, double *jul) |
|
◆ DSIGN
Definition at line 9 of file nav.h.
◆ dmod()
double dmod |
( |
double |
a, |
|
|
double |
p |
|
) |
| |
Description:
Returns remainder calculated as:
A - (INT(A / P) * P)
P must not be zero.
- Parameters
-
a | INTEGER or REAL; scalar; INTENT(IN). |
p | INTEGER or REAL; scalar; INTENT(IN). |
- Returns
- double
Definition at line 23 of file nav.c.
◆ dot()
double dot |
( |
const double * |
vec1, |
|
|
const double * |
vec2, |
|
|
size_t |
n |
|
) |
| |
computes the scalar/dot product of two vectors
- Parameters
-
vec1 | vector1 |
vec2 | vector1 |
n | dim |
- Returns
- double
Definition at line 15 of file nav.c.
◆ jd()
int32_t jd |
( |
int32_t |
i, |
|
|
int32_t |
j, |
|
|
int32_t |
k |
|
) |
| |
c This function converts a calendar date to the corresponding Julian day starting at noon on the calendar date. The algorithm used is from Van Flandern and Pulkkinen, Ap. J. Supplement Series 41, November 1979, p. 400. Written by Frederick S. Patt, GSC, November 4, 1992
- Parameters
-
i | Year - e.g. 1970; I |
j | Month - (1-12): I |
k | Day - (1-31) : I |
- Returns
- int32_t Julian day; O
Definition at line 119 of file nav.c.
◆ jdate()
void jdate |
( |
int |
jd, |
|
|
int * |
i, |
|
|
int * |
k |
|
) |
| |
c Compute days since January 0, 1900
- Parameters
-
jd | julian date |
i | output year |
k | output day of year (0-365/366) |
Definition at line 86 of file nav.c.
◆ jddate()
void jddate |
( |
int |
jd, |
|
|
int * |
i, |
|
|
int * |
j, |
|
|
int * |
k |
|
) |
| |
Construct a new ddate objectC C This routine computes the calendar date corresponding to C a given Julian day. This code was brazenly copied from C a routine written by Myron Shear for CSC on Julian Day 1. C
C ARGUMENT TYPE I/O DESCRIPTION
C __________________________________________________________ C JD I*4 I Julian Day (reference Jan 1, 4713 BC) C I I*4 O Year C J I*4 O Month
C K I*4 0 Day of Month C.
- Parameters
-
Definition at line 100 of file nav.c.
◆ julian()
double julian |
( |
double |
tin[2] | ) |
|
- Parameters
-
tin | TIN(1) = CALENDER DATE, YYYYMMDD. (2) = CALENDER TIME, HHMMSS.SSSS |
- Returns
- TOUT = JULIAN DATE (DAYS)
Definition at line 30 of file nav.c.
◆ norm()
double norm |
( |
const double * |
vec, |
|
|
size_t |
n |
|
) |
| |
computes the norm of a vector
- Parameters
-
- Returns
- double
Definition at line 3 of file nav.c.
◆ square()
double square |
( |
const double * |
vec, |
|
|
size_t |
n |
|
) |
| |
computes the square of the norm of a vector
- Parameters
-
- Returns
- double
Definition at line 7 of file nav.c.
◆ ymdhms2jul()
void ymdhms2jul |
( |
int32_t |
year, |
|
|
int32_t |
month, |
|
|
int32_t |
day, |
|
|
int32_t |
hour, |
|
|
int32_t |
minute, |
|
|
double |
sec, |
|
|
double * |
jul |
|
) |
| |
c ----------------------------------------------------------— c Subroutine ymdhms2jul c c Convers from Year, Month, Day of Month, Hour, Minute, Second c to Julian time. c c BA Franz, GSC, 1/97
- Parameters
-
year | input year |
month | input month |
day | input day |
hour | input hour |
minute | input minute |
sec | input second |
jul | output julian date |
Definition at line 113 of file nav.c.