Being And Time: The Ontological Tradition

This post is part of a series. Go to the Introduction

Previous Post in Series: The Meaning of Being

The Presocratic philosopher Parmenides struggled with the Greek verb ἐστί (esti) which means “it is.” If I say “the unicorn is white” am I saying that there is a unicorn that exists? Or that a creature of my imagination is white? For the Greeks this sentence was ambiguous and there was not yet a clear distinction made in the language between an existential understanding (a being is) and a predicative understanding (a being has the property of whiteness). What complicated matters further was that if someone said “it is not” this seemed to cause a contradiction because you were saying something was before going on to say that it wasn’t. As a result, Parmenides argued that we can only think of what is and must avoid thinking about what is not. He went on to say that change and motion are impossible. His student Zeno invented humorous thought puzzles where swift-footed Achilles can never catch up to a slow-moving tortoise. But that’s a story for another time.

These thoughts on “is” and “is not” provide the context for why the unnamed visitor from Elea expresses confusion about the word “being.” Plato theorized that particular beings in the world had their cause in transcendental Forms from which copies of beings were created. For every type of being there is a form. Picture one of those rubber stamps that you cover with ink and then stamp out dozens of impressions on a piece of paper. There were stamps for trees, rocks, water, dogs and cats, beds, numbers, even one for human beings.

Aristotle rejects this idea with a humorous criticism:

[Plato teaches that] “corresponding to each thing there is a synonymous entity apart from the substances… both in our everyday world and in the realm of eternal entities…. [It’s] as though a man who wishes to count things should suppose that it would be impossible when they are few, and should attempt to count them when he has added to them” (Aristotle 990a).

In other words, if our explanation of beings involves postulating more transcendental beings, all we’ve succeeded in doing is doubling the number of beings now in need of explanation.

Aristotle will arrive at a different theory of being. He argues that the essence of a thing is “the primary cause of its existence” (Aristotle 1041b). The acorn causes the oak tree to be. Biological parents cause their offspring to be. Each effect is preceded by a cause which in turn is preceded by other causes and effects. But surely these causes can’t go back forever? There must have been a primary cause. This primary cause Aristotle calls the Unmoved Mover, a causeless cause that kick-started the whole chain of events. This is the “god of the philosophers,” a single changeless eternal Being that is the ground of all being.

Aristotle’s way of looking at being will make its way into Neoplatonism and then early Christianity. It reaches a sort of maturity in the medieval period as the vertical “great chain of being” with plants and rocks at the bottom, animals and humans somewhere in the middle, all the way up to angels and God at the top. The medieval period still accepts the Greek view in which the soul is an immaterial substance bound to the material body and released from the body at death.

In his Meditations, Rene Descartes walks through a thought experiment to argue that the essence of our being is that of a thinking subject. He famously declares “I think, therefore I am” (cogito ergo sum). In doing so, his substance dualism equates the immaterial soul with the mind. From now on we tend to see our essence as an immaterial mental subject, one-step removed from, and gazing out at the material world of objects around us. This way of looking at our being comes to dominate the tradition. And it is what Heidegger wishes to destroy.

Next Post in Series: Destruction

Being And Time: The Meaning of Being

This post is part of a series. Go to the Introduction

What is the meaning of being? In philosophy “being” is the main question in metaphysics, or more specifically ontology. This is also the question that drives Heidegger’s project. He sets the scene in his preface with a quote from Plato’s Sophist. The visitor from Elea has been in dialogue with the young Theaetetus. They’ve been going back and forth about such things as what we mean when we use expressions like is and is not. In the spirit of inquiry, Theaetetus goes along and acts as a foil to the visitor’s line of questioning. But the more they talk about the expression “being,” the more tangled things seem to get. Finally, the visitor asks:

“What do you want to signify when you say being? Obviously, you’ve known for a long time. We thought we did, but now we’re confused about it” (Plato 244a).

Heidegger quotes this line right at the start of his book. He says we’re still waiting for the answer. To make matters worse, we are no longer “perplexed at our inability to understand the expression ‘being.'” We’ve forgotten to ask the question altogether. His task is to “reawaken an understanding for the meaning of this question.” Heidegger lists three prejudices or objections that come up when questions about being are raised:

1. Being is universal. For example, we can talk about individuals but at the end of the day we’re all human beings.

