Asset Tracker , GPS froze after weeks of sucessful use

Asset Tracker was working perfect. I am using the assettracker.h library. I had the unit working to where it would update every 2 minutes on motion, and after a minute of inactivity would report every 4 hours. it would also report speed as well.

I used a few of the examples provided in the community to set up a web page that showed current location when the page was refreshed. and another that showed how to send the data to a google spreadsheet.

i moved onto creating a database on my website ( I would like to market this service eventually). while closeing out open windows on the web I just glanced at my spreadsheet and noticed the last 20 or so entries all had the same lat, lon .

I looked the speed spreadsheet ( haven’t migrated them together yet, that was the steps I was currently working on) the speed spreadsheet had similar groups of the same entries down the list. after reviewing both spreadsheets it looked as if after 13 days of logging to a spreadsheet the device had some sort of hiccup. I had read about using the millis() (function/statement) and had thought about building in a system.reset() after so many days of use. I manually reset the unit and waiting aprox 3 minutes and the GPS reported the location properly. I drove the vehicle a few times over the next few hours and thought ok a system.reset() will fix this. the data was very consistant. I reflashed the unit with updated (firmware/app/program) that included a system.reset after 7246060100 millis(). (7 days) . after coming into work today I looked at the website that shows current location. well… I’m still at home about 15 miles away… looking at the data it looks like it froze up again around 1am. I loaded the new firmware around 7 pm.

// This #include statement was automatically added by the Particle IDE.
#include <AssetTracker.h>

// Set whether you want the device to publish data to the internet by default here.
// 1 will Particle.publish AND Serial.print, 0 will just Serial.print
// Extremely useful for saving data while developing close enough to have a cable plugged in.
// You can also change this remotely using the Particle.function "tmode" defined in setup()
int transmittingData = 1;
int led = D7;
// Used to keep track of the last time we published data
long lastPublish = 0;
long motion = 0;
float speedKnots = 0;
float speedMph = 0;
float lat = 0;
float lon = 0;
// How many minutes minimum between publishes? 10+ recommended!
int delayMinutes = 2;
int longDelay = 5*60;
//float speedMph = 0;
// Threshold to trigger a publish
// 9000 is VERY sensitive, 12000 will still detect small bumps
// Creating an AssetTracker named 't' for us to reference
AssetTracker t = AssetTracker();

// A FuelGauge named 'fuel' for checking on the battery state
FuelGauge fuel;
int accelThreshold = 9900; // 9000 verry secenitive
//bool motionTrip;

void setup() {
     // Enable the GPS module. Defaults to off to save power.
    // Takes 1.5s or so because of delays.
    t.gpsOn();
    delay(500);
     // Opens up a Serial port so you can listen over USB
   // Serial.begin(9600);

    // These three functions are useful for remote diagnostics. Read more below.
    Particle.function("MPH",speedMPH);
    Particle.function("aThresh",accelThresholder);
 //   Particle.function("batt", batteryStatus);
    Particle.function("gps", gpsPublish);
    pinMode(led , OUTPUT);
    
      // Sets up all the necessary AssetTracker bits
    t.begin();
    
}
void loop() {
     // You'll need to run this every loop to capture the GPS output
   
    t.updateGPS();
    
    // Check if there's been a big acceleration
if(t.readXYZmagnitude() > accelThreshold)  {
       
   //  motionTrip = true;
 
     //   if there is motion do this!!
     digitalWrite(led, HIGH);
// write onboard led for reference
     delayMinutes = 2;
// motion changes the publish times !!!
     motion = millis();

                                              }

if(millis() - motion >= 1.5*60*1000)  {
    // after 1.5 minutes publish will run gps data every 4 hrs
    delayMinutes = longDelay;
      digitalWrite(led,LOW);
 //   motionTrip = false;
                                        }
  
  speedKnots = t.getSpeed(); 
  speedMph = speedKnots*1.151;
  if(speedMph < 2) { 
      speedMph = 0;
                   }
  
  char data[256];
  lat = (t.readLatDeg());
  lon = (t.readLonDeg());
  snprintf(data, sizeof(data), "{\"lat\":%f, \"lon\":%f, \"mph\":%.2f}", lat, lon, speedMph);
  
  
  
  
  
       if(millis() - lastPublish >= delayMinutes*60*1000) {
        // send gps every 4 hours if no movement
        // Remember when we published
         //String pubAccel = String::format("%d,%d,%d", t.readX(), t.readY(), t.readZ());
        //Serial.println(pubAccel);
        //Particle.publish("A", pubAccel, 60, PRIVATE);

        // Dumps the full NMEA sentence to serial in case you're curious
       // Serial.println(t.preNMEA());

        // GPS requires a "fix" on the satellites to give good data,
        // so we should only publish data if there's a fix
        if(t.gpsFix()) {
            // Only publish if we're in transmittingData mode 1;
            if(transmittingData) {
                  lastPublish = millis();
                // Short publish names save data!
                Particle.publish("G", t.readLatLon(), 60, PRIVATE);
             //   Particle.publish("B", "v:" + String::format("%.2f",fuel.getVCell()), 60, PRIVATE  );
                 Particle.publish("S", "  " + String::format("%.2f", speedMph) , 60 , PRIVATE);
                 Particle.publish("GPS", data, PRIVATE);
                                 }
                        }           
                                                       }
// system reset after 7 days of operation, if not currently sensing motion and reporting every 2 min
// needed because data became ?static? ?unreliable? after logging for 13 days, unit may have been running for 14+ days
    if(millis() > 7*24*60*60*1000) {
        if(delayMinutes == longDelay) {
            System.reset();
                                      }
                                    }       
           
// end
}           
 
