Skip to content

Commit

Permalink
Merge pull request #78 from cyjoelchen/issue/77
Browse files Browse the repository at this point in the history
Return extended values in swe_revjul().
  • Loading branch information
kevindecapite authored Oct 12, 2021
2 parents fe543bb + d434f52 commit 23ef6ff
Show file tree
Hide file tree
Showing 8 changed files with 148 additions and 62 deletions.
53 changes: 31 additions & 22 deletions doc/doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">
<body>



Expand Down Expand Up @@ -255,7 +255,7 @@
</li>
</ul>
</li>
<li><a href="#function-swe_set_sid_mode-sid_mode-t0-ayan_t0">function swe_set_sid_mode(sid_mode, &amp;t0, &amp;ayan_t0)</a>
<li><a href="#function-swe_set_sid_mode-sid_mode-t0-ayan_t0">function swe_set_sid_mode(sid_mode, t0, ayan_t0)</a>
<ul>
<li>
<ul>
Expand Down Expand Up @@ -541,7 +541,7 @@
</li>
</ul>
</li>
<li><a href="#function-swe_sol_eclipse_how-tjd_ut-iflag-geopos-0-geopos-1-geopos-2">function swe_sol_eclipse_how(tjd_ut, iflag, geopos[0], geopos[1], geopos[2]);</a>
<li><a href="#function-swe_sol_eclipse_how-tjd_ut-iflag-geolng-geolat-geoalt">function swe_sol_eclipse_how(tjd_ut, iflag, geolng, geolat, geoalt);</a>
<ul>
<li>
<ul>
Expand Down Expand Up @@ -717,7 +717,7 @@
</li>
</ul>
</li>
<li><a href="#function-swe_azalt_rev-tjd_ut-calc_flag-xin0-xin1">function swe_azalt_rev(tjd_ut, calc_flag, xin0, xin1)</a>
<li><a href="#function-swe_azalt_rev-tjd_ut-calc_flag-lng-lat-alt-xin0-xin1">function swe_azalt_rev(tjd_ut, calc_flag, lng, lat, alt, xin0, xin1)</a>
<ul>
<li>
<ul>
Expand Down Expand Up @@ -772,7 +772,7 @@
</li>
</ul>
</li>
<li><a href="#function-swe_get_orbital_elements-tjd_1t-ipl-iflag">function swe_get_orbital_elements(tjd_1t, ipl, iflag)</a>
<li><a href="#function-swe_get_orbital_elements-tjd_et-ipl-iflag">function swe_get_orbital_elements(tjd_et, ipl, iflag)</a>
<ul>
<li>
<ul>
Expand Down Expand Up @@ -1570,7 +1570,7 @@ <h3 id="C-declaration21">C declaration</h3>

<p>void swe_set_topo(double geolon, double geolat, double geoalt)</p>

<h1 id="function-swe_set_sid_mode-sid_mode-t0-ayan_t0">function swe_set_sid_mode(sid_mode, &amp;t0, &amp;ayan_t0)</h1>
<h1 id="function-swe_set_sid_mode-sid_mode-t0-ayan_t0">function swe_set_sid_mode(sid_mode, t0, ayan_t0)</h1>

<p>Set one of the numerous sidereal modes, used with flag SEFLG_SIDEREAL and some functions</p>

Expand Down Expand Up @@ -1756,7 +1756,7 @@ <h3 id="Parameters29">Parameters</h3>
int month (1..12)
int day (1..31)
double hour UT (0.0 .. 23.99999) clock time as double
int gregflag SE_GREG_CAL (==1) or SE_JUL_CAL (==0)</code></pre>
int gregflag SE_GREG_CAL (==1, default) or SE_JUL_CAL (==0)</code></pre>

<h3 id="return-value1">return value</h3>

Expand All @@ -1773,14 +1773,18 @@ <h1 id="function-swe_revjul-jd-gregflag">function swe_revjul (jd, gregflag)</h1>
<h3 id="Parameters30">Parameters</h3>

