Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 22:37 19 Apr 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Version 1.2.0 of Grandfather Clock

Author Message
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 381
Posted: 11:55am 16 Mar 2021
Copy link to clipboard 
Print this post

Attached is the latest version of my Grandfather Clock program.

Changes from the previous version:
1. Changed the moon dial so that full moon is better positioned.
2. Added a small dot on the moon phase dial to show the current day of the 29.5 day moon cycle.
3. Replaced the Zodiac sign in the lower left window with the current date.
4. Added an elevation correction to the sunrise and sunset times. (This will only change those times by a second or so unless you live on top of a very tall mountain!)
5. Added the program version to the bottom right of the clock frame in very small text.





I did a lot of testing entering various cities all over the world to make sure the main time was right and the sunrise and sunset times were accurate to a minute or so. The sunrise and sunset times are not compensated for atmospheric refraction, and you will probably find my times differ from what is published in newspapers, TV, and on the web by a few minutes. (Published times from different sources often disagree with each other by up to 2 minutes)

If you find your clock to be off by a full hour, it means your UTC offset time was entered incorrectly. Note that if your location uses daylight savings time, you need to change the UTC offset accordingly.

If the sunrise and sunset times are weird, check to make sure your longitude entry is correct.

Enjoy!
-Bill


GrandfatherClock.zip
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 381
Posted: 12:01pm 16 Mar 2021
Copy link to clipboard 
Print this post

Oops! I accidentally published the version with the screen capture!

Here is the correct version. Sorry about that!
-Bill


GrandfatherClock.zip
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 381
Posted: 12:04pm 16 Mar 2021
Copy link to clipboard 
Print this post

And yes, I'm an American moron: the ELEVATION constant is implicitly measured in feet instead of meters and I forgot to mention it!

If you know your site's elevation in meters, just multiply that value by 3.28084.

*sigh*

-Bill
 
PilotPirx

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 64
Posted: 01:14pm 25 Mar 2021
Copy link to clipboard 
Print this post

  Quote  And yes, I'm an American moron

Great work, morons can't program such nice software.

It's not problematic, because it is not the new software for the european mars lander...

"We are 100m above ground..." Boom!
Software says 100feet
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 02:35pm 25 Mar 2021
Copy link to clipboard 
Print this post

Isn't it ironic that only the U.S. still uses Imperial measures?

William, nice work,, and don't apologize or succumb to that world government "everyone must use metric !!" claptrap. It's like they never stop trying to convince Americans to watch soccer, a game in which a final score of 0-0 is considered "exciting" - watching paint dry is more thrilling. Now, a no-hitter in baseball - THAT's exciting !

I am fluent in both systems, and while metric is clearly more logical, orthogonal and utilitarian, it is also cold and soulless. I love the "messy" British system for three reasons:

1) It's a piece of living history, connecting us to the Roman Empire and thousands of years of mankind's effort to measure, instrument and control the natural world.
2) The measures are meaningful at the size and scale that we encounter in our daily lives - a foot is a foot, a cup is a cup, a tablespoon is a tablespoon, a mile is a thousand steps, a stone is the weight of a stone, etc. etc, etc.. Inches and feet are much more natural and useful units of measures than metres and millimetres - only scientists and engineers would disagree.
3) Last but not least, using the British system is a terrific brain workout! Just yesterday, I had to figure out what the next lower size socket wrench from 7/16" was - if you work at 1/32" tolerances, you've got all sorts of Lowest Common Denominator stuff swirling around in your head. Most conversions and multiples in the British system require these sorts of mental gymnastics. I consider it the mental "stay in shape" equivalent of walking up the stairs instead of taking the elevator :)
Edited 2021-03-26 00:40 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
IanT
Regular Member

Joined: 29/11/2016
Location: United Kingdom
Posts: 84
Posted: 11:24am 26 Mar 2021
Copy link to clipboard 
Print this post

"Isn't it ironic that only the U.S. still uses Imperial measures?"

Well we can't quite make up our minds here - at least for now. Our Politicians, Media and Scientists all prefer Metric - so the BBC reports rainfall in centimetres, which I have to translate to inches for my wife (who is Canadian by birth). We still signpost roads in Miles and also have legal speed limits in Miles per Hour - although the Beeb always uses Kilometres to describe distance of course.

We sell petrol in Litres but many still brag about how many Miles per Gallon (MPG) we can get from our cars. I find it easier to read (e.g. actually see) the MM scale of my Vernier gauge but then have to translate them to Thou's as my machines are largely Imperial (not too hard given that 1mm = 40 Thou [approx]). I weigh myself in pounds (lbs) and feel guilty when I calculate how many Stone that is (14 lbs = 1 Stone). I know I used to be 5ft 10" but suspect I'm now nearer 5ft 9" - but I couldn't (quickly) tell you what my height is in Metres...

