Category Archives: General

SatNav of the future?

Galileo satellite in orbit.

I always love it when the more theoretical aspects of physics, so often the exclusive realm of mathematicians and those studying the origins of the universe, have a direct impact on our daily lives. 

Take the GPS system, for example, which has so many challenges that it really shouldn’t work at all, as far as I can see.   Quite apart from the very clever software and signal-processing needed to allow a weak radio signal, from a satellite tens of thousands of miles above you, to be diluted over a substantial chunk of the earth’s surface, and distorted by the ionosphere, and compromised by the weather, yet still be picked up by a small battery-powered device in your pocket when you’re sitting inside a moving metal box surrounded by lots of other noisy electrical signals… quite apart from all that, there’s another problem… and it involves Einstein.  

Did you know you were using his Theories of Relativity whenever your satnav tells you how far it is to the next junction?    I’ve always found this very pleasing.

GPS depends on being able to make very accurate time measurements, and the issue is that the satellites are travelling very fast, which means that time itself runs at a different rate for them than it does for the those of us down below driving round the M25. Their atomic clocks run more slowly than an equivalent on Earth.  But a bigger effect comes from the fact they’re in a lower gravitational field, which causes them to run faster!  Pleasingly, this means that both Special and General Relativity need to be taken into account by the GPS system, in order to work out these differences and stop a gradual drift, which would be visible over time on your satnav map and might make you think you were on the wrong road.  Thanks for sorting that out, Albert!

However, for all the magic of GPS, it has its limitations, as you’ll know if you’re driving through a long tunnel, or between skyscrapers on the streets of Manhattan.  And the delicacy of the GPS signal also means that it can easily be interfered with by, for example, an enemy on a battlefield. When the GPS signal is lost, navigation systems have to fall back on ready-reckoning using accelerometers and distance measurements to try and guess where you are.  This is a process as old as navigation itself, but it is very fallible, because your knowledge of your current position is based on your position a little while before, and any errors in that process get magnified the further you go. The accuracy of accelerometers has greatly improved over time and become less dependent on things like the bearings of spinning gyroscopes, but it’s still a problem.  

This is why a lot of people are awfully excited about the recent experiments with Quantum Positioning, which may offer a much more accurate way to do this in the future (and I would guess may be useful long before quantum computing!)  Once again, theoretical physics may help us find out where we are.  It may be rather a long time before you have this mounted on your dashboard, but perhaps not so long until it’s in ships, submarines and aircraft.

So how do you use quantum mechanics to work out your position?  (Or, more precisely, your acceleration, from which changes in position can be derived?)

Fortunately, there’s a really excellent video by Ben Miles explaining the basics.  Nicely done.

Code Review

It’s easy for those of us who passed their UK driving test a long time ago to forget that the Highway Code is not a static document: it is updated from time to time and old drivers need to know about the changes as well as young ones.

For example, I didn’t know about all these changes in 2022, mostly to do with the interactions between different types of road users: drivers, cyclists, pedestrians and horse riders. Did you? They’re quite important.

Another AI cautionary tale

In one of my YouTube videos, I talk about how I’ve wired up my solar/battery system to ensure the energy in my home battery isn’t ever used to charge my car (which has a much bigger battery, so doing this doesn’t normally make sense), while still allowing the car to be charged using any excess solar power.

I had a query from somebody who was confused about how it worked, so I did my best to answer, and we went to and fro in what became a decent-length conversation.  He has a similar inverter to me, but had some fundamental misunderstandings about how it worked.  

At first, I assumed this was because he had different goals: he lives in another part of the world where there’s a lot more sun and a much less reliable electricity supply, for example.  But no, it turned out he wanted to do the same thing as me, but was convinced it wouldn’t work the way I had described it.

It turned out, in the end, that the source of his confusion was that he had asked four different LLMs (ChatGPT, Claude, Perplexity, and Grok) about how to configure the system, and they had all agreed that ‘battery power is never used to power loads on the “Grid” port’, which is actually incorrect.

What persuaded him, in the end, that my description was right, and that all four LLMs were wrong?

He read the manual.

A glooming light this morning with it brings

A sombre mood here in our half-American household. The phrase that keeps running through my head is…

Elect me once, shame on me.
Elect me twice…

A brief trip to the past

I’ve just come back from bobbing about in a small boat on the crystal blue waters of the Greek bit of the Mediterranean – a marvellous excerience!

I’m sitting in the tender here because, as anyone who has tried it will confirm, it’s much easier to land a drone on a boat that doesn’t have any rigging!

But just before I set off in the wake of Odysseus et al, I decided to spend a day in Athens visiting the Parthenon. Should you wish to spend a few minutes in my company doing the same, you can find a short video here.

.

Go, Octopus, Go!

One of the surprising things about Octopus, the UK company from whom we purchase our gas and electricity, is that, despite growing to the point where they handle about a quarter of UK households, they continue to innovate.

For a long time, we’ve been on the ‘Octopus Go’ tariff, which means that for the four hours starting from 00:30 each night, we get electricity at less than one-third of the cost of the rest of the day. We make good use of this, charging our home batteries to the point where, combined with our solar, we very seldom use any normal (i.e. peak-rate) power.