// Remotely change the trigger threshold!
int accelThresholder(String command) {
    accelThreshold = atoi(command);
    return 1;
}

// Allows you to remotely change whether a device is publishing to the cloud
// or is only reporting data over Serial. Saves data when using only Serial!
// Change the default at the top of the code.
//int transmitMode(String command) {
  //  transmittingData = atoi(command);
  //  return 1;
//}
// Actively ask for a GPS reading if you're impatient. Only publishes if there's
// a GPS fix, otherwise returns '0'
int gpsPublish(String command) {
    if (t.gpsFix()) {
        Particle.publish("G",t.readLatLon(), 60, PRIVATE);
  // uncomment next line if you want a manual publish to reset delay counter
        // lastPublish = millis();
        return 1;
    } else {
      return 0;
    }
}
// attempt at speed
int speedMPH(String command) {
    if(t.gpsFix()) {
    Particle.publish("S", "  " + String::format("%.2f", speedMph), 60 , PRIVATE);
    return 1;
    } else {
        return 0;
    }
}
// Lets you remotely check the battery status by calling the function "batt"
// Triggers a publish with the info (so subscribe or watch the dashboard)
// and also returns a '1' if there's >10% battery left and a '0' if below
//int batteryStatus(String command) {
    // Publish the battery voltage and percentage of battery remaining
    // if you want to be really efficient, just report one of these
    // the String::format("%f.2") part gives us a string to publish,
    // but with only 2 decimal points to save space
//Particle.publish("B",
   //      "v:" + String::format("%.2f",fuel.getVCell()),
     //    60, PRIVATE  );
  //   if there's more than 10% of the battery left, then return 1
  //  if (fuel.getSoC() > 10) {
//      return 1;
  //   if you're running out of battery, return 0
//   } else {
 //    return 0;
 //  }
//}

DATA FROM GOOGLE DOCS

