for my TCAS gauge I have written an xml gauge that is installed in my fsx aircraft's panel (invisible). It basically querys the simulators AI aircraft table and copys some values to local variables (L:Vars). A test with the blackbox3 xml gauge shows that all variables are updated (screen shot).
In Air Manager however I get data for all variables except "L:TCAS_bearing". The viewer lists it as UNSUBSRIBED. I have tried changing the unit to Number, Radians, etc. both in the xml code and in the Air Manager subscribe with no luck.
Maybe someone has an idea what could be wrong here?
Black box test gauge:
Air Manager Viewer:
XML code for FSX gauge:
Code: Select all
<Gauge Name="TrafficInfo" Version="1.0">
<Size X="400" Y="300" />
<Update Frequency="5" Hidden="No">
<!-- Clear old values -->
0 (>L:TCAS_bearing,degrees)
(>L:TCAS_distance,nmiles)
(>L:TCAS_altitude, feet)
<!-- Set traffic search parameters -->
16 (>C:ITrafficInfo:Filter, enum) <!-- Bit 4: TRAFFIC_FILTER_IN_AIR -->
15 (>C:ITrafficInfo:Radius,nmiles)
16 (>C:ITrafficInfo:MaxVehicles)
<!-- Increment or reset counter that cycles through the AI found -->
(L:AircraftID, enum) ++ (>L:AircraftID, enum)
(L:AircraftID, enum) (C:ITrafficInfo:MaxVehicles) ==
if{ 0 (>L:AircraftID, enum) }
<!-- Select the aircraft -->
(L:AircraftID, enum) d (>C:ITrafficInfo:CurrentVehicle,enum)
(>C:ITrafficInfo:SelectedVehicle,enum)
<!-- Get position data -->
(A:PLANE LATITUDE,degrees) (>C:fs9gps:GeoCalcLatitude1,degrees)
(A:PLANE LONGITUDE,degrees) (>C:fs9gps:GeoCalcLongitude1,degrees)
(C:ITrafficInfo:S:PLANE LATITUDE,degrees) (>L:temp_lat,degrees)
(L:temp_lat) (>C:fs9gps:GeoCalcLatitude2,degrees)
(C:ITrafficInfo:S:PLANE LONGITUDE,degrees) (>L:temp_lon,degrees)
(L:temp_lon,degrees) (>C:fs9gps:GeoCalcLongitude2,degrees)
(C:fs9gps:GeoCalcBearing,degrees) (>L:TCAS_bearing,degrees)
(C:fs9gps:GeoCalcDistance,nmiles) (>L:TCAS_distance,nmiles)
(C:ITrafficInfo:S:PLANE ALTITUDE, feet) (>L:TCAS_altitude, feet)
(C:ITrafficInfo:S:VERTICAL SPEED, feet per minute) (>L:TCAS_vSpeed, feet per minute)
</Update>
</Gauge>
Air Manager script:
Code: Select all
counter=0
function new_data_fsx(own_altitude, heading, id, bearing, distance, altitude, vSpeed)
if counter == 9 then
counter = 0
if id==2 then
print(id.." ".. bearing.." "..distance.." "..altitude.." "..vSpeed)
end
end
counter = counter + 1
end
fsx_variable_subscribe("PLANE ALTITUDE","Feet",
"PLANE HEADING DEGREES GYRO", "DEGREES",
"L:AircraftID", "Number",
"L:TCAS_bearing", "Degrees",
"L:TCAS_distance", "Number",
"L:TCAS_altitude", "Number",
"L:TCAS_vSpeed", "feet per minute",
new_data_fsx)