A forlorn hope perchance

A word from our sponsor:

Printer-friendly version

Author: 

Hi all,

I am spending far too many hours on a project by making assumptions, or, better said, approximations, and then having to spend so much time smoothing out the approximations to give vaguely meaningful results.

It would be so much more simple if I could just enter the variables into a spreadsheet and sit back and let it do the work for me.

Is there anyone out there who is brainy enough to come up with a formula, usable on a spreadsheet, for calculating the hours of daylight in a day given the figures for the previous day? Or for saying, for example, if we have 9 hours of daylight on the 2nd of the 3rd month, how many would we have on the 14th of the 4th?

Converting a time, or a length of time, to some base unit, like seconds, is easy peasy. And doing the same thing in reverse is likewise.
But I am getting headaches trying to devise a formula which will account for the time of year (and hence the rate of change of the daylight hours) and the direction of change (days getting shorter or longer).

In my approximations, I have applied the good old tidal rule of thumb - the rule of 12ths, but that doesn't quite reflect reality. And falls apart if the time period is chopped up too small. A variable would have to be introduced to say where in the overall cycle this time period is.

And frankly, after nearly a week of struggling with this, I need to regain some semblance of control over my life :-)

Thanks in advance

Julia

Comments

Not easy

Location is important.

There is a whole wikipedia article on Sunrise calculation.

Right...

The further north (in the northern hemisphere) or south (in the southern) you go, the later the sunset is at the summer solstice; by definition, days and nights are equal in length at the fall equinox. If there's a three-hour difference (from a 10pm Daylight Time sunset at the solstice to 7pm at the equinox) to distribute over the roughly 92 days between the two, obviously days have to shorten by twice as much time as they do closer to the equator where there's only a 1-1/2 hour difference (8:30 pm to 7 pm). The same's true, of course, for the other three seasonal transitions, either getting shorter or longer.

Eric

And...

Since I'm guessing she's talking about Anmar, the different configuration of the Anmarian solar system will make this even more complicated. Too complicated I think.

Abigail Drew.

day length

I'm afraid you're going to need a lookup table, since the rate of change, changes itself. That is, near the summer and winter solstice the change in day length is minimal. Near the spring and fall solstice, the length of the day has the largest changes in length. Hmm, maybe a sign wave for the rate of change in the change of length?? Maybe Wolfram Alpha could help.

Indeed, you have all spotted the difficulties

it is the rate of change that is the problem, but the Rule of Twelfths covers this neatly. Basically, the tide flows in at speeds (average of course) of 1, 2, 3, 3, 2, 1.
Actually, the rule of 12ths is often used for measuring the HEIGHT of the tide, which can be likened to the length of a day. So early on the change is slow, later (Feb/March) the change is rapid, then tails off again into June where the rate of change is low again.
Basically a nice sine wave.

I just need to translate the theory from a six-hour period to a six month period. And then have settable variables. Say, shortest day is 35150 seconds and the longest day is 55200. Then latitudinal variations can be accounted for.

So really what I want is to be able to put in the length of the start day, the length of the end day and the number of days between the two.

And have the varied rates of change accounted for by the formula.

I shall continue straining my brain!

Cheers

J

Trig

erin's picture

This is a trig function. You're going to need either a lookup table or a calculator that does trig. Basically, you are trying to find out the covariance of delta t with regard to delta theta as theta varies with t. Astronomers looking for exoplanets solve this all the time and you need a related equation to solve for launch windows in the space program.

Find an astronomers club online and they will either have the equation you need or will be delighted to figure one out for you. It's a pretty problem and if I were 45 years younger I would have a lot of fun working it out. (My degree is in math.) My brain is not limber enough anymore for such acrobatics. :)

An arithmetic equation like the Rule of Twelve might not be accurate enough for what you need.

Hugs,
Erin

= Give everyone the benefit of the doubt because certainty is a fragile thing that can be shattered by one overlooked fact.

You what?

[Stares slack-jawed at questioner]

Hum. I did do maths, but that was (mumble) years ago and the GCE certificate was chiseled on a slab of stone.