2. Even if we wanted to ask, the question makes no sense. We know what it means to be human, to be a dog, or a cat, but we can’t talk about being in the abstract. So don’t ask.

3. Isn’t it obvious? Everyone already knows what it means to say, “the dress is green” or “the girl has pigtails”. If we want to understand being, all we have to do is just look at the person or object.

Heidegger addresses each in turn. To assert that being is universal doesn’t make the question any clearer. Do we know what we mean when we say that being is a universal concept? Since “being” is obscure, this is all the more reason to discuss it.

As for the second one, just because the question makes no sense that’s no reason to continue to ignore it. Quite the reverse, Heidegger thinks. The question “forces it upon us.”

As for the last prejudice, Heidegger is skeptical that being is self-evident. Like the visitor from Elea, we get confused easily just talking about it. This talk of self-evidence and confusion presents an interesting enigma. We think the question of being is obvious to everyone and yet being remains “shrouded in darkness.” He muses at another point that the question “is the most universal and the emptiest” (40).

The whole book is Heidegger’s attempt to answer the question of the meaning of being. Before diving into it, I need to present a very brief survey of the history of philosophy with respect to being. Heidegger calls this “the tradition” since it’s a view that has shaped Western philosophical thinking for over 2,500 years.

Next Post in Series: The Ontological Tradition

Being And Time: Introduction

Martin Heidegger is one of the most influential philosophers of the twentieth century. With the publication of his book Sein und Zeit (Being and Time) in 1927, he revolutionized how we thought of our world and our existence in it as human beings. Pretty much all later Continental philosophy – existentialism, structuralism, and postmodernism – go back to him in one way or another.

Over a series of blog posts, I’m going to organize my thoughts on major themes found in Division One (the first 44 sections of Being and Time). This is the first half of the book known as the existential analysis of Dasein. I’ve read Stambaugh’s translation of the book twice recently and have gone back over certain sections numerous times. I’ve also kept a notebook and have sketched out some of the relationships between his technical terms. But it’s time to put all of this down in writing because that’s how I learn best. For me, that means blogging. A word of caution. Although I have a philosophy undergraduate degree, I am not an academic. My training was in the analytic tradition with an emphasis on philosophy of science and first-order logic. I went on to have a career as a software developer. So, Heidegger’s phenomenological method, his opaque terms, and his inability to communicate in clear language, have been a serious challenge for me. I have gone through multiple bouts of frustration. You will too. Have patience with yourself.

There’s an elephant in the room. Namely, the repulsive fact that Heidegger was an egomaniac, antisemitic, and joined the Nazi Party in 1933 as a true “blood and soil” nationalist. So why did I bother to read him? Well, when I was an undergrad, a professor declared that we would read Sartre but not Heidegger. Heidegger’s fascism made him strictly verboten. You can guess what I did next. I picked up a copy of the Macquarrie and Robinson translation to seek out this “forbidden knowledge” for myself. But I had a full course load, the book was impenetrable, and despite several attempts to read it over the years I never understood it. That always bothered me.

Fast forward a few decades and I picked it up again. I remained curious. But more than that, I traced in my own mind a connection between today’s relativism of “alternative facts” where truth is whatever one wants it to be, back through the postmodern rejection of objective scientific truth, and to Heidegger’s philosophical relativism where truth is a function of our own being. For Heidegger if we do not exist then there is no truth. I’m not sure what to make of that since I’m firmly in the camp that says a tree falling in the forest makes a sound even if no one is around to hear it. Unless you want to say that the displacement of air molecules by a falling object is mere truthiness. The point is my return to Heidegger is not just undergrad nostalgia but also something that feels very present.

My goal is to understand and describe what Heidegger is saying rather than to dwell on a flawed man. As much as possible I’ll adopt a journalistic detachment in my interpretation. At the end of the day, don’t take anything I say at face value. Read the book for yourself and come to your own conclusions.

Citations

This is the primary source which is the focus of my survey:

Heidegger, Martin. Being and Time (BT). Translated by Joan Stambaugh and Revised by Dennis J. Schmidt. Albany: State University of New York Press. 1996.

A full list of works cited is on its own page and I will link to that page when I make a citation to a primary or secondary source. A word about page numbers. Both the Macquarrie and Robinson and the Stambaugh translations include in the margins the pagination from the original Niemeyer edition of Sein und Zeit. I have Stambaugh’s translation. So, when I cite BT, I’ll quote from her with the Niemeyer page in parenthesis. For example, from page 10 of Stambaugh:

