Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reported QNH is off for temperatures other than 16deg #85

Closed
rkusa opened this issue Jan 25, 2021 · 20 comments
Closed

Reported QNH is off for temperatures other than 16deg #85

rkusa opened this issue Jan 25, 2021 · 20 comments

Comments

@rkusa
Copy link
Owner

rkusa commented Jan 25, 2021

@talbotmcinnis I hope you don't mind that I am pulling this discussion into a Github issue here. This helps me keep track of why certain changes were made and also to reference to them if it comes up again in the future.

As you've reported, the QNH doesn't seem to be correct, tested via:

adjust the altimeter setting so that the altimeter reads the correct known elevation of whatever point you are at

This seem to also match what was reported here https://forums.eagle.ru/topic/256057-altitude-qnh-error-bug/
When I change the mission temperature to 16 deg, the QNH seems to be correct, but for other temperatures it deviates.

I'd be open to fix this for DATIS, despite the DCS mission briefing reporting something else then, however, I don't know yet how to fix it. While I can get the pressure and temperature on both sea level and the actual altitude of the airplane, using a barometric formula doesn't seem to provide a accurate result (the linked error above also suggests that DCS is using a strange pressure system).

Example:

Parked at Beslan, Mission set to 8.4 deg and QNH 2992.
Altitude in parking position is 1727ft, while F18 reports 1770ft (with the QNH of 2992 dialed in).

DCS reports the following information:

  • At aircraft altitude: temp 4.99 deg C, pressure 95034.4 Pa
  • At sea level: temp 8.4 deg C, pressure 101325 Pa

Throwing this into the barometric formula (which I might have done wrong) results in an altitude of 1722.47, which is closer to the actual 1727ft the mission editor reports, but still off by ~4.5ft (compared to the previous error of 43ft). Though I am not sure how much margin of error is acceptable here.

@CaptainBandages do you happen to have an opinion here too - when sitting on the airfield, having the QNH dialed in, how much difference in altitude compared to your actual altitude is acceptable in your opinion?

@CaptainBandages
Copy link

QNH is sea level pressure corrected for non standard temperature so the altimeter reads elevation on the ground. Its also might be why the tankers are not at their stated indicated altitude in DCS, they are erroneously using True Altitude in the mission editor.

You can have 75' variance for it to be acceptable on the ground. In the air the difference between 2 altimeters can be up to an exceptable tolerance of 200'.

DCS gives out QFE in the mission brief which very few states use which the altimeter reads zero at the airport. Only time I see it used is for airshows.

@CaptainBandages
Copy link

CaptainBandages commented Jan 25, 2021

MSL will be different from QNH because QNH is MSL corrected for non standard temperature at the airport elevation that the altimeter setting was issued for. So you'll see a deviation from MSL and ASL in non standard temperatures. The important part is that the altimeter reads the correct elevation at the airport reference point. Soon as you climb from that reference you introduce errors but the important part is that everyone in the vicinity uses the same reference in the same volume of air. We dont have to worry about temperature corrections for deconfliction from other aircraft. We can however if we are concerned about avoiding terrain, calculate true altitude. Basically it only a problem when its colder than standard. "From High to Low, Lookout Below" also applies to flying in different pressure regions without setting the altimeter.

@talbotmcinnis
Copy link
Contributor

I'll see if I can get extra opinions too. Thanks for looking into it, and good job even figuring out that temperature was the factor!

@talbotmcinnis
Copy link
Contributor

Tested the fix and I definitely think its going in the right direction, ie compensating for temperature, but I did still notice a deviation at nellis. I was a bit rushed so I didn't get exact data but I will repeat my test and get you actual numbers. Code looks sound so not sure how practical it is going to be to tweak, but lets hope the data reveals a pattern.

@rkusa
Copy link
Owner Author

rkusa commented Apr 30, 2021

For most tests, I saw a difference of +10ft from what would have been an exact match (as exact as it can be anyway). E.g. sitting at Nellis at 1848ft ASL, the altimeter setting report from ATIS brings my altitude to 1860, while 1850 might have been the even better result. While I'd say that 20ft is within a reasonable margin of error, I'd be fine to always substract 10ft in case you can confirm that this is the difference you see most of the time too.

@talbotmcinnis
Copy link
Contributor

talbotmcinnis commented Apr 30, 2021 via email

@CaptainBandages
Copy link

