I have got pretty far along writing a GPS emulator. The source is in Delphi but it would probably help you a bit anyways. The protocol is not quite what's described on certain websites btw. I had to monitor the serial traffic between GPSemulator and SA to get it to work right. Give me an IM and I'll send you the source I've got so far if you want.