Hi Frank and Evert, thanks for your reaction.
Changing the variables DIM to the type SINGLE wasn't an improvement, increase the stack also wasn't.
I translated the formula from C++ to BASCOM-AVR. Maybe in doing so, I made a mistake. Although I checked all the lines several times. Perhaps there was a mistake in the C++ program.
Now I have a properly working program in BASCOM-AVR. This formula is also based one the info found in:
"Duffett-Smith, Peter. 1988. Practical Astronomy with Your Calculator, 3rd Ed. Cambridge Univ. Press".
I translated this to BASCOM-AVR from Java and added the original Java script code in the comments.
The result has an accuracy within half a degree. This good working formula handles radians and degrees differently.
All relevant variables are given in radians (*deg). In the former formula, this only happened after a trig function like SIN (VAR*deg) deg =pi/180.
There are some more minor differences.
The working program is attached.
Thanks once more and kind regards
↧