We also charge our car during this time, meaning that our ‘fuel’ costs are about 2p per mile, and one of my favourite statistics is that, since it cost me about £600 to replace our car tyres recently after 30,000 miles, we pay almost exactly the same per mile for fuel as we do for tyre rubber.

All of this may sound very impressive, green and economical… just don’t ask me how much I’ve spent to get to this point! Still, I find it very satisfying.

One of the purposes of this post, by the way, is to remind anyone else also on Octopus Go that, from today, the cheap period has been extended to five hours: from 00:30-05:30. So go and reprogram your cars, car chargers, home batteries or whatever now, before you forget! For those of us who have a standard 7kW home charger, that means 35kWh of cheap-rate power per day, which probably translates into about 100-150 miles, depending on your car.

But Octopus also have some interesting features aimed at balancing the load on the grid during times of peak supply or demand. They’ve tried a few variants, and the availability of any particular one will be rather dependent on your postcode, but here we do quite well, as a result, I think, of generating vast amounts of wind power off the East Anglian coast and not yet having all the cabling that’s needed to distribute it effectively to other parts of the country!

One of these schemes is called ‘Saving Sessions‘, where, at times of peak demand, you can get paid surprisingly high rates per kWh for using less than your normal amount of electricity. At first, I ignored this because we use so little daytime grid power anyway that I thought it would be pointless, until a friend pointed out that even if your usage is normally zero, you can be paid for negative usage; in other words, for exporting to the grid.

“Oh ho!”, thought I, “I can do that!” And so, after a bit of programming, my home automation system notices whenever a Saving Session is active and starts discharging my house battery (and any excess solar) to the grid. These sessions only happen in the winter, and not very frequently, but we still managed to export 40kWh between November and March, earning us about £100. Yes, they really do pay as much as £2.50/kWh for energy we might have bought the night before for 9p. On rare occasions even more.

And finally, there are Octopus Power-Ups. When they think supply is going to exceed demand, they need to absorb it, and so they will let you consume as much as you want for free. Since this is primarily down to the weather forecast predicting strong winds, or lots of sunshine, or both, you don’t get very much notice: typically an email the day before or even on the same day. I just plug the times into my system, and when the moment comes, my car starts charging, my batteries start charging, my hot water starts heating, and so on. It costs me nothing, Octopus probably make more money the more I use, and everyone is happy. (Except my envious friends who don’t live in one of the blessed postcodes!) The main challenge was that I had expended so much effort over many months trying to configure the house to draw as little as possible from the grid, and I now had to set all of the components to do precisely the opposite for a short time and then revert! Still, that’s what home automation is for!

Octopus is a large company now, and like all organisations on such a scale, does have plenty of problems too. They suddenly realised at one point in the past, for example, that they had been billing me for gas but not electricity for nearly a year, and I got a very large bill that month. Also, I had smart meters installed for both gas and electricity, and the gas one has never worked, so I still have to go and read it manually. To be fair, this is a technical problem suffered at a lot of UK households by most providers, who didn’t realise that providing the electricity meter with connectivity and assuming that the gas meter could relay its reports through it using Zigbee wasn’t going to work when, as is often the case, the meters are on opposite side of a brick or stone house filled with competing 2.4GHz signals!)

But, in general, I’m a happy customer, and I hope they continue to explore new and interesting ways to optimise supply and demand. Further innovations will, of course, require me to keep tweaking my code, but, hey, everyone needs a hobby!

My thanks to my pal Gareth Marlow, who has a similar set-up and whose Home Assistant configuration helped me make mine much better! Gareth has also done some great YouTube videos analysing the costs and savings resulting from his home solar/battery system; perhaps the best I’ve seen on that topic for UK enthusiasts. Recommended.

Slow time?

Back in the days when I had an analogue watch, rather than a serious computer, strapped to my wrist, I often wondered whether life would be more or less stressful if I removed the minute and second hands, so that I could only tell the time to, say, the nearest 5-10 minutes.  Would I be more likely to be on time for meetings, for example, or would I still try to squeeze other things in right up until the last minute?

Well, it turns out I wasn’t the only one to find this idea at least intriguing.  Enter Slow Watches, who make some rather nice designs with a single hand.  In their case, they chose to make this hand rotate every 24 hours instead of 12, to ‘follow the natural rhythm of the sun’.

20180112 slow 06 1 1 400x400.

Now, that’s quite poetic, and I like the way midnight is at the bottom, so the hand will rise and set in a way that should feel natural, at least if you live in the northern hemisphere.  But it might take longer for you to be able to glance at it and know that it’s roughly half-past two.

I’ve got so used to all the wonderful facilities of my Apple Watch that I find it hard to imagine exchanging it for anything, though there’s no denying that these are more aesthetically appealing.

What do you think?  Would your quality of life improve if you could only tell the time to the nearest 15 mins or so?

Well, that seems appropriate.

A couple of days ago, I pointed out that a better name for climate change might be “Global Drenching”.

However, it’s clear that I’m not the only one who is thinking that way.

