Text this: Resource optimization for UAV relay networks based on physical-layer network coding