Jump to content

Recommended Posts

Posted (edited)

Version 1.5

Changelog

Version 1.5 - Redesigned the GUI, rewrote all code (yes, I lost the previous code). MATLAB added a few new GUI elements which I have included (mainly the heading indicator). Remove vertical speed as it is largely negligible. Remove the lower bound on IAS, which should make the calculator useful for FC! Thanks to WWDarkdiz for this suggestion!
Version 1.1 - Added an altitude slider since TAS changes with altitude. Thanks to AndyJWest and 56RAF_Roblex for pointing this out.
Version 1.2 - Removed the "Turn to the"  text box (due to unnecessity) and replaced it with a "Ground Speed" text box.  The compensation result now keeps its sign (negative/positive) when displayed. Thanks to -LaFrench-bexhausted for these suggestions. All outputs now only displays at most one decimal point to the right since more than one is not really necessary.
Version 1.3 - Added a "Wind Angle" text box which displays the angle between the desired heading and the wind direction (useful when using a bombsight). Thanks to FFS_Comet for this suggestion. Added a "Display settings" menu where you can chose either a "Simple" or "Detailed" layout. By choosing the simple layout, you hide the components "Compensation", "Wind Angle" and "Vertical Speed". Note that when choosing the simple layout, vertical speed will be put to 0.
Version 1.4 - You can now choose whether to input values with imperial or metric units, making it easier to use the calculator with american and british aircraft. Altitude input is in thousand feet [kft] and climbrate is in thousand feet per minute [kft/min] when using imperial units. Thanks again to -LaFrench-bexhausted for the suggestions!

This is a wind compensation calculator I've been working on in MATLAB which numerically calculates how much to compensate for the wind while navigating in IL-2. I have used this program during the latest TAW campaign while mostly level bombing,  and from my experience it is very accurate. It became easier to approach the target accurately from a desired direction, which is necessary if you want to maximize your potential damage.

To use it, simply input the data of your flight, including wind direction and wind speed, desired heading, indicated air speed and altitude . When pressing the "Calculate Wind Compensation" button, the program will output how much you will have to compensate (in degrees) for the wind, your new heading due to this compensation as well as your ground speed and the wind angle. You can input the wind angle in your bomsight.

Here is what the GUI looks like with metric units selected and dark mode enabled:
wcGUI.png.d68199544b13beced4a1b724566609b8.png


See below spoiler for the GUI in light mode:

Spoiler

wcGUI_light.png.ecf8a88e5c725a8c5f1f68c8708d5423.png

 

See below spolier for the GUI with imperial units selected:

Spoiler

wcGUI_imperial.png.3af0baccf26ef06158256b9aadd63f53.png


You will likely get a heads up from your windows/anti-virus that the installation file is from an unknown publisher. If you still have doubts, just search through the file with your anti-virus, but I can assure you there is nothing harmful in the program. After allowing the file to run, you get the option to install the program. MATLAB Runtime will also be installed, which is a collection of shared libraries and code that enables the execution of compiled and packaged MATLAB applications on systems without an installed version of MATLAB, and is therefore necessary to run this program. The runtime installer is a bit slow unfortunately.

Any feedback regarding features/bugs/accuracy is highly appreciated!

You can download the program via mediafire HERE (64-bit)

Source code

If desired, I can upload the source code to GitHub, just dm me or post in this thread if you wish to have it.

 

source_code.pdf

Edited by FlygFan
Updated calculator version
  • Like 6
  • Thanks 5
  • Upvote 5
Posted

I dl-ed it and after trying to run the exe all red flags went up from windows and anti virus.

You sure this is ok?

Posted (edited)
29 minutes ago, Bando said:

I dl-ed it and after trying to run the exe all red flags went up from windows and anti virus.

You sure this is ok?

You could always search through the file with your anti-virus if you still have doubts, but there is nothing harmful in the program. I'm guessing your windows/anti-virus just want to give you a heads up that it's from an unknown publisher (which I get too) or something along those lines. After allowing the file to run you get the option to install the program.

Edited by FlygFan
  • Thanks 1
=gRiJ=Roman-
Posted (edited)

AWESOME!!!!! :)

 

This award is presented to Flygfan to express our deep appreciation for the outstanding and dedicated service to our community:umnik2:

gThmpU2sN73engLTZfnputIkcaiY-7O_11rDNluu

Edited by PA_Spartan-
  • Like 2
Posted (edited)

Is the airspeed setting IAS or TAS?

 

Edit: thinking about it, that's a dumb question: there is no altitude setting on the calculator, so it can only be TAS. 

Edited by AndyJWest
56RAF_Roblex
Posted (edited)
4 hours ago, AndyJWest said:

Is the airspeed setting IAS or TAS?

 

