Text this: Joint optimization of trajectory and resource allocation for UAV integrated radar and communication system