The SYS library gives a Lua script access to the probe status variables, a delay function and logging to GP-Cloud. It is available on both probes that support Lua scripting: GP-Probe TGE2 and GP-Probe DIN L1.
The set of statuses depends on the probe model. The differences are marked in the tables below.
Requesting a Probe Status
-- Requesting a probe status as a string
sys.get_status_str(string VarName)
-- Requesting a probe status as an integer
sys.get_status_int(string VarName)
Every variable has two versions. NEW_ holds the current value. OLD_ holds the value before the change that started the script.
Variable Names
| Var Name | Str Value | Int Value | GP-Probe TGE2 | GP-Probe DIN L1 |
|---|---|---|---|---|
| GP-Probe Status | ||||
| NEW_STATUS | See "Probe Status Values" below | ✔ | ✔ | |
| OLD_STATUS | ||||
| GNSS Spoofing Status (per constellation) | ||||
| NEW_GPS_SPOOFING | true false | 1 0 | ✔ | ✖ |
| OLD_GPS_SPOOFING | ||||
| NEW_GLO_SPOOFING | ||||
| OLD_GLO_SPOOFING | ||||
| NEW_GAL_SPOOFING | ||||
| OLD_GAL_SPOOFING | ||||
| NEW_BDS_SPOOFING | ||||
| OLD_BDS_SPOOFING | ||||
| GNSS Jamming Status (per constellation) | ||||
| NEW_GPS_JAMMING | true false | 1 0 | ✔ | ✖ |
| OLD_GPS_JAMMING | ||||
| NEW_GLO_JAMMING | ||||
| OLD_GLO_JAMMING | ||||
| NEW_GAL_JAMMING | ||||
| OLD_GAL_JAMMING | ||||
| NEW_BDS_JAMMING | ||||
| OLD_BDS_JAMMING | ||||
| GNSS Anomaly Status (per constellation) | ||||
| NEW_GPS_ANOMALY | true false | 1 0 | ✔ | ✖ |
| OLD_GPS_ANOMALY | ||||
| NEW_GLO_ANOMALY | ||||
| OLD_GLO_ANOMALY | ||||
| NEW_GAL_ANOMALY | ||||
| OLD_GAL_ANOMALY | ||||
| NEW_BDS_ANOMALY | ||||
| OLD_BDS_ANOMALY | ||||
GP-Probe DIN L1 has a single GNSS channel and reports only the overall probe status. The per-constellation spoofing, jamming and anomaly variables are available on GP-Probe TGE2 only.
Probe Status Values
These are the values of NEW_STATUS and OLD_STATUS.
| Int Value | Str Value | GP-Probe TGE2 | GP-Probe DIN L1 | Description |
|---|---|---|---|---|
| 0 | Offline | ✔ | ✔ | The probe has no connection to GP-Cloud. |
| 1 | Normal | ✔ | ✔ | No interference, anomalies or errors are detected. |
| 2 | Spoofing | ✔ | ✖ | False GNSS signals are detected. |
| 3 | Jamming | ✔ | ✖ | Interference reduces the SNR and the number of visible satellites. |
| 4 | PPS Offset | ✔ | ✔ | The phase error of the signal at the PPS input exceeds the limit set in GP-Cloud. |
| 6 | Low Position Accuracy | ✔ | ✔ | The receiver coordinates deviate from the reference position by more than the limit set in GP-Cloud. |
| 7 | Interference | ✔ | ✔ | Interference is detected by the built-in RF spectrum analyzer. On GP-Probe TGE2 it does not degrade GNSS signal reception. On GP-Probe DIN L1 the measured Peak Power has crossed the configured threshold. |
| 8 | Anomaly | ✔ | ✔ | GNSS signals deviate from their normal behavior, but the event cannot be classified. |
| 100 | Hardware Error | ✔ | ✔ | The self-diagnostic system has detected a hardware fault. |
| 101 | No Fix | ✔ | ✔ | The GNSS receiver has no navigation solution. |
| 200 | Server Error | ✔ | ✔ | GP-Cloud has reported an error. |
GP-Probe TGE2 classifies interference as spoofing or jamming. GP-Probe DIN L1 cannot classify interference in real time, so it never returns Spoofing (2) or Jamming (3). It reports such events as Interference (7) or Anomaly (8). All other statuses are the same for both probes.
For a detailed description of each status, read Event and Interference Classification. For model-specific details, read Interference Classification with GP-Probe TGE2 and Interference Classification with GP-Probe DIN L1.
Examples
Reading the previous and the current status:
old = sys.get_status_int("OLD_STATUS");
new = sys.get_status_int("NEW_STATUS");
oldstr = sys.get_status_str("OLD_STATUS");
newstr = sys.get_status_str("NEW_STATUS");Reacting to any interference event. This check works on both probe models:
new = sys.get_status_int("NEW_STATUS");
if new == 2 or new == 3 or new == 7 or new == 8 then
sys.warning("GNSS alarm: " .. sys.get_status_str("NEW_STATUS"));
endDelay
Delay in milliseconds. Maximum value 100e+6
sys.delay(number msec);
Logging to GP-Cloud
The function sends a warning message to GP-Cloud for logging
sys.warning(string);
The function sends an error message to GP-Cloud for logging
sys.error(string);