Version: 1.8.14.0
Frequency: Consistently
Severity: High
Marketplace package name: N/A
Context:
MSFS 2024, PC, in flight. Custom weather injection through JS_LISTENER_WEATHER and UpdateTempWeatherPreset using the active WeatherPresetData.
The repro uses sterile custom WPR controls whose weather content is identical except for WPR identity/order and AerosolDensity.
Summary:
Passing the exact, unmodified active WeatherPresetData object back through:
JS_LISTENER_WEATHER.call(“UpdateTempWeatherPreset”, exactCurrentWeatherPresetData)
destroys the native aerosol / particle-visibility state loaded from the active WPR.
With AerosolDensity = 98, AMBIENT VISIBILITY is 2800 m before the call and becomes 138600 m after the no-edit call, while the same preset identity remains selected.
The caller-side input DTO is not mutated by the call: JSON.stringify() captured on the exact input object immediately before and immediately after the native call is identical (19846 characters; FNV-1a 32 hash f88b8b0e in both captures).
Important clarification: the object returned by UpdateTempWeatherPreset is a different object and serializes differently. It is not used as the DTO-identity proof. The identity proof concerns the exact caller-side object passed into the native call.
Measured evidence:
- beforeVisibilityM = 2800
- afterVisibilityM = 138600
- dtoIdentical = true
- dtoIdenticalAcrossInputCall = true
- samePresetIdentityAcrossUpdate = true
- exactDtoUpdateResetsVisibilityToClear = true
- dtoExposesAerosolField = false
- dtoExposesVisibilityField = false
- dtoExposesPollutionField = true
- caller-side JSON length before/after = 19846 / 19846
- caller-side FNV-1a 32 before/after = f88b8b0e / f88b8b0e
Runtime introspection of WeatherPresetData shows these oSettings keys only:
__Type
bIsAltitudeAMGL
bWindFromDeparture
dvMSLGLTemperature
dvMSLPressure
dvPollution
dvPrecipitation
dvSnowCover
dvThunderstormRatio
There is no AerosolDensity field and no visibility field in the returned DTO.
Likely mechanism:
The MSFS 2024 SDK documents as a WPR property, with a default value of 1, and states that higher values make the air less transparent.
In the sterile controls used for this repro:
- AerosolDensity = 2.97 produces AMBIENT VISIBILITY = 135842 m
- AerosolDensity = 98 produces AMBIENT VISIBILITY = 2800 m
After the unchanged WeatherPresetData round-trip, visibility becomes 138600 m. In the measured WPR mapping, this is exactly the value corresponding to AerosolDensity = 1.
This is therefore strongly consistent with UpdateTempWeatherPreset rebuilding or resetting native aerosol state to the WPR default for a field that is not represented in WeatherPresetData.
The internal assignment to AerosolDensity = 1 is not directly observable, so this mechanism is an evidence-based interpretation rather than a directly measured internal implementation detail. The loss of the native aerosol state itself is deterministic and directly measured.
dvPollution is not a usable substitute in this API path. In a separate controlled sweep, dvPollution was writable/accepted, but changing it from 0 through 50 produced no measurable change in AMBIENT VISIBILITY, which remained at 138600 m.
Repro steps:
- Load a sterile custom WPR with AerosolDensity = 98 and wait until it is fully applied.
- Confirm AMBIENT VISIBILITY = 2800 m.
- Retrieve the active WeatherPresetData through JS_LISTENER_WEATHER.
- Capture JSON.stringify() of the exact object. Do not modify any weather value.
- Call JS_LISTENER_WEATHER.call(“UpdateTempWeatherPreset”, exactCurrentWeatherPresetData) using that same object.
- Immediately serialize the same caller-side input object again and compare it with the pre-call capture.
- Read AMBIENT VISIBILITY.
- Keep the aircraft/camera fixed and do not touch the weather controls during the sequence.
Actual result:
AMBIENT VISIBILITY : 2800 m → 138600 m
dtoIdentical : true
dtoIdenticalAcrossInputCall : true
samePresetIdentityAcrossUpdate : true
exactDtoUpdateResetsVisibilityToClear : true
dtoExposesAerosolField : false
dtoExposesVisibilityField : false
dtoExposesPollutionField : true
The exact caller-side WeatherPresetData input remains identical across the call, but the WPR aerosol-derived visibility is lost.
Control / recovery:
The sterile WPR controls apply correctly when genuinely selected:
- AerosolDensity = 2.97 → AMBIENT VISIBILITY = 135842 m
- AerosolDensity = 98 → AMBIENT VISIBILITY = 2800 m
After the unchanged UpdateTempWeatherPreset call has reset visibility to 138600 m, forcing a real transition through a distinct WPR and then back to the AerosolDensity = 98 WPR restores AMBIENT VISIBILITY to 2800 m.
This demonstrates that the native WPR aerosol renderer still works; the state loss is specifically associated with the temporary-preset update round-trip.
Expected result:
Preferred fix:
Expose AerosolDensity as a writable field of WeatherPresetData, consistent with the WPR property of the same name, so the value can survive and be controlled during dynamic weather updates.
Fallback:
UpdateTempWeatherPreset should preserve native weather state that is not represented in WeatherPresetData, including the active WPR AerosolDensity value.
It would also be useful to clarify whether dvPollution is intended to correspond to WPR aerosol density. In the current build it does not control AMBIENT VISIBILITY in this path.
Impact:
This blocks third-party weather injectors that rely on UpdateTempWeatherPreset from continuously controlling WPR aerosol-derived ambient visibility while dynamically updating the rest of the temporary weather preset through the same API path.
Any injector using this mechanism can currently preserve the WPR aerosol visibility state or perform dynamic WeatherPresetData updates, but not reliably do both at the same time.
Attachments:
- Redacted diagnostic log excerpt containing the exact SAME DTO → UPDATE transition and DTO identity proof.
- Redacted full diagnostic log.
- Redacted screenshots covering CLEAR control, LOW 2.8 KM control, SAME DTO → UPDATE, recovery, and reproduced result.
- Compact DTO shape / identity evidence JSON.
- Sterile WPR control package/source can be supplied separately if required.
ASOBO_VISIBILITY_REPRO_COMPLETE.zip (4.4 MB)