![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
|
08-27-11, 05:05 AM
|
#1 | |
|
Hellas
![]() |
Quote:
i told you at my previous message what angles are involving for calculating the impact angle.(read it again more...carefull). at your figure ...you have drawn wrong the impact angle (it is not the 'x'and forget the Aob) .look at pic : ![]() now, generally speaking the formula for getting the impact angle is : (ImpactAngle) = (AoB at bearing 0) + (Gyroangle) OR (ImpactAngle) = (AoB at bearing 0) - (Gyroangle) depending if you shoot right or left of your bearing 0 and depending if you are on a port or on a starboard attack. the rule is this : when your gyroangle = 0 then the (ImpactAngle) is equal to (AoB at bearing 0).NOW, if you shoot with gyro NOT 0 degrees the needle of Impact angle dial will 'follow' the GYROANGLE dial and either will add or abstract the gyro angle .look at the following pics to understand how the impact angle dial works. ps: your idea by using one of the existing types for dial and use it for the needle of impact angle will go nowhere . the only thing that you will manage is to make the needle just moving around but it will never show the impact angle .you need the code ,without the code it will be very complicated to show the impact angle (and this will not be directly shown). LGN1 has managed to 'appear' the impact angle(without the code) but it is so complicated that only advanced player will be able to 'read'. port attack : ![]() ![]() ![]() starboard attack : ![]() ![]() ![]() ===============
__________________
Knowledge is the only thing that nobody can ever take from you... ![]() Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods Last edited by makman94; 08-27-11 at 05:15 AM. |
|
|
|
08-27-11, 11:38 AM
|
#2 | |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
Quote:
Hmmm, Ok need to study this to figure out how it works correctly. Thanks for the more indepth explanation on how it works - afraid I don't play much spend more time modding than playing .The reason for my diagram is due to I wish to figure out a calculation that calculates the ImpactAngle from your Scope bearing rather than just at 0 degrees. So what I need to know is how does the AOB change when moving from 0 to say 90deg in relation to AOB along the same target course line. Using your examples above I will figure out the calculation for 0 degrees, than rotate to 45 degrees, 90 degrees a35 degrees etc and see what the change is to update the formula. (Away for the weekend but have my laptop with me so may get some time to work on it.) As for code, don't worry about that my example video is showing the Sims Dial being controlled by my code overwirting what ever the game wants to do with it. So I have code in my app thats retriving the Gyroange and just subtracting it from 360 to mirror the gyro (But its my code thats moving the hijacked dial). So it will do what I want it to do ![]() ![]() ![]() so once I program the formula above it will show the angle.![]() EDIT: Ok studied those diagrams and explanations and its finally clicked Last edited by reaper7; 08-27-11 at 01:02 PM. |
|
|
|
08-27-11, 03:48 PM
|
#3 |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
Using your example pics above I worked out the following:
AOB Gyro Bearing Impact Angle -120 0 0 -120 -100 30 20 -90 -140 -30 -20 -150 120 0 0 120 140 20 20 140 105 -20 -15 100 So Using the above figures I was able to work out the Required formula to calculate the Impact Angle: (AOB + (Gyro - Bearing)) = Impact Angle Popping in the above shows they work out (-120)+(0-(0))=-120 (-100)+(30-(20))=-90 (-140)+(-30-(-20))=-150 (120)+(0-(0))=120 140+(20-(20))=140 105+(-20-(-15))=100 Now to write the code and test
|
|
|
08-27-11, 04:40 PM
|
#4 |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
It Works ![]() The Impact Angle is working properly using the above formula and my code. I'm going to pack this up for Makman94 to test and confirm that it works correctly. And to make sure that by hijacking this dial-type that its not having any other unforeseen consequences on the sim. If it works this will be Incorporated into our TDC in the U-Boot_HAHD project. @Makman, File sent to your yahoo account. Last edited by reaper7; 08-27-11 at 05:27 PM. |
|
|
08-27-11, 07:34 PM
|
#5 |
|
Grey Wolf
![]() Join Date: Apr 2011
Posts: 756
Downloads: 238
Uploads: 0
|
Great stuff Reaper and you said you are not good at math.....
![]() ![]() |
|
|
08-28-11, 04:30 AM
|
#6 |
|
Hellas
![]() |
FANTASTIC work Reaper7 !!!!
![]() yes ,the formula you found (many many congrats !! ) seems that covers all situations and works correct [just a note : the values for the above examples are : -120 0 0 -120 -99 30 21 -90 -141 -30 -21 -150 120 0 0 120 134 20 14 140 106 -20 -14 100 ] the impact angle dial is working absolutely correct BUT there are side effects to other areas which are not allowing to use it ingame yet ! i am almost sure that ,thanks to Reaper, we are very close to overcome these side effects and have ,at last, an ORIGINAL Impact Angle dial for SH3! just hope to solve the issues ! Congratulations Reaper !
__________________
Knowledge is the only thing that nobody can ever take from you... ![]() Mediafire page:http://www.mediafire.com/folder/da50.../Makman94_Mods |
|
|
08-28-11, 05:51 AM
|
#7 | |
|
sim2reality
![]() Join Date: Jun 2007
Location: AM 82
Posts: 2,288
Downloads: 262
Uploads: 31
|
Quote:
I have a habbit of rounding thing up or down - thats my bad maths head ![]() But as stated the formula works - so we are very close to a fully functional dial. My next step using the Dial types you supplied me is to find one that will have no impact on the game (Current one effect other parts of the sim). Then I can get rid of the Static Impact Angle in our TDC with a working Impact Angle. Bur I'm sure we'll find one. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
