+ for( i = 0; i < database_data[index].Temperature.size(); i++)
+ {
+ SGPropertyNode * temperature = station->getNode("temperature", i, true);
+ temperature -> tie("value-K",
+ SGRawValueMethodsIndexed<FGPhysicalProperties,WeatherPrecision>(
+ database_data[index], i,
+ &FGPhysicalProperties::getTemperature_x,
+ &FGPhysicalProperties::setTemperature_x)
+ ,false);
+ temperature -> tie("altitude-m",
+ SGRawValueMethodsIndexed<FGPhysicalProperties,WeatherPrecision>(
+ database_data[index], i,
+ &FGPhysicalProperties::getTemperature_a,
+ &FGPhysicalProperties::setTemperature_a)
+ ,false);
+ }
+
+ for( i = 0; i < database_data[index].VaporPressure.size(); i++)
+ {
+ SGPropertyNode * vaporpressure = station->getNode("vapor-pressure", i, true);
+ vaporpressure -> tie("value-Pa",
+ SGRawValueMethodsIndexed<FGPhysicalProperties,WeatherPrecision>(
+ database_data[index], i,
+ &FGPhysicalProperties::getVaporPressure_x,
+ &FGPhysicalProperties::setVaporPressure_x)
+ ,false);
+ vaporpressure -> tie("altitude-m",
+ SGRawValueMethodsIndexed<FGPhysicalProperties,WeatherPrecision>(
+ database_data[index], i,
+ &FGPhysicalProperties::getVaporPressure_a,
+ &FGPhysicalProperties::setVaporPressure_a)
+ ,false);
+ }
+
+ index++;
+ }
+}
+
+void FGLocalWeatherDatabase::unbind()
+{
+ fgUntie("/environment/weather/wind-north-mps");
+ fgUntie("/environment/weather/wind-east-mps");
+ fgUntie("/environment/weather/wind-up-mps");
+ fgUntie("/environment/weather/temperature-K");
+ fgUntie("/environment/weather/air-pressure-Pa");
+ fgUntie("/environment/weather/vapor-pressure-Pa");
+ fgUntie("/environment/weather/air-density");
+}
+
+FGLocalWeatherDatabase::~FGLocalWeatherDatabase()
+{
+ //Tidying up:
+ delete database_logic;