From 1977a2873ab859abb9a86a5560083a2ff06ed9cd Mon Sep 17 00:00:00 2001 From: zebulon2 Date: Mon, 24 Aug 2020 15:02:14 +0200 Subject: [PATCH 1/5] Added Sun parallax correction to small table --- increments.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/increments.py b/increments.py index d6fb1d3..65b6ab5 100644 --- a/increments.py +++ b/increments.py @@ -232,16 +232,18 @@ def venparallax(): Hdeg=10 tab = r'''\noindent - \begin{tabular}[t]{|c|cccccc|} - \multicolumn{7}{c}{\textbf{Parallax of Venus and Mars}}\\ + \begin{tabular}[t]{|c|c|cccccc|} + \multicolumn{8}{c}{\textbf{Parallax of the Sun, Venus and Mars}}\\ ''' tab += r"""\hline - $H_{a}$ HP & \textbf{.1'} & \textbf{.2'} & \textbf{.3} & \textbf{.4'} & \textbf{.5'} & \textbf{.6'} \\ + $H_{a}$ HP & \textbf{Sun} & \textbf{.1'} & \textbf{.2'} & \textbf{.3} & \textbf{.4'} & \textbf{.5'} & \textbf{.6'} \\ \hline """ while Hdeg<90: hp = 0.1 + hpsun = 0.1489 line = r"\textbf{{ {}$^\circ$}} ".format(Hdeg) + line += "& {:.2f} ".format(parallax(hpsun, Hdeg, 0)) # Sun parallax while hp < 0.7: line += "& {:.1f} ".format(parallax(hp, Hdeg, 0)) hp += 0.1 @@ -305,9 +307,9 @@ def makelatex(): \[R_0=\cot \left( H_a + \frac{7.31}{H_a+4.4}\right)\] For other than standard conditions, calculate a correction factor for $R_0$ by: \[f=\frac{0.28P}{T+273}\] where $P$ is the pressure in hectopascal and $T$ is the temperature in $^\circ$C. No table is given for this correction so far. \subsubsection*{Parallax} -For moon sight (and if necessary for Mars and Venus) a parallax correction is necessary. For Mars and Venus the horizontal parallax ($HP$) is never more than 0.5' and can be omitted if this kind of precision is not necessary. The parallax ($P$) can be calculated from horizontal parallax ($HP$) and apparent altitude $H_a$ with the following formula: +For moon sight (and if necessary for the Sun, Mars and Venus) a parallax correction is necessary. For the Sun, Mars and Venus the horizontal parallax ($HP$) is never more than 0.6' and can be omitted if this kind of precision is not necessary. The parallax ($P$) can be calculated from horizontal parallax ($HP$) and apparent altitude $H_a$ with the following formula: \[P={HP} \times \cos(H_a)\] -The table for the moon gives the parallax for a horizontal parallax of 54' which is the lowest value for the moon. For all other values, the value in the lower half of the table has to be added. Note that this table is only for parallax and does not correct for refraction and semidiameter. For all moon and sun sights, semidiameter has to be added for lower limb sights and subtracted for upper limb sights. The value for HP and semidiameter is tabulated in the daily pages. The smaller parallax table is for parallax of Venus and Mars. +The table for the moon gives the parallax for a horizontal parallax of 54' which is the lowest value for the moon. For all other values, the value in the lower half of the table has to be added. Note that this table is only for parallax and does not correct for refraction and semidiameter. For all moon and sun sights, semidiameter has to be added for lower limb sights and subtracted for upper limb sights. The value for HP and semidiameter is tabulated in the daily pages. The smaller parallax table is for parallax of the Sun, Venus and Mars. \subsubsection*{Altitude correction} To correct your sextant altitude $H_s$ do the following: Calculate $H_a$ by @@ -332,7 +334,7 @@ def makelatex(): if sys.version_info[0] != 3: raise Exception("This runs with Python 3") -fn = "inc" +fn = "increments_corrections" filename = fn + ".tex" outfile = open(filename, mode="w", encoding="utf8") outfile.write(makelatex()) From 3537bc0fc7a6b07de615380906d5417408a885bf Mon Sep 17 00:00:00 2001 From: zebulon2 Date: Tue, 25 Aug 2020 10:30:19 +0200 Subject: [PATCH 2/5] Added Moon SD augmentation table and description --- increments.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/increments.py b/increments.py index 65b6ab5..463c177 100644 --- a/increments.py +++ b/increments.py @@ -255,6 +255,42 @@ def venparallax(): """ return tab +def moonsdaugment(hp, deg, min): + #returns moon SD augmentation in min due to topocentric vs geocentric difference + #using Stark approx. formula + k = 0.2725 #ratio radius moon/earth + aug = ((k * hp / (1 - sin(rad(0, hp)) * sin(rad(deg, min)))) - k * hp) + return aug + + +def moonsdaugmenttab(): + #Hdeg = 0 + hp = 54.0 + + #HP $H_{a}$ & \textbf{0} & \textbf{10} & \textbf{20} & \textbf{30} & \textbf{40} & \textbf{50} & \textbf{60} & \textbf{70} & \textbf{80} & \textbf{90} \\ + + tab = r'''\noindent + \begin{tabular}[t]{|c|ccccccccc|} + \multicolumn{10}{c}{\textbf{Moon SD augmentation}}\\ + ''' + tab += r"""\hline + HP $H_{a}$ & \textbf{10$^\circ$} & \textbf{20} & \textbf{30} & \textbf{40} & \textbf{50} & \textbf{60} & \textbf{70} & \textbf{80} & \textbf{90} \\ + \hline + """ + while hp <= 61.5:#Hdeg <= 90: + Hdeg = 10 + line = r"\textbf{{ {}}} ".format(hp) + while Hdeg <= 90:#hp < 0.7: + line += "& {:.1f} ".format(moonsdaugment(hp, Hdeg, 0)) + Hdeg += 10#hp += 0.1 + line += "\\\ \n" + tab += line + hp += 1.5#Hdeg += 10 + tab = tab + r"""\hline + \end{tabular} + """ + return tab + def makelatex(): lx = r"""\documentclass[ 10pt, twoside, a4paper]{scrreprt} @@ -288,6 +324,7 @@ def makelatex(): \begin{multicols}{2} \begin{scriptsize} ''' lx = lx + venparallax() + lx = lx + moonsdaugmenttab() lx = lx + r'''\end{scriptsize} \newpage \section*{About these tables} The preceding static tables are independent from the year. They differ from the tables found in the official paper versions of the Nautical almanac in two important considerations. @@ -310,6 +347,8 @@ def makelatex(): For moon sight (and if necessary for the Sun, Mars and Venus) a parallax correction is necessary. For the Sun, Mars and Venus the horizontal parallax ($HP$) is never more than 0.6' and can be omitted if this kind of precision is not necessary. The parallax ($P$) can be calculated from horizontal parallax ($HP$) and apparent altitude $H_a$ with the following formula: \[P={HP} \times \cos(H_a)\] The table for the moon gives the parallax for a horizontal parallax of 54' which is the lowest value for the moon. For all other values, the value in the lower half of the table has to be added. Note that this table is only for parallax and does not correct for refraction and semidiameter. For all moon and sun sights, semidiameter has to be added for lower limb sights and subtracted for upper limb sights. The value for HP and semidiameter is tabulated in the daily pages. The smaller parallax table is for parallax of the Sun, Venus and Mars. +\subsubsection*{Moon SD augmentation} +Due to its proximity, moon topo- and geocentric SD differ. The Moon SD augmentation table provides a correction to be added to the moon SD before calculating $H_o$. \subsubsection*{Altitude correction} To correct your sextant altitude $H_s$ do the following: Calculate $H_a$ by From 6e1d0ea8044dc0584f4944a474b986df8349b6ac Mon Sep 17 00:00:00 2001 From: zebulon2 Date: Tue, 25 Aug 2020 10:44:05 +0200 Subject: [PATCH 3/5] code cleanup --- increments.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/increments.py b/increments.py index 463c177..a4e0257 100644 --- a/increments.py +++ b/increments.py @@ -264,28 +264,25 @@ def moonsdaugment(hp, deg, min): def moonsdaugmenttab(): - #Hdeg = 0 hp = 54.0 - #HP $H_{a}$ & \textbf{0} & \textbf{10} & \textbf{20} & \textbf{30} & \textbf{40} & \textbf{50} & \textbf{60} & \textbf{70} & \textbf{80} & \textbf{90} \\ - tab = r'''\noindent \begin{tabular}[t]{|c|ccccccccc|} \multicolumn{10}{c}{\textbf{Moon SD augmentation}}\\ ''' tab += r"""\hline - HP $H_{a}$ & \textbf{10$^\circ$} & \textbf{20} & \textbf{30} & \textbf{40} & \textbf{50} & \textbf{60} & \textbf{70} & \textbf{80} & \textbf{90} \\ + HP $H_{a}$ & \textbf{10$^\circ$} & \textbf{20$^\circ$} & \textbf{30$^\circ$} & \textbf{40$^\circ$} & \textbf{50$^\circ$} & \textbf{60$^\circ$} & \textbf{70$^\circ$} & \textbf{80$^\circ$} & \textbf{90$^\circ$} \\ \hline """ - while hp <= 61.5:#Hdeg <= 90: + while hp <= 61.5: Hdeg = 10 line = r"\textbf{{ {}}} ".format(hp) - while Hdeg <= 90:#hp < 0.7: + while Hdeg <= 90: line += "& {:.1f} ".format(moonsdaugment(hp, Hdeg, 0)) - Hdeg += 10#hp += 0.1 + Hdeg += 10 line += "\\\ \n" tab += line - hp += 1.5#Hdeg += 10 + hp += 1.5 tab = tab + r"""\hline \end{tabular} """ From 5f98e8a28caa42802305d6576617b3e04bba367e Mon Sep 17 00:00:00 2001 From: zebulon2 Date: Wed, 26 Aug 2020 11:02:59 +0200 Subject: [PATCH 4/5] description of moon augmented SD formula --- increments.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/increments.py b/increments.py index a4e0257..2819513 100644 --- a/increments.py +++ b/increments.py @@ -323,7 +323,7 @@ def makelatex(): lx = lx + venparallax() lx = lx + moonsdaugmenttab() lx = lx + r'''\end{scriptsize} \newpage - \section*{About these tables} + \small\section*{About these tables} The preceding static tables are independent from the year. They differ from the tables found in the official paper versions of the Nautical almanac in two important considerations. \begin{itemize} \item My tables are not arranged as \textit{critical} tables. So chose the value that fits best to your value and interpolate in the rare cases where this should be necessary. @@ -345,7 +345,8 @@ def makelatex(): \[P={HP} \times \cos(H_a)\] The table for the moon gives the parallax for a horizontal parallax of 54' which is the lowest value for the moon. For all other values, the value in the lower half of the table has to be added. Note that this table is only for parallax and does not correct for refraction and semidiameter. For all moon and sun sights, semidiameter has to be added for lower limb sights and subtracted for upper limb sights. The value for HP and semidiameter is tabulated in the daily pages. The smaller parallax table is for parallax of the Sun, Venus and Mars. \subsubsection*{Moon SD augmentation} -Due to its proximity, moon topo- and geocentric SD differ. The Moon SD augmentation table provides a correction to be added to the moon SD before calculating $H_o$. +Due to its proximity, moon topo- and geocentric SD differ. The Moon SD augmentation table provides a correction to be added to the moon SD before calculating $H_o$. This correction was calculated using Stark approximate formula: +\[SD_{aug}=k \cdot {HP} \div (1 - \sin(HP) \cdot \sin(H_a))\] \subsubsection*{Altitude correction} To correct your sextant altitude $H_s$ do the following: Calculate $H_a$ by From 3f49d248b6eaa6a4d1dce2c90441615a51d91a9f Mon Sep 17 00:00:00 2001 From: zebulon2 Date: Wed, 26 Aug 2020 11:14:06 +0200 Subject: [PATCH 5/5] better description of moon augmented SD --- increments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/increments.py b/increments.py index 2819513..43e8381 100644 --- a/increments.py +++ b/increments.py @@ -258,7 +258,7 @@ def venparallax(): def moonsdaugment(hp, deg, min): #returns moon SD augmentation in min due to topocentric vs geocentric difference #using Stark approx. formula - k = 0.2725 #ratio radius moon/earth + k = 0.2725 #ratio radius moon/earth - by definition SD = k * hp aug = ((k * hp / (1 - sin(rad(0, hp)) * sin(rad(deg, min)))) - k * hp) return aug @@ -346,7 +346,7 @@ def makelatex(): The table for the moon gives the parallax for a horizontal parallax of 54' which is the lowest value for the moon. For all other values, the value in the lower half of the table has to be added. Note that this table is only for parallax and does not correct for refraction and semidiameter. For all moon and sun sights, semidiameter has to be added for lower limb sights and subtracted for upper limb sights. The value for HP and semidiameter is tabulated in the daily pages. The smaller parallax table is for parallax of the Sun, Venus and Mars. \subsubsection*{Moon SD augmentation} Due to its proximity, moon topo- and geocentric SD differ. The Moon SD augmentation table provides a correction to be added to the moon SD before calculating $H_o$. This correction was calculated using Stark approximate formula: -\[SD_{aug}=k \cdot {HP} \div (1 - \sin(HP) \cdot \sin(H_a))\] +\[SD_{aug}=SD \div (1 - \sin(HP) \cdot \sin(H_a))\] \subsubsection*{Altitude correction} To correct your sextant altitude $H_s$ do the following: Calculate $H_a$ by