From 5eaebdb7286b799ea984b55c01ea94ecee848bd8 Mon Sep 17 00:00:00 2001 From: abory Date: Fri, 11 Jul 2008 21:10:48 +0000 Subject: [PATCH] - 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. --- Aircraft/Generic/radardist.nas | 19 +++++++++---------- Aircraft/Generic/radardist.xml | 8 ++++---- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Aircraft/Generic/radardist.nas b/Aircraft/Generic/radardist.nas index 1787da639..b95815417 100644 --- a/Aircraft/Generic/radardist.nas +++ b/Aircraft/Generic/radardist.nas @@ -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(); } diff --git a/Aircraft/Generic/radardist.xml b/Aircraft/Generic/radardist.xml index b48a341f7..522b9d0de 100644 --- a/Aircraft/Generic/radardist.xml +++ b/Aircraft/Generic/radardist.xml @@ -9,8 +9,8 @@ max. radar range target seize(RCS)m2, 4th root of radar RCS --> - - + + generic 5 @@ -533,8 +533,8 @@ max. radar range target seize(RCS)m2, 4th root of radar RCS --> 100 3.16 - - + +