question

Patryk avatar image
0 Likes"
Patryk asked Felix Möhlmann answered

How to get vehicle location information on GIS map


In GISNavigator variables, you can see information about the location of a given vehicle, but when it wants to obtain this information with the code, it returns only a fragment of the value. How to get the total value of this node? preferably as a string.



1675773705443.png

FlexSim 22.2.2
gisnode
1675773705443.png (57.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

The node you are reading from has the "SimpleDataType" format. Sometimes values within these nodes are accessible as class properties (like some AGV data), but I don't think this is the case here.

You can read the invidivual values with the "getsdtvalue(treenode Node, str valName)" command. For example, the following would return the latitude value.

treenode member = Model.find("GISNavigator>variables/travelmembers/1");
double lat = getsdtvalue(member, "latitude");
return lat;

Note that the command's documentation mentions that forward-compatibility is not guaranteed when accessing sdt-node data directly by name like this.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.