“Science in general can be defined as the totality of fundamentally coherent true propositions” (11).

In Macquarrie and Robinson this is on page 32:

“Science in general may be defined as the totality established through an interconnection of true propositions” (11).

Both are on page 11 of the Niemeyer edition. This convention is common in the secondary literature, so I’ll follow it as well. Last, Heidegger loves to italicize for emphasis. All italicized words in quotations originate from him unless I indicate otherwise. However, I will italicize words now and then when they are one of Heidegger’s technical terms (e.g., ontic).

Next Post in Series: The Meaning of Being

The Series

This series on Heidegger’s Being and Time is divided into the following parts:

The Meaning of Being

The Ontological Tradition

Destruction

Rebuilding

Dasein

Being-In-The-World

The Others

Average Everydayness

Authentic Self

Care

Temporality

Final Opinions

What Sidereal Time Is It?

It was one of those rare clear nights we sometimes get this time of year in the Pacific Northwest. My wife had been outside looking up at the night sky. Soon she came inside the house and asked, “what’s the sidereal time right now?” It was good timing because I had just added a sidereal time object to the SquareWidget.Astronomy.Core code library. While she looked over my shoulder, I started to write some code to answer the question. I looked up our local longitude (L) and in four lines of code I had the answer:

using SquareWidget.Astronomy.Core.UnitsOfMeasure;

Moment moment = new(DateTime.UtcNow);
SiderealTime st = new(moment);
SexigesimalAngle L = new(-123, 15, 43.34);
Console.WriteLine(st.ToLocalMean(L));

It returned 7 hours and some odd arcminutes and arcseconds. She nodded approvingly because she already knew the answer having been outside and saw that the constellation Orion had recently crossed our local meridian.

It’s been about four weeks since I released the first version of the code library. It took a lot out of me, so my plan was to chill out and relax for a good long while. And I did. For about 24 hours. I kept identifying and making a list of new features that I wanted to add at some point. Soon I found myself peeling them off one at a time and building releases around each one. So now the library is up to v1.5.1 and I think it’s time to do “Chill Out 2.0” for real this time. But first, let me walk through some of the new features to illustrate them. See my previous blog post on the subject as well as the README documentation on GitHub for more details.

Solar Coordinates

The first version had a solar longitude calculator. The calculator has been deprecated and the functionality is now in the Sun object. The coordinates are returned as apparent (geocentric) equatorial coordinates at a given moment. Suppose I want to know the Sun’s coordinates on 4 Jul 2028:

using SquareWidget.Astronomy.Core.UnitsOfMeasure;
using SquareWidget.Astronomy.Core.CelestialObjects.Stars;

DateTime d = new(2028, 7, 4);
Moment moment = new(d);
Sun sun = new(moment);

EquatorialCoordinates eqc = sun.GetGeocentricPosition();

Console.WriteLine($"RA {eqc.α.ToString()}");
Console.WriteLine($"Dec {eqc.δ.ToString()}.");

/* Displays:
 
RA 6h 54m 36.194953s
Dec +22° 50' 36.22891852".

*/

For a deep dive into the algorithm on solar coordinates see my earlier blog post Astronomical Calculations: Solar Coordinates.

Moon Phases

There is now a calculator to return moon phases within a given date range. Some phases fall outside the range in order to get a baseline for the previous or next phase:

using SquareWidget.Astronomy.Core.Models;
using SquareWidget.Astronomy.Core.Calculators;
using SquareWidget.Astronomy.Core.CelestialObjects.Moons;

DateOnly startDate = new(2025, 1, 1);
DateOnly endDate = new(2025, 3, 31);
DateRange dateRange = new(startDate, endDate);

List<MoonPhase> list = MoonPhaseDatesCalculator.Calculate(dateRange);