It would have to be TAS as the program has no idea of your altitude (& temp would make it more accurate) .   Maybe we need to ask for a extra option :-)   

 Try TAS = IAS + (1.5% for every 1000ft)

 

In metres I suppose adding 5% for every 1000m would be in the right area.   Let's be honest,  unless you are flying a very long and complicated route entirely on instruments with no visibility at all then the rough estimates will get you pretty close to each waypoint; close enough to visually re-adjust to exactly hit each point if you really need to.    Let's be even more honest,  just using IAS will get you close enough to see your waypoints. Let's be pedantically honest, :-),  unless the winds are very strong not adjusting for drift at all will still get you there.

Edited by 56RAF_Roblex
Posted (edited)
45 minutes ago, 56RAF_Roblex said:

 

It would have to be TAS as the program has no idea of your altitude (& temp would make it more accurate) .   Maybe we need to ask for a extra option :-)   

 Trying TAS = IAS + (1.5% for every 1000ft)

 

In metres I suppose adding 5% for every 1000m would be in the right area.   Let's be honest,  unless you are flying a very long and complicated route entirely on instruments with no visibility at all then the rough estimates will get you pretty close to each waypoint; close enough to visually re-adjust to exactly hit each point if you really need to.    Let's be even more honest,  just using IAS will get you close enough to see your waypoints. Let's be pedantically honest, :-),  unless the winds are very strong not adjusting for drift at all will still get you there.

Good point! I forgot about TAS/IAS  and will try to add an altitude setting whenever I have the time.

Yes, you can often estimate how to navigate to your waypoint, but when winds get quite fast you actually have to compensate more than you realize (at least I do anyway :biggrin:). Especially when approaching targets when levelbombing it can also be nice to know exactly how to angle yourself for that perfect approach.

Edited by FlygFan
Posted

Changelog
Version 1.1 -
Added an altitude slider since TAS changes with altitude. TAS is calculated as follows: TAS = IAS + (1.5% for every 1000ft) . Thanks to AndyJWest and 56RAF_Roblex for pointing this out.

56RAF_Roblex
Posted
1 hour ago, FlygFan said:

Changelog
Version 1.1 -
Added an altitude slider since TAS changes with altitude. TAS is calculated as follows: TAS = IAS + (1.5% for every 1000ft) . Thanks to AndyJWest and 56RAF_Roblex for pointing this out.

 

Just to be sure,   You did remember to convert your altitude?  You have asked for altitude in Metres but say you are using Feet in the calculation.

=gRiJ=Roman-
Posted
22 minutes ago, 56RAF_Roblex said:

 

Just to be sure,   You did remember to convert your altitude?  You have asked for altitude in Metres but say you are using Feet in the calculation.

 

Now, we'll need a 1.2 version :)

curiousGamblerr
Posted

Cool!

 

Any chance you'd share the source code? I'm interested out of pure curiosity, not having done much Matlab coding, but also because I'd like to add wind calculations to il2missionplanner someday and am always interested in checking out another implementation.

 

(Long time users of il2missionplanner will note I've been saying I want to add wind calculations for like two years now... so, who knows if that ever happens lol... would still love to check out the code!)

Posted
10 hours ago, 56RAF_Roblex said:

Just to be sure,   You did remember to convert your altitude?  You have asked for altitude in Metres but say you are using Feet in the calculation.


Yes, I converted to meter from feet :).

 

8 hours ago, 19//curiousGamblerr said:

Any chance you'd share the source code? I'm interested out of pure curiosity, not having done much Matlab coding, but also because I'd like to add wind calculations to il2missionplanner someday and am always interested in checking out another implementation.


I will gladly share the source code :biggrin:. I don't really know the best way to do this though, is it fine if I just put it in a .txt file?

56RAF_Roblex
Posted (edited)

Not a big deal but if you need to update the program for any reason in the future could you consider also putting the two compass based dials the right way up?

 

It is a bit confusing having South at the top but, more importantly,  it makes it easier to avoid silly mistakes when entering the directions or reading the answer.  If they are both the right way up and you enter a Northerly course with a wind blowing from the East then it just 'looks right' when you are told the offset will be to the right.

 

Edited by 56RAF_Roblex
Answer checked against E6B and is OK
Posted (edited)
On 22/04/2018 at 10:05 AM, Bando said:

I dl-ed it and after trying to run the exe all red flags went up from windows and anti virus.

You sure this is ok?

 

If you thrust in AV's - scan in www.virustotal.com with 66 AV's.

 

 

Edited by Sokol1
  • Thanks 1
Posted
41 minutes ago, 56RAF_Roblex said:

Not a big deal but if you need to update the program for any reason in the future could you consider also putting the two compass based dials the right way up?
 


I agree that would be ideal, but due to limitations in the GUI designer I am unable to do that :unsure:.

 

42 minutes ago, 56RAF_Roblex said:

