I am struggling with a very simple task.
I am trying to get the value of the GPS altitude.
Code: Select all
local Gps [ /system/gps/monitor once as-value ];
/log/info ($Gps->"altitude");
Now I'm trying to get the altitude value without the unit.
Code: Select all
local Gps [ /system/gps/monitor once as-value ];
/log/info (pick ($Gps->"altitude") 0 len(($Gps->"altitude")-2));
How can I trim the measurement unit and keep only the value as a number (or string)?