foreach (var item in list)
{
    Console.WriteLine(item.PhaseName + " on " +
        item.Moment
            .ToDateTime()
            .ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
}



/* Displays:
 
NewMoon on 12/30/2024 10:26:46.440 PM
FirstQuarter on 01/06/2025 11:56:49.386 PM
LastQuarter on 01/21/2025 08:30:00.587 PM
FullMoon on 02/12/2025 01:53:20.083 PM
NewMoon on 01/29/2025 12:35:53.996 PM
FirstQuarter on 02/05/2025 08:01:06.996 AM
LastQuarter on 02/20/2025 05:31:34.392 PM
FullMoon on 03/14/2025 06:54:32.963 AM
NewMoon on 02/28/2025 12:44:39.649 AM
FirstQuarter on 03/06/2025 04:30:40.312 PM
LastQuarter on 03/22/2025 11:29:33.015 AM
FullMoon on 04/13/2025 12:22:13.127 AM

*/

Solar Eclipses

As with moon phases above you build a date range and pass that into the calculator to get a list of solar eclipses within the range. Here I’m entering the current year 2024 and I see the total eclipse this April that will swing through the U.S. Midwest.

using SquareWidget.Astronomy.Core.Calculators;
using SquareWidget.Astronomy.Core.Models;

DateOnly startDate = new(2024, 1, 1);
DateOnly endDate = new(2024, 12, 31);
DateRange dateRange = new(startDate, endDate);

IEnumerable<SolarEclipse> eclipses = SolarEclipseCalculator.Calculate(dateRange);

foreach (var eclipse in eclipses)
{
    Console.WriteLine(eclipse.ToString());
}

/* Displays:
 
04-08-2024 18:18 UTC  g:  0.3438   Total
10-02-2024 18:46 UTC  g: -0.3515   Annular

*/

Check out NASA’s Five Millennium Canon of Solar Eclipses -1999 to +3000 to see a visual diagram that you can compare with the results.

Galilean Moons of Jupiter

A few years ago, I showed how to calculate, for a given date, the apparent rectangular coordinates (X, Y) of the four Galilean moons of Jupiter (here). You can see a visual representation of the data — a sort of corkscrew diagram — that accompanies that article here. This past month, I put the feature into the code library. You use the same date range pattern as with the other calculators above:

using SquareWidget.Astronomy.Core.Calculators;
using SquareWidget.Astronomy.Core.Models;

DateTime startDate = DateTime.Today;
DateTime endDate = startDate.AddDays(1);

for (var d = startDate; d <= endDate; d = d.AddDays(1))
{
    SatellitePositions positions = JupiterSatellitePositionCalculator.Calculate(d);
    Console.WriteLine(positions.ToString());
}

/* Displays:
 
2/24/2024 12:01 AM
      Io - X:  -4.06   Y:   0.22
  Europa - X:  -0.58   Y:   0.48
Ganymede - X: -14.48   Y:   0.20
Callisto - X:  10.73   Y:  -1.24

2/25/2024 12:01 AM
      Io - X:   5.38   Y:  -0.12
  Europa - X:  -9.02   Y:  -0.12
Ganymede - X: -12.32   Y:  -0.44
Callisto - X:  18.74   Y:  -0.95

*/

The SatellitePositions object holds the date, all four moons, and their respective X, Y coordinates with respect to Jupiter.

Horizontal Coordinates

I’ve added horizontal coordinates as a third system for Alt-Az support. See the code sample for a detailed implementation. If you already have horizontal coordinates, you can convert them to equatorial:

// convert horizontal coordinates to equatorial coordinates
EquatorialCoordinates eqc = hc.ToΕquatorialCoordinates(moment, φ, L);

You need a Moment instance, and the observer’s latitude (φ) and longitude (L) for the conversion.

Sidereal Time

The code library uses sidereal time for conversion between coordinates. You can use it to find the Greenwich Mean Sidereal Time (GMST) or the Greenwich Apparent Sidereal Time (GAST) for any given moment in time. Always use UTC when initializing a SiderealTime object:

using SquareWidget.Astronomy.Core.Planets;
using SquareWidget.Astronomy.Core.UnitsOfMeasure;

DateTime datetime = new(1987, 4, 10, 19, 21, 0);
Moment moment = new Moment(datetime);
SiderealTime st = new(moment);

RightAscension gmst = new(st.GreenwichMean);
RightAscension gast = new(st.GreenwichApparent);

Console.WriteLine(gmst.ToString());
Console.WriteLine(gast.ToString());


/* Displays:
 
8h 34m 57.089579s
8h 34m 57.073455s

*/

If the observer’s longitude (L) is known, GMST can be converted to LMST:

using SquareWidget.Astronomy.Core.Planets;
using SquareWidget.Astronomy.Core.UnitsOfMeasure;

DateTime datetime = new(1987, 4, 10, 19, 21, 0);
Moment moment = new Moment(datetime);
SiderealTime st = new(moment);

RightAscension gmst = new(st.GreenwichMean);

// longitude in Corvallis, OR
SexigesimalAngle L = new(-123, 15, 43.34); 

// local mean sidereal time on the date (PST -8 offset)
RightAscension lmst = st.ToLocalMean(L);   

Console.WriteLine(gmst.ToString());
Console.WriteLine(lmst.ToString());


/* Displays:
 
8h 34m 57.089579s
0h 21m 54.200245s

*/

Finally, the hour angle (H) for an observer’s location and an object’s equatorial right ascension (α) is available by calling ToHourAngle:

using SquareWidget.Astronomy.Core.Planets;
using SquareWidget.Astronomy.Core.UnitsOfMeasure;

DateTime datetime = new(2024, 7, 4, 17, 0, 0); // UTC
Moment moment = new(datetime);
SiderealTime st = new(moment);

// longitude in Los Angeles, USA
SexigesimalAngle L = new(-118, 14, 38); 

// An object's equatorial right ascension
RightAscension α = new(5.838);

Degrees H = st.ToHourAngle(L, α);

Console.WriteLine(H.ToString());

/* Displays:
 
290°.6014494764589

*/

I’d be lying if I said I wasn’t thinking of new features and yes, I’ve started another list of enhancements. But for now, I’m going to take a break from this project for a bit and recharge my batteries. When I pick it up again it will be to do more testing. Currently, there are about 60 unit tests but there’s always room for more coverage and more tests. I also want to focus on useability. Then over time I’ll look to add more enhancements: equinoxes, solstices, equation of time, transits, conjunctions, perihelion and aphelion… the list goes on!

 

 

 

 

 

 

 

 

 

SquareWidget.Astronomy.Core: A C# Code Library

I’m happy to announce the release of SquareWidget.Astronomy.Core, a new code library targeting .NET 8.0 and written in C#, that supports common astronomical calculations and algorithms. The current version is 1.1.0. You can reference the NuGet package at the link above. It has a baseline of functionality and I have plans to add more over time.

Why a library? I’ve been writing code (and snippets of code) over several years to solve various problems in astronomy. When something looked interesting enough to share, I published some of that code on my GitHub repo and on this blog. Recently I was ploughing through the position angle of Saturn’s north pole (Jean Meeus,  Astronomical Algorithms, Chapter 49). After some long debugging sessions, I realized I was using the double data type for everything. Several times I would forget whether a value was in degrees, radians, large angles, reduced angles, or something else entirely. So, I decided I needed a basic code library to bring a little order out of the chaos. The first thing I added were the units of measure. Then planets and calculators came later. I have two design goals in mind for the library: useability and robustness. Certainly, the library should return results accurate to within a few minutes of degrees. But it should also be intuitive and easy to use.

I’ve written more detailed documentation on the GitHub README. Here I’ll just introduce a few of the features. At the heart of the library is a Moment struct. You can pass in date and time parameters, a DateTime instance, or a Julian Day (JD) value:

Moment m1 = new(2024, 1, 31, 9, 36, 0);
Moment m2 = new(2024, 1, 31.4);
Moment m3 = new(2460340.90001);

string s1 = m1.ToDateTime().ToString("yyyy MMM dd HH:mm");
string s2 = m2.ToDateTime().ToString("yyyy MMM dd HH:mm");
string s3 = m3.ToDateTime().ToString("yyyy MMM dd HH:mm");

Console.WriteLine(s1); // 2024 Jan 31 09:36
Console.WriteLine(s2); // 2024 Jan 31 09:36
Console.WriteLine(s3); // 2024 Jan 31 09:36

Once you have a Moment you can get its JD, modified JDE, Day D, or Time T (measure of Julian centuries from epoch J2000.0).

The code library also includes several units of measure with the ability to convert between them. For example, suppose I want to model the Earth’s obliquity of the ecliptic.  I can create a Degrees object by passing in decimal degrees:

Degrees d = new(23.41);
Console.WriteLine(d.ToString()); // 23°.41

Units can be converted to other units. Here I’ll convert to Radians, then a SexesimalAngle, and back to Degrees again:

Degrees d = new(23.41);
Console.WriteLine(d.ToString()); // 23°.41

Radians r = d.ToRadians();
Console.WriteLine(r.ToString()); // 0.4085816

SexigesimalAngle sa = new(d);
Console.WriteLine(sa.ToString()); // +23° 24' 36"

Degrees d1 = new(sa);
Console.WriteLine(d1.ToString()); // 23°.41

Quite often in astronomical calculations we deal with very large angles. Those can be reduced to within the range [0, 360] with the ToReducedAngle function:

Degrees d = new(13512.45);
Console.WriteLine(d.ToString()); // 13512°.45
Console.WriteLine(d.ToReducedAngle().ToString()); // 192°.45

A RightAscension can be constructed with the standard hours, minutes, and seconds (HMS) or decimal degrees:

// passing in HMS
RightAscension ra = new(12, 37, 27);
Console.WriteLine(ra.ToString());   // 12h 37m 27s

// passing decimal degrees
RightAscension ra = new(189.3625);
Console.WriteLine(ra.ToString()); // 12h 37m 27s

Two coordinate systems have been implemented, equitorial and ecliptical,  and you can convert back and forth between them. Suppose we have the equatorial coordinates (α, δ) of Pollux from a star catalog or the wiki and we know Earth’s obliquity of the ecliptic (ε):

// Pollux (β Gem)
RightAscension α = new(7, 45, 18.946);
SexigesimalAngle δ = new(28, 01, 34.26);
Degrees ε = new(23.4392911);

EquitorialCoordinates eqc = new(δ, α, ε);
Console.WriteLine(eqc.α.ToString()); // 7h 45m 18.946s
Console.WriteLine(eqc.δ.ToString()); // +28° 1' 34.26"

We can take those coordinates and convert them to ecliptical coordinates:

EquitorialCoordinates eqc = new(δ, α, ε);
EclipticalCoordinates ec = eqc.ToΕclipticCoordinates();

Console.WriteLine(ec.λ.ToDegrees().ToReducedAngle().ToString()); // 113°.21
Console.WriteLine(ec.β.ToDegrees().ToString());                  //   6°.68

You can instantiate a planet with the new operator or use the factory method. You must pass in a Moment struct either way.

DateTime datetime = new(2028, 7, 1);
Moment moment = new(datetime);

// using new operator
Earth earth = new(moment);

// using factory method for polymorphism
Planet planet = PlanetFactory.Create(PlanetName.Earth, moment);

Once you have a planet you can get its properties which include orbital elements and heliocentric spherical coordinates.

The library has six calculators right now and I plan to add at least a couple more in the next few weeks.

    • Geocentric position calculator
    • Moon phase and dates calculator
    • Nutation calculator
    • Position Angle of Saturn’s semiminor axis calculator
    • Sundial calculator
    • Solar longitude calculator

Consult the README documentation and the unit tests for details. Let me just illustrate one here. Suppose I want to know the four main phases of the moon for the month of August 2024:

DateOnly startDate = new(2024, 7, 1);
DateOnly endDate = new(2024, 9, 30);
DateRange dateRange = new(startDate, endDate);

var list = MoonPhaseDatesCalculator.Calculate(dateRange);

// use a collection expression to get just August
list = [.. list
    .Where(i => i.Moment.Month == 8)
    .OrderBy(o => o.Moment.ToDateTime())];

foreach (var item in list)
{
    Console.WriteLine(item.PhaseName + " on " + 
        item.Moment.ToDateTime().ToString("MM/dd/yyyy hh:mm:ss.fff tt"));
}

This displays:

NewMoon on 08/04/2024 11:12:56.525 AM
FirstQuarter on 08/12/2024 03:19:31.125 PM
FullMoon on 08/19/2024 06:25:37.281 PM
LastQuarter on 08/26/2024 09:27:16.726 AM

What’s next? I’ve got two enhancements open right now. One is to add a feature to calculate solar eclipses and the other is to calculate the positions of the four Galilean moons of Jupiter. Sometime after that I’ll want to address magnitude, planetary perihelion and aphelion, and probably more fun stuff with the Moon. Drop me a line if you have any requests.

Calculate New Moon Dates

In my last post (Calculate Future Solar Eclipses) I showed how to calculate the types of solar eclipses that would occur for a given date range. I took a shortcut and used a NewMoonData class that had a list of all known new moon dates that I culled from the timeanddate.com website. That worked just fine for the purposes of that blog post.

But in the real world who wants to hardcode every single new moon date into the far future? That’s not a realistic solution. I’m following up with an implementation in C# .NET, based on Jean Meeus’ algorithm he adopted from the ELP-2000/82 theory for the Moon. The results show the exact instant of the new moon phase (UTC) for any date from -1999 BCE to +3000 CE, accurate to within a few seconds.

The code is checked into my repo at FindNewMoonConsoleApp. Feel free to clone the code base and take it for a test ride. I won’t do a full walkthrough like with the solar eclipse calculations. I’ll just say that the general approach I took was to start with the first new moon in the J2000.0 epoch (6 Jan 2000) and enumerate over the mean new moon phases that follow. Starting with 6 Jan 2000 the program adds the lunar cycle of 29.5306 days to get 4 Feb 2000. Add the lunar cycle again and you get 5 Mar 2000, and so on for as many months and years as you like.

Sounds easy right? The problem is there are forces of gravity pulling on the Moon and Earth. And none of these bodies move at constant rates. So, the times of the mean phases of the moon just gets us in the ballpark of give or take a day or so. From there we have to apply an algorithm that corrects for all of the perturbations in order to get a more accurate date and time for each new moon.

Suppose I want to know the instant of the new moon in Dec 2022. I run the program and get: 12/23/2022 10:16:47 UTC. The Griffith Observatory, which uses the NASA/JPL Horizons system, rounds it up to 12/23/2022 10:17 UTC.

The program will produce results for every new moon that are accurate to within several seconds for any date range you provide.

Clear skies!

 

 

 

 

 

 

 

 

 

 

Calculate Future Solar Eclipses

According to Herodotus, who wrote The History around 430 BCE, a total solar eclipse interrupted a battle between the Lydians and the Medes:

[J]ust as the battle was growing warm, day was on a sudden changed into night. This event had been foretold by Thales, the Milesian, who forewarned the Ionians of it, fixing for it the very year in which it actually took place. The Medes and Lydians, when they observed the change, ceased fighting, and were alike anxious to have terms of peace agreed on.

(Source: Internet Classic Archives)

This “battle of the eclipse” took place in what is now Turkey, and the eclipse itself could have been the one that occurred on 28 May 585 BCE. Unfortunately, if Thales wrote anything it didn’t survive the centuries. So, we don’t know if he really did predict the eclipse or by what means he did it. All we have is Herodotus to go on. In any case, it’s the first mention in history of anyone predicting an eclipse so it’s interesting on that basis alone.

Wouldn’t it be cool if we could figure out when future solar eclipses occurred for us in the next decade or so? That’s what we’re going to do in this blog post so read on. Continue reading “Calculate Future Solar Eclipses”

Let’s Make a Sundial!

Let’s make a sundial that tells the hour of the day. I know what you’re thinking. Can’t I just go to my local garden store and buy one? Nope. Those are just for decoration only. A real sundial, one that accurately tells the time, must be built for your location (latitude). All sundials are local.

I recommend reading my previous post on building a solar calendar. Also, if you’ve never given much thought to the apparent motion of the sun across the sky, then check out my post on sidereal time. If you know all about sundials and you just want to build one, then read on!

Continue reading “Let’s Make a Sundial!”

Pretty Good Pipeline (PGP)

With apologies to Phil Zimmermann, I’ve put together a “pretty good pipeline” using Azure Pipelines, a multi-stage YAML file, and a couple of ARM templates to deploy a typical .NET Core 3.1 API to an Azure App Service. This won’t be a walkthrough or a “how to” so much as general guidance with links to relevant documentation for more information. From a high-level the pipeline will look something like this diagram:

I am not going to talk about containerization, A/B testing, the latest trends in DevOps, or continuous delivery where a dozen production releases are all in a day’s work.  This is just vanilla guidance for a typical mid-sized shop. If this still interests you then read on.

Continue reading “Pretty Good Pipeline (PGP)”

JSON Variable Substitution in Multi-Stage YAML Pipeline with Azure Key Vault

In my last post I showed how to configure JSON variable substitution with secret variables right in the pipeline. Now in this follow up post I want to expand on that to show how you could instead store your secrets in an Azure Key Vault and reference them in the pipeline. See the publicly visible TimeApi project on Azure DevOps for the source code, ARM templates, and the YAML file.

Continue reading “JSON Variable Substitution in Multi-Stage YAML Pipeline with Azure Key Vault”