Brownrigg, Robert James, Captain; Military Secretary in Ceylon