# имя: 'Position simulator 2' # описание: симулятор движения # тип триггера: 'EgsScheduled' # создан: 2017.10.26 16.20.45, Сельченков Н.Ю. # изменен: '2018.04.17 15.32.41', Сельченков Н.Ю. # подробности: https://redmine.integra-s.com:11000/projects/eilyacuario/wiki/Position_simulator_2 use acuario2.types.MoveableObject from acuario2.types use System.Text.RegularExpressions.Regex use System.Text.RegularExpressions.MatchCollection use typedef ` ` as Settings const settings = Settings(trigger.settings) const target = graph[Guid(settings.target)] as MoveableObject const matches = Regex(settings.pattern).Matches(settings.input) once index = 0 let groups = matches[index].Groups target.position = "POINT(" + groups["longitude"] +" " + groups["latitude"] + ")" target.altitude = double(groups["altitude"].Value) index = (index + 1) % matches.Count