The Duke of Sussex has arrived at the Royal Courts of Justice ahead of an appeal in his legal challenge over his security arrangements while visiting the UK.