Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:15 10 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMX/RasPi/DOS - Phases of the Moon

Author Message
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 266
Posted: 03:05am 17 Jul 2017
Copy link to clipboard 
Print this post

This MMBASIC program (moon_phases.bas) can be used to determine the calendar date and UTC time of the phases of the Moon. It runs on the MicroMite eXtreme, Raspberry Pi and DOS versions of MMBASIC.

Here's a typical user interaction with the software and the results computed by the code.

phases of the Moon
==================

please input the calendar month (1 = January, 2 = February, etc.)
? 8

please input the calendar year (include all digits)
? 2017

new Moon
--------

calendar date August 21 2017

UTC time 18 hours 30 minutes 58.23 seconds

first quarter
-------------

calendar date August 29 2017

UTC time 8 hours 14 minutes 5.30 seconds

full Moon
---------

calendar date September 6 2017

UTC time 7 hours 3 minutes 49.89 seconds

last quarter
------------

calendar date September 13 2017

UTC time 6 hours 25 minutes 54.25 seconds


Here's the link to a zipped archive containing the MMBASIC source code.

2017-07-17_130300_moon_phases.zip



 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 979
Posted: 04:01am 17 Jul 2017
Copy link to clipboard 
Print this post

THANKS A LOT!!!

Frank
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3308
Posted: 02:55am 18 Jul 2017
Copy link to clipboard 
Print this post

That is a lot of code David. I hope that you are putting these up on @CaptainBoing's website because I am sure that they will be useful in the future - if only I can find them.

Geoff
Geoff Graham - http://geoffg.net
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 266
Posted: 05:00am 18 Jul 2017
Copy link to clipboard 
Print this post

I'm posting all the MMBASIC code I develop at my Google Drive site which is

MMBASIC by D Eagle

This is easier for me since I often forget to post at other sites like @CaptainBoing and Rob's Circuit Gizmos. I've got a good memory, it's just short!

There is also gfortran code for the Raspberry Pi at

gfortran for the Raspberry Pi

and Octave code for the Raspberry Pi at

Octave for the Raspberry Pi

 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 979
Posted: 12:00am 19 Jul 2017
Copy link to clipboard 
Print this post

Hi David,

did you have a program that calculates the moonphase for a specific date/time?

THANKS!

Frank
 
cdeagle
Senior Member

Joined: 22/06/2014
Location: United States
Posts: 266
Posted: 10:22am 19 Jul 2017
Copy link to clipboard 
Print this post

I do but have not ported it from QuickBASIC to MMBASIC yet.

Item #73 on the list of things I want/need/should/could do.

So many lines of source code, but only 23 hours and ~56 minutes in the sidereal day.
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 979
Posted: 09:03pm 19 Jul 2017
Copy link to clipboard 
Print this post

Ok, I can wait!

... a day have 24 hours - when this is not enough to me, I take the night!

Frank
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025