|
From: James T. <ja...@fl...> - 2023-07-25 12:27:46
|
> On 25 Jul 2023, at 13:23, PlayeRom Roman Ludwicki <rom...@pl...> wrote: > > If we want to get rid of `fgGetBool` when creating `FGEnvironment dummy;`, I see the following solution: > > 1. set the `is-isa` flag in the `/environament/climate/is-isa` property. > 2. In the function `FGClimate::bind()` bind the flag `_tiedProperties.Tie( "is-isa", &_is_isa);`. > 3. In the `FGClimate::update` function, call `set_is_isa`: > > FGEnvironment dummy; > dummy.set_is_isa(_is_isa); > ... > > > This means that `_tiedProperties.Tie` for `is_isa` in `FGEnvironment::Tie` is redundant and should be removed. > > If this is a more appropriate solution, I can implement it. > Yes, that’s better, if you don’t mind. Thank you for digging into this, I knew there was some copying / re-creating of FGEnvironment but did not realise it had gotten this complicated … not very easy to hack on :( > There is another call of `FGEnvironment dummy;` in `MetarProperties::setMetar`, but I wouldn't change anything there, because as far as I can see it is only run for the `Live data` weather scenario, where `is_isa` must be `false` anyway. > Sure, no problem. Kind regards, James |