| |
Sun Position Calculator [2020] |
AKA :
Sun Calculator - create a graphical sun diagram like on your Apple Watch
Credits :
Download :
Look for downloads on external sites:
Pokefinder.org
User Comment Submitted by polluks on 3 May 2020
FYI the new vbcc6502 also supports FP. | User Comment Submitted by Bytebreaker on 29 April 2020
Thanks all for your kind feedback. :-)
@ wil
I just saw that Basic Boss supports a data type called REAL. For the future I will take this into account. Somehow I was convinced that BASIC V2 floats cannot be compiled, that‘s why I worked with integers only when using Austro Speed back in the day. | User Comment Submitted by wil on 29 April 2020
Awesome! I like it when such "serious" applications for science and business are done with BASIC. I think this is like what Commodore had it mind when they designed computers such as the Plus4 or C128. The speed of your program is fine for me, but since you mention it: there are BASIC compilers that handle floating point well, for example Austro-Speed or Basic Boss. | User Comment Submitted by Pushead on 28 April 2020
Very impressive! Nice work! Tested with values for northern Norway in summertime - when the sun doesn't set:-)! | User Comment Submitted by Didi on 28 April 2020
Nice work. Had fun trying it. | User Comment Submitted by TheRyk on 28 April 2020
wonderful and just in time, was just going to buy me a smart watch, now I'll definetely never need one! | User Comment Submitted by Bytebreaker on 28 April 2020
Hello there,
on my apple watch there is a display showing a sun diagram as a curve with a bright spot moving along the curve, showing the sun height at the given time and also sunrise, true noon and sunset. I liked this so much that I decided to code a C64 version of this.
The height of the sun and also the direction (=azimuth) is given in degrees, i.e. the sun is at noon at ca. 60 degrees height and heading south at ca 180 degrees.
How to use:
- Autostart the .d64 (i.e. via drag 'n drop into VICE) or typee load"$",8,1 (press Enter) and run (press Enter)
- Find out the geo coordinates (latitude and longitude) of the place for which you want to calculate a sun diagram (in the application, the coordinates for Pforzheim/Germany are pre-set as an example)
- Find out your UTC timezone (pre-set in the application is +2 (=+1 for Germany +1 for summertime = +2)
- Enter the date, coordinates and UTC zone for which you want the diagram to be calculated
- If you do not want a graphical diagram and only to know the sun key data (sunrise, true noon, sunset), you can choose so and the program quits after displaying this information
- If you choose to see the diagram, you can control the sun position hour-wise with your joystick, key markers are placed as little sun symbols on the curve
Additional remarks:
- Please do not expect this to run extremely fast, it is a BASIC program with some machine language support for the graphics. I need BASIC because of the floating point math and since there is no BASIC compiler that handles floats, we have to cope with the speed there is (use Alt-W in VICE to speed up)
- The calculation for sunrise, true noon and sunset is less precise than the calculation of the sun curve, since I use a simplified algorithm for the sun key data - that's why sunrise and sunset can be at heights slightly below 0 degrees - all in all, the results are very close to comparisons with sun calculators in mobile apps and on websites - the C64 calculates the same results as in my corresponding open office calc sheet (you find it attached in the package), so i am quite satisfied how precise our old C64 works.
Sources used:
For sun position calculation: https://de.wikipedia.org/wiki/Sonnenstand
For weekday calculation: https://de.wikipedia.org/wiki/Wochentagsberechnung
For sunrise and sunset calculation: https://lexikon.astronomie.info/zeitgleichung/ |
|
|
|
| Search CSDb |
| Navigate | |
|
| Detailed Info | |
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|