Sniffing the ground is definitely a good calming signal to look out for on dog to dog meetings. You can see them look at each other and then one or the other will take a more curved approach, turn slightly away and start sniffing. Can be quick like a switch being thrown sometimes. I always relax more if Millie or the other dog suddenly averts eye contact and sniffs the ground. And I know it's calming signal from Millie as she is very much more sight driven then scent.
With regards to scratching Millie does this sometimes when she's a bit anxious/wound up. She never settles if it's anywhere near meal time or waiting on an evening for the other half to come home. She'll pace for a bit, sit down in my eye line, give a little woof at me, then scratch at the back of a front leg while sitting. She also starts doing it if there is repeatedly loud noises outside, like on the day the bins get emptied - a bit annoying when I'm trying to watch Homes Under the Hammer