Squares

General FreeBASIC programming questions.
Locked
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

Hi Lizard.
Regarding astronomical calculations, we used to navigate by sextant (I was a seaman).
A good clock (chronometer), an ephemeris, a set of log tables, a glimpse of the sun in the morning and around noon.
A view of the stars in the evening, so you could see them and the horizon at the same time.
No GPS or calculators or computers.
Interesting as Hawking's type astrophysics is, with black hole Hawking radiation and accretion and gravity waves etc. , I find the real astro. stuff more interesting.
Landers with parachutes for example.
Is it not fascinating how familiar these alien landscapes look. Mars, Titan.
The moon pictures show us rounded hills, almost looking like weathering.
I suppose there is always that nagging doubt of believing the media.
But even a 50% truth is spellbinding.
By all means share your lib.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Squares

Post by lizard »

Hi Dodicat,
then we would be ready to hire on the same ship. Time of old frigates has gone, now spaceships are coming. I know basics of mathematics, but to figure out a complete horoscope took me some time with this lib:

viewtopic.php?f=8&t=26699

Stiil unsure if an native english understands my writings the same it was meant, i mostly try to stay short. :-)
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Squares

Post by srvaldez »

the only problem is the GPL license, there's a similar library http://libnova.sourceforge.net it's license is LGPL, however it's a bit problematic to build with msys2, was able to build the 32-bit version after using autoreconf --install but there was a problem trying to build the 64-bit version.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Squares

Post by lizard »

Thats right. For personal use Swisseph is free, for commercial one has to buy a licence. See here:
https://www.astro.com/swisseph/swephinfo_g.htm
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Squares

Post by srvaldez »

lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Squares

Post by lizard »

Many free programs are using Swisseph like Walter Pullens Astrolog 6.30:

http://www.astrolog.org/astrolog.htm

Pullen has even a own section in astro.com to create horoscopes after his own style.

You can see it under mainmenu "free horoscopes/extended chart selection" but only after creating a free account which gives 100 free horoscopes. No costs at all. Serious site.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Squares

Post by caseih »

lizard wrote:You can see it under mainmenu "free horoscopes/extended chart selection" but only after creating a free account which gives 100 free horoscopes. No costs at all. Serious site.
Astrology serious?
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Squares

Post by lizard »

caseih wrote:Astrology serious?
Why not? Please explain.
caseih
Posts: 2157
Joined: Feb 26, 2007 5:32

Re: Squares

Post by caseih »

I've just never heard Astrology referred to as anything serious or of consequence. Fortune telling, horriscopes, etc. Big business, certainly.
lizard
Posts: 440
Joined: Oct 17, 2017 11:35
Location: Germany

Re: Squares

Post by lizard »

caseih wrote:I've just never heard Astrology referred to as anything serious or of consequence. Fortune telling, horriscopes, etc. Big business, certainly.
Are you Christian, ever heard the story how Jesus was born? There was a star three Astrologers from orient followed to see the new born child Jesus. So Astrology has the most important role in the most important story of christianity! :-)
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

Big bang astronomy:
..
The laws of physics apply everywhere, er.. ,no, Information cannot be lost in the universe er.., it resides on the surface of a black hole ..
Er..yes, it is a quantum effect, I have' a tome on Bessel functions somewhere.
For every particle there is another, a twin, BINGO
If a particle is in a black hole, mercifully it's twin is somewhere else, that must be it, we shall investigate further with different telescope models.
There is a black hole near you..
Where's Albert?

Yes, I'll have another cuppa, thank you.
slurp ..

What was I saying?
Yes, two zeptoseconds after the Big Bang the universe was ...bla bla bla
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

@srvaldez
I managed to compile (as an exercise) the libnova.c files to .o files then a static library.
I only have 32 bit mingw, I put the libnova folder (containing the .h files) into the mingw include folder and compiled from a shell within
libnova-0.15.0\src

The difficult bit of course is setting up fb types for c structures ans defining the various functions for use with fb.
srvaldez
Posts: 3373
Joined: Sep 25, 2005 21:54

Re: Squares

Post by srvaldez »

hello dodicat
I am curious whether you used the configure script and the makefile or compiled the individual C files.
the problem with trying to compile to 64-bit is that the time functions are not implemented in the 64-bit include/lib
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

srvaldez
gcc -c *.c
then
ar rcs -o libnova.a *.o

I get a few warnings.
I got the structures via fbfrog, but a compile error on my first function
./libnova.a(utility.o):utility.c:(.text+0x12f1): undefined reference to `gmtime_s'

function was;
"ln_get_asteroid_mag"
So, back to the drawing board.
(Hope the asteroid isn't too close!)
dodicat
Posts: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Squares

Post by dodicat »

Thanks srvaldez, I tested your lib.a version.
My own version had an error in one file (I thought that I only got warnings, but I missed the actual error) -- says in math.h!
My mingw is quite old, I just copied it all over from my XP machine and set the bin folder on path.
Thanks lizard for your link also.
Locked