Yes, this is a question (I'm guessing) about Anmar and that means the constraints of the Solar System do not apply. Mostly.

As Erin said, this should be a simple trig function which approximates a sine wave. Real celestial mechanics does have a word or two to say, however.

The orbit of Earth is not a circle but an ellipse, so there is a variation in the rate at which sunrise/sunset changes throughout the year. Worse, the axis of the ellipse (currently; it precesses!) doesn't coincide with any equinox or solstice so the numbers come out looking odd; it should all even out around 365.2422 days later, of course. For most purposes one can ignore the influence of other planets, although it is there but tiny.

Fortunately, since this is Anmar one can make some assumptions about what works and what doesn't. It would make life easier to assume a perfect ellipse with the long axis arranged so that the southern winter occurs at the point Anmar is closest to the sun. This was the way I originally thought the orbit might be laid out since the southern winters are fairly mild.

(Waves hand) Someone else can do the math (waves hand). If it were me, and this were 30 years ago, I would simply have written a program to calculate the required times. That can be done without understanding the math required providing the algorithm is supplied. I don't have those skills any longer, stuff atrophies when not used.

Penny

PS Of course, if this was indeed Earth, one could simply Google the answer :)

I'll admit

I've STILL never gotten around to checking out the Anmar stuff, but this all begs a couple of questions:

1. How similar IS Anmar to Earth? Our seasonal flux is entirely due to the perfect storm of circumstances involving the location of the bodies we orbit and that orbit us, as well as rotation/etc. and that's all BEFORE calculating in polar shifts and the like.

2. Is your current date/seasonal structure based on said differences and the way the affect the overall feel, or simply an Earth equivalency thing?

3. What's to stop you from tweaking things with any number of factors to make the calculations easier?

The third is by far the most important aspect here, though it does tie directly into the first. You could VASTLY simplify the calculation of most anything involving seasonal shifts for the planet simply by assuming it has an orbit and rotational tilt that accomodates said differences. This is fantasy we're talking about here, not calculations based on data about a real planet, so you can literally work backward from the results you want -- say, 33 day lunar cycle, seasonal shift on a period of 73 days, 297 day year -- and just eyeball things from there. This isn't a situation where you have to work within the constraints of already-present variables, but one where adjusting the variables to suit your needs is incredibly easy. Plus, even if you HAVE previously made a statement -- like that the planet is identical to Earth -- that doesn't mean that that statement was de-facto true, or even all that applicable here. After all, how many people who would say something like that would have in-depth knowledge of the decay of our system over the past thousands of years, the influence on our planet of the other nearby bodies, or other relevant factoids?

It's your world. Work out something that works for you, and to a close enough approximation to be both useful and understandable. The physics of it doesn't have to be spot on, just tight enough to be sensical. And, most of all, have FUN with it! When figuring something out for a fictional world involves more pain and frustration than enjoyment, it's probably worth scrapping it all together and tackling the problem from a new angle.

Melanie E.

To be fair...

It's Penny's world, Julia just plays in it and helps with some additional world building as I understand it.

Penny has also already established at least a few things about this planet, multiple moons I remember for sure, which would definitely make this more complicated, not easier. I think I remember there being something about the size of the globe being different, though I can't remember whether it was bigger or smaller. One of the moons, Kalikan, is MASSIVE, or orbits REALLY close, but considering that IIRC the Anmarian Kalikan cycle is longer than our single lunar cycle I doubt that, the smaller moons orbit the more frequently, which would mean they're the ones that are closer.

I seem to remember something about it being a binary star as well, but I could be mixing that up with a different fictional planet from another writer.

Abigail Drew.

Not really that different

Kalikan is roughly Luna sized and goes round in 31 days. This was done in order to approximate the conditions on Earth but also to make things easier from a biological viewpoint. I didn't want to get into what might happen if the menstrual cycle had to adapt to a significantly differing lunar cycle, not to mention many plants and animals have their own lunar resonances.

I thought it would be fun to 'lock' the menstrual cycle to Kalikan, rather than having a sloppy fit like on Earth :) Since all months are thirty-one days, every woman knows what day her period starts.

The other two moons are smaller enough to not make a significant difference to tides or biological matters. The middle one "just happens" to go round once every seven days which conveniently gives the locals a week measure. The closest one is just a nuisance (or pretty). Oh, and Anmar only has the one sun.