p/s   I think you are applying the 1.5% from 0ft upwards instead of 1000ft upwards.    I entered a course of 360 at a IAS of 400kph at 0ft with a 30 m/s 90 degree wind and your calc says it needs an offset of 15.11 degrees when really it should be 16.  I tried again with 406 km/h ,ie 400* (1.015), and that gives about 15.


I am assuming TAS increase with 0.0015% per feet  (or roughly 0.0049% per meter). This means that after 1000ft, TAS will have increased with 1.5%. At 0m the increase is 0%.
Not entierly sure where you get 16 degrees from - from testing in-game with similar values the calculator gives me a correct heading.

curiousGamblerr
Posted
9 hours ago, FlygFan said:

I will gladly share the source code :biggrin:. I don't really know the best way to do this though, is it fine if I just put it in a .txt file?

 

Normally I use a website like GitHub or BitBucket to host my source code, but if you aren't a coder and thus unfamiliar with source code versioning systems, a .txt file is perfectly fine :)

 

Thanks! Looking forward to checking it out.

Posted (edited)

The source code is now available as a pdf (see main post)

Along with a visual representation for the formula used, available in the spoiler:
 

Spoiler

calculations.thumb.jpg.f0d0f57b849028cb2be914d7e342018b.jpg

 

source_code.pdf

Edited by FlygFan
56RAF_Roblex
Posted (edited)
17 minutes ago, FlygFan said:

I am assuming TAS increase with 0.0015% per feet  (or roughly 0.0049% per meter). This means that after 1000ft, TAS will have increased with 1.5%. At 0m the increase is 0%.
Not entierly sure where you get 16 degrees from - from testing in-game with similar values the calculator gives me a correct heading.

 

Sorry our posts must have crossed.  I originally tested it using someones online e6-B calculator and got 16 but then rechecked it using a manual e6-B calculator and discovered you are correct and he is wrong.  I also checked it again mathematically using a triangle of velocities :-)

Edited by 56RAF_Roblex
  • Thanks 1
  • 2 weeks later...
CCG_bexhausted
Posted

Thank you very much for sharing this fantastic tool, much easier to use than a spreadsheet. :salute:


If I can afford some suggestions (they are not criticisms):

 

-compensation result: keep the sign. In the example it would be - 6.83. Because the manual calculation is : desired heading - (compensation) = 135 - (- 6.83) = 135 + 6.83 = 141.83.

It's not important it's just a detail.

 

-The button "TURN TO THE": is useless since we have the true course to follow.
I would replace this button with another result: "GROUND SPEED". Knowing this speed makes it possible to calculate the travel time to the next waypoint, which is very useful for bombers.

 

GROUND SPEED = IAS - WIND SPEED x COS (DESIRED HEADING - WIND DIRECTION).

The angle is measured in radians, speed in m/s.

 

As it stands, this tool is already very practical. 
Again thank for your work.

:salute:

  • Upvote 1
Posted (edited)
On 2018-05-03 at 9:49 AM, -LaFrench-bexhausted said:

Thank you very much for sharing this fantastic tool, much easier to use than a spreadsheet. :salute:


If I can afford some suggestions (they are not criticisms):

 

-compensation result: keep the sign. In the example it would be - 6.83. Because the manual calculation is : desired heading - (compensation) = 135 - (- 6.83) = 135 + 6.83 = 141.83.

It's not important it's just a detail.

 

-The button "TURN TO THE": is useless since we have the true course to follow.
I would replace this button with another result: "GROUND SPEED". Knowing this speed makes it possible to calculate the travel time to the next waypoint, which is very useful for bombers.

 

GROUND SPEED = IAS - WIND SPEED x COS (DESIRED HEADING - WIND DIRECTION).

The angle is measured in radians, speed in m/s.

 

As it stands, this tool is already very practical. 
Again thank for your work.

:salute:


Thank you for the feedback :)
I will make sure to add your suggestions (keeping the sign + replacing "turn to the" with ground speed). Would it be preferable with ground speed in m/s or km/h? Personally I'd prefer m/s.
Also, I believe when calculating the ground speed you use TAS and not IAS.

I could also add so that it calculates travel time to the next waypoint, however this could be redundant and make the GUI cluttered. Thoughts?

Edited by FlygFan
[DBS]El_Marta
Posted (edited)

I would opt for km/h or km/min since you need it for planning your estimated time of arrival.

Edited by [DBS]El_Marta
  • Upvote 1
CCG_bexhausted
Posted

TAS of course ! :blush:

 

As [DBS]El_Marta i would prefer km/h. 

