Jump to content

Recommended Posts

Posted

Hello guys.

 

Anyone knows how to get the QFE on a unplaned waypoint for the Viggen and have it in the F10 menu using MIST ?

 

I already get some infos via :

 

mgrs = coord.LLtoMGRS(coord.LOtoLL(unitSpawnZone))

mgrsString = mist.tostringMGRS(mgrs, 3)

 

lat, lon = coord.LOtoLL(unitSpawnZone)

llString = mist.tostringLL(lat, lon, 2)

ll2String = mist.tostringLL(lat, lon, 0, true)

brString = MA_getBearingRange()

 

_targetInfoPath = missionCommands.addSubMenu('Target information', _taskingsGroundPath)

 

missionCommands.addCommand('TARGET: Group of ' .. groupSize .. ' vehicles and infantry.', _targetInfoPath, MA_emptyFunction)

missionCommands.addCommand('LAT LON: ' .. llString .. '.', _targetInfoPath, MA_emptyFunction)

missionCommands.addCommand('LAT LON: ' .. ll2String .. '.', _targetInfoPath, MA_emptyFunction)

missionCommands.addCommand('MGRS/UTM: ' .. mgrsString .. '.', _targetInfoPath, MA_emptyFunction)

missionCommands.addCommand(brString, _targetInfoPath, MA_emptyFunction)

 

I also know that :

 

In metric:

1 milibar is approximately equal to 30 feet. This calculation is therefore also approximate but is good for airfield elevations to several hundred feet since we round to the nearest millibar.

Divide the airfield altitude in feet by 30 to get the number of millibars above MSL. Add this to the QFE to get QNH or subtract it from QNH to get QFE.

For example, the airfield elevation is 200 feet. Diving by 30 gives us 6.66r. The QFE is 1023. Add 6.66 to get 1029.66 and round up to 1030 millibars, which is the QNH.

In imperial:

1 inch mercury is approximately equal to 900 feet. This calculation is therefore also approximate but is good for airfield elevations to several hundred feet since we round to the nearest hundredth inches.

Divide the airfield altitude in feet by 900 to get the number of inches above MSL. Add this to the QFE to get QNH or subtract it from QNH to get QFE.

For example, the airfield elevation is 300 feet. Diving by 900 gives us 0.33r. The QFE is 30.12. Add 0.33 to get 30.45 which is the QNH.

If the airfield elevation is below sea level, subtract rather than add and vice versa.

 

Any help would be appreciated.

i9 9900k, 64 Go RAM, RTX 4090, Warthog HOTAS Throttle & Stick, Virpil AH64 collective, TPR rudder, MFD Cougar, Trackir 5 Pro, Multipurpose UFC, Alain Dufour's TEDAC and Oculus Rift S (when I want some VR),

http://www.twitch.tv/zarma4074 /  https://www.youtube.com/user/Zarma4074 

 

Copy-of-DCS-A-10C-User-Bar-CMR-ConvertImage.jpg

Posted

well if you know the QNH you can calculate the QFE as the altitude of the spawn group is known. Just don't know how to get the QNH. Maybe a fix value with preset weather.

i9 9900k, 64 Go RAM, RTX 4090, Warthog HOTAS Throttle & Stick, Virpil AH64 collective, TPR rudder, MFD Cougar, Trackir 5 Pro, Multipurpose UFC, Alain Dufour's TEDAC and Oculus Rift S (when I want some VR),

http://www.twitch.tv/zarma4074 /  https://www.youtube.com/user/Zarma4074 

 

Copy-of-DCS-A-10C-User-Bar-CMR-ConvertImage.jpg

Posted

I actually added a function to get QFE in the last dev branch update of mist. You can see the function here. I'm rewriting it slightly because there was an actual function added to DCS to return the pressure value that I didn't know was added recently. I know for sure it is in 1.5.6 but I haven't checked if it is in the current 2.0.5 build. I know it will be in the next 2.0 update for sure.

 

Using standard weather the qnh value is always accessible via env.mission.weather.qnh. I'm not sure how dynamic weather might change it as I haven't extensively tested it yet, it may just default to 760.

 

Anyways here is the documentation for atmosphere.getTemperatureAndPressure

  • Like 1

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted
I actually added a function to get QFE in the last dev branch update of mist. You can see the function here. I'm rewriting it slightly because there was an actual function added to DCS to return the pressure value that I didn't know was added recently. I know for sure it is in 1.5.6 but I haven't checked if it is in the current 2.0.5 build. I know it will be in the next 2.0 update for sure.

 

Using standard weather the qnh value is always accessible via env.mission.weather.qnh. I'm not sure how dynamic weather might change it as I haven't extensively tested it yet, it may just default to 760.

 

Anyways here is the documentation for atmosphere.getTemperatureAndPressure

 

Nice ! Trying to create Something until the next release.

i9 9900k, 64 Go RAM, RTX 4090, Warthog HOTAS Throttle & Stick, Virpil AH64 collective, TPR rudder, MFD Cougar, Trackir 5 Pro, Multipurpose UFC, Alain Dufour's TEDAC and Oculus Rift S (when I want some VR),

http://www.twitch.tv/zarma4074 /  https://www.youtube.com/user/Zarma4074 

 

Copy-of-DCS-A-10C-User-Bar-CMR-ConvertImage.jpg

Posted

This is what I am using right now :

 

QFE = mist.utils.round((env.mission.weather.qnh * 1.33322) - ((land.getHeight(unitSpawnZone)/0.3048 )/30),2)

 

(without the space after the 8 but was getting an emoticon in the forum lol)

i9 9900k, 64 Go RAM, RTX 4090, Warthog HOTAS Throttle & Stick, Virpil AH64 collective, TPR rudder, MFD Cougar, Trackir 5 Pro, Multipurpose UFC, Alain Dufour's TEDAC and Oculus Rift S (when I want some VR),

http://www.twitch.tv/zarma4074 /  https://www.youtube.com/user/Zarma4074 

 

Copy-of-DCS-A-10C-User-Bar-CMR-ConvertImage.jpg

  • 7 months later...
Posted

On a side-track to this question, using atmosphere.getTemperatureAndPressure is it now possible to get temperature/pressure on any point of the map?

 

This, coupled with getwind, would be great for us controllers and enable the use of dynamic weather!

  • Like 1

[sIGPIC][/sIGPIC]

 

Commodore 64 | MOS6510 | VIC-II | SID6581 | DD 1541 | KCS Power Cartridge | 64Kb | 32Kb external | Arcade Turbo

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...