Of course, I am old and my sons are more at home with metrication than I am. I'm sad to say that my Grandchildren will have no knowledge of Imperial measurement at all.  :-(

Regards,

IanT
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3008
Posted: 11:54am 26 Mar 2021
Copy link to clipboard 
Print this post

  IanT said  the BBC reports rainfall in centimetres, which I have to translate to inches for my wife (who is Canadian by birth)

Canada is metric too, but with exceptions. Lumber is still sold in imperial units (2x4, etc.--overwhelming U.S. market to the south). But only metric is taught in schools. I had a handyman who couldn't read a tape measure marked in inches, and getting him to read off fractional inches was impossible.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 01:00pm 26 Mar 2021
Copy link to clipboard 
Print this post

I was born in 1964 in Canada, and metrification began in 1970  - I believe I was in Grade 4 when we had our first "Today, class, we're going to learn the metric system" lesson. The fact that pure water freezes at 0C and boils at 100C was quite memorable :)

I should also point out I was raised in a Hungarian household, so heard my parents talking about decagrams and decilitres, which were, and still are, the common units of measures for food and beverages in Hungary. Oddly, these "human scaled" units are not generally used in Canada, even though it would have made a lot of sense to introduce them.

I don't know if the British system will ever die out completely - my kids all refer to their weight and height in pounds and feet, which may be owing to my theory that they find these more useful and meaningful e.g. losing or gaining "a pound" of weight is more significant than an entire kilo or some number of grams. Similarly, growing an inch is a noticeable increment.

One thing that annoys me to this day is that in Canada they perverted the automotive fuel efficiency standards - cars went from being measured in "MPG" (higher is better) to "litres per 100 km" (lower is better). This might be a matter of opinion, but the metric version just feels awkward. I know the intent was to create a consumer metric that resulted in a well-scaled value for easy comparison... but it still feels weird. And, to your point, @Lizby, no one brags about lower numbers :)
Edited 2021-03-26 23:04 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 1773
Posted: 01:03am 27 Mar 2021
Copy link to clipboard 
Print this post

Re the mental gymnastics for imperial measures.

Bricklayers had to memorize the 3 & 3/8 times table, 3" for the brick plus 3/8" for the mortar, to work out how many courses a wall would need. I bet they don't miss that.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 12:58pm 27 Mar 2021
Copy link to clipboard 
Print this post

Exactly my first point up thread. I don't know when brick dimension were standardized, but I bet it was a lonnng time ago! If anyone is looking for a good book on the history of the building trades, plus a lot of page-turning drama and plot twists, I highly recommend Ken Follet's "Pillars of the Earth".
Edited 2021-03-27 22:59 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3008
Posted: 02:44pm 27 Mar 2021
Copy link to clipboard 
Print this post

  phil99 said  Bricklayers had to memorize the 3 & 3/8 times table, 3" for the brick plus 3/8" for the mortar, to work out how many courses a wall would need. I bet they don't miss that.

So now do they do the same gymnastics with 85.725 millimeters?

Perhaps they use the calculator on their phone.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 04:10pm 29 Mar 2021
Copy link to clipboard 
Print this post

I had some substantial brickwork done on my house two years ago. I never saw any of the workmen whipping out a smartphone calculator - I guess it's not all that practical when you are up on a windy scaffold covered in brick dust and mortar!
Edited 2021-03-30 02:11 by RetroJoe
Enjoy Every Sandwich / Joe P.
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3008
Posted: 04:58pm 29 Mar 2021
Copy link to clipboard 
Print this post

  RetroJoe said  I had some substantial brickwork done on my house two years ago. I never saw any of the workmen whipping out a smartphone calculator - I guess it's not all that practical when you are up on a windy scaffold covered in brick dust and mortar!

True enough, but one hopes they figured out the number of courses needed before they got up on the scaffolding.

My nephew, in the building trades, says the engineers and architects use smartphones, but all the tradespeople use flip phones when working.
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 05:35pm 29 Mar 2021
Copy link to clipboard 
Print this post

THEY CHEAT!!!!

Most brickyards give away coursing charts which show the height and length of walls constructed using both the U.S. modular and non modular common brick sizes.

I found some on line but they are low resolution. You really have to get one at a brickyard. I don't think phones would have a really long life expectancy up on a scaffold with all of that cement dust.

Here's a brick coursing chart for Australia.
https://www.midlandbrick.com.au/MidlandBrick/media/Documents/BricksBrochures/Midland-Brick-Coursing-Chart.pdf

Here's a complete guide for Texas.
https://brick.com/sites/default/files/pocketguide-body-20180207.pdf

Paul in NY
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 313
Posted: 08:39pm 30 Mar 2021
Copy link to clipboard 
Print this post

