|
From: Jens W. W. <j.w...@gm...> - 2004-08-31 22:36:02
|
Hello again,
I thought about that again and refined it a bit, as there are lots of things
one might want to configure.
So I want to do it like that:
For every location, every configuration option needs to be specified in the
config file:
-wind characteristics
-thermal characteristics
-default start/launch parameters for an airplane
The user might (he does not have to!) choose a special enviromental
configuration. As long as we don't have a menu system it is chosen via
command line parameter. An enviromental configuration might (it does not have to)
override one or more of the locations settings:
-wind characteristics
-thermal characteristics
Again, those enviromental settings may be overriden via command line.
In the end, the users opts for a certain airplane.
In the configuration file there can be special settings for an airplane
which override settings from above.
This is different to my first idea, but it seems to me that this way to do
it should fit most users needs. If we provide a good configuration file, a
user can simply choose a location and a plane and get sane settings, without
even knowing about this configuration file. But he has the power to make
everything fit his needs, if it doesn't already.
First steps are in cvs already (crrcsim.xml and some basic usage of it).
Any comments?
Best regards,
Jens
---- first draft of config file (Already is in cvs. Structure is important, not values!) -----------
<?xml version="1.0"?>
<crrcsimConfig version="1">
<!-- configuration options for input methods -->
<inputMethod>
<serial2 device="/dev/ttyS1" baudrate="19200" />
</inputMethod>
<!-- Settings for different locations.
These settings may be overridden (command line parameter, setting for airplane, enviroment),
so they are some kind of default values.
Here everything must be specified for every location. -->
<locations>
<location name="davis">
<start altitude="1" theta="0" velocity="20" />
<wind direction="0" velocity="0" />
<thermal strength_mean="5"
strength_sigma="1"
radius_mean="50"
radius_sigma="10"
density="0.5E-5"
lifetime_mean="240"
lifetime_sigma="60" />
</location>
<location name="medfield" >
<start altitude="1" theta="0" velocity="20" />
<wind direction="0" velocity="0" />
<thermal strength_mean="5"
strength_sigma="1"
radius_mean="50"
radius_sigma="10"
density="0.5E-5"
lifetime_mean="240"
lifetime_sigma="60" />
</location>
<location name="cape_cod" >
<start altitude="1" theta="0" velocity="20" />
<wind direction="0" velocity="5" />
<thermal strength_mean="5"
strength_sigma="1"
radius_mean="50"
radius_sigma="10"
density="0.5E-5"
lifetime_mean="240"
lifetime_sigma="60" />
</location>
</locations>
<!-- Enviromental settings. Choose one to override defaults in location.
Here nothing needs to be specified. If anything is specified,
it overrides the location's defaults.
May be overridden by command line parameter. -->
<enviroment>
<enviroment name="moreThermals" >
<thermal strength_mean="5"
strength_sigma="1"
radius_mean="50"
radius_sigma="10"
density="0.7E-5"
lifetime_mean="240"
lifetime_sigma="60" />
</enviroment>
<enviroment name="cape_cod_withoutThermalsButStrongerWind" >
<wind direction="0" velocity="10" />
<thermal strength_mean="0"
strength_sigma="0"
radius_mean="0"
radius_sigma="0"
density="0"
lifetime_mean="0"
lifetime_sigma="0" />
</enviroment>
</enviroment>
<!-- Settings for different airplanes. Here nothing needs to be specified.
May be overridden by command line parameter. -->
<airplaneSettings>
<model name="allegro" soundfile="">
<location name="davis">
<start altitude="1" theta="0" velocity="20" />
</location>
<location name="medfield">
<start altitude="1" theta="0" velocity="20" />
</location>
</model>
<model name="spirit" soundfile="">
<location name="cape_cod">
<start altitude="1" theta="0" velocity="20" />
</location>
</model>
</airplaneSettings>
</crrcsimConfig>
|