32.898399,-84.771713	chart_one	May 22, 2017 at 01:29AM	4.25
32.900089,-84.774345	chart_one	May 22, 2017 at 05:29AM	0
32.900200,-84.774460	chart_one	May 22, 2017 at 07:36AM	0
32.900276,-84.774200	chart_one	May 22, 2017 at 07:38AM	0
32.900291,-84.774284	chart_one	May 22, 2017 at 07:40AM	0
32.900219,-84.774124	chart_one	May 22, 2017 at 08:17AM	0
32.902317,-84.768486	chart_one	May 22, 2017 at 08:19AM	25.86
32.910427,-84.739372	chart_one	May 22, 2017 at 08:21AM	26.97
32.911293,-84.729492	chart_one	May 22, 2017 at 08:23AM	61.7
32.892273,-84.696877	chart_one	May 22, 2017 at 08:25AM	43.71
32.890278,-84.681168	chart_one	May 22, 2017 at 08:27AM	10.9
32.880745,-84.667526	chart_one	May 22, 2017 at 08:29AM	49.42
32.874241,-84.635025	chart_one	May 22, 2017 at 08:31AM	57.9
32.869438,-84.630013	chart_one	May 22, 2017 at 08:33AM	0
32.869526,-84.630661	chart_one	May 22, 2017 at 08:35AM	2.79
32.869553,-84.630699	chart_one	May 22, 2017 at 10:13AM	
32.869556,-84.630714	chart_one	May 22, 2017 at 10:22AM	
32.869423,-84.628891	chart_one	May 22, 2017 at 12:13PM	3.17
32.868477,-84.625275	chart_one	May 22, 2017 at 12:15PM	10.36
32.868477,-84.625275	chart_one	May 22, 2017 at 12:17PM	10.36
32.868477,-84.625275	chart_one	May 22, 2017 at 12:19PM	10.36
32.868477,-84.625275	chart_one	May 22, 2017 at 12:21PM	10.36
32.854778,-84.619385	chart_one	May 22, 2017 at 12:52PM	3.07
32.858570,-84.620049	chart_one	May 22, 2017 at 12:54PM	20.67
32.869270,-84.631172	chart_one	May 22, 2017 at 12:56PM	38.34
32.869934,-84.631073	chart_one	May 22, 2017 at 12:58PM	2.62
32.869816,-84.630974	chart_one	May 22, 2017 at 01:00PM	0
32.869576,-84.630699	chart_one	May 22, 2017 at 03:36PM	0
32.865730,-84.627884	chart_one	May 22, 2017 at 03:38PM	49.37
32.855076,-84.620071	chart_one	May 22, 2017 at 03:40PM	16.9
32.852257,-84.612320	chart_one	May 22, 2017 at 03:42PM	6.13
32.852215,-84.612518	chart_one	May 22, 2017 at 03:44PM	0
32.852238,-84.612274	chart_one	May 22, 2017 at 03:46PM	0
32.853786,-84.619095	chart_one	May 22, 2017 at 03:48PM	7.48
32.852505,-84.618294	chart_one	May 22, 2017 at 03:50PM	0
32.852737,-84.618408	chart_one	May 22, 2017 at 03:52PM	0
32.852512,-84.619110	chart_one	May 22, 2017 at 03:54PM	7.34
32.854115,-84.618507	chart_one	May 22, 2017 at 03:56PM	0
32.854538,-84.618622	chart_one	May 22, 2017 at 03:58PM	3.94
32.854137,-84.618683	chart_one	May 22, 2017 at 04:38PM	0
32.860130,-84.620506	chart_one	May 22, 2017 at 04:40PM	7.58
32.868114,-84.629997	chart_one	May 22, 2017 at 04:42PM	46.28
32.869652,-84.630745	chart_one	May 22, 2017 at 04:44PM	0
32.869637,-84.630646	chart_one	May 22, 2017 at 04:46PM	0
32.869526,-84.630341	chart_one	May 22, 2017 at 06:20PM	5.55
32.871838,-84.633446	chart_one	May 22, 2017 at 06:22PM	43.76
32.878445,-84.662285	chart_one	May 22, 2017 at 06:24PM	62.7
32.890682,-84.679398	chart_one	May 22, 2017 at 06:26PM	7.99
32.894211,-84.691307	chart_one	May 22, 2017 at 06:28PM	36.27
32.896404,-84.714798	chart_one	May 22, 2017 at 06:30PM	0
32.896404,-84.714798	chart_one	May 22, 2017 at 06:32PM	0
32.908928,-84.741013	chart_one	May 22, 2017 at 06:34PM	32.55
32.908928,-84.741013	chart_one	May 22, 2017 at 06:36PM	32.55
32.908928,-84.741013	chart_one	May 22, 2017 at 06:38PM	32.55
32.908928,-84.741013	chart_one	May 22, 2017 at 06:40PM	32.55
32.900311,-84.774429	chart_one	May 22, 2017 at 09:56PM	5.28
32.900311,-84.774429	chart_one	May 22, 2017 at 09:56PM	5.28
32.900311,-84.774429	chart_one	May 22, 2017 at 09:58PM	5.28
32.900311,-84.774429	chart_one	May 22, 2017 at 10:02PM	
32.900311,-84.774429	chart_one	May 23, 2017 at 01:58AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 06:00AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:07AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:09AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:11AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:13AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:15AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:17AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:19AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:21AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:23AM	5.28
32.900311,-84.774429	chart_one	May 23, 2017 at 08:25AM	5.28
32.869434,-84.630585	chart_one	May 23, 2017 at 10:28AM	0
32.869534,-84.630585	chart_one	May 23, 2017 at 10:30AM	0
32.869450,-84.630501	chart_one	May 23, 2017 at 10:32AM	0
32.869671,-84.630615	chart_one	May 23, 2017 at 10:40AM	0
32.873371,-84.634552	chart_one	May 23, 2017 at 10:42AM	37.62
32.877056,-84.647331	chart_one	May 23, 2017 at 10:44AM	0
32.877014,-84.647232	chart_one	May 23, 2017 at 10:46AM	0
32.877151,-84.647232	chart_one	May 23, 2017 at 10:48AM	0
32.877029,-84.647186	chart_one	May 23, 2017 at 10:56AM	0
32.877090,-84.645821	chart_one	May 23, 2017 at 10:58AM	0
32.877129,-84.645821	chart_one	May 23, 2017 at 11:00AM	0
32.875568,-84.644547	chart_one	May 23, 2017 at 11:12AM	2.8
32.873169,-84.632843	chart_one	May 23, 2017 at 11:14AM	21.66
32.868584,-84.627541	chart_one	May 23, 2017 at 11:16AM	5.33
32.862774,-84.623276	chart_one	May 23, 2017 at 11:18AM	17.05
32.854305,-84.616798	chart_one	May 23, 2017 at 11:20AM	15.74
32.854946,-84.612518	chart_one	May 23, 2017 at 11:22AM	8.38
32.854946,-84.612518	chart_one	May 23, 2017 at 11:24AM	8.38
32.854946,-84.612518	chart_one	May 23, 2017 at 11:26AM	8.38
32.854946,-84.612518	chart_one	May 23, 2017 at 11:28AM	8.38
32.869743,-84.630600	chart_one	May 23, 2017 at 12:16PM	0
32.860935,-84.622215	chart_one	May 23, 2017 at 12:18PM	34.94
32.853603,-84.618507	chart_one	May 23, 2017 at 12:20PM	0
32.853901,-84.617935	chart_one	May 23, 2017 at 12:22PM	0
32.853279,-84.618324	chart_one	May 23, 2017 at 12:26PM	6.62
32.850452,-84.611603	chart_one	May 23, 2017 at 12:28PM	4.61
32.850357,-84.612091	chart_one	May 23, 2017 at 12:30PM	0
32.850269,-84.612030	chart_one	May 23, 2017 at 12:32PM	0
32.851292,-84.613998	chart_one	May 23, 2017 at 12:34PM	17.57
32.853088,-84.617043	chart_one	May 23, 2017 at 12:36PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:38PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:40PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:42PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:44PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:46PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:48PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:56PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 12:58PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 01:00PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 01:02PM	13.01
32.853088,-84.617043	chart_one	May 23, 2017 at 01:04PM	13.01
32.869484,-84.630829	chart_one	May 23, 2017 at 03:19PM	0
32.869442,-84.630829	chart_one	May 23, 2017 at 03:21PM	0
32.869770,-84.630417	chart_one	May 23, 2017 at 03:23PM	0
32.866695,-84.629539	chart_one	May 23, 2017 at 03:25PM	11.09
32.857376,-84.619545	chart_one	May 23, 2017 at 03:27PM	0
32.857349,-84.619286	chart_one	May 23, 2017 at 03:29PM	0
32.857292,-84.619186	chart_one	May 23, 2017 at 03:31PM	0
32.857300,-84.619072	chart_one	May 23, 2017 at 03:40PM	0
32.860802,-84.616470	chart_one	May 23, 2017 at 03:42PM	10.94
32.863609,-84.617950	chart_one	May 23, 2017 at 03:44PM	26.84
32.863609,-84.617950	chart_one	May 23, 2017 at 03:46PM	26.84
32.863609,-84.617950	chart_one	May 23, 2017 at 03:48PM	26.84
32.869545,-84.631546	chart_one	May 23, 2017 at 06:56PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 06:58PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:00PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:02PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:04PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:06PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:08PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:10PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:12PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:46PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:48PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:50PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:52PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:54PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:56PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 07:58PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:00PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:02PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:04PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:47PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:49PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 08:51PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 09:35PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 09:37PM	4.93
32.869545,-84.631546	chart_one	May 23, 2017 at 09:39PM	4.93
32.869545,-84.631546	chart_one	May 24, 2017 at 01:39AM	4.93
32.869545,-84.631546	chart_one	May 24, 2017 at 05:39AM	4.93
32.900150,-84.774483	chart_one	May 24, 2017 at 06:05AM	0
32.900215,-84.774368	chart_one	May 24, 2017 at 06:07AM	0
32.900085,-84.774254	chart_one	May 24, 2017 at 06:09AM	0
32.900379,-84.774574	chart_one	May 24, 2017 at 08:23AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:25AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:27AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:29AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:31AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:33AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:35AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:37AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:39AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:41AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:43AM	5.15
32.900379,-84.774574	chart_one	May 24, 2017 at 08:55AM	
32.900379,-84.774574	chart_one	May 24, 2017 at 09:01AM	
32.869514,-84.630600	chart_one	May 24, 2017 at 09:08AM	0
32.869514,-84.630646	chart_one	May 24, 2017 at 09:09AM	
32.869579,-84.630775	chart_one	May 24, 2017 at 12:55PM	0
32.863071,-84.625084	chart_one	May 24, 2017 at 12:57PM	45.02
32.853683,-84.618507	chart_one	May 24, 2017 at 12:59PM	5.38
32.853638,-84.618622	chart_one	May 24, 2017 at 01:00PM	
32.853592,-84.618584	chart_one	May 24, 2017 at 01:01PM	0
32.853352,-84.618523	chart_one	May 24, 2017 at 01:03PM	2.36
32.852539,-84.615021	chart_one	May 24, 2017 at 01:07PM	16.86
32.858532,-84.610153	chart_one	May 24, 2017 at 01:08PM	27.82
32.861874,-84.623405	chart_one	May 24, 2017 at 01:10PM	34.55
32.869549,-84.630440	chart_one	May 24, 2017 at 01:13PM	0
32.869400,-84.630325	chart_one	May 24, 2017 at 01:14PM	0
32.869553,-84.630386	chart_one	May 24, 2017 at 01:18PM	4.89
32.869305,-84.629738	chart_one	May 24, 2017 at 01:20PM	0
32.869549,-84.630196	chart_one	May 24, 2017 at 01:22PM	0
32.869484,-84.630173	chart_one	May 24, 2017 at 01:24PM	0
32.869564,-84.630486	chart_one	May 24, 2017 at 01:26PM	0
32.869328,-84.630615	chart_one	May 24, 2017 at 01:28PM	0
32.859707,-84.620163	chart_one	May 24, 2017 at 01:30PM	30.88
32.854687,-84.627769	chart_one	May 24, 2017 at 01:32PM	0
32.853901,-84.627213	chart_one	May 24, 2017 at 01:34PM	0
32.853817,-84.627037	chart_one	May 24, 2017 at 01:36PM	0
32.853897,-84.626938	chart_one	May 24, 2017 at 01:50PM	0
32.854549,-84.622932	chart_one	May 24, 2017 at 01:52PM	22.12
32.852161,-84.614014	chart_one	May 24, 2017 at 01:54PM	18.95
32.845257,-84.620476	chart_one	May 24, 2017 at 01:56PM	9.52
32.845818,-84.612663	chart_one	May 24, 2017 at 01:58PM	3.91
32.845829,-84.612419	chart_one	May 24, 2017 at 02:00PM	0
32.845840,-84.612434	chart_one	May 24, 2017 at 02:02PM	0
32.845688,-84.612236	chart_one	May 24, 2017 at 02:06PM	2.65
32.846153,-84.612663	chart_one	May 24, 2017 at 02:08PM	2.62
32.846054,-84.612823	chart_one	May 24, 2017 at 02:10PM	3.95
32.845711,-84.612404	chart_one	May 24, 2017 at 02:32PM	4.41
32.850628,-84.608398	chart_one	May 24, 2017 at 02:34PM	14.4
32.854736,-84.619904	chart_one	May 24, 2017 at 02:36PM	22.16
32.861393,-84.622757	chart_one	May 24, 2017 at 02:38PM	31.58
32.869553,-84.630829	chart_one	May 24, 2017 at 02:40PM	3.28
32.869411,-84.630615	chart_one	May 24, 2017 at 02:42PM	0
32.869507,-84.630745	chart_one	May 24, 2017 at 04:01PM	0
32.869545,-84.630531	chart_one	May 24, 2017 at 04:03PM	0
32.869503,-84.630661	chart_one	May 24, 2017 at 04:05PM	0
32.869473,-84.630646	chart_one	May 24, 2017 at 07:25PM	2.18
32.869919,-84.631767	chart_one	May 24, 2017 at 07:27PM	9.42
32.869568,-84.630684	chart_one	May 24, 2017 at 07:30PM	0
32.869621,-84.630470	chart_one	May 24, 2017 at 07:35PM	0
32.869534,-84.630547	chart_one	May 24, 2017 at 07:39PM	5.05
32.869530,-84.630661	chart_one	May 24, 2017 at 07:47PM	2.27
32.877319,-84.647041	chart_one	May 24, 2017 at 07:49PM	51.83
32.884151,-84.674477	chart_one	May 24, 2017 at 07:51PM	35.24
32.890667,-84.683578	chart_one	May 24, 2017 at 07:53PM	32.01
32.893387,-84.707733	chart_one	May 24, 2017 at 07:55PM	57.04
32.908657,-84.724854	chart_one	May 24, 2017 at 07:57PM	60.82
32.906773,-84.750847	chart_one	May 24, 2017 at 07:59PM	55.39
32.900906,-84.773598	chart_one	May 24, 2017 at 08:01PM	11.63
32.900475,-84.774185	chart_one	May 24, 2017 at 08:03PM	0
32.900349,-84.774185	chart_one	May 24, 2017 at 08:07PM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 01:07AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 06:07AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:16AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:18AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:20AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:22AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:24AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:26AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:28AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:30AM	0
32.899799,-84.774445	chart_one	May 25, 2017 at 08:32AM	0

