Hi,
I am struggling with a very simple task.
I am trying to get the value of the GPS altitude.
local Gps [ /system/gps/monitor once as-value ];
/log/info ($Gps->"altitude");
It will return “1.480000 m”
Now I’m trying to get the altitude value without the unit.
local Gps [ /system/gps/monitor once as-value ];
/log/info (pick ($Gps->"altitude") 0 len(($Gps->"altitude")-2));
But I get the following result: “00:01:29” instead. It seems that it was transtyped as a time instead of string or a number…
How can I trim the measurement unit and keep only the value as a number (or string)?