It reminds me of years ago when she was visiting Bedford. I was near the station and thought I would take a chance to get a photo of the royal train. I went to ask one of the police and he said no problem.
But then he said I would be wasting my time as she was coming in on a service train, not the royal train.
Another time, she was on a Jubilee tour and times were published in advance. I went to the old Rutherglen station, which was alongside the WCML. Unfortunately, a unit pulled into the station, blocking the view. I then got on the unit to Glasgow Central in time to see the back of the Duke of Edinburgh's head through the back window of their car. The nearest I ever got to seeing royalty. However you could then go onto the station to photograph the train.
A third time was at Paddington when I worked in London. The royal train was parked up in the old parcels platform during the evening rush hour and came into platform 1 around 18:30.
I was on the footbridge trying to photograph the train and a police man came up and asked me what I was doing. He asked me how I knew it was there and was satisfied when I told him.
He then escorted me along platform 2 so I could take as many photos as I wanted.
As long as you are sensible I have never had any problems getting near the train.