please , help…

I don’t think it’s fair to say that the system “froze up” when it’s publishing data.

It sounds more like the GPS not getting a fix or refreshing the lat long.

It seems like the speed is 0 which means the device is not moving and gives a same lat lon. Which sounds like right?

You might need to be more concise and point / tell us directly what is the “froze” about.

1 Like

When the gps shows the same lat lon after awhile the speed seems to show weird values over and over , the led lights up to show the motion threshold has been reached. The speed either gives zeros or one instance was the same number over and over. Yes, this may be something within the gps module. If the gps has no fix it shouldn’t report anything. It shouldn’t repeat the last location over and over. I don’t know if the gps module cannot run for long time periods or what, but the system worked flawlessly for 12 days consistently. Then the data seemed to freeze, or become static (not change for periods of time). I reset the unit again today to see if it gives the issue again after the 4 hour post. That seemed to be where is started the night before and last night. Well … to look back at the data I provided at 0956pm on may 22nd the unit shows 5.28 mph and lat long of 32.900311, -84.774429 . it keeps those same values for the rest of the time until after driving for 15 minutes to work and noticing that the unit is not being responsive , I reset it. then as it sits waiting on the threshold to stabilize you can see the gps data wander , which I feel is completely normal. on may 23rd at 1124am you see a similar pattern of speed and static coordinates. may 23rd at 1234pm similar as well. this is also durning the 2 minute loop while motion is noticed. The pattern continues a few more times after that. I started the logging on may 11th the unit responded with normal data until may 20th. I can put the rest of the data on here if that would be helpful.

It is not a good idea to publish from within a Particle function. The cloud connection is already busy handling the function call and you are asking to do something else.

A better way is to set a flag in the function that causes the publish to happen once control returns to loop().

I can’t say that this is definitely a problem for you, but I would change it on principle.

1 Like

Actually I am planing on removing that part of the code, I had to find something that would work so I could understand exactly what is happening at what line. I think i may have found the culprit on the data issues. The (temporary) external GPS antenna may have been damaged from being shut in the door to many times. After the last reset I disconnected the external antenna and the on board antenna locked on to a signal.

Ok, it’s not the antenna. I think it was coincidence I unplugged the antenna when it started working again. The sat fix light only blinks once now and when I remove power it blinks once more. Is there a test procedure for the new asset tracker sheild? To see if the problem is in the electron or the sheild?