<pre><code> double jd julian day number
int gregflag SE_GREG_CAL (==1) or SE_JUL_CAL (==0)</code></pre>
int gregflag SE_GREG_CAL (==1, default) or SE_JUL_CAL (==0)</code></pre>

<h3 id="return-array20">return array</h3>

<pre><code> [&#39;year&#39;] int
[&#39;month&#39;] int
[&#39;day&#39;] int
[&#39;hour&#39;] double</code></pre>
[&#39;hour&#39;] double
[&#39;ihour&#39;] int
[&#39;imin&#39;] int
[&#39;isec&#39;] int
[&#39;dsec&#39;] double</code></pre>

<h3 id="C-declaration33">C declaration</h3>

Expand Down Expand Up @@ -2165,17 +2169,17 @@ <h3 id="C-declaration47">C declaration</h3>

<pre><code> int swe_lun_occult_where(double tjd, int32 ipl, char *starname, int32 ifl, double *geopos, double *attr, char *serr);</code></pre>

<h1 id="function-swe_sol_eclipse_how-tjd_ut-iflag-geopos-0-geopos-1-geopos-2">function swe_sol_eclipse_how(tjd_ut, iflag, geopos[0], geopos[1], geopos[2]);</h1>
<h1 id="function-swe_sol_eclipse_how-tjd_ut-iflag-geolng-geolat-geoalt">function swe_sol_eclipse_how(tjd_ut, iflag, geolng, geolat, geoalt);</h1>

<p>Computes attributes of a solar eclipse for given tjd, geo. longitude, geo. latitude, and geo. height.</p>

<h3 id="Parameters45">Parameters</h3>

<pre><code> tjd_ut double Julian day number, Universal Time
iflag int (specify ephemeris to be used, cf. swe_calc( ))
geopos[0] double geographic longitude
geopos[1] double geographic latitude
geopos[2] double altitude above sea level, in meters</code></pre>
geolng double geographic longitude
geolat double geographic latitude
geoalt double altitude above sea level, in meters</code></pre>

<h3 id="return-array32">return array</h3>

Expand Down Expand Up @@ -2583,8 +2587,8 @@ <h3 id="Parameters56">Parameters</h3>
<pre><code> double inalt altitude of object in degrees
double geoalt altitude of observer above sea level in meters
double atpress atmospheric pressure (hectopascal)
double lapse_rate (dT/dh) [deg K/m]
double attemp atmospheric temperature &deg;C
double lapse_rate (dT/dh) [deg K/m]
int calc_flag either SE_APP_TO_TRUE or SE_TRUE_TO_APP</code></pre>

<h3 id="return-array42">return array</h3>
Expand Down Expand Up @@ -2727,16 +2731,19 @@ <h3 id="C-declaration63">C declaration</h3>

<pre><code> void swe_azalt( double tjd_ut, int32 calc_flag, double *geopos, double atpress, double attemp, double *xin, double *xaz)</code></pre>

<h1 id="function-swe_azalt_rev-tjd_ut-calc_flag-xin0-xin1">function swe_azalt_rev(tjd_ut, calc_flag, xin0, xin1)</h1>
<h1 id="function-swe_azalt_rev-tjd_ut-calc_flag-lng-lat-alt-xin0-xin1">function swe_azalt_rev(tjd_ut, calc_flag, lng, lat, alt, xin0, xin1)</h1>

<p>computes either ecliptical or equatorial coordinates from azimuth and true altitude in degrees.</p>

<h3 id="Parameters61">Parameters</h3>

<pre><code> double tjd_ut
int calc_flag either SE_HOR2ECL or SE_HOR2EQU
double xin0 azimut, in degrees
double xin1 true altitude, in degrees</code></pre>
int calc_flag Either SE_HOR2ECL or SE_HOR2EQU
double lng Longitude position of observer.
double lat Latitude position of observer.
double alt Altitude of observer.
double xin0 azimut, in degrees
double xin1 true altitude, in degrees</code></pre>

<h3 id="return-array47">return array</h3>

Expand Down Expand Up @@ -2867,7 +2874,7 @@ <h3 id="C-declaration68">C declaration</h3>

<pre><code> int swe_nod_aps_ut(double tjd_ut, int32 ipl, int32 iflag, int32 method, double *xnasc, double *xndsc, double *xperi, double *xaphe, char *serr)</code></pre>

<h1 id="function-swe_get_orbital_elements-tjd_1t-ipl-iflag">function swe_get_orbital_elements(tjd_1t, ipl, iflag)</h1>
<h1 id="function-swe_get_orbital_elements-tjd_et-ipl-iflag">function swe_get_orbital_elements(tjd_et, ipl, iflag)</h1>

<p>Calculates osculating orbital elements (Kepler elements) of a planet or asteroid or the Earth-Moon barycentre. The function returns error if called for the Sun, the lunar nodes, or the apsides.</p>

Expand Down Expand Up @@ -3051,7 +3058,8 @@ <h3 id="Parameters75">Parameters</h3>

<pre><code> double lng Longitude/right ascension position.
double lat Latitude/declination position.
double dist Distance (ignored).</code></pre>
double dist Distance (ignored).
double eps Obliquity of ecliptic, in degrees.</code></pre>

<h3 id="return-array58">return array</h3>

Expand All @@ -3076,7 +3084,8 @@ <h3 id="Parameters76">Parameters</h3>
double dist Distance (ignored).
double lngs Longitude/right ascension velocity.
double lat Latitude/declination velocity.
double dists Distance velocity (ignored).</code></pre>
double dists Distance velocity (ignored).
double eps Obliquity of ecliptic, in degrees.</code></pre>

<h3 id="return-array59">return array</h3>

Expand Down Expand Up @@ -3214,7 +3223,7 @@ <h1 id="function-swe_split_deg-ddeg-roundflag">function swe_split_deg(ddeg, roun
<h3 id="Parameters83">Parameters</h3>

<pre><code> double ddeg Decimal degree value to &quot;split&quot;.
double roundflag Default is no rounding; otherwise use flags:
int roundflag Default is no rounding; otherwise use flags:
SE_SPLIT_DEG_ROUND_SEC
SE_SPLIT_DEG_ROUND_MIN
SE_SPLIT_DEG_ROUND_DEG
Expand Down
39 changes: 24 additions & 15 deletions doc/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Set topocentric reference places, used with flag SEFLG\_TOPOCTR and some functio

void swe\_set\_topo(double geolon, double geolat, double geoalt)

# function swe\_set\_sid\_mode(sid\_mode, &t0, &ayan\_t0)
# function swe\_set\_sid\_mode(sid\_mode, t0, ayan\_t0)

Set one of the numerous sidereal modes, used with flag SEFLG\_SIDEREAL and some functions

Expand Down Expand Up @@ -645,7 +645,7 @@ Converts a calendar date to julian day number tjd, no validity check for date.
int month (1..12)
int day (1..31)
double hour UT (0.0 .. 23.99999) clock time as double
int gregflag SE_GREG_CAL (==1) or SE_JUL_CAL (==0)
int gregflag SE_GREG_CAL (==1, default) or SE_JUL_CAL (==0)

### return value

Expand All @@ -662,14 +662,18 @@ Converts julian day number to calendar date
### Parameters

double jd julian day number
int gregflag SE_GREG_CAL (==1) or SE_JUL_CAL (==0)
int gregflag SE_GREG_CAL (==1, default) or SE_JUL_CAL (==0)

### return array

['year'] int
['month'] int
['day'] int
['hour'] double
['ihour'] int
['imin'] int
['isec'] int
['dsec'] double

### C declaration

Expand Down Expand Up @@ -1061,17 +1065,17 @@ time.

int swe_lun_occult_where(double tjd, int32 ipl, char *starname, int32 ifl, double *geopos, double *attr, char *serr);

# function swe\_sol\_eclipse\_how(tjd\_ut, iflag, geopos\[0\], geopos\[1\], geopos\[2\]);
# function swe\_sol\_eclipse\_how(tjd\_ut, iflag, geolng, geolat, geoalt);

Computes attributes of a solar eclipse for given tjd, geo. longitude, geo. latitude, and geo. height.

### Parameters

tjd_ut double Julian day number, Universal Time
iflag int (specify ephemeris to be used, cf. swe_calc( ))
geopos[0] double geographic longitude
geopos[1] double geographic latitude
geopos[2] double altitude above sea level, in meters
geolng double geographic longitude
geolat double geographic latitude
geoalt double altitude above sea level, in meters

### return array

Expand Down Expand Up @@ -1462,7 +1466,7 @@ Transforms apparent to true altitude and vice-versa.

double inalt altitude of object in degrees
double atpress atmospheric pressure (hectopascal)
double attemp atmospheric temperature °C
double attemp atmospheric temperature °C
int calc_flag either SE_APP_TO_TRUE or SE_TRUE_TO_APP

### return value
Expand Down Expand Up @@ -1492,8 +1496,8 @@ It is more correct and more skilled than the old function swe\_refrac():
double inalt altitude of object in degrees
double geoalt altitude of observer above sea level in meters
double atpress atmospheric pressure (hectopascal)
double attemp atmospheric temperature °C
double lapse_rate (dT/dh) [deg K/m]
double attemp atmospheric temperature °C
int calc_flag either SE_APP_TO_TRUE or SE_TRUE_TO_APP

### return array
Expand Down Expand Up @@ -1639,16 +1643,19 @@ Computes azimut and height, from either ecliptic or equatorial coordinates

void swe_azalt( double tjd_ut, int32 calc_flag, double *geopos, double atpress, double attemp, double *xin, double *xaz)

# function swe\_azalt\_rev(tjd\_ut, calc\_flag, xin0, xin1)
# function swe\_azalt\_rev(tjd\_ut, calc\_flag, lng, lat, alt, xin0, xin1)

computes either ecliptical or equatorial coordinates from azimuth and true altitude in degrees.

### Parameters

double tjd_ut
int calc_flag either SE_HOR2ECL or SE_HOR2EQU
double xin0 azimut, in degrees
double xin1 true altitude, in degrees
int calc_flag Either SE_HOR2ECL or SE_HOR2EQU
double lng Longitude position of observer.
double lat Latitude position of observer.
double alt Altitude of observer.
double xin0 azimut, in degrees
double xin1 true altitude, in degrees

### return array

Expand Down Expand Up @@ -1779,7 +1786,7 @@ Detailed documentation in Programmer's manual and in comments in C source file s

int swe_nod_aps_ut(double tjd_ut, int32 ipl, int32 iflag, int32 method, double *xnasc, double *xndsc, double *xperi, double *xaphe, char *serr)

# function swe\_get\_orbital\_elements(tjd\_1t, ipl, iflag)
# function swe\_get\_orbital\_elements(tjd\_et, ipl, iflag)

Calculates osculating orbital elements (Kepler elements) of a planet
or asteroid or the Earth-Moon barycentre.
Expand Down Expand Up @@ -1973,6 +1980,7 @@ Convert ecliptic to equatorial if eps is negative.
double lng Longitude/right ascension position.
double lat Latitude/declination position.
double dist Distance (ignored).
double eps Obliquity of ecliptic, in degrees.

### return array

Expand Down Expand Up @@ -2000,6 +2008,7 @@ Convert ecliptic to equatorial if eps is negative.
double lngs Longitude/right ascension velocity.
double lat Latitude/declination velocity.
double dists Distance velocity (ignored).
double eps Obliquity of ecliptic, in degrees.

### return array

Expand Down Expand Up @@ -2140,7 +2149,7 @@ It can also round to seconds, minutes, degrees.
### Parameters

double ddeg Decimal degree value to "split".
double roundflag Default is no rounding; otherwise use flags:
int roundflag Default is no rounding; otherwise use flags:
SE_SPLIT_DEG_ROUND_SEC
SE_SPLIT_DEG_ROUND_MIN
SE_SPLIT_DEG_ROUND_DEG
Expand Down
Loading

0 comments on commit 23ef6ff

Please sign in to comment.