Just as a small point, not all of America uses the Imperial system. Gas Turbines are all metric (I imagine they don't want the hassle of plane stranded outside of the U.S. because somebody can't find a 3/8" spanner) and I believe the U.S. military uses metric for much the same reasons.
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 09:58pm 30 Mar 2021
Copy link to clipboard 
Print this post

Pete, I've conceded the "metric for science and engineering" argument :)
Enjoy Every Sandwich / Joe P.
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 381
Posted: 02:59pm 02 Apr 2021
Copy link to clipboard 
Print this post

...and I am sure we all remember the joke about railroad track gauge being traced back to Roman Chariot widths, which was due to the required spacing between the two horses that pulled it... so the next time you ask the question, "What horse's ass created this spec?",  you will know it's true.

-Bill
 
Paul_L
Guru

Joined: 03/03/2016
Location: United States
Posts: 769
Posted: 02:41am 03 Apr 2021
Copy link to clipboard 
Print this post

@PeteCotton ... Gas turbines used as jet engines are definitely not metric sized, at least the ones made by Pratt & Whitney or GE.

The big problem with metric measurements in technical products is the confusing, contradictory and non-scalable standards. In the 1880s the ASME was formed (asme.org). Its first standards were for steam boilers, followed by standard pipe sizes and then threaded fasteners. Smaller machine screw diameters were specified by numbers from #0000 up to #16 which was about 1/4 inch and two thread pitches know as National Fine and National Coarse. The upshot of this was that if you wanted a screw that was 20% stronger you moved up one number size. The screw size was not determined by some regular increase in diameter but by an increase in strength.

Meanwhile, in the UK, Joseph Whitworth defined his Whtiworth standard in 1841. It has been superseeded mostly because the included angle of the individual threads was too shallow at 55 degree, a thread depth of 0.640327 * pitch, and a radius of 0.137329 * pitch. With harder steel available and rolling techniques perfected to form the threads it became possible to specify higher included angles, deeper thread depth, and smaller radius and thus achieve higher clamping forces with a given size screw. Joseph Whitworth also specified bolt sizes in 1/32" steps from 1/16" to 1/4", 1/16" steps from 1/4" to 1", 1/8" steps from 1" to 3", and 1/4" steps from 3" to 6". This resulted in 42 poorly spaces sizes and difficulties in manufacturing and stocking them all.

Meanwhile, across the channel, the ISO 60 degree standard was slowly coalescing from conflicting German, French, Italian, Russian and Danish standards. ISO thread pitches are Coarse, Fine I, II, III, IV, V, VI, VII, VIII, IX and X, corresponding to standards DIN 13-1 through 13-11.

Then things started to get really confusing. British Morris and MG engines from 1923 to 1955 were built using metric threads but with bolt heads and nuts dimensioned for Whitworth wrenches. In 1919 Morris Motors took over the French Hotchkiss engine works which had moved to Coventry during the First World War. The Hotchkiss machine tools were of metric thread but metric wrenches were not readily available in Britain at the time, so fasteners were made with metric thread but Whitworth heads.

There are some two dozen other thread standards roaming around in the wild ... including BA, BSF, BSP, UTS, UNC, UNF, UNS, UNEF, Knuckle, Buttress, Trazezoidal, PG, Dairy, and Edison.

Thankfully, virtually every threaded fastener in Boeing, Airbus, Bombardier, Embraer,  Cessna, Gulfstream, Dassault, Pilatus and Hawker aircraft are covered by the modern ASME specification. If they hadn't been using the ASME specification I wouldn't have worked for Pan Am for a third of a century!!!

Paul in NY
 
RetroJoe

Senior Member

Joined: 06/08/2020
Location: Canada
Posts: 290
Posted: 07:49am 03 Apr 2021
Copy link to clipboard 
Print this post

Thanks, Paul - the history of threaded fasteners is endlessly fascinating to me. They are little marvels of engineering you can hold in your hand. As you point out, there's a lot more to this discussion than "inches versus millimetres" !!

While you can't stand in the way of progress, much of the current confusion stems from competing proprietary standards (e.g. the myriad of screw head drive systems) and protectionist national standards.

As the old joke goes, the great thing about standards is that there are so many to choose from.
Enjoy Every Sandwich / Joe P.
 
William Leue
Guru

Joined: 03/07/2020
Location: United States
Posts: 381
Posted: 08:05pm 05 Apr 2021
Copy link to clipboard 
Print this post

Measurement systems are fun, so long as they don't drive us crazy.

As an electrical and software engineer, I worked on medical diagnostic imaging for several decades. We always used metric measurements, which made lots of sense because of how closely we were tied to the physics of the equipment we designed. MKS for the win!

In retirement, I am a hobby machinist. My lathe and milling machine are Chinese and made using metric fasteners, lead screws, etc. But many of my measurement tools are imperial or dual-system, and I use lots of ASME fasteners because they are easier to find in the US than metric. So every wall of my shop has a decimal equivalent chart posted.

I am gradually moving into horology, which of course uses a base-60 system, which is neither metric nor imperial, but sui generis. Fortunately time and angles match up nicely.

-Bill
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024