2013-09-05 11:36:43 +02:00
|
|
|
/* SWISSEPH
|
|
|
|
* $Header: /home/dieter/sweph/RCS/swedll.h,v 1.75 2009/04/08 07:19:08 dieter Exp $
|
|
|
|
*
|
|
|
|
* Windows DLL interface imports for the Astrodienst SWISSEPH package
|
|
|
|
*
|
|
|
|
|
2014-05-21 17:04:54 +02:00
|
|
|
**************************************************************/
|
2013-09-05 11:36:43 +02:00
|
|
|
/* Copyright (C) 1997 - 2008 Astrodienst AG, Switzerland. All rights reserved.
|
|
|
|
|
|
|
|
License conditions
|
|
|
|
------------------
|
|
|
|
|
|
|
|
This file is part of Swiss Ephemeris.
|
|
|
|
|
|
|
|
Swiss Ephemeris is distributed with NO WARRANTY OF ANY KIND. No author
|
|
|
|
or distributor accepts any responsibility for the consequences of using it,
|
|
|
|
or for whether it serves any particular purpose or works at all, unless he
|
|
|
|
or she says so in writing.
|
|
|
|
|
|
|
|
Swiss Ephemeris is made available by its authors under a dual licensing
|
|
|
|
system. The software developer, who uses any part of Swiss Ephemeris
|
|
|
|
in his or her software, must choose between one of the two license models,
|
|
|
|
which are
|
|
|
|
a) GNU public license version 2 or later
|
|
|
|
b) Swiss Ephemeris Professional License
|
|
|
|
|
|
|
|
The choice must be made before the software developer distributes software
|
|
|
|
containing parts of Swiss Ephemeris to others, and before any public
|
|
|
|
service using the developed software is activated.
|
|
|
|
|
|
|
|
If the developer choses the GNU GPL software license, he or she must fulfill
|
|
|
|
the conditions of that license, which includes the obligation to place his
|
|
|
|
or her whole software project under the GNU GPL or a compatible license.
|
|
|
|
See http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
|
|
|
|
If the developer choses the Swiss Ephemeris Professional license,
|
|
|
|
he must follow the instructions as found in http://www.astro.com/swisseph/
|
|
|
|
and purchase the Swiss Ephemeris Professional Edition from Astrodienst
|
|
|
|
and sign the corresponding license contract.
|
|
|
|
|
|
|
|
The License grants you the right to use, copy, modify and redistribute
|
|
|
|
Swiss Ephemeris, but only under certain conditions described in the License.
|
|
|
|
Among other things, the License requires that the copyright notices and
|
|
|
|
this notice be preserved on all copies.
|
|
|
|
|
|
|
|
Authors of the Swiss Ephemeris: Dieter Koch and Alois Treindl
|
|
|
|
|
|
|
|
The authors of Swiss Ephemeris have no control or influence over any of
|
|
|
|
the derived works, i.e. over software or services created by other
|
|
|
|
programmers which use Swiss Ephemeris functions.
|
|
|
|
|
|
|
|
The names of the authors or of the copyright holder (Astrodienst) must not
|
|
|
|
be used for promoting any software, product or service which uses or contains
|
|
|
|
the Swiss Ephemeris. This copyright notice is the ONLY place where the
|
|
|
|
names of the authors can legally appear, except in cases where they have
|
|
|
|
given special permission in writing.
|
|
|
|
|
|
|
|
The trademarks 'Swiss Ephemeris' and 'Swiss Ephemeris inside' may be used
|
|
|
|
for promoting such software, products or services.
|
2014-05-21 17:04:54 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id: swedll.h,v 1.75 2009/04/08 07:19:08 dieter Exp $ */
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
#ifdef __cplusplus
|
2014-05-21 17:04:54 +02:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
2013-09-05 11:36:43 +02:00
|
|
|
#ifndef _SWEDLL_H
|
|
|
|
#define _SWEDLL_H
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
#ifndef _SWEPHEXP_INCLUDED
|
|
|
|
#include "swephexp.h"
|
2014-05-21 17:04:54 +02:00
|
|
|
#endif
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
#ifdef USE_DLL16 /* 16bit DLL */
|
|
|
|
#define DllImport extern
|
2014-05-21 17:04:54 +02:00
|
|
|
#else
|
|
|
|
# ifdef __cplusplus
|
2013-09-05 11:36:43 +02:00
|
|
|
#define DllImport extern "C" __declspec( dllimport )
|
2014-05-21 17:04:54 +02:00
|
|
|
# else
|
2013-09-05 11:36:43 +02:00
|
|
|
#define DllImport __declspec( dllimport )
|
2014-05-21 17:04:54 +02:00
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
#if defined (PASCAL) || defined(__stdcall)
|
|
|
|
#define CALL_CONV_IMP __stdcall
|
|
|
|
#else
|
|
|
|
#define CALL_CONV_IMP
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_heliacal_ut(double JDNDaysUTStart, double *geopos, double *datm, double *dobs, char *ObjectName, int32 TypeEvent, int32 iflag, double *dret, char *serr);
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_heliacal_pheno_ut(double JDNDaysUT, double *geopos, double *datm, double *dobs, char *ObjectName, int32 TypeEvent, int32 helflag, double *darr, char *serr);
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_vis_limit_mag(double tjdut, double *geopos, double *datm, double *dobs, char *ObjectName, int32 helflag, double *dret, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
/* the following are secret, for Victor Reijs' */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_heliacal_angle(double tjdut, double *dgeo, double *datm, double *dobs, int32 helflag, double mag, double azi_obj, double azi_sun, double azi_moon, double alt_moon, double *dret, char *serr);
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_topo_arcus_visionis(double tjdut, double *dgeo, double *datm, double *dobs, int32 helflag, double mag, double azi_obj, double alt_obj, double azi_sun, double azi_moon, double alt_moon, double *dret, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_degnorm(double deg);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_version(char *);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_calc(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd, int ipl, int32 iflag,
|
|
|
|
double *xx,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_calc_ut(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, int32 ipl, int32 iflag,
|
|
|
|
double *xx,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_fixstar(
|
2014-05-21 17:04:54 +02:00
|
|
|
char *star, double tjd, int32 iflag,
|
|
|
|
double *xx,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_fixstar_ut(
|
2014-05-21 17:04:54 +02:00
|
|
|
char *star, double tjd_ut, int32 iflag,
|
|
|
|
double *xx,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_fixstar_mag(
|
2014-05-21 17:04:54 +02:00
|
|
|
char *star, double *xx, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_sidtime0(double tjd_ut, double ecl, double nut);
|
|
|
|
DllImport double CALL_CONV_IMP swe_sidtime(double tjd_ut);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_deltat_ex(double tjd, int32 iflag, char *serr);
|
|
|
|
DllImport double CALL_CONV_IMP swe_deltat(double tjd);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, double geolat, double geolon, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses_ex(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, int32 iflag, double geolat, double geolon, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses_armc(
|
2014-05-21 17:04:54 +02:00
|
|
|
double armc, double geolat, double eps, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_house_pos(
|
2014-05-21 17:04:54 +02:00
|
|
|
double armc, double geolon, double eps, int hsys, double *xpin, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_house_name(int hsys);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_gauquelin_sector(
|
2014-05-21 17:04:54 +02:00
|
|
|
double t_ut, int32 ipl, char *starname, int32 iflag, int32 imeth, double *geopos, double atpress, double attemp, double *dgsect, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_set_sid_mode(
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 sid_mode, double t0, double ayan_t0);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_get_ayanamsa_ex(double tjd_et, int32 iflag, double *daya, char *serr);
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_get_ayanamsa_ex_ut(double tjd_ut, int32 iflag, double *daya, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_get_ayanamsa(double tjd_et);
|
|
|
|
DllImport double CALL_CONV_IMP swe_get_ayanamsa_ut(double tjd_ut);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_get_ayanamsa_name(int32 isidmode);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_date_conversion(
|
2014-05-21 17:04:54 +02:00
|
|
|
int y , int m , int d , /* year, month, day */
|
|
|
|
double utime, /* universal time in hours (decimal) */
|
|
|
|
char c, /* calendar g[regorian]|j[ulian]|a[stro = greg] */
|
|
|
|
double *tjd);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_julday(
|
2014-05-21 17:04:54 +02:00
|
|
|
int year, int mon, int mday,
|
|
|
|
double hour,
|
|
|
|
int gregflag);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_revjul(
|
2014-05-21 17:04:54 +02:00
|
|
|
double jd, int gregflag,
|
|
|
|
int *year, int *mon, int *mday,
|
|
|
|
double *hour);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_utc_time_zone(
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 iyear, int32 imonth, int32 iday,
|
|
|
|
int32 ihour, int32 imin, double dsec,
|
|
|
|
double d_timezone,
|
|
|
|
int32 *iyear_out, int32 *imonth_out, int32 *iday_out,
|
|
|
|
int32 *ihour_out, int32 *imin_out, double *dsec_out);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_utc_to_jd(
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 iyear, int32 imonth, int32 iday,
|
|
|
|
int32 ihour, int32 imin, double dsec,
|
|
|
|
int32 gregflag, double *dret, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_jdet_to_utc(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_et, int32 gregflag,
|
|
|
|
int32 *iyear, int32 *imonth, int32 *iday,
|
|
|
|
int32 *ihour, int32 *imin, double *dsec);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_jdut1_to_utc(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, int32 gregflag,
|
|
|
|
int32 *iyear, int32 *imonth, int32 *iday,
|
|
|
|
int32 *ihour, int32 *imin, double *dsec);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_time_equ(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd, double *e, char *serr);
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_lmt_to_lat(double tjd_lmt, double geolon, double *tjd_lat, char *serr);
|
|
|
|
DllImport int CALL_CONV_IMP swe_lat_to_lmt(double tjd_lat, double geolon, double *tjd_lmt, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_get_tid_acc(void);
|
|
|
|
DllImport void CALL_CONV_IMP swe_set_tid_acc(double tidacc);
|
|
|
|
DllImport void CALL_CONV_IMP swe_set_ephe_path(char *path);
|
|
|
|
DllImport void CALL_CONV_IMP swe_set_jpl_file(char *fname);
|
|
|
|
DllImport void CALL_CONV_IMP swe_close(void);
|
|
|
|
DllImport char * CALL_CONV_IMP swe_get_planet_name(int ipl, char *spname);
|
|
|
|
DllImport void CALL_CONV_IMP swe_cotrans(double *xpo, double *xpn, double eps);
|
|
|
|
DllImport void CALL_CONV_IMP swe_cotrans_sp(double *xpo, double *xpn, double eps);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_set_topo(double geolon, double geolat, double height);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_set_astro_models(int32 *imodel);
|
2015-09-13 15:35:46 +02:00
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/****************************
|
|
|
|
* from swecl.c
|
2014-05-21 17:04:54 +02:00
|
|
|
****************************/
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/* computes geographic location and attributes of solar
|
2014-05-21 17:04:54 +02:00
|
|
|
* eclipse at a given tjd */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_where(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_occult_where(double tjd, int32 ipl, char *starname, int32 ifl, double *geopos, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* computes attributes of a solar eclipse for given tjd, geolon, geolat */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_how(double tjd, int32 ifl, double *geopos, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* finds time of next local eclipse */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_when_loc(double tjd_start, int32 ifl, double *geopos, double *tret, double *attr, int32 backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_occult_when_loc(double tjd_start, int32 ipl, char *starname, int32 ifl, double *geopos, double *tret, double *attr, int32 backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* finds time of next eclipse globally */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_when_glob(double tjd_start, int32 ifl, int32 ifltype, double *tret, int32 backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* finds time of next occultation globally */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_occult_when_glob(double tjd_start, int32 ipl, char *starname, int32 ifl, int32 ifltype, double *tret, int32 backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* computes attributes of a lunar eclipse for given tjd */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_eclipse_how(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut,
|
|
|
|
int32 ifl,
|
|
|
|
double *geopos,
|
|
|
|
double *attr,
|
|
|
|
char *serr);
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_eclipse_when(double tjd_start, int32 ifl, int32 ifltype, double *tret, int32 backward, char *serr);
|
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_eclipse_when_loc(double tjd_start, int32 ifl, double *geopos, double *tret, double *attr, int32 backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
/* planetary phenomena */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_pheno(double tjd, int32 ipl, int32 iflag, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_pheno_ut(double tjd_ut, int32 ipl, int32 iflag, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_refrac(double inalt, double atpress, double attemp, int32 calc_flag);
|
|
|
|
DllImport double CALL_CONV_IMP swe_refrac_extended(double inalt, double geoalt, double atpress, double attemp, double lapse_rate, int32 calc_flag, double *dret);
|
|
|
|
DllImport void CALL_CONV_IMP swe_set_lapse_rate(double lapse_rate);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_azalt(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut,
|
|
|
|
int32 calc_flag,
|
|
|
|
double *geopos,
|
|
|
|
double atpress,
|
|
|
|
double attemp,
|
|
|
|
double *xin,
|
|
|
|
double *xaz);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_azalt_rev(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut,
|
|
|
|
int32 calc_flag,
|
|
|
|
double *geopos,
|
|
|
|
double *xin,
|
|
|
|
double *xout);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_rise_trans(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, int32 ipl, char *starname,
|
|
|
|
int32 epheflag, int32 rsmi,
|
|
|
|
double *geopos,
|
|
|
|
double atpress, double attemp,
|
|
|
|
double *tret,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_rise_trans_true_hor(
|
2014-05-21 17:04:54 +02:00
|
|
|
double tjd_ut, int32 ipl, char *starname,
|
|
|
|
int32 epheflag, int32 rsmi,
|
|
|
|
double *geopos,
|
|
|
|
double atpress, double attemp,
|
|
|
|
double horhgt,
|
|
|
|
double *tret,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_nod_aps(double tjd_et, int32 ipl, int32 iflag,
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 method,
|
|
|
|
double *xnasc, double *xndsc,
|
|
|
|
double *xperi, double *xaphe,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_nod_aps_ut(double tjd_ut, int32 ipl, int32 iflag,
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 method,
|
|
|
|
double *xnasc, double *xndsc,
|
|
|
|
double *xperi, double *xaphe,
|
|
|
|
char *serr);
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/*******************************************************
|
|
|
|
* other functions from swephlib.c;
|
|
|
|
* they are not needed for Swiss Ephemeris,
|
|
|
|
* but may be useful to former Placalc users.
|
2014-05-21 17:04:54 +02:00
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
/* normalize argument into interval [0..DEG360] */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_csnorm(centisec p);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* distance in centisecs p1 - p2 normalized to [0..360[ */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_difcsn (centisec p1, centisec p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_difdegn (double p1, double p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* distance in centisecs p1 - p2 normalized to [-180..180[ */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_difcs2n(centisec p1, centisec p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_difdeg2n(double p1, double p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport double CALL_CONV_IMP swe_difdeg2n(double p1, double p2);
|
|
|
|
DllImport double CALL_CONV_IMP swe_difrad2n(double p1, double p2);
|
|
|
|
DllImport double CALL_CONV_IMP swe_rad_midp(double x1, double x0);
|
|
|
|
DllImport double CALL_CONV_IMP swe_deg_midp(double x1, double x0);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* round second, but at 29.5959 always down */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_csroundsec(centisec x);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* double to int32 with rounding, no overflow check */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_d2l(double x);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport void CALL_CONV_IMP swe_split_deg(double ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *isgn);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* monday = 0, ... sunday = 6 */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_day_of_week(double jd);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2timestr(CSEC t, int sep, AS_BOOL suppressZero, char *a);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2lonlatstr(CSEC t, char pchar, char mchar, char *s);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2degstr(CSEC t, char *a);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/* additional functions for antiquated GFA basic DLL interface.
|
|
|
|
* double -> double *
|
|
|
|
* char -> char *
|
|
|
|
* void -> int
|
2014-05-21 17:04:54 +02:00
|
|
|
*/
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_calc_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd, int ipl, int32 iflag,
|
|
|
|
double *x,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_calc_ut_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd, int16 ipl, int32 iflag,
|
|
|
|
double *x,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_fixstar_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
char *star, double *tjd, int32 iflag,
|
|
|
|
double *x,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_fixstar_ut_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
char *star, double *tjd, int32 iflag,
|
|
|
|
double *x,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_close_d(int ivoid);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_set_ephe_path_d(char *path);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_set_jpl_file_d(char *fname);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_get_planet_name_d(int ipl, char *spname);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_deltat_d(double *tjd, double *deltat);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_sidtime0_d(double *tjd_ut, double *eps,
|
2014-05-21 17:04:54 +02:00
|
|
|
double *nut, double *sidt);
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_sidtime_d(double *tjd_ut, double *sidt);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_set_sid_mode_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 sid_mode, double *t0, double *ayan_t0);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_get_ayanamsa_d(double *tjd_et, double *ayan);
|
|
|
|
DllImport int CALL_CONV_IMP swe_get_ayanamsa_ut_d(double *tjd_et, double *ayan);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_cotrans_d(double *xpo, double *xpn, double *eps);
|
|
|
|
DllImport int CALL_CONV_IMP swe_cotrans_sp_d(double *xpo, double *xpn, double *eps);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_set_topo_d(double *geolon, double *geolat, double *height);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_get_tid_acc_d(double *t_acc);
|
|
|
|
DllImport int CALL_CONV_IMP swe_set_tid_acc_d(double *t_acc);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_degnorm_d(double *x);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_date_conversion_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
int y , int m , int d , /* year, month, day */
|
|
|
|
double *utime, /* universal time in hours (decimal) */
|
|
|
|
char *c, /* calendar g[regorian]|j[ulian]|a[stro = greg] */
|
|
|
|
double *tjd);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_julday_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
int year, int month, int day, double *hour,
|
|
|
|
int gregflag, double *tjd);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_revjul_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd,
|
|
|
|
int gregflag,
|
|
|
|
int *jyear, int *jmon, int *jday, double *jut);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd, double *geolat, double *geolon, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses_ex_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd_ut, int32 iflag, double *geolat, double *geolon, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_houses_armc_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *armc, double *geolat, double *eps, int hsys,
|
|
|
|
double *hcusps, double *ascmc);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_house_pos_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *armc, double *geolon, double *eps, int hsys, double *xpin, double *hpos, char *serr);
|
|
|
|
|
|
|
|
/* normalize argument into interval [0..DEG360] */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_csnorm_d(centisec p);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* distance in centisecs p1 - p2 normalized to [0..360[ */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_difcsn_d(centisec p1, centisec p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_difdegn_d(double *p1, double *p2, double *diff);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* distance in centisecs p1 - p2 normalized to [-180..180[ */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_difcs2n_d(centisec p1, centisec p2);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_difdeg2n_d(double *p1, double *p2, double *diff);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* round second, but at 29.5959 always down */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport centisec CALL_CONV_IMP swe_csroundsec_d(centisec x);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* double to int32 with rounding, no overflow check */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_d2l_d(double *x);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_split_deg_d(double *ddeg, int32 roundflag, int32 *ideg, int32 *imin, int32 *isec, double *dsecfr, int32 *isgn);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* monday = 0, ... sunday = 6 */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_day_of_week_d(double *jd);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2timestr_d(CSEC t, int sep, AS_BOOL suppressZero, char *a);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2lonlatstr_d(CSEC t, char *pchar, char *mchar, char *s);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport char * CALL_CONV_IMP swe_cs2degstr_d(CSEC t, char *a);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/****************************
|
|
|
|
* from swecl.c
|
2014-05-21 17:04:54 +02:00
|
|
|
****************************/
|
|
|
|
|
2013-09-05 11:36:43 +02:00
|
|
|
/* computes geographic location and attributes of solar
|
2014-05-21 17:04:54 +02:00
|
|
|
* eclipse at a given tjd */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_where_d(double *tjd_ut, int32 ifl, double *geopos, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* computes attributes of a solar eclipse for given tjd, geolon, geolat */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_how_d(double *tjd_ut, int32 ifl, double geolon, double geolat, double geohgt, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* finds time of next local eclipse */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_when_loc_d(double *tjd_start, int32 ifl, double *geopos, double *tret, double *attr, AS_BOOL backward, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
|
|
|
/* finds time of next eclipse globally */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_sol_eclipse_when_glob_d(double *tjd_start, int32 ifl, int32 ifltype,
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tret, AS_BOOL backward, char *serr);
|
|
|
|
|
|
|
|
/* computes attributes of a lunar eclipse for given tjd */
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_eclipse_how_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd_ut,
|
|
|
|
int32 ifl,
|
|
|
|
double *attr,
|
|
|
|
char *serr);
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_lun_eclipse_when_d(double *tjd_start, int32 ifl, int32 ifltype,
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tret, AS_BOOL backward, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_pheno_d(double *tjd, int32 ipl, int32 iflag,
|
2014-05-21 17:04:54 +02:00
|
|
|
double *attr, char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_pheno_ut_d(double *tjd_ut, int32 ipl, int32 iflag, double *attr, char *serr);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_refrac_d(double *inalt, double *atpress, double *attemp, int32 calc_flag, double *retalt);
|
2014-05-21 17:04:54 +02:00
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_azalt_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd_ut,
|
|
|
|
int32 calc_flag,
|
|
|
|
double *geopos,
|
|
|
|
double *atpress,
|
|
|
|
double *attemp,
|
|
|
|
double *xin,
|
|
|
|
double *xaz);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int CALL_CONV_IMP swe_azalt_rev_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd_ut,
|
|
|
|
int32 calc_flag,
|
|
|
|
double *geopos,
|
|
|
|
double *xin,
|
|
|
|
double *xout);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_rise_trans_d(
|
2014-05-21 17:04:54 +02:00
|
|
|
double *tjd_ut, int32 ipl, char *starname,
|
|
|
|
int32 epheflag, int32 rsmi,
|
|
|
|
double *geopos,
|
|
|
|
double *atpress, double *attemp,
|
|
|
|
double *tret,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_nod_aps_d(double *tjd_et, int32 ipl, int32 iflag,
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 method,
|
|
|
|
double *xnasc, double *xndsc,
|
|
|
|
double *xperi, double *xaphe,
|
|
|
|
char *serr);
|
|
|
|
|
2016-07-25 12:42:52 +02:00
|
|
|
DllImport int32 CALL_CONV_IMP swe_nod_aps_ut_d(double *tjd_ut, int32 ipl, int32 iflag,
|
2014-05-21 17:04:54 +02:00
|
|
|
int32 method,
|
|
|
|
double *xnasc, double *xndsc,
|
|
|
|
double *xperi, double *xaphe,
|
|
|
|
char *serr);
|
|
|
|
|
|
|
|
#endif /* !_SWEDLL_H */
|
2013-09-05 11:36:43 +02:00
|
|
|
#ifdef __cplusplus
|
2014-05-21 17:04:54 +02:00
|
|
|
} /* extern C */
|
|
|
|
#endif
|