pud: nmealib: replace random() by our own function