I got an asset tracker (old shield) and works well till today. But i have noticed that the GPS locations reporting is not correct when i use RSSI to get signal strength. Do we have any relation between these two?
my code snippet as follows:
AssetTracker t = AssetTracker();
void loop()
{
t.updateGPS();
//Get GPS data
processGPS();
#ifdef SIGNAL_STRENGTH
processSignalStrength();
#endif
}
void processSignalStrength()
{
int rssi = 0;
#if Wiring_WiFi == 1
rssi = WiFi.RSSI();
#elif Wiring_Cellular == 1
CellularSignal sig = Cellular.RSSI();
rssi = sig.rssi;
#endif
if (rssi < 0)
{
if (rssi>=-70)
{
DEBUGpln("Excellent");
sigStrength = 5;
}
else if(rssi>=-70 && rssi >-85)
{
DEBUGpln("Good");
sigStrength = 4;
}
else if (rssi>-86&& rssi >=-100)
{
DEBUGpln("Fair");
sigStrength = 3;
}
else if (rssi>-100)
{
DEBUGpln("Poor");
sigStrength = 2;
}
else if (rssi>-110)
{
DEBUGpln("No Signal");
sigStrength = 1;
}
}
}
Am i doing wrong?