Penny

I was confused then

I was confused then about a few points, though I WAS correct about Kalikan's cycle being longer than a Lunar cycle. The Lunar cycle is roughly 28 days, and, as you rightfully pointed out, women's cycles only roughly fit the lunar cycle. The fact our Luna's cycle is itself not entirely constant could play a part in that inconstancy though. I don't know what made me think Kalikan was much larger than Luna though since you just told me I was wrong about that.

Abigail Drew.

With all these differences,

and already having the rough outline of months/weeks/lunar cycles in place, the only other major thing to take into account is the planet's angle of repose and how flat and eliptical the orbit is. If you've already simplified measurement setups as much as you have here, then why not consider the planet having an almost perfectly circular orbit around its sun and a locked angle of repose? You could then assume that, in said near-perfectly circular orbit, seasons would always happen on an even 1/4 scale of the year, and it SHOULD, in theory, simplify daylight hour calculation as well, since rather than choosing an angle you could just say "the shortest daylight every year is X hours, and the longest is Y," and have a linear scale between the two for every other day. Heck, for ease of calculation say that every day's daylight perior is precisely 30 seconds longer than the previous, with a short length of 7 1/2 hours. Assuming a roughly earth-length year -- let's say 91 days a season -- that would put your longest day at just over 9 hours. You COULD, if you wanted, decide on a drift period so that the solstices happened at a different time every year, but again, you have the freedom here to basically fit the math to match your world rather than the other way around. Why not run with that?

Melanie E.

Length of daylight

In highschool (almost 30 years ago) I did a science proyect on solar energy. In that report I included a table of sunrise and sunset times, as well as sunshine durations. The formula I found and used did not account for the wobble of the earth axis, but was a close enough approximation. I started calculating some refrence times with my trusty Casio fx120 calculator. But then I decided to write a small Basic programm on my Commodore 64 to calculate the times for each day of the year at our location, saving the results in a text file to be later included in my report. This data correlated quite well with the meassurements of sunshine duration I was also able to obtain.

As others have allready suggested, the equation (formula) should be available on the net. And translating that to a spreadsheet should be trivial. Just remember that the trigonometric functions in spreadsheets take the angles in Radians insted of Degrees. But there should be conversion functions available. The equivalencies are:

  • 180 Degrees = 1 Radian
  • 1 Degree = 60 Minutes
  • 1 Minute = 60 Seconds

Not to ruin anyone's fun, but

Not to ruin anyone's fun, but this IS an invented universe. The movements of celestial bodies within are whatever the creator(s) say they should be. Why not use a quasi-scientific explanation to cover whatever needs arise? I, for one, am very happy just to have stories of this caliber to read without fretting about the minutiae.

It is fiction, after all.

It's okay

If you, as a reader, don't care too much about all the world-building minutiae, but it's because of that minutiae that the stories are of this caliber. Every great author does world-building on a scale similar to this, more-so if they're writing science fiction, which is what Anmar is. Fantasy worlds can leave a lot of the science details to the imagination simply because their milieu doesn't focus on it... Julia's stories even more-so than even Penny's, however, delve really deep into the science details though.

Abigail Drew.

O M G - O M G - O M G. Oh, and LOL

Problem solved.

And so incredibly easily.

There is an inbuilt Sine function in Excel and similar. Duh!

Silly moo that I am, wasting my time (and yours) when there was such a simple solution.

Thanks all for the comments.

The Moon or Moons whizzing around aren't so effective as regards sunrises and sunsets, so I shall ignore them.

Now I have a simple spreadsheet that I can set to formulate daylight hours (or Bells) for any old year length, and any old axial tilt, and any old latitude (assuming a single sun!). Just plug in the base parameters and off it goes.

Much relieved. (and grinning in delight).

Thanks again, all of you.

J

And thank you

For raising what turned out to be an entirely absorbing question.

One of the interesting things, for me, about both SEE and JoB is the variety and depth of subjects raised in the comments and associated blogs. This heartens me, since it shows that our readers are fully engaged with the world we have created.

It does mean that we have to raise our game, but 'twas ever thus.

Penny