# From Mean Moon to True Moon in an old procedural calendar

This is a follow-up to How to interpret this old degree notation?

It is about an old calendar system which generates a luni-solar calendar with a procedural method, using a handful of calculations and some constants derived from astronomical observations.

This method originates from ancient India. Today it is used in Thailand to determine public holidays and observance days (uposatha days) for Buddhist monks, which fall on New- and Full Moon days.

Actually it's a neat system that had allowed village "astronomers / astrologers" construct a calendar with a method they could memorize by rote learning, without astronomical tools to make precise measurements. It is dreadfully underdocumented, and I've been collating the method and it's practices in Calculating the Uposatha Moondays.

Most useful have been the actual formulas in Rules for Interpolation in the Thai Calendar by J.C. Eade, it is just some basic arithmetic, but following his notation is a puzzle in itself.

Effectively I'm trying to implement these formulas (see image below), in a golang package.

With the earlier help, I arrived at step 13 (Mean Moon). Hooray :)

Step 14. and 15. is a puzzle again.

## Step 14.

How would you interpret this? "(1780 + 80) * 3 on base 808, and add 2"

## Step 15.

Eade has (8; 11 : 7) - (6; 27 : 12) = (1; 3 : 55), but that doesn't work.

That specific substr. gives me (1; 13 : 55), which could be a typo in the paper, but that value doesn't carry things forward either.

Things straighten up at step 16., 17., 18., which would produce the paper's results, to get there I faked the values for step 14. and 15, to work at least in the example case given in the paper.

In suriya.go this business is happening in:

func (suDay *SuriyaDay) Init(ce_year int, lunar_year_day int)


As before, there is a confusing avoidance of specifying the unit under consideration, but the pattern is still that the last number is in minutes of arc, the middle in degrees, and the first in $30^\circ$ for the Zodiac divisions, so: $$\begin{eqnarray*} \frac{(1780+80)\times 3}{808} &=& 6+\frac{27}{30} + \frac{10}{30\times 60} + \frac{41}{30\times 60^2}+\ldots \\ &=& (6;\;27\!:\,10)\text{.}\end{eqnarray*}$$ The $+2$ makes this $(6;\;27\!:\,12)$, although this makes the second addend in minutes of arc while the first one is not. As before, the calculation is not rounded.
Eade has (8; 11 : 7) - (6; 27 : 12) = (1; 3 : 55), but that doesn't work.
That specific substr. gives me (1; 13 : 55), which could be a typo in the paper, but that value doesn't carry things forward either.
I think that you are correct that this is a typographical error, but the corrected value probably is carried forward--the error is just repeated again in Step 16. Note that $(1;\;13\!:\,55) = 43^\circ 55'$, which makes the corrected Step 16 $$296\sin(1;\;13\!:\,55) = 205.309 = (0;\;3\!:25)\text{,}$$ following the convention that the numerical value is re-interpreted as minutes of arc. On the other hand, if we follow what Step 16 actually says, we get a very different value: $$296\sin(1;\;3\!:\,55) = 165.164 = (0;\;2\!:45)\text{.}$$
Granted, the value actually carried forward to Step 17 is $(0;\;3\!:24)$ instead, but the former is definitely much closer. This further discrepancy could also be an undocumented geographical correction (the procedure does, after all, have things like $+3$ and $+2$ at times), but I'm more inclined to guess that this is due to imprecision in the calculation of sine, as the paper indicates that a table was used.