Text this: A general algorithm to build mixed real and virtual antenna functions for higher-order calculations