Swiss Ephemeris for Astrology-program

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 17854 Views - Last Post: 03 November 2014 - 08:23 AM Rate Topic: -----

#1 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Swiss Ephemeris for Astrology-program

Post icon  Posted 16 September 2009 - 06:40 AM

Dear friends,

I'm a beginner in programming, have been learning Visual Basic using MS Visual Studio 2005 for the last few months. I don't have anyone to get any help and have bought a Book "Microsoft Visual Basic 2005 Step-by-Step" and another one "Microsoft Visual C# 2005 Step-by-Step".

I am not familiar in creating Classes, Methods etc and not done/used any of the Array, etc. But went through the Book on these once - not very happy about them as I couldn't master them.

Actually I started to learn programming to write a program on Astrology. For that e have to use the Swiss Ephemeris - to get the planetary positions for a particular time etc.
I have downloaded the free version of the Swiss Ephemeris (From "www.Astro.com"), but couldn't find out how to use it, though there are sample programs - and it is written in Visual Basic 6 which I'm not familiar with. I asked help from some of the people who have written programs using it but they are reluctant to help me - so far I haven't got any help from them. Can any of you help me to write a program in Astrology?

Even the sample program gives problem - it says couldn't find the .... so using another ephemeris instead of Swiss Ephemeris.."

Since I couldn't get that correctly and Don't know how to use I'm unable to try writing any codes fr it. So please don't tell me first write some codes and show us for helping - your usual answer.

Hope to get some help from you!

