I have a modulation function written basically in groovy which is definately BPSK.
groovy
BPSK
Below is the groovy function.