Ok I've got simple test with pulse generation. Both pulse width and delay is configurable. Pulse will be fixed, delay will be set by the value coming from GPS speed.
const int pinOut = 13;
unsigned long previousMicros = 0;
int pulseState = LOW;
long pulseDelay = 500000;
long pulseWidth = 10000;
void setup()
{
pinMode(pinOut, OUTPUT);
Serial.begin(9600);
Serial.println("Start");
}
void loop()
{
unsigned long currentMicros = micros();
if (Serial.available()) {
long ch = Serial.parseInt();
if (ch > 0) {
pulseDelay = ch;
Serial.println(ch);
}
}
if(currentMicros - previousMicros > pulseDelay) {
previousMicros = currentMicros;
pulseState = HIGH;
digitalWrite(pinOut, pulseState);
//Serial.println("On");
}
if ((currentMicros - previousMicros > pulseWidth) && (pulseState== HIGH)){
pulseState = LOW;
digitalWrite(pinOut, pulseState);
//Serial.println("Off");
}
}