An article on the BBC website tells me that, in England & Wales, the most popular boy’s name for babies is now, apparently, Noah!

Coincidence? Ha! I think not!

AI Whitewashing

Yesterday, I asked:

Here’s a question, O Internet:

If I buy full-fat milk and dilute it 50/50 with water, do I effectively have semi-skimmed milk, or is there something more sophisticated about the skimming process?

And if I then dilute it again, do I get skimmed milk… for one quarter of the price?

Now, the quick answer, as I understand it, is ‘no’: milk contains a variety of nutrients, and several of these are water-soluble.  So the process of ‘skimming’ to reduce the fat content doesn’t dilute these nutrients in the way that you would by just adding water: you still get them at approximately the same concentration when you buy semi-skimmed or skimmed milk.

But I learned a couple of interesting different things from asking!

The first thing is this wonderful diagram, found and posted in the comments by Spencer:

Thumbnail of 'Milk products' flowchart

(click for full size)

It looks like something explaining the petrochemical industry, but much, much more yummy.

His comment: “I wonder how many of these I can have with my breakfast today?”

And the second thing is that, as well as beginning “Here’s a question, O Internet”, I could have asked “Here’s a question, O Artificial Intelligence”.  

My friend Keshav did that, submitting my question verbatim to Perplexity, a system I hadn’t previously tried.  Here’s the rather good result (and here as a screenshot in case that live link goes away).

I then went on to ask “Which nutrients in milk are water-soluble?”, and it told me, with good citations, with the comment that “maintaining adequate levels of these water-soluble vitamins in breast milk is important for the health and development of the breastfed infant”.  So I asked a follow-up question:  “Is this different in cows’ milk?”, and again, got a useful, detailed response with references for all the facts.

This stuff really is getting better… at least until the Internet is completely overrun by AI spam and the AIs have to start citing themselves.  But for now,  I think Perplexity is worth exploring further.

Thanks to Spencer, Keshav and other respondents!

Whitewashing?

Here’s a question, O Internet:

If I buy full-fat milk and dilute it 50/50 with water, do I effectively have semi-skimmed milk, or is there something more sophisticated about the skimming process?

And if I then dilute it again, do I get skimmed milk… for one quarter of the price?

Live together in perfect harmony…

I’m fond of both milk and dark chocolate. Milk chocolate is yummy kiddy comfort food. Dark chocolate is more sophisticated, more bitter, more ‘adult’. It’s also less likely to melt at inconvenient times, so helping you preserve that more sophisticated appearance.

But the problem, I find, is that dark chocolate often has too little taste. Even the better brands can be hard, waxy, slightly bitter slabs that don’t actually give much enjoyment, especially when you get to the higher-cocoa-content variants. More ‘fix’ than ‘fun’. Espresso vs latte. (But espresso, I think, has more flavour. Certainly more variety of flavour.)

And so I often think back nostalgically to the days of my youth, when Marks & Spencer sold what was, in my mind, the perfect Swiss chocolate bar.

It was a simple bar of dark chocolate, with a milk chocolate centre.

Bitter and yet sweet. Soft and yet crunchy. Non-melty, and yet easy to bite. Sophisticated and yet yummy. Yin and yet yang.

It seems so obvious: the ‘flat white’ of chocolate. And, as is generally the case with M&S food, it was very good. It could certainly have turned its nose up at anything made Mr Cadbury, and as for Mr Hershey… well, let’s not go there.

Now, we didn’t have anything as smart as an M&S Food store in the little town where I grew up, so this was a special treat which occasionally appeared after my mother returned from shopping in a larger metropolis. Perhaps its rarity, combined with rosy nostalgia, has elevated it to an unwarranted state of perfection in my mind… but there was no doubt it was pretty good!

And yet, at about the time when I graduated from having chocolate bought for me to buying it myself… they stopped selling it! I don’t know why. Perhaps it was marketing: are most customers actually purists who demand either black or white? Or perhaps there were manufacturing challenges of which I am unaware. Not only did Marks and Spencer stop selling it, I haven’t really seen its equivalent anywhere else in the intervening decades.

But if anybody out there knows of a good combination of high-quality dark and milk chocolate, I’d like to return to my childhood, so please let me know…

Living history

I was delighted to meet my great-nephew Jonathan — my brother’s daughter’s son — for the first time at the weekend.

I remember, in my childhood, meeting my Great-Aunt Grace.  (She deserved that degree of capitalisation.)  Though always kind, I remember her as a rather formidable woman from a different world.  She lived in central London (which she knew like the back of her hand), was born in the 19th century, and had lived through the reign of several monarchs of whom, at the time, I was only very dimly aware.  She died just before the advent of the personal computer.

And I guess that, in a few years, that’s how Jonathan may think of me.

“Great-uncle Q”, he will say, “was a relic of a bygone era.   He used to write code himself, rather than getting a machine to do it!  He even, can you believe, used a QWERTY keyboard! Have you ever seen one of those things?  Wait – I have a photo of him somewhere, but it’s only two-dimensional…”

© Copyright Quentin Stafford-Fraser