<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Geo Location Scripting Issue]]></title><description><![CDATA[<p dir="auto">right very simple one for one of you scripting gods lol</p>
<p dir="auto">firstly I'm using Mikrotik router boards and I have a a GPS fitted to a few of them and for a bit of a mess about was thinking on using them to track a few assets mainly out of interest. I saw a script which I guess would do the job but..</p>
<pre><code>transport = CreateSNMPTransport($node);
if (transport == null) {
  return null;
}

lat = SNMPGetValue(transport, ".1.3.6.1.4.1.14988.1.1.12.3.0");
long = SNMPGetValue(transport, ".1.3.6.1.4.1.14988.1.1.12.2.0");

if (lat == null || long == null) {
  return null;
}
println lat;
println long;

geoLoc =new GeoLocation(lat, long, 1);
$node-&gt;setGeoLocation(geoLoc);
return 0;
</code></pre>
<p dir="auto">but I get this as an error. which seems a little odd I suspect its the '' at the end so tried to use the replace function but that doesn't work and I get Function not found as a returned error<br />
 </p>
<pre><code>N 00 00' 0.000''
W 0 00' 0.000''
Error 4 in line 15: Bad arithmetic conversion
</code></pre>
<p dir="auto">I also tried to strip the chars with no real effect.. oddly enough if I copy and paste the returned values (not including the '') into the geo location on the device properties it works fine but I really want to automate this process to be fair.</p>
<p dir="auto">Thanks<br />
Rhodri</p>
]]></description><link>https://forum.netxms.org/topic/7100/geo-location-scripting-issue</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 13:58:36 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/7100.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 04 Jul 2021 00:09:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Geo Location Scripting Issue on Mon, 12 Jul 2021 15:00:10 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">NXSL function "replace" was added only in 3.9 branch, which is not released yet.</p>
<p dir="auto">As for original geolocation issue - geolocation object constructor expects two floating point numbers as latitude and longitude. You have to manually convert d m' s" format into degrees.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/30225</link><guid isPermaLink="true">https://forum.netxms.org/post/30225</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Mon, 12 Jul 2021 15:00:10 GMT</pubDate></item><item><title><![CDATA[Reply to Geo Location Scripting Issue on Sun, 04 Jul 2021 15:52:57 GMT]]></title><description><![CDATA[<p dir="auto">after creating a transformation script to test to see if its an issue with the script from before I mean its quite simple...</p>
<pre><code>return replace("  232   "," ","");
</code></pre>
<p dir="auto">I get this as an error</p>
<pre><code>Error 11 in line 1: Function not found
</code></pre>
]]></description><link>https://forum.netxms.org/post/30203</link><guid isPermaLink="true">https://forum.netxms.org/post/30203</guid><dc:creator><![CDATA[rhodri.ross]]></dc:creator><pubDate>Sun, 04 Jul 2021 15:52:57 GMT</pubDate></item></channel></rss>