[pycalcal] push by enrico.spinielli - Meeus in bib; formulae with siunitx formatting for angles on 2010-02-21 15:11 GMT

1 view
Skip to first unread message

pyca...@googlecode.com

unread,
Feb 21, 2010, 10:12:54 AM2/21/10
to pyca...@googlegroups.com
Revision: 52303b590e
Author: Enrico Spinielli <enrico.s...@gmail.com>
Date: Sun Feb 21 07:11:47 2010
Log: Meeus in bib; formulae with siunitx formatting for angles
http://code.google.com/p/pycalcal/source/detail?r=52303b590e

Modified:
/pycalcal.bib
/pycalcal.nw

=======================================
--- /pycalcal.bib Mon Dec 28 08:43:41 2009
+++ /pycalcal.bib Sun Feb 21 07:11:47 2010
@@ -25,6 +25,15 @@
note = {Common Lisp code available at

\url{http://www.cup.cam.ac.uk/resources/0521702380/5106_calendrica-3.0.cl.zip}}
}
+
+@book{meeus:astroalgo,
+ author = {Meeus, Jean},
+ title = {Astronomical Algorithms},
+ year = {1998},
+ edition = {with corrections as of June 15, 2005},
+ isbn = {0943396611},
+ publisher = {Willmann-Bell, Incorporated},
+ }

@Book{aho:awk,
author = {Aho, A.~V., B.~W. Kernighan, and P.~J. Weinberger},
=======================================
--- /pycalcal.nw Sun Feb 14 07:22:45 2010
+++ /pycalcal.nw Sun Feb 21 07:11:47 2010
@@ -3,6 +3,42 @@
% BUT it does NOT inlude graphics nor create links
%\documentclass[a4paper,draft,pdftex]{report}
\documentclass[a4paper,pdftex]{report}
+
+% for proper typesetting of angles...but it lacks h/m/s forms
+\usepackage{siunitx}
+\def\dms{\ang[padangle=none,astroang]} % a synomim
+% waiting for siunitx extension for h/m/s...
+\usepackage{euro}
+\newcommand\phour[1]{\hbox{$#1^{\rm h}$}}
+\newcommand\pmin[1]{\hbox{$#1^{\rm m}$}}
+\def\fsec{$\hbox{.\!\!^{\rm s}$}}
+\newcommand*\hms[3]{{%
+ \EUROFORMAT{main}{\in}%
+ \EUROFORMAT{in}{\val}%
+ \EUROFORMAT{EUR}{\form{\,}{\,\fsec}{}\round{-10}}%
+ \ensuremath{%
+ \phour{#1}\,\pmin{#2}\,\EURO{EUR}{#3}}}}
+
+\newcommand*{\manualmark}{%
+ \if@chapter\let\chaptermark\@gobble\fi
+ \let\sectionmark\@gobble
+ \let\subsectionmark\@gobble
+ \let\subsubsectionmark\@gobble
+ \let\paragraphmark\@gobble
+ \let\subparagraphmark\@gobble
+ \let\@mkboth\@gobbletwo
+ \@automarkfalse
+}
+
+
+%% Define a new 'leo' style for the package that will use a smaller font.
+\makeatletter
+\def\url@leostyle{%
+
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
+\makeatother
+%% Now actually use the newly defined style.
+
+

\usepackage{wasysym}
%%\usepackage[a4paper,top=3cm,bottom=3cm,left=3.5cm,right=3.5cm,%
@@ -26,33 +62,6 @@
% smallcode: Set code in LaTeX \small font instead of \normalsize.
\noweboptions{externalindex,webnumbering,longxref,longchunks,smallcode}

-% example usage: 12^h 45^m 23^s (\showclock{12}{45}{23}).
-% TODO: maybe should not display h (or h and m) if zero
-\newcommand{\showclock}[3]{$#1^{h} #2^{m} #3^{s}$}
-
-% example usage: 12^\circ 45' 23''.56 (\showdegrees{12}{45}{23}).
-% TODO: maybe should not display \circ (or \circ and ') if zero
-% Consider kerning decimal of seconds if presenr
-\newcommand{\showdegrees}[3]{#1^{\circ}\,#2'\,#3''}
-
-\newcommand*{\manualmark}{%
- \if@chapter\let\chaptermark\@gobble\fi
- \let\sectionmark\@gobble
- \let\subsectionmark\@gobble
- \let\subsubsectionmark\@gobble
- \let\paragraphmark\@gobble
- \let\subparagraphmark\@gobble
- \let\@mkboth\@gobbletwo
- \@automarkfalse
-}
-
-
-%% Define a new 'leo' style for the package that will use a smaller font.
-\makeatletter
-\def\url@leostyle{%
-
\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
-\makeatother
-%% Now actually use the newly defined style.


\usepackage[a4paper,top=3cm,bottom=3cm,left=3.5cm,right=3.5cm,%
@@ -79,7 +88,6 @@
\usepackage{lettrine}

%\usepackage{appendix}
-

% figures template
%% \begin{figure}
@@ -3712,10 +3720,15 @@
return (dynamical_from_universal(tee) - J2000) / mpf(36525)

@
-The \emph{mean} obliquity is defined by the following formula:
+\subsubsection{Mean Obliquity}
+\label{sec:meanobliquity}
+The \emph{mean} obliquity is defined by the following
formula~\cite[equ.~22.2]{meeus:astroalgo}:
\begin{equation}
\label{eq:meanobliquity}
- \varepsilon_0 = \showdegrees{23}{26}{21.448} - 46''\!\!.8150 T -
0''.00059 T^2 + 0''.001813 T^3
+ \varepsilon_0 = \dms{23;26;21.448} -
+ \dms{;;46.8150} T -
+ \dms{;;.00059} T^2 +
+ \dms{;;.001813} T^3
\end{equation}
<<time and astronomy>>=
# see lines 2872-2880 in calendrica-3.0.cl
@@ -3728,6 +3741,10 @@
angle(0, 0, mpf(-0.00059)),
angle(0, 0, mpf(0.001813))]))

+@ A formula with better precision (\dms{;;0.01} after $1000$ years and few
+seconds of arc after $10000$ years around $J2000.0$) over a wider time
($10000$
+years around $J2000.0$) span is given by~\cite[equ.~22.3]{meeus:astroalgo}:
+<<time and astronomy>>=
def `precise_obliquity(tee):
"""Return precise (mean) obliquity of ecliptic at moment tee."""
u = julian_centuries(tee)/100

Reply all
Reply to author
Forward
0 new messages