@talbotmcinnis
Copy link
Contributor

image

Retry at uploading the image.

@rkusa
Copy link
Owner Author

rkusa commented May 2, 2021

@talbotmcinnis Thanks a lot for testing the changes! I've found some more deviations for low/high temperatures on different pressure settings in the ME and different airport altitudes. I was unable to fix them with a linear adjustments, but was able to find another approach. I am now calculating QNH based on the pressure values DCS reports for sea- and ground-level. This looks quite promising and I didn't notice any deviations of more than 10ft during testing. I've already released the changes as part of v3.0.1, but please feel free to report higher deviations if you still notice any.

@talbotmcinnis
Copy link
Contributor

Excellent, can't wait to test it out, but I'm confident you've got it now. Great job!

@CaptainBandages
Copy link

I think you guys are doing the temperature corrections wrong. The Altimeter settings are way out now compared to the previous version by .04".

@talbotmcinnis
Copy link
Contributor

Seems like its going to be challenging to handle all the variables in play here. I suggest we use some test-driven development, and come up with unit tests of all this that can run without dcs so changes to the core model can be validated. Just a thought.

@talbotmcinnis
Copy link
Contributor

What airfield, aircraft and temp were the differences noticed at? To be clear, the datis readback altimeter setting will not match what is set in the mission editor, but will (err, should) result in correct field elevations vs charts or map elevation.

@CaptainBandages
Copy link

All airfields. Out by 0.04-0.05" To be honest it was pretty accurate before and never had an issue.

@talbotmcinnis
Copy link
Contributor

I just re-ran tests at Nellis and can only confirm Markus' observations that with 3.1 everything is within 10' of correct. At the lola ramp at KLSV, known altitude 1843'. ME altimeter 29.40, Temp +50C. Datis reads out 29.59, which yields an A-10 altimeter readout of 183X.

Prior to this update efforts it was easy to create deviations of way more that 0.04.

Maybe you can share similar details of a measurement that you are finding to be so far off?

@CaptainBandages
Copy link

Persian Gulf, Al Dhafra. Syria they were all out by 0.04" to 0.05". Set the Datis altimeter setting at the altimeter is out by 50'. Tried it on the carrier as well, same results in various temperatures. They were sea level airports. Its could be the way the ME works. The altimeter setting is accurate in the ME for sea level airports but not for airports above sea level. Nor would it be. The temperature error isn't linear. The easiest way would be to see what the altimeter reads with the altimeter setting in the ME then compare it with the field elevation and apply the difference to adjust the altimeter for each airfield. But its not linear, the higher you go from the source altimeter setting the error increases exponentially. DCS is a bit backwards on how it does stuff. It falls in line with the ME using true altitudes rather than indicated to so the tankers and AI report the wrong altitudes and speeds.

@CaptainBandages
Copy link

Ok. Heres what I found out. The ME altimeter is accurate for sea level airports only. There is no error. That would make the error increase exponentially based on the temperature deviation from standard from that datum. Its not linear. The higher you go the more error there will be. Its also affected by cold temperature.

@talbotmcinnis
Copy link
Contributor

That is correct, the ME "altimeter setting" only seeds the DCS atmospheric engine. Both temperature and altitude affect the effective pressure throughout the map, which as you said, it should. So generally increasing or decreasing the ME setting does affect pressure but cannot be taken 1:1 as the required altimeter setting in aircraft. Just to be sure it didn't vary map to map, I tested Incrilik, H loop spot 32 with a ME altitude of 172' MSL. ME altimeter 29.80, 20 degrees C. Datis read out 31.08, and after setting that in my A-10C, I read altimeter 160', so -12'. Winning :)

@CaptainBandages
Copy link

Carrier QNH is out by 0.04" as well as anything at sea level

rkusa added a commit that referenced this issue Jun 22, 2021
rkusa added a commit that referenced this issue Jun 22, 2021
@rkusa
Copy link
Owner Author

rkusa commented Jun 22, 2021

I've fixed a bug that was only affecting the carrier QNH, but also made another adjustment for all QNH reports, which should improve the accuracy especially for stations close to sea-level. I've tested the changes at 20ft, 70ft, 1250ft and 3040ft, each at 0 and 30 degrees Celsius and was usually within 0,01inHg, with only one exception which was off by 0,02inHG.

Please let me know if you see an improvement (or a regression)

@rkusa rkusa closed this as completed Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants