- Code: Select all
foreach(var node; props.globals.getNode("/ai/models", 1).getChildren("static")) {
# FIXME: Not sure how to handle cases with existing static models already defined in the sim
# FIXME: For some reason we cannot assign a callsign to static models
# FIXME: This approach assumes the hoops are the only static models
hoop = {};
hoop.node = node;
hoop.id = node.getNode("id").getValue();
hoop.lat = node.getNode("position/latitude-deg").getValue();
hoop.lon = node.getNode("position/longitude-deg").getValue();
hoop.alt = node.getNode("position/altitude-ft").getValue();
hoop.pitch = node.getNode("orientation/pitch-deg").getValue();
hoop.roll = node.getNode("orientation/roll-deg").getValue();
hoop.head = geo.normdeg(node.getNode("orientation/true-heading-deg").getValue());
append(hoops, hoop);
Andre