Board index FlightGear Development New features

Callsigns for static ai/models

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Callsigns for static ai/models

Postby freevryheid » Sun Jan 13, 2013 5:17 pm

I cannot assign callsigns to static ai/models although the callsign tag shows up in the tree. This would be helpful to identify my static models from others already existing in the sim. Here's an extract from my nasal to explain.
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
freevryheid
 
Posts: 18
Joined: Thu Jan 10, 2013 5:06 am
Location: Austin, TX
Version: 2.8
OS: arch

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest