question

Lucas Antonio Risso avatar image
0 Likes"
Lucas Antonio Risso asked Lucas Antonio Risso commented

How to get latitude and longitude of a task executer on a GIS Map?

Hello,

Is it possible to assign a token label to get the latitude and longitude of a task executer in a certain instant while it is moving on a GIS Map?

I appreciate any help and a possible sample model.

Regards.


FlexSim 22.2.4
process flowgis
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

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Lucas Antonio Risso commented
Object te = Model.find("Airplane1");
updatelocations(te);
treenode travelmember = te.find(">variables/navigator/1+");
double lat = getsdtvalue(travelmember, "latitude");
double long = getsdtvalue(travelmember, "longitude");
return [lat, long];

1671030041630.png

gis_te_lat_long.fsm


1671030041630.png (465.2 KiB)
gis-te-lat-long.fsm (37.0 KiB)
· 2
5 |100000

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

Gustavo Teodoro avatar image Gustavo Teodoro commented ·

Just to make sure if the code is working, you can stop the model, execute the code and add a point near it to verify the latitude and longitude. In the picture you can see that the code is working.

flexsim-answer.jpg

0 Likes 0 ·
flexsim-answer.jpg (522.9 KiB)
Lucas Antonio Risso avatar image Lucas Antonio Risso commented ·

Thank you, so much @Phil BoBo for the solution, and @Gustavo Teodoro for the verification hint. It will help me a lot.



0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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