• I think something like this will do what you want:

    Serial3.setup (115200, {rx: P0, tx: P1});
    var lastData;
    var gps = require ("GPS"). connect (Serial3, function (data) {
      console.log (data);
      if (lastData) {
       // do stuff here - eg. the difference between the two readings
        var dlat = data.lat - lastData.lat;
        var dlon = data.lon - lastData.lon;   
      }
      lastData = data;
    });
    

    Although as you say, you might be able to extract the data that you want from other NMEA data. For instance VTG - Velocity made good sounds promising

About

Avatar for Gordon @Gordon started