GPS simulator

HI all,

Has anyone have an example of a GPS sentence generator for Aduino?

Thanks Rich....

Sparkfun and several other companies sell GPSs. What use is a simulator? Why would it generate sentences rather than the data parsed from the sentences? What have you tried?

So little information...

A simulation can be used where there is no GPS signal, like in a basement. I've never heard of a device or program to do that, I also can't imagine the use apart from a test suite for GPS accessory development. What I have done for testing is simpler. I cut and pasted NMEA sentences from online sources into a file. Then I sent the file contents to the test program.

rgarcia1000:
Has anyone have an example of a GPS sentence generator for Aduino?

Look in the Examples for TinyGPS. There are three, the first two use “play” data the other needs the GPS serial data.

I think the second one from memory has a bunch of sentences. You could expand those to give you the rest. You can find sample NMEA sentences online.

Look in the Examples for TinyGPS.

That is example data, but it is not a sentence "generator". Do you really want to make an Arduino spit out NMEA sentences, as if it were the GPS device? Like PaulS, I've been waiting to get more information.

As others have suggested, you could use online generators to get the checksum for a sentence you compose. You could then store those sentences in PROGMEM or an SD card and have the Arduino send them over the serial port.

I don't know of any online generators that let you enter the fields individually (anyone?), but there are several generator applications you could download to your PC. Those generators could be used to create the data for an Arduino to send, too.

I've been considering adding "generation" to NeoGPS, if that's what you're after. If you look at this table, you can see that NeoGPS already has all the pieces from parsing the messages, so why couldn't it format them for output, too?

Tell us more about what you're doing. Spoofing an ankle bracelet or Progressive Snapshot®, maybe?

Cheers,
/dev

/dev:
Spoofing an ankle bracelet or Progressive Snapshot®, maybe?

Cheers,
/dev

Mmm, yeah, but you could use a PC for that.

yeah, but you could use a PC for that.

hehe. Don't you mean you could use a rusty 555, a chewed-up pencil, and two wax paper capacitors?

not a bad idea ta all...

I am working on a nixie clock, and want to be sure that the daylight saving routine is working, want to know if my sketch handles correctly some error condition, such as no gps attached, no data, fix / no fix indicator, valid data, warning data, number of satellites in view, et al...

I just learned that Tinygps++ indeed does the checksum check. so I would like an easy way to generate custom sentences, surely somebody has done something....

bye

Alex

It's unclear what you want. Arduino to stream data to another device? Another device to stream to Arduino? What are the two devices? If the former, just Serial.print a char array with a line of GPS data in it. Put it in a loop and cycle every second, which is what most GPS will provide.

If you just want to set up one Arduino to stream to another, use this:

const char gps[7][80] = {
    "$GPGGA,031607.00,2118.99192,N,15751.19869,W,2,10,0.83,38.7,M,-20.2,M,,0000*4B",
    "$GPGSA,A,3,30,28,19,42,03,06,50,02,07,09,,,1.63,0.83,1.40*03",
    "$GPGSV,4,1,15,02,33,254,30,03,11,047,11,05,08,207,17,06,56,315,23*77",
    "$GPGSV,4,2,15,07,14,158,19,09,10,124,10,13,05,238,,17,25,007,*7B",
    "$GPGSV,4,3,15,19,23,338,16,28,60,062,40,30,40,180,28,35,38,093,39*79",
    "$GPRMC,031608.00,A,2118.99202,N,15751.19867,W,0.025,,220818,,,D*77",
    "$GPVTG,,T,,M,0.025,N,0.046,K,D*23"
};

void setup()
{
    Serial.begin(38400);
}

void loop()
{
    for(byte i = 0; i < 7; i++) Serial.println(gps[i]);
    delay(885); // there are 436 characters to print, @ 38400 it will take about
                // 115ms so delay for 885 to make the loop one second.
}

I adjusted the coordinates (to protect the innocent) to make it appear as though the data is being sourced in Honolulu, so don’t read anything into it.

Try here;