Thanks
Regards
VKSBK
[color=#3333FF]

Is This A Good Question/Topic? 0
  • +

Replies To: Swiss Ephemeris for Astrology-program

#2 Luc001  Icon User is offline

  • D.I.C Addict

Reputation: 84
  • View blog
  • Posts: 617
  • Joined: 04-May 09

Re: Swiss Ephemeris for Astrology-program

Posted 16 September 2009 - 07:00 AM

Hi,

Perhaps you can find some information here.
Was This Post Helpful? 0
  • +
  • -

#3 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Re: Swiss Ephemeris for Astrology-program

Posted 16 September 2009 - 07:17 AM

Dear friends,

Sorry, I couldn't post "Introduce meself" as I couldn't find where to write - when I click that, I didn't get any writing form, still searching for that, so I posted a question straightaway.

Dear Luc001
Thanks for the link. I know that site and I have downloadd 2 programs form that site. But I don't know whether they will help me to learn how to use Swiss Ephemeris. I'll once again try the Forum found in that site.

Thanks
Regards
VKSBK.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9500
  • View blog
  • Posts: 35,848
  • Joined: 12-June 08

Re: Swiss Ephemeris for Astrology-program

Posted 16 September 2009 - 09:14 AM

So... you are looking for help on how to use this "Swiss Ephemeris" program (what ever the f' that is)?

How about going to that program's company's website and reading the help file?

I don't get how this is a programming question.
Was This Post Helpful? 0
  • +
  • -

#5 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Re: Swiss Ephemeris for Astrology-program

Posted 16 September 2009 - 10:49 PM

Modi123_1,

Please read my 1st post before writing some bad comments!

I've clearly stated in the 3rd para of the 1st post what the Swiss Ephemeris is and what it is for.

If you are that lazy, I don't mind re-writing it.
Swiss Ephemeris is used to get the Planetary positions for a particular Time, particular place etc which is used to write an Astrology program.

I don't think you can call it a Program. May be, a file - .There is a sample -Demo- program to show how to use the Swiss Ephemeris to create Astrology program. This gives the planetary positions etc on giving the date, place (Country, city...) etc.

If you still can't understand, please go to the web site I mentioned in the 1st post and see / download, study, understand and then reply.

Please refrain from using bad language ...

Thanks
VKSBK.

Was This Post Helpful? 0
  • +
  • -

#6 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 9500
  • View blog
  • Posts: 35,848
  • Joined: 12-June 08

Re: Swiss Ephemeris for Astrology-program

Posted 17 September 2009 - 09:37 AM

Wow.. Okay... Didn't expect such a snarky response. I'll try and see if you can understand the nature of my f'n post. (Side note - what bad language?)

First.. I really didn't care what it was that was just a question if you were willing to cough up more information. It wasn't the crux of my post.

Second.. What I was looking for was a definitive answer if you are trying to write a program or understand *HOW* to use something you got off a website.

Quote

Actually I started to learn programming to write a program on Astrology.

Okay we know you are learning to write one. Good so far. Let's see if you outline a problem.

Quote

I have downloaded the free version of the Swiss Ephemeris <snip> but couldn't find out how to use it, though there are sample programs

This is where it gets confusing. It's not a problem with a piece of VB.NET code. You tell us you can't get this program working. This forum is not tech support for program X or company Y. *shrug* Let's move on and see if there is an actual program question.

Quote

But I don't know whether they will help me to learn how to use Swiss Ephemeris

This post you had to the other guy seems to indicate you just want to learn how to use this Swiss Kiss stuff. Refer to above.

Quote

Can any of you help me to write a program in Astrology?

Another issue.. do you want someone to write it for you? If so post it the "post a job" forum here. Asking 'for teh codez' is frowned upon. Buck up and learn it yourself!


Side note saying "to get the planetary positions for a particular time etc." does not in any real way explain what this Swiss Miss thing is. As I said I really don't care. It was just a passing comment hoping you might expand. Oh, and I won't be going to a quack site about quack things.

So.. all that being said:
do you..
have a question..
about a program you are making?

:P
Was This Post Helpful? 0
  • +
  • -

#7 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Re: Swiss Ephemeris for Astrology-program

Posted 17 September 2009 - 06:58 PM

View Postmodi123_1, on 17 Sep, 2009 - 08:37 AM, said:

Wow.. Okay... Didn't expect such a snarky response. I'll try and see if you can understand the nature of my f'n post. (Side note - what bad language?)

First.. I really didn't care what it was that was just a question if you were willing to cough up more information. It wasn't the crux of my post.

Second.. What I was looking for was a definitive answer if you are trying to write a program or understand *HOW* to use something you got off a website.

Quote

Actually I started to learn programming to write a program on Astrology.

Okay we know you are learning to write one. Good so far. Let's see if you outline a problem.

Quote

I have downloaded the free version of the Swiss Ephemeris <snip> but couldn't find out how to use it, though there are sample programs

This is where it gets confusing. It's not a problem with a piece of VB.NET code. You tell us you can't get this program working. This forum is not tech support for program X or company Y. *shrug* Let's move on and see if there is an actual program question.

Quote

But I don't know whether they will help me to learn how to use Swiss Ephemeris

This post you had to the other guy seems to indicate you just want to learn how to use this Swiss Kiss stuff. Refer to above.

Quote

Can any of you help me to write a program in Astrology?

Another issue.. do you want someone to write it for you? If so post it the "post a job" forum here. Asking 'for teh codez' is frowned upon. Buck up and learn it yourself!


Side note saying "to get the planetary positions for a particular time etc." does not in any real way explain what this Swiss Miss thing is. As I said I really don't care. It was just a passing comment hoping you might expand. Oh, and I won't be going to a quack site about quack things.

So.. all that being said:
do you..
have a question..
about a program you are making?

:P

Was This Post Helpful? 0
  • +
  • -

#8 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Re: Swiss Ephemeris for Astrology-program

Posted 17 September 2009 - 07:28 PM

Hi,

Sorry about reposting the reply from Modi123_1 by mistake.

I've pasted the ReadMe.txt from the Astro.com for the Swiss Ephemeris.

I may have used the wrong words to refer to that making you to think it is a program and I don't know how to use it. So if you read this you will understand what it is, as you are a advanced programmer and I am a beginner - who don't know what is what.

Anyway, What do you mean by " So... you are looking for help on how to use this "Swiss Ephemeris" program (what ever the f' that is
)?

Further, I don't want to continue this fight - not my nature, if you really want to help read that and answer or just ignore it.

Yes, you don't care and you don't have to "As I said I really don't care. It was just a passing comment hoping you might expand. Oh, and I won't be going to a quack site about quack things.".

"So.. all that being said:
do you..
have a question..
about a program you are making? ", Yes I have, that is why I am posting this. Read the "ReadMe txt" then you may get some idea.

That was written in VB 5, which I don't know - a problem to understand the files of the Demo program. As I don't know and I want help to understand how to Call the SE Functions
.

Hope I am not wasting your time as well as mine!!

Thanks for the fight - a useless one - started by you,

[color=#FF6666]Given below is the ReadMe txt:


00readme.txt 27-jul-2008 by Alois Treindl

This download area contains the Free Edition of the SWISS EPHEMERIS.

About the Swiss Ephemeris:

Swiss Ephemeris is a software toolbox for programmers of astrological
software. It is of little use for a non-programmer

The test programs SWETEST.EXE and SWEWIN.EXE come
with it as demonstration programs for programmers to show them how
they can call the SE functions.
swetest.exe can be used to compute complete natal horoscopes as textual
output.

Programmers all over the world have started to build SE into their
software.

SE ist built according to the highest standards of precision available
in astronomical data. It is able to reproduce the ephemeris data in
astronomical standard books up to the last printed digit.

Detailed information is available at http://www.astro.com/swisseph
or in the documentation files included in the distribution.

Description of files:
=====================
While we have made available many single files, so that they can
be viewed directly in a browser, it is much more convenient to
download the files in '.zip' or '.gz' format. Except for the single
asteroid files, all files in this area available in one of the 'zip' or
'gz' archives and should be downloaded in the archived form for higher
speed.

LICENSE.TXT
The Swiss Ephemeris is published currently under GPL, and
alternatively under Swiss Ephemeris Professional License,
You must read and accept the license before you download any files.

swe_unix_src_1.74.tar.gz
The release of the Swiss Ephemeris source code.
It has currently been tested on Linux and Windows 2003.
A simple Makefile to create a Unix library is included.
The unix-readable of the doc directory are also included.
The release number is sometimes changing frequently when we are in an
active development phase.
Sometimes several releases will be available at the same time.
It is usually best to take the one with the highest release number.

Release 1.61 was the last one which contained 16-bit support.
It is permanently archived in subdirectory sweph161.

Release 1.67 was the last with the old IAU precission model 1976
(Lieske), old nutation model 1980 (Wahr). It is preserved
in swe_unix_src_1.67.tar.gz and sweph_1.67.zip

sweph.zip
The complete Swiss Ephemeris package for Windows (32bit),
except the ephemeris data files.
See online documentation at http://www.astro.com/swisseph
or in the doc directory for more details.
Small sample programs and build-projects are included for
- Visual C++ .net 2003
- Visual Basic 5.0
- Delphi 32-bit
Note for release 1.67 and later: Visual Basic files have not been updated and
tested, as we currently do not possess a copy of VB running on Windows 2003.

swephzip.txt
overview of content of the sweph.zip package

src/*
unpacked source archive, identical to content of archive file above,
with the highest release number.

doc/*
swisseph.doc Feature Documentation, MS Word format
swephprg.doc Programmer's Documentation, MS Word format
[there are also PDF and HTML versions of these files]
graphical labels (Corel Draw 7.0 and GIF versions)
All files are also contained in the swe_src_..gz archive.

ephe Directory with binary ephemeris files.

programs
A directory containing sample and utility programs for Windows:
swewin32.zip
zipped archive containing swewin.exe.
This is a small Windows application which computes complete
horoscopes, including houses and asteroids.
It runs on Windows 95/98/NT/2000/XP

swetest.exe
executable Swiss Ephemeris program.
This is a 32-bit Console mode application.
To get information about the many features of this program, run
swetest -? > out.txt
and print the file out.txt, or view it with your text editor.
This is just a sample to demonstrate the precision of the
ephemeris, and to show the typical use of a few cally.

swetest.zip
zipped version of swetest.exe for faster download.

unzip.exe
A Windows utility to unzip .ZIP files.
If you have WinZip on your system, just double click on the
the downloaded ZIP files and Winzip will take care of unzipping.
Otherwise you can use unzip.exe: open a command (DOS) Windows,
type the command: unzip sweph.zip
and the zip-archive will be unpacked in a local directory named
'sweph'.

It is possible to use SWEWIN and SWETEST without the ephemeris files.
If the program finds no ephemeris files, it uses the builtin
analytical ephemeris which provides "only" a precision of 0.1 arc seconds
for the planets and 3" for the Moon.
No asteroids will be available, and no barycentric option can be used.

The SWISS EPHEMERIS can be licensed by programmers to include this
calculation engine in their software. More information is found at
http://www.astro.com/swisseph/

Depending on your application the free edition under the Public License
may apply, or you may have to acquire a professional license for a fee.

CDROM distribution:
===================
The content of parts of this downlaod area is also available on CDROM,
for a price of 39.90 Swiss Francs plus shipping (approx. USD 30.-).
The CDROM contains about 600 Mbytes of data, with most space taken
up by the original JPL DE406 ephemeris files (200 Mb) and a selected
set of short 600-year asteroid files.


Legal restrictions
==================
Read LICENSE.TXT

Mailing list
============
We maintain a mailing list which we use to send developers information about
updates, bugs etc.
If you want to have your name added to this mailing list, please
visit groups.yahoo.com/swisseph

Feedback
========
We welcome any suggestions and comments you may have about the Swiss Ephemeris.
Please email to swisseph@groups.yahoo.com

If you want your feedback distributed to all members of the swisseph
mailing list, please write to swisseph@astro.ch

Public feedback to the Swiss Ephemeris is also welcome in our general guestbook
on the website.


Java-Version:
=============
Thomas Mack has ported the Swiss Ephemeris library to Java.
His work can be found at: http://www.th-mack.d...ional/download/
If you use it for commercial or for non-open-source purposes, please
be aware that a Swiss Ephemeris professional license by Astrodienst
is also required for the Java version, besides any additional requirements
which may be defined by Thomas Mack.

Numerical Integrator
====================
the numerical integrator to prepare swisss ephemeris files is not in a state
fit for publication.

There is a file numint.tar.gz which contains all the parts needed for it,
so that those who want to look can have a look at it.
The permission to use it is currently 'read source code' only.



VKSBK.

PS: Please don't continue to write any such, if you don't want help just keep off, some others might help.
Was This Post Helpful? 0
  • +
  • -

#9 Guest_wyomesh*


Reputation:

Re: Swiss Ephemeris for Astrology-program

Posted 03 January 2011 - 12:31 AM

View PostVKSBK, on 16 September 2009 - 05:40 AM, said:

Dear friends,

I'm a beginner in programming, have been learning Visual Basic using MS Visual Studio 2005 for the last few months. I don't have anyone to get any help and have bought a Book "Microsoft Visual Basic 2005 Step-by-Step" and another one "Microsoft Visual C# 2005 Step-by-Step".

I am not familiar in creating Classes, Methods etc and not done/used any of the Array, etc. But went through the Book on these once - not very happy about them as I couldn't master them.

Actually I started to learn programming to write a program on Astrology. For that e have to use the Swiss Ephemeris - to get the planetary positions for a particular time etc.
I have downloaded the free version of the Swiss Ephemeris (From "www.Astro.com"), but couldn't find out how to use it, though there are sample programs - and it is written in Visual Basic 6 which I'm not familiar with. I asked help from some of the people who have written programs using it but they are reluctant to help me - so far I haven't got any help from them. Can any of you help me to write a program in Astrology?

Even the sample program gives problem - it says couldn't find the .... so using another ephemeris instead of Swiss Ephemeris.."

Since I couldn't get that correctly and Don't know how to use I'm unable to try writing any codes fr it. So please don't tell me first write some codes and show us for helping - your usual answer.

Hope to get some help from you!

Thanks
Regards
VKSBK
[color=#3333FF]

Was This Post Helpful? -1

#10 Guest_wyomesh*


Reputation:

Re: Swiss Ephemeris for Astrology-program

Posted 03 January 2011 - 12:46 AM

Hello

Swiss ephemeris is compatible with older versions of visual studio, but we can use it with visual studio .NET too.
download the sweph.zip file from the website. there you should find declaration.txt. these are the declarations
for VB6.0. since data types in VB.NET can store a lot more data than it could store in previous versions. so you
will have to manually replace the LONG data type into INTEGER data type, Integer to SHORT etc. if you want to use those declaration with VB.NET.
then copy all these declarations in a module.
place your SWEDLL32.DLL in "Debug" directory, also put your ephemeris files there.
first you will have to call the swe_set_eph_path function to set the ephemeris path.
then start calling functions to calculate what you want.

making a DLL is so simple in .NET, just add a class module in your application

class class-name
' your functions and other things.
end class

.NET will compile automatically it as an DLL.

now if you want to use this DLL for calling functions in it , just add a reference to this DLL in your application.
dim aa as new MyFunctions
dim kkk as integer
kkk= aa.myfunction1(arg1,arg2) .... etc.

where MyFunctions is your DLL's name added in references.
aa is an object of this DLL class and myfunction1 is a function returns integer, and takes 2 arguments arg1 and arg2.

So .NET is very simple. If you want programming help on functions provided in SWISS ephemeris then download it's
full documentation available on website.

Thanks

View Postwyomesh, on 02 January 2011 - 11:31 PM, said:

View PostVKSBK, on 16 September 2009 - 05:40 AM, said:

Dear friends,

I'm a beginner in programming, have been learning Visual Basic using MS Visual Studio 2005 for the last few months. I don't have anyone to get any help and have bought a Book "Microsoft Visual Basic 2005 Step-by-Step" and another one "Microsoft Visual C# 2005 Step-by-Step".

I am not familiar in creating Classes, Methods etc and not done/used any of the Array, etc. But went through the Book on these once - not very happy about them as I couldn't master them.

Actually I started to learn programming to write a program on Astrology. For that e have to use the Swiss Ephemeris - to get the planetary positions for a particular time etc.
I have downloaded the free version of the Swiss Ephemeris (From "www.Astro.com"), but couldn't find out how to use it, though there are sample programs - and it is written in Visual Basic 6 which I'm not familiar with. I asked help from some of the people who have written programs using it but they are reluctant to help me - so far I haven't got any help from them. Can any of you help me to write a program in Astrology?

Even the sample program gives problem - it says couldn't find the .... so using another ephemeris instead of Swiss Ephemeris.."

Since I couldn't get that correctly and Don't know how to use I'm unable to try writing any codes fr it. So please don't tell me first write some codes and show us for helping - your usual answer.

Hope to get some help from you!

Thanks
Regards
VKSBK
[color=#3333FF]

Was This Post Helpful? -1

#11 VKSBK  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 15-September 09

Re: Swiss Ephemeris for Astrology-program

Posted 03 January 2011 - 04:24 AM

Dear Wyomesh,

Thanks you very much for your reply.

I found out how to use the Swiss Ephemeris and already created a Program using it ( I started using it since 2009 Sept / Oct); I am getting all the planetary positions and House (Cusp) position.
There are more features to be added to the program which I need to learn how to program.

You must thank you for telling me how to make a dll file.

By the way, did you visit the Swiss Ephemeris site to know about it or are you using Swiss Ephemeris for creating a Astrology software ?

Just curious !

Anyway, thank you very much for replying and teaching me some programming.

Thanks
Regards

VKSBK.







View Postwyomesh, on 02 January 2011 - 11:46 PM, said:

Hello

Swiss ephemeris is compatible with older versions of visual studio, but we can use it with visual studio .NET too.
download the sweph.zip file from the website. there you should find declaration.txt. these are the declarations
for VB6.0. since data types in VB.NET can store a lot more data than it could store in previous versions. so you
will have to manually replace the LONG data type into INTEGER data type, Integer to SHORT etc. if you want to use those declaration with VB.NET.
then copy all these declarations in a module.
place your SWEDLL32.DLL in "Debug" directory, also put your ephemeris files there.
first you will have to call the swe_set_eph_path function to set the ephemeris path.
then start calling functions to calculate what you want.

making a DLL is so simple in .NET, just add a class module in your application

class class-name
' your functions and other things.
end class

.NET will compile automatically it as an DLL.

now if you want to use this DLL for calling functions in it , just add a reference to this DLL in your application.
dim aa as new MyFunctions
dim kkk as integer
kkk= aa.myfunction1(arg1,arg2) .... etc.

where MyFunctions is your DLL's name added in references.
aa is an object of this DLL class and myfunction1 is a function returns integer, and takes 2 arguments arg1 and arg2.

So .NET is very simple. If you want programming help on functions provided in SWISS ephemeris then download it's
full documentation available on website.

Thanks

View Postwyomesh, on 02 January 2011 - 11:31 PM, said:

View PostVKSBK, on 16 September 2009 - 05:40 AM, said:

Dear friends,

I'm a beginner in programming, have been learning Visual Basic using MS Visual Studio 2005 for the last few months. I don't have anyone to get any help and have bought a Book "Microsoft Visual Basic 2005 Step-by-Step" and another one "Microsoft Visual C# 2005 Step-by-Step".

I am not familiar in creating Classes, Methods etc and not done/used any of the Array, etc. But went through the Book on these once - not very happy about them as I couldn't master them.

Actually I started to learn programming to write a program on Astrology. For that e have to use the Swiss Ephemeris - to get the planetary positions for a particular time etc.
I have downloaded the free version of the Swiss Ephemeris (From "www.Astro.com"), but couldn't find out how to use it, though there are sample programs - and it is written in Visual Basic 6 which I'm not familiar with. I asked help from some of the people who have written programs using it but they are reluctant to help me - so far I haven't got any help from them. Can any of you help me to write a program in Astrology?

Even the sample program gives problem - it says couldn't find the .... so using another ephemeris instead of Swiss Ephemeris.."

Since I couldn't get that correctly and Don't know how to use I'm unable to try writing any codes fr it. So please don't tell me first write some codes and show us for helping - your usual answer.

Hope to get some help from you!

Thanks
Regards
VKSBK
[color=#3333FF]

Was This Post Helpful? 0
  • +
  • -

#12 Chamile  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-March 11

Re: Swiss Ephemeris for Astrology-program

Posted 08 March 2011 - 12:07 PM

Hi VKSBK
Do you know where I can get help for drawing a horoscope with .Net? Did you succeed to do that?
Thanks,
Chamile
Was This Post Helpful? 0
  • +
  • -

#13 otis_lewd  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-August 09

Re: Swiss Ephemeris for Astrology-program

Posted 21 March 2012 - 02:32 PM

For all those trying to use the Swiss ephemeris in order to create astrology software, please google "AstroWin" and see example source code and scripts in VB6 and PHP. If I might use a URL, then visit www.astrowin.org.

Allen
Was This Post Helpful? 0
  • +
  • -

#14 Lenvdb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-November 10

Re: Swiss Ephemeris for Astrology-program

Posted 28 October 2014 - 03:49 AM

Hi everyone

I have successfully used this DLL in the VB.Net 2005 app I created, which works well with the 32 bit DLL on the 32bit Platforms of Windows.

However, I recently got a new PC with Windows 7 64 bit, and VS2012. The old DLL was compiled in VS2003. Has anyone perhps been able to successfully recompile the C++ source code in a more recent version of Visual Studio?

Is anyone able to recompile the C++ source code in VS2012 and perhaps create a DLL that can work on BOTH 32bit and 64 bit platforms of Windows?

BTW, thank you very much to the guys at ASTRODIENST for providing us with this DLL. I created this for personal use to keep track of the planetary movements.

Kind regards
Len
:helpsmilie:/>/>
Was This Post Helpful? 0
  • +
  • -

#15 Lenvdb  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 25-November 10

Re: Swiss Ephemeris for Astrology-program

Posted 28 October 2014 - 03:59 AM

If anyone was interested in the Code I used in VB.Net 2005 on 32 bit Win XP here goes:

Imports System.Math
Imports Microsoft.VisualBasic.DateAndTime
Imports Microsoft.VisualBasic
Imports System.Runtime.InteropServices


Public Class frmMain


    ' planet and body numbers (parameter ipl) for swe_calc()
    Const SE_SUN As Integer = 0
    Const SE_MOON As Integer = 1
    Const SE_MERCURY As Integer = 2
    Const SE_VENUS As Integer = 3
    Const SE_MARS As Integer = 4
    Const SE_JUPITER As Integer = 5
    Const SE_SATURN As Integer = 6
    Const SE_URANUS As Integer = 7
    Const SE_NEPTUNE As Integer = 8
    Const SE_PLUTO As Integer = 9
    Const SE_MEAN_NODE As Integer = 10
    Const SE_TRUE_NODE As Integer = 11
    Const SE_MEAN_APOG As Integer = 12
    Const SE_OSCU_APOG As Integer = 13
    Const SE_EARTH As Integer = 14
    Const SE_CHIRON As Integer = 15
    Const SE_PHOLUS As Integer = 16
    Const SE_CERES As Integer = 17
    Const SE_PALLAS As Integer = 18
    Const SE_JUNO As Integer = 19
    Const SE_VESTA As Integer = 20

    Dim iDay As Int16
    Dim iMonth As Int16
    Dim iYear As Int16
    Dim iHr As Double
    Dim iMin As Int16

    'Dim AllData(15, 9) As Object
    Dim AllAspects(20) As String

    Dim sPlanets(9) As String
    Dim sOut As String
    Dim dtToday As Date

    Private Function outdeg(ByVal X As Double) As String
        Dim fract As Double
        Dim min As Double, sec As Double

        fract = Abs(X) - Int(Abs(X))
        min = Int(fract * 60)
        sec = fract * 3600 - min * 60
        outdeg = Format(Sign(X) * Int(Abs(X)), "###0") + "" + Format(min, "00") + "'" ' + Format(sec, "00.0000")
    End Function

    Private Function outdeg3(ByVal X As Double) As String
        Dim fract As Double
        Dim min As Double, sec As Double

        fract = Abs(X) - Int(Abs(X))
        min = Int(fract * 60)
        sec = fract * 3600 - min * 60
        outdeg3 = Format(Sign(X) * Int(Abs(X)), "000") + "" + Format(min, "00") + "'" '+ Format(sec, "00.0000")
    End Function

    Private Function set_strlen(ByVal c As String) As String
        Dim i As Integer

        i = InStr(c, "0")
        If (i > 0) Then
            c = Microsoft.VisualBasic.Left(c, i - 1)
        End If

        set_strlen = c

    End Function


    Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Populate the Array====

        Try
            ZodSigns(0) = "Aries"
            ZodSigns(1) = "Taurus"
            ZodSigns(2) = "Gemini"
            ZodSigns(3) = "Cancer"
            ZodSigns(4) = "Leo"
            ZodSigns(5) = "Virgo"
            ZodSigns(6) = "Libra"
            ZodSigns(7) = "Scorpio"
            ZodSigns(8) = "Sagittarius"
            ZodSigns(9) = "Capricorn"
            ZodSigns(10) = "Aquarius"
            ZodSigns(11) = "Pisces"
            Getversion()
            dtToday = CDate(Now)
            'Me.dtMyDate.Format = DateTimePickerFormat.Custom
            'Me.dtMyDate.CustomFormat = "dd/mm/yyyy hh:mm:ss"

            Me.txtDate.Text = dtToday.ToShortDateString & " " & dtToday.ToShortTimeString

            Listplanets()
            CheckAspects()
            Me.txtOutput.Text = sOut

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Errors!", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try


    End Sub

    Private Sub Listplanets()

        Dim iHousecode As Int16
        Dim X(6) As Double
        Dim x2(6) As Double
        Dim cusp(13) As Double
        Dim ascmc(10) As Double
        Dim attr(20) As Double
        Dim tret(20) As Double
        Dim geopos(10) As Double
        Dim geoposx(10) As Double
        Dim xnasc(6) As Double
        Dim xndsc(6) As Double
        Dim xperi(6) As Double
        Dim xaphe(6) As Double
        Dim cal As Byte
        'Dim o As orient
        'Dim ss As String
        Dim h As Double
        'Dim olen
        Dim retval As Double
        Dim tjd_et As Double
        Dim tjd_ut As Double
        'Dim t2
        'Dim ut$
        Dim Planet As Int16
        Dim iFlag As Long
        Dim serr, plnam, ret_flag As String
        'Dim i As Integer
        Dim armc As Double, eps As Double
        'Dim ihsys As Long 'House System (Placidus -see below)
        Dim xpin(2) As Double
        Dim iHouseno As Int16
        Dim sSign As String
        'Dim AA As Integer
        'Dim hDeg As Long
        Dim z As Int16
        Dim iDegree As Int16
        Dim iPos As Int16
        Dim iMC, iAsc As Int16
        Dim n As Long


        Try

            GetPlanetList()
            iDay = Day(dtToday)
            iMonth = Month(dtToday)
            iYear = Year(dtToday)
            iHr = Hour(dtToday)
            iMin = Minute(dtToday)
            iHousecode = Asc("P") 'For Placidus

            iHr = iHr + iMin / 60.0
            sOut = "***** London - GMT Time *****" & dtToday
            sOut = sOut & vbNewLine & "The Planetary Positions for today are:- " & vbNewLine

            cal = 103  ' g for gregorian calendar

            tjd_ut = swe_julday(iYear, iMonth, iDay, iHr, 1)

            If Me.chkEphTime.Checked = True Then
                'tjd_et = tjd_ut
                n = swe_deltat(tjd_ut)
                tjd_et = tjd_ut + n
                'Else
                '    'tjd_et = tjd_ut + n
                '    n = swe_deltat(tjd_et)
                '    tjd_ut = tjd_et - n
            End If

            retval = swe_date_conversion(iYear, iMonth, iDay, h, cal, tjd_ut)

            If retval <> 0 Then
                MessageBox.Show("Illegal Date", "Error in Date!", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            geopos(0) = CDbl(Me.txtLong.Text)
            geopos(1) = CDbl(Me.txtLat.Text)
            geopos(2) = 0

            iFlag = 258 ' for Geo = 258 ///for Sidereal - 258 + 2048

            'ret_flag = swe_houses(tjd_ut, lat, lon, Asc(t$), cusp(0), ascmc(0))

            'In the array ascmc, the function returns the following values: 

            'ascmc[0] =     Ascendant
            'ascmc[1] =     MC
            'ascmc[2] =     ARMC
            'ascmc[3] =     Vertex
            'ascmc[4] =     "equatorial ascendant"
            'ascmc[5] =     "co-ascendant" (Walter Koch)
            'ascmc[6] =     "co-ascendant" (Michael Munkasey)
            'ascmc[7] =     "polar ascendant" (M. Munkasey)

            'These values are not accurate as the Asc changes supposedly every 2 hrs===============
            serr = ""
            ret_flag = swe_houses(tjd_et, geopos(1), geopos(0), iHousecode, cusp(0), ascmc(0)) '(armc, geopos(1), eps, iHousecode, xpin(0), serr)

            'ret_flag = swe_houses_armc(armc, geopos(1), eps, iHousecode, cusp(0), ascmc(0))
            'or 

            'ret_flag = swe_houses_ex(tjd_ut, iFlag, geopos(1), geopos(0), iHousecode, cusp(0), ascmc(0))
            iMC = ascmc(1)
            iAsc = ascmc(0)

            'Stick everything into an Array(0-15,0-8)
            'AllData (0,0) for Planet N
            'AllData (1,0) for Planet Name
            'AllData (2,0) for speed
            'AllData (3,0) for PlanetLoc
            'AllData (4,0) for PlanetDecl
            'AllData (5,0) for Retrograde status
            'AllData (6,0) for HouseCusp
            'AllData(7,0) for ZodNum
            'AllData(8,0) for ZodSign

            For Planet = SE_SUN To SE_PLUTO
                If Planet <> SE_EARTH Then
                    serr = ""
                    iFlag = 258

                    ret_flag = swe_calc(tjd_et, Planet, iFlag, X(0), serr)

                    serr = set_strlen(serr$)
                    If ret_flag <> iFlag And Len(serr$) > 0 Then
                        sOut = sOut & vbNewLine & "swe_calc reports: " & ";" & serr$
                    End If

                    AllData(0, Planet) = Planet
                    AllData(3, Planet) = X(0) 'Planet Loc
                    z = Int(X(0) / 30) + 1
                    AllData(2, Planet) = X(3) 'Planet Speed

                    AllData(4, Planet) = outdeg(X(0))

                    If X(3) < 0 Then
                        AllData(5, Planet) = " (Retrogr)"
                    End If
                    plnam = ""
                    'Call swe_get_planet_name(Planet, plnam) 'Could also do a local Sub
                    'plnam = set_strlen(plnam)
                    'plnam = Microsoft.VisualBasic.Left(plnam, 10)
                    GetPlanet(Planet, plnam)
                    AllData(1, Planet) = plnam

                    iHouseno = Int(swe_house_pos(armc, geopos(0), eps, Planet, X(0), serr$))
                    z = Int(X(0) / 30) + 1
                    AllData(7, Planet) = z
                    sSign = ""
                    GetSign(z, sSign)
                    AllData(8, Planet) = sSign

                    'iFlag = iFlag + 2048
                    'ret_flag = swe_calc(tjd_et, Planet, iFlag, X(0), serr$)
                    iPos = InStr(AllData(4, Planet), "")

                    iDegree = CInt(Microsoft.VisualBasic.Left(AllData(4, Planet), iPos - 1))
                    iDegree = iDegree Mod 30
                    sOut = sOut & vbNewLine & plnam & " is in " & sSign & " at " & CStr(iDegree) & ""

                    If Not AllData(5, Planet) Is Nothing Then
                        sOut = sOut & "   ** " & AllData(5, Planet)
                    End If

                End If
            Next Planet

            'Add MC===
            If iMC > 0 Then
                z = (iMC / 30) ' + 1
                sSign = ""
                GetSign(z, sSign)
            Else
                sSign = "Aries"
            End If

            sOut = sOut & vbNewLine & "Midheaven (MC) is now in " & sSign & " at " & CStr(iMC Mod 30) & ""
            z = (iAsc / 30) ' + 1
            GetSign(z, sSign)
            sOut = sOut & vbNewLine & "The Ascendant is now in " & sSign & " at " & CStr(iAsc Mod 30) & ""
            swe_close()

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Getting PLanets Error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Finally

        End Try
    End Sub

    Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click
        Application.Exit()
    End Sub

    Private Sub GetSign(ByVal iSign As Object, ByRef sSign As String)

        sSign = ZodSigns(iSign - 1)

    End Sub

    Private Sub GetPlanetList()

        Dim ii As Int16
        Dim sPName As String = ""

        For ii = 0 To 9
            GetPlanet(ii, sPName)
            PlanetList(ii) = sPName
        Next


    End Sub

    Private Sub GetPlanet(ByVal iPlan As Int16, ByRef sPlanName As String)


        Select Case iPlan
            Case 0
                sPlanName = "The Sun"
            Case 1
                sPlanName = "The Moon"
            Case 2
                sPlanName = "Mercury"
            Case 3
                sPlanName = "Venus"
            Case 4
                sPlanName = "Mars"
            Case 5
                sPlanName = "Jupiter"
            Case 6
                sPlanName = "Saturn"
            Case 7
                sPlanName = "Uranus"
            Case 8
                sPlanName = "Neptune"
            Case 9
                sPlanName = "Pluto"

        End Select

    End Sub

    Public Sub CheckAspects()
        'Loop through the Planets and pick up their angles
        Dim ii As Int16, i As Int16, x As Int16
        Dim iAA As Int16, iBB As Int16
        Dim sAspect As String = ""
        Try


            Dim iPlanet As Int16
            i = 0
            For iPlanet = SE_SUN To SE_PLUTO
                iAA = CInt(Microsoft.VisualBasic.Left(AllData(4, iPlanet), InStr(AllData(4, iPlanet), "") - 1))
                For ii = iPlanet To SE_PLUTO

                    If ii <> iPlanet Then
                        iBB = CInt(Microsoft.VisualBasic.Left(AllData(4, ii), InStr(AllData(4, ii), "") - 1))
                        If iAA > iBB Then
                            CalculateAspects(iAA, iBB, sAspect)
                        ElseIf iAA < iBB Then
                            CalculateAspects(iBB, iAA, sAspect)
                        ElseIf iAA = iBB Then
                            sAspect = " Conj "
                        End If

                        If sAspect <> "None" Then
                            If iPlanet = SE_SUN And ii = SE_MOON Then
                                If sAspect = " Conj " Then
                                    AllAspects(i) = "**New Moon today**"
                                End If
                                If sAspect = " Opposes " Then
                                    AllAspects(i) = "**Full Moon today**"
                                End If
                            Else
                                AllAspects(i) = AllData(1, iPlanet) & sAspect & AllData(1, ii)
                            End If

                            i = i + 1
                        End If
                    End If
                Next
            Next

            If i > 0 Then
                sOut = sOut & vbNewLine & vbNewLine & "*** The Planetary Aspects today: ***"
                For x = 0 To i
                    sOut = sOut & vbNewLine & AllAspects(x)
                Next
            End If

        Catch ex As Exception
            MessageBox.Show(ex.Message, "Getting Angles error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End Try



    End Sub

    Public Sub CalculateAspects(ByVal a As Int16, ByVal b As Int16, ByRef c As String)
        'The best way to calc the aspects is to subtract the greater angle from the lesser angle.
        'Then look for angles like 0, 60, 90 and 180

        '90 = squares, 180 = oppositions, 60 = trines, 0 = conjunctions
        'Pass in a as the greater and b as the lesser.

        Dim iDiff As Int16

        Try
            iDiff = a - b

            If iDiff > 88 And iDiff < 93 Then
                c = " Squares "
            ElseIf iDiff >= 268 And iDiff <= 273 Then
                c = " Squares "
            ElseIf iDiff >= 58 And iDiff <= 63 Then
                c = " Trines "
            ElseIf iDiff >= 238 And iDiff <= 243 Then
                c = " Trines "
            ElseIf iDiff >= 178 And iDiff <= 183 Then
                c = " Opposes "
            ElseIf iDiff >= 148 And iDiff <= 153 Then
                c = " InConj "
            ElseIf iDiff >= 0 And iDiff <= 7 Then
                c = " Conj "
            Else
                c = "None"
            End If


        Catch ex As Exception
            MessageBox.Show(ex.Message, "Getting Aspects error!", MessageBoxButtons.OK, MessageBoxIcon.Information)
        End Try


    End Sub

    Private Sub cmdFwd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdFwd.Click

        dtToday = CDate(Me.txtDate.Text)
        If Me.optDay.Checked = True Then
            dtToday = dtToday.AddDays(1)
        Else
            dtToday = dtToday.AddHours(2)
        End If
        Me.txtDate.Text = dtToday
        Array.Clear(AllAspects, 0, AllAspects.Length)
        Array.Clear(AllData, 0, AllData.LongLength)
        Listplanets()
        CheckAspects()
        Me.txtOutput.Text = sOut

    End Sub

    Private Sub cmdRew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdRew.Click

        dtToday = Me.txtDate.Text
        If Me.optDay.Checked = True Then
            dtToday = dtToday.AddDays(-1)
        Else
            dtToday = dtToday.AddHours(-2)
        End If
        Me.txtDate.Text = dtToday
        Array.Clear(AllAspects, 0, AllAspects.Length)
        Array.Clear(AllData, 0, AllData.LongLength)
        Listplanets()
        CheckAspects()
        Me.txtOutput.Text = sOut

    End Sub

    Private Sub cmdGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGo.Click
        dtToday = CDate(Me.txtDate.Text)
        Array.Clear(AllAspects, 0, AllAspects.Length)
        Array.Clear(AllData, 0, AllData.LongLength)
        Listplanets()
        CheckAspects()
        Me.txtOutput.Text = sOut
    End Sub

    Private Function Getversion() As String
        ' Dim sVer As String
        'sVer = ""
        Getversion = "" 'swe_version(sVer)
        'MessageBox.Show("Version - " & sVer, "Version", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Function


    Private Sub cmdChart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdChart.Click
        frmChart_zg.Show()
        'frmChart.Show()

    End Sub
End Class



Obviously I had to list the API calls in a Module as follows:

Module modGeneral


    Public Declare Function swe_azalt Lib "swedll32.dll" Alias "_swe_azalt@40" (ByVal tjd_ut As Double, ByVal calc_flag As Integer, ByRef geopos As Double, ByVal atpress As Double, ByVal attemp As Double, ByRef xin As Double, ByRef xaz As Double) As Integer 'geopos must be the first of three array elements
    Public Declare Function swe_azalt_rev Lib "swedll32.dll" Alias "_swe_azalt_rev@24" (ByVal tjd_ut As Double, ByVal calc_flag As Integer, ByRef geopos As Double, ByRef xin As Double, ByRef xout As Double) As Integer 'geopos must be the first of three array elements
    Public Declare Function swe_calc Lib "swedll32.dll" Alias "_swe_calc@24" (ByVal tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef X As Double, ByRef serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_calc_d Lib "swedll32.dll" Alias "_swe_calc_d@20" (ByRef tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_calc_ut Lib "swedll32.dll" Alias "_swe_calc_ut@24" (ByVal tjd_ut As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_calc_ut_d Lib "swedll32.dll" Alias "_swe_calc_ut_d@20" (ByRef tjd_ut As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_close Lib "swedll32.dll" Alias "_swe_close@0" () As Integer
    Public Declare Function swe_close_d Lib "swedll32.dll" Alias "_swe_close_d@4" (ByVal ivoid As Integer) As Integer ' argument ivoid is ignored
    Public Declare Sub swe_cotrans Lib "swedll32.dll" Alias "_swe_cotrans@16" (ByRef xpo As Double, ByRef xpn As Double, ByVal eps As Double)
    Public Declare Function swe_cotrans_d Lib "swedll32.dll" Alias "_swe_cotrans_d@12" (ByRef xpo As Double, ByRef xpn As Double, ByRef eps As Double) As Integer
    Public Declare Sub swe_cotrans_sp Lib "swedll32.dll" Alias "_swe_cotrans_sp@16" (ByRef xpo As Double, ByRef xpn As Double, ByVal eps As Double)
    Public Declare Function swe_cotrans_sp_d Lib "swedll32.dll" Alias "_swe_cotrans_sp_d@12" (ByRef xpo As Double, ByRef xpn As Double, ByRef eps As Double) As Integer
    Public Declare Sub swe_cs2degstr Lib "swedll32.dll" Alias "_swe_cs2degstr@8" (ByVal t As Integer, ByVal s As String)
    Public Declare Function swe_cs2degstr_d Lib "swedll32.dll" Alias "_swe_cs2degstr_d@8" (ByVal t As Integer, ByVal s As String) As Integer
    Public Declare Sub swe_cs2lonlatstr Lib "swedll32.dll" Alias "_swe_cs2lonlatstr@16" (ByVal t As Integer, ByVal pchar As Byte, ByVal mchar As Byte, ByVal s As String)
    Public Declare Function swe_cs2lonlatstr_d Lib "swedll32.dll" Alias "_swe_cs2lonlatstr_d@16" (ByVal t As Integer, ByRef pchar As Byte, ByRef mchar As Byte, ByVal s As String) As Integer
    Public Declare Sub swe_cs2timestr Lib "swedll32.dll" Alias "_swe_cs2timestr@16" (ByVal t As Integer, ByVal sep As Integer, ByVal supzero As Integer, ByVal s As String)
    Public Declare Function swe_cs2timestr_d Lib "swedll32.dll" Alias "_swe_cs2timestr_d@16" (ByVal t As Integer, ByVal sep As Integer, ByVal supzero As Integer, ByVal s As String) As Integer
    Public Declare Function swe_csnorm Lib "swedll32.dll" Alias "_swe_csnorm@4" (ByVal p As Integer) As Integer
    Public Declare Function swe_csnorm_d Lib "swedll32.dll" Alias "_swe_csnorm_d@4" (ByVal p As Integer) As Integer
    Public Declare Function swe_csroundsec Lib "swedll32.dll" Alias "_swe_csroundsec@4" (ByVal p As Integer) As Integer
    Public Declare Function swe_csroundsec_d Lib "swedll32.dll" Alias "_swe_csroundsec_d@4" (ByVal p As Integer) As Integer
    Public Declare Function swe_d2l Lib "swedll32.dll" Alias "_swe_d2l@8" () As Integer
    Public Declare Function swe_d2l_d Lib "swedll32.dll" Alias "_swe_d2l_d@4" () As Integer
    Public Declare Function swe_date_conversion Lib "swedll32.dll" Alias "_swe_date_conversion@28" (ByVal iYear As Integer, ByVal iMonth As Integer, ByVal iDay As Integer, ByVal utime As Double, ByVal cal As Byte, ByRef tjd As Double) As Integer
    Public Declare Function swe_date_conversion_d Lib "swedll32.dll" Alias "_swe_date_conversion_d@24" (ByVal Year_Renamed As Integer, ByVal Month_Renamed As Integer, ByVal Day_Renamed As Integer, ByRef utime As Double, ByRef cal As Byte, ByRef tjd As Double) As Integer
    Public Declare Function swe_day_of_week Lib "swedll32.dll" Alias "_swe_day_of_week@8" (ByVal jd As Double) As Integer
    Public Declare Function swe_day_of_week_d Lib "swedll32.dll" Alias "_swe_day_of_week_d@4" (ByRef jd As Double) As Integer
    Public Declare Function swe_degnorm Lib "swedll32.dll" Alias "_swe_degnorm@8" (ByVal jd As Double) As Double
    Public Declare Function swe_degnorm_d Lib "swedll32.dll" Alias "_swe_degnorm_d@4" (ByRef jd As Double) As Integer
    Public Declare Function swe_deltat Lib "swedll32.dll" Alias "_swe_deltat@8" (ByVal jd As Double) As Double
    Public Declare Function swe_deltat_d Lib "swedll32.dll" Alias "_swe_deltat_d@8" (ByRef jd As Double, ByRef deltat As Double) As Integer
    Public Declare Function swe_difcs2n Lib "swedll32.dll" Alias "_swe_difcs2n@8" (ByVal p1 As Integer, ByVal p2 As Integer) As Integer
    Public Declare Function swe_difcs2n_d Lib "swedll32.dll" Alias "_swe_difcs2n_d@8" (ByVal p1 As Integer, ByVal p2 As Integer) As Integer
    Public Declare Function swe_difcsn Lib "swedll32.dll" Alias "_swe_difcsn@8" (ByVal p1 As Integer, ByVal p2 As Integer) As Integer
    Public Declare Function swe_difcsn_d Lib "swedll32.dll" Alias "_swe_difcsn_d@8" (ByVal p1 As Integer, ByVal p2 As Integer) As Integer
    Public Declare Function swe_difdeg2n Lib "swedll32.dll" Alias "_swe_difdeg2n@16" (ByVal p1 As Double, ByVal p2 As Double) As Double
    Public Declare Function swe_difdeg2n_d Lib "swedll32.dll" Alias "_swe_difdeg2n_d@12" (ByRef p1 As Double, ByRef p2 As Double, ByRef diff As Double) As Integer
    Public Declare Function swe_difdegn Lib "swedll32.dll" Alias "_swe_difdegn@16" (ByVal p1 As Double, ByVal p2 As Double) As Integer
    Public Declare Function swe_difdegn_d Lib "swedll32.dll" Alias "_swe_difdegn_d@12" (ByRef p1 As Double, ByRef p2 As Double, ByRef diff As Double) As Integer
    Public Declare Function swe_fixstar Lib "swedll32.dll" Alias "_swe_fixstar@24" (ByVal star As String, ByVal tjd As Double, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_fixstar_d Lib "swedll32.dll" Alias "_swe_fixstar_d@20" (ByVal star As String, ByRef tjd As Double, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_fixstar_ut Lib "swedll32.dll" Alias "_swe_fixstar_ut@24" (ByVal star As String, ByVal tjd_ut As Double, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_fixstar_ut_d Lib "swedll32.dll" Alias "_swe_fixstar_ut_d@20" (ByVal star As String, ByRef tjd_ut As Double, ByVal iFlag As Integer, ByRef X As Double, ByVal serr As String) As Integer ' x must be first of six array elements
    Public Declare Function swe_get_ayanamsa Lib "swedll32.dll" Alias "_swe_get_ayanamsa@8" (ByVal tjd_et As Double) As Double
    Public Declare Function swe_get_ayanamsa_d Lib "swedll32.dll" Alias "_swe_get_ayanamsa_d@8" (ByRef tjd_et As Double, ByRef ayan As Double) As Integer
    Public Declare Function swe_get_ayanamsa_ut Lib "swedll32.dll" Alias "_swe_get_ayanamsa_ut@8" (ByVal tjd_ut As Double) As Double
    Public Declare Function swe_get_ayanamsa_ut_d Lib "swedll32.dll" Alias "_swe_get_ayanamsa_ut_d@8" (ByRef tjd_ut As Double, ByRef ayan As Double) As Integer
    Public Declare Sub swe_get_planet_name Lib "swedll32.dll" Alias "_swe_get_planet_name@8" (ByVal ipl As Integer, ByVal pname As String)
    Public Declare Function swe_get_planet_name_d Lib "swedll32.dll" Alias "_swe_get_planet_name_d@8" (ByVal ipl As Integer, ByVal pname As String) As Integer
    Public Declare Function swe_get_tid_acc Lib "swedll32.dll" Alias "_swe_get_tid_acc@0" () As Double
    Public Declare Function swe_get_tid_acc_d Lib "swedll32.dll" Alias "_swe_get_tid_acc_d@4" (ByRef X As Double) As Integer
    Public Declare Function swe_houses Lib "swedll32.dll" Alias "_swe_houses@36" (ByVal tjd_ut As Double, ByVal geolat As Double, ByVal geolon As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_houses_d Lib "swedll32.dll" Alias "_swe_houses_d@24" (ByRef tjd_ut As Double, ByRef geolat As Double, ByRef geolon As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_houses_ex Lib "swedll32.dll" Alias "_swe_houses_ex@40" (ByVal tjd_ut As Double, ByVal iFlag As Integer, ByVal geolat As Double, ByVal geolon As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_houses_ex_d Lib "swedll32.dll" Alias "_swe_houses_ex_d@28" (ByRef tjd_ut As Double, ByVal iFlag As Integer, ByRef geolat As Double, ByRef geolon As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_houses_armc Lib "swedll32.dll" Alias "_swe_houses_armc@36" (ByVal armc As Double, ByVal geolat As Double, ByVal eps As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_houses_armc_d Lib "swedll32.dll" Alias "_swe_houses_armc_d@24" (ByRef armc As Double, ByRef geolat As Double, ByRef eps As Double, ByVal ihsy As Integer, ByRef hcusps As Double, ByRef ascmc As Double) As Integer ' hcusps must be first of 13 array elements
    Public Declare Function swe_house_pos Lib "swedll32.dll" Alias "_swe_house_pos@36" (ByVal armc As Double, ByVal geolat As Double, ByVal eps As Double, ByVal ihsy As Integer, ByRef xpin As Double, ByVal serr As String) As Double
    Public Declare Function swe_house_pos_d Lib "swedll32.dll" Alias "_swe_house_pos_d@28" (ByRef armc As Double, ByRef geolat As Double, ByRef eps As Double, ByVal ihsy As Integer, ByRef xpin As Double, ByRef hpos As Double, ByVal serr As String) As Integer
    Public Declare Function swe_julday Lib "swedll32.dll" Alias "_swe_julday@24" (ByVal iYear As Integer, ByVal iMonth As Integer, ByVal iDay As Integer, ByVal ihour As Double, ByVal gregflg As Integer) As Double
    Public Declare Function swe_julday_d Lib "swedll32.dll" Alias "_swe_julday_d@24" (ByVal Year_Renamed As Integer, ByVal Month_Renamed As Integer, ByVal Day_Renamed As Integer, ByRef hour_Renamed As Double, ByVal gregflg As Integer, ByRef tjd As Double) As Integer
    Public Declare Function swe_lun_eclipse_how Lib "swedll32.dll" Alias "_swe_lun_eclipse_how@24" (ByVal tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_lun_eclipse_how_d Lib "swedll32.dll" Alias "_swe_lun_eclipse_how_d@20" (ByRef tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_lun_eclipse_when Lib "swedll32.dll" Alias "_swe_lun_eclipse_when@28" (ByVal tjd_start As Double, ByVal ifl As Integer, ByVal ifltype As Integer, ByRef tret As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_lun_eclipse_when_d Lib "swedll32.dll" Alias "_swe_lun_eclipse_when_d@24" (ByRef tjd_start As Double, ByVal ifl As Integer, ByVal ifltype As Integer, ByRef tret As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_nod_aps Lib "swedll32.dll" Alias "_swe_nod_aps@40" (ByVal tjd_et As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByVal method As Integer, ByRef xnasc As Double, ByRef xndsc As Double, ByRef xperi As Double, ByRef xaphe As Double, ByVal serr As String) As Integer
    Public Declare Function swe_nod_aps_ut Lib "swedll32.dll" Alias "_swe_nod_aps_ut@40" (ByVal tjd_ut As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByVal method As Integer, ByRef xnasc As Double, ByRef xndsc As Double, ByRef xperi As Double, ByRef xaphe As Double, ByVal serr As String) As Integer
    Public Declare Function swe_pheno Lib "swedll32.dll" Alias "_swe_pheno@24" (ByVal tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_pheno_ut Lib "swedll32.dll" Alias "_swe_pheno_ut@24" (ByVal tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_pheno_d Lib "swedll32.dll" Alias "_swe_pheno_d@20" (ByRef tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_pheno_ut_d Lib "swedll32.dll" Alias "_swe_pheno_ut_d@20" (ByRef tjd As Double, ByVal ipl As Integer, ByVal iFlag As Integer, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_refrac Lib "swedll32.dll" Alias "_swe_refrac@28" (ByVal inalt As Double, ByVal atpress As Double, ByVal attemp As Double, ByVal calc_flag As Integer) As Double
    Public Declare Sub swe_revjul Lib "swedll32.dll" Alias "_swe_revjul@28" (ByVal tjd As Double, ByVal gregflg As Integer, ByRef iYear As Integer, ByRef iMonth As Integer, ByRef iDay As Integer, ByRef ihour As Double)
    Public Declare Function swe_revjul_d Lib "swedll32.dll" Alias "_swe_revjul_d@24" (ByRef tjd As Double, ByVal gregflg As Integer, ByRef Year_Renamed As Integer, ByRef Month_Renamed As Integer, ByRef Day_Renamed As Integer, ByRef hour_Renamed As Double) As Integer
    Public Declare Function swe_rise_trans Lib "swedll32.dll" Alias "_swe_rise_trans@52" (ByVal tjd_ut As Double, ByVal ipl As Integer, ByVal starname As String, ByVal epheflag As Integer, ByVal rsmi As Integer, ByRef geopos As Double, ByVal atpress As Double, ByVal attemp As Double, ByRef tret As Double, ByVal serr As String) As Integer
    Public Declare Sub swe_set_ephe_path Lib "swedll32.dll" Alias "_swe_set_ephe_path@4" (ByVal path As String)
    Public Declare Function swe_set_ephe_path_d Lib "swedll32.dll" Alias "_swe_set_ephe_path_d@4" (ByVal path As String) As Integer
    Public Declare Sub swe_set_jpl_file Lib "swedll32.dll" Alias "_swe_set_jpl_file@4" (ByVal file As String)
    Public Declare Function swe_set_jpl_file_d Lib "swedll32.dll" Alias "_swe_set_jpl_file_d@4" (ByVal file As String) As Integer
    Public Declare Function swe_set_sid_mode Lib "swedll32.dll" Alias "_swe_set_sid_mode@20" (ByVal sid_mode As Integer, ByVal t0 As Double, ByVal ayan_t0 As Double) As Integer
    Public Declare Function swe_set_sid_mode_d Lib "swedll32.dll" Alias "_swe_sid_mode_d@12" (ByVal sid_mode As Integer, ByRef t0 As Double, ByRef ayan_t0 As Double) As Integer
    Public Declare Sub swe_set_topo Lib "swedll32.dll" Alias "_swe_set_topo@24" (ByVal geolon As Double, ByVal geolat As Double, ByVal altitude As Double)
    Public Declare Function swe_set_topo_d Lib "swedll32.dll" Alias "_swe_set_topo_d@12" (ByRef geolon As Double, ByRef geolat As Double, ByRef altitude As Double) As Integer
    Public Declare Sub swe_set_tid_acc Lib "swedll32.dll" Alias "_swe_set_tid_acc@8" (ByVal X As Double)
    Public Declare Function swe_set_tid_acc_d Lib "swedll32.dll" Alias "_swe_set_tid_acc_d@4" (ByRef X As Double) As Integer
    Public Declare Function swe_sidtime0 Lib "swedll32.dll" Alias "_swe_sidtime0@24" (ByVal tjd_ut As Double, ByVal ecl As Double, ByVal nut As Double) As Double
    Public Declare Function swe_sidtime0_d Lib "swedll32.dll" Alias "_swe_sidtime0_d@16" (ByRef tjd_ut As Double, ByRef ecl As Double, ByRef nut As Double, ByRef sidt As Double) As Integer
    Public Declare Function swe_sidtime Lib "swedll32.dll" Alias "_swe_sidtime@8" (ByVal tjd_ut As Double) As Double
    Public Declare Function swe_sidtime_d Lib "swedll32.dll" Alias "_swe_sidtime_d@8" (ByRef tjd_ut As Double, ByRef sidt As Double) As Integer
    Public Declare Function swe_sol_eclipse_how Lib "swedll32.dll" Alias "_swe_sol_eclipse_how@24" (ByVal tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_how_d Lib "swedll32.dll" Alias "_swe_sol_eclipse_how_d@20" (ByRef tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_when_glob Lib "swedll32.dll" Alias "_swe_sol_eclipse_when_glob@28" (ByVal tjd_start As Double, ByVal ifl As Integer, ByVal ifltype As Integer, ByRef tret As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_when_glob_d Lib "swedll32.dll" Alias "_swe_sol_eclipse_when_glob_d@24" (ByRef tjd_start As Double, ByVal ifl As Integer, ByVal ifltype As Integer, ByRef tret As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_when_loc Lib "swedll32.dll" Alias "_swe_sol_eclipse_when_loc@32" (ByVal tjd_start As Double, ByVal ifl As Integer, ByRef tret As Double, ByRef attr As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_when_loc_d Lib "swedll32.dll" Alias "_swe_sol_eclipse_when_loc_d@28" (ByRef tjd_start As Double, ByVal ifl As Integer, ByRef tret As Double, ByRef attr As Double, ByVal backward As Integer, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_where Lib "swedll32.dll" Alias "_swe_sol_eclipse_where@24" (ByVal tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_sol_eclipse_where_d Lib "swedll32.dll" Alias "_swe_sol_eclipse_where_d@20" (ByRef tjd_ut As Double, ByVal ifl As Integer, ByRef geopos As Double, ByRef attr As Double, ByVal serr As String) As Integer
    Public Declare Function swe_time_equ Lib "swedll32.dll" Alias "_swe_time_equ@16" (ByVal tjd_ut As Double, ByRef e As Double, ByVal serr As String) As Integer
    Public Declare Function swe_version Lib "swedll32.dll" (ByVal sVer As String) As String

    Public ZodSigns(12) As String
    Public AllData(15, 9) As Object
    Public PlanetList(9) As String

End Module



Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2