It is easy to calculate the time to target knowing the distance between two points (this thanks to Il2 Mission Planner by 19//curiousGamblerr).


If my ground speed is 300 km / h then I fly 60/300 = 1/5 = 1 mn / 5 km (I'm lucky no digits after the comma).
It is an approximation, but it is enough. Why not add two buttons, one in m/s and another in km / h?

So  i totally agree with you we don't  need a travel time  button

 

9 hours ago, FlygFan said:

this could be redundant and make the GUI cluttered.

:) yes 

  • Upvote 1
Posted
On 2018-05-03 at 9:49 AM, -LaFrench-bexhausted said:

-compensation result: keep the sign. In the example it would be - 6.83. Because the manual calculation is : desired heading - (compensation) = 135 - (- 6.83) = 135 + 6.83 = 141.83.

It's not important it's just a detail.

 

-The button "TURN TO THE": is useless since we have the true course to follow.
I would replace this button with another result: "GROUND SPEED". Knowing this speed makes it possible to calculate the travel time to the next waypoint, which is very useful for bombers.


These features have now been added :)
Thanks again for the suggestions! :salute:

  • Upvote 1
CCG_bexhausted
Posted

Stunning!
Now it's really a perfect tool.
Thank you very much!:good::good::good:

  • 2 weeks later...
Posted

so this is just for nav right? I wish it were for bombing. I still have trouble calculating for wind direction.

Posted (edited)
On 5/20/2018 at 4:10 AM, FFS_Comet said:

so this is just for nav right? I wish it were for bombing. I still have trouble calculating for wind direction.


Yes, this is only for navigation currently. I could possibly add a textbox where it displays the wind direction you should put in your bombsight if you'd like :)

Edit: it would look something like this:

Spoiler

wc_wd.png.01abc4d65fac6e496c53f364a00cc287.png


Edit 2: small mistake - I accidentally used the "New Heading" instead of "Desired Heading" when calculating the Wind Direction. The correct wind direction should indeed be 107 for the scenario in the pic, I'll make sure to fix this before adding it to the program

Edited by FlygFan
Posted (edited)

How look the same angle in "BeePee Bombsight Calc":

 

Wind_angle.jpg

https://s7.postimg.cc/p1a9ye83v/Wind_angle.jpg

 

Or in DR-3 disk:

 

DR-3.jpg

 

Looks that adjust in bombsight is 6.8 + 100.2  = 107 - is need know if set in right or left side.

 

Maybe you should round numbers, because in game wing angle bombsight adjust is done in integers.

 

Edited by Sokol1
  • Thanks 1
Posted (edited)
1 hour ago, Sokol1 said:

How look the same angle in "BeePee Bombsight Calc":

 

Looks that adjust in bombsight is 6.8 + 100.2  = 107 - is need know if set in right or left side.

 

Maybe you should round numbers, because in game wing angle bombsight adjust is done in integers.

 

Thanks for pointing this out, I accidentally used the "New Heading" instead of "Desired Heading". The correct wind direction should indeed be 107, I'll make sure to fix this before adding it to the program :)

Edit: It seems to be correct now:
wc_wd.png.17d3b7b2dc0c5b01e25ce4572233f7cd.png

Edited by FlygFan
  • Upvote 1
Posted
On 2018-05-20 at 4:10 AM, FFS_Comet said:

so this is just for nav right? I wish it were for bombing. I still have trouble calculating for wind direction.


I have now updated the program so that it displays the wind angle, which you input in the bombsight :)
Thank you for the feedback! :salute:

  • Like 1
  • Upvote 1
Posted

Hi FlygFan,

 

nice tool. is this only 64bit?

Posted
23 hours ago, StG2_Raven said:

nice tool. is this only 64bit?


Yes, this is 64-bit only. 32-bit applications is not supported in MATLAB.
 

  • Thanks 1
  • 2 weeks later...
CCG_bexhausted
Posted (edited)

I wonder wether we could have three new buttons as converters ? Something like that for US planes ?

 

743oPXx.jpg

 

The miles per minute button is not really usefull i think ?

Perhaps it would need a third display ?

 

Thanks for your work. Much appreciate.

Edited by -LaFrench-bexhausted
  • Like 1
Posted
On 6/6/2018 at 9:46 AM, -LaFrench-bexhausted said:

I wonder wether we could have three new buttons as converters ? Something like that for US planes ?


Definitely a good idea, I will look into it whenever i have the time.

Posted

@-LaFrench-bexhausted I made it so that you can change between imperial and metric units in Display settings, thank you for the suggestion :salute:
Feel free to tell me if you find any bugs :)

  • Thanks 2
=gRiJ=Roman-
Posted (edited)

Speechless! You deserve three wishes from the magic lamp!!! :clapping:

Edited by PA_Spartan-
  • Haha 1
CCG_bexhausted
Posted

Thank you so much !

I 'll test it this WE.?

  • Like 1
  • 1 year later...
Posted

hello

i just installed the tool but how do you make it appear in game when in bomber view mode  ?

  • FlygFan changed the title to Wind Compensation Calculator [v 1.5]

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...