Affiliation
American Association of Variable Star Observers (AAVSO)
Sat, 08/18/2012 - 18:52

Hi all,

I have written an app that submits observations to webobs in the AAVSO visual format. Part of this app of course converts the calendar date to JD, and on several occasions error messages have been raised when attempting to upload a file. I thought that this was because of some inconsistency in the format, but it turns out that the algorithm I have been using (downloaded from the web) doesn't always return the correct JD!

Does anyone know of a reliable JD algorithm, preferably (though not necessarily) in Visual Basic?

You may contact me on mike@starman.co.uk if you want

Michael Poxon, Norwich, UK

Affiliation
American Association of Variable Star Observers (AAVSO)
My JD Converter for Excel

Mike,

Here is my JD Excel spreadsheet that I use in my archiving activity.

Kevin Paxson - PKV

Affiliation
American Association of Variable Star Observers (AAVSO)
JD algorithm

The autoritative source for all things calculated in astronony is Jean Meeus' Astronomical Algorithms.  From pages 60-61.

"Let Y be the year, M the month number  and D the day of the month (with decimals, if any) of the calendar date.

If M>2, leave Y and M unchanged

If M=1 or M=2, replace Y by Y-1 and M by M+12  (In other words January and February are thought to be the 13th and 14th month of the previous year).

In the Gregorian calendar take

A= INT(Y/100) and B = 2-A+INT(A/4) where INT() implies the integer part of a number (NOT the rounded value).

JD = INT(365.25(Y+4716)) + INT(30.6001(M+1)) + D +B - 1524.5"

Note:  this is for Gregorian calendar dates only (Not Julian Calendar).  See Meeus for more details.