1
0
Fork 0

- Alexis Bory (and Melchior):

- Changed properties name in the XML: radardist -> radar-performance.
- Corrected spelling of data.
- Shortened the init message.
This doesn' change the way to call radardist.nas functions.
This commit is contained in:
abory 2008-07-11 21:10:48 +00:00
parent abdc416f32
commit 5eaebdb728
2 changed files with 13 additions and 14 deletions

View file

@ -14,7 +14,7 @@
# radar stuff too.
var datas_path = getprop("/sim/fg-root") ~ "/Aircraft/Generic/radardist.xml";
var data_path = getprop("/sim/fg-root") ~ "/Aircraft/Generic/radardist.xml";
var aircraftData = {};
var radarData = [];
@ -110,10 +110,10 @@ var radis = func(t, my_radarcorr) {
}
var load_datas = func {
var load_data = func {
# a) converts aircraft model name to lookup (index) number in aircraftData{}.
# b) appends ordered list of datas into radarData[],
# datas are:
# b) appends ordered list of data into radarData[],
# data is:
# - acname (the index number)
# - the first (if several) aircraft model name corresponding to this type,
# - RCS(m2),
@ -122,8 +122,8 @@ var load_datas = func {
# - max. radar range(km),
# - max. radar range target seize(RCS)m2,
# - 4th root of radar RCS.
var datas_node = props.globals.getNode("instrumentation/radardist/datas");
var aircraft_types = datas_node.getChildren();
var data_node = props.globals.getNode("instrumentation/radar-performance/data");
var aircraft_types = data_node.getChildren();
foreach( var t; aircraft_types ) {
var index = t.getIndex();
var aircraft_names = t.getChildren();
@ -148,11 +148,10 @@ var load_datas = func {
}
var init = func {
print("Initializing Radar Datas from: " ~ datas_path);
fgcommand("load", props.Node.new({ "file": datas_path }));
load_datas();
print("Initializing Radar Data");
fgcommand("load", props.Node.new({ "file": data_path }));
load_data();
}

View file

@ -9,8 +9,8 @@
max. radar range target seize(RCS)m2, 4th root of radar RCS -->
<instrumentation>
<radardist>
<datas>
<radar-performance>
<data>
<aircraft n="0">
<name>generic</name>
<rcs-sq-meter>5</rcs-sq-meter>
@ -533,8 +533,8 @@ max. radar range target seize(RCS)m2, 4th root of radar RCS -->
<max-target-sq-meter>100</max-target-sq-meter>
<max-target-4th-root>3.16</max-target-4th-root>
</aircraft>
</datas>
</radardist>
</data>
</radar-performance>
</instrumentation>