Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 2 of 3 1 2 3
#4420733 - 05/14/18 04:01 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
Spent some time digging through the dynamics code, overall it doesn't look too bad. All the needed bits are in there. The implementation of the tail boom drag force is odd, it isn't a calculated aerodynamic force, it's an artificial restoring force that is either on or off. That can be upgraded once I figure things out. I also noticed a couple of minor errors, the gravity force is applied at the rotor hub, not at the center of mass like it should be. The weight of the helicopter tends to pull the helo back to vertical over time, proportional to the angle. They've added in two artificial restoring forces that serve a similar function, but the artificial forces are not proportional to the moment arm like a weight force would be. I need to look at the math more closely to see how hard it would be to fix this. The aerodynamic drag force has the same problem, it acts at the rotor hub, not the center of the helo body like it should.

I turned on the diagnostic plot of the forces on the helos in the ini file and watched the system react while flying. I noticed that the aerodynamic forces are not implemented correctly on all of the helo types, some of the user-created models need some adjustments to the dynamics. Some of the physical constants need to be updated and some of the forces need to be turned on or off so they are not based on an incorrect dynamics model. Then the different types of helicopters will have a different feel when you fly them and behave correctly.

I didn't see any evidence that the rear horizontal stabilizer is modeled, but that isn't a very significant issue. The main rotor down wash flow is so complex on a helo it's hard to really say what the stabilizer will do under all flight conditions. The Comanche is different, with the stabilizer way up high out of the down wash, it could be modeled pretty easily on the Comanche. When it's located in the middle of the tail boom it's a difficult call. Mainly it's there to help level the helo out when it's moving forwards at a high speed. Leaving it out really isn't a big issue. Some helos have a horizontal stabilizer and some don't, so even the design engineers can't decide which is better.

I have Watcom working, that wasn't difficult at all.

#4420747 - 05/14/18 04:34 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
it's good to hear that everything is working smile
A long time ago thealx mentioned that he plans to work the engine depending on temperature or altitude.

#4420785 - 05/14/18 07:33 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
I did see a block of code which calculates the air density based on altitude for the aerodynamics, but I'm guessing it isn't applied to the turbine engines. I haven't seen anything yet that uses temperature.

#4420808 - 05/14/18 09:41 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
Yeah, that's my function. there was some linear calculations that allow to fly over 30 000 feet, so it was easiest way to limit ceiling by linking lift power to density. Not very accurate maybe, but good enough at the moment.
I had plans to implement temperature and wind calculations in 3D but never started. Currently only wind is generating in two dimensions, which affect particles, helicopters (controlled by players) and some projectiles.

#4420846 - 05/15/18 03:44 AM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
Ah, so it is linked to the engines already. Nice.

I see in the normal dynamics code where gravity is subtracted out in bas_dyn.c then again in co_dyn.c which can't be right. Is there a description anywhere of the program flow? Which module is the traffic cop that directs how the program executes and which dynamics model gets used? I see three dynamics models, a simple vector based one, a common dynamics model, then an advanced dynamics model for each helicopter type.

Maybe I should stop digging and get to work on fixing the Hover/Altitude Hold instead. Grin.

#4420860 - 05/15/18 07:48 AM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Dec 2010
Posts: 1,883
messyhead Offline
Member
messyhead  Offline
Member

Joined: Dec 2010
Posts: 1,883
I remember reading a while ago about open source flight simulator physics engines. Do you think it would be possible, and worth the effort, of implementing one of those? Or do you think the fixes you can make would be good enough?

#4420905 - 05/15/18 02:33 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
An open source flight physics engine? It might be useful to look at it, you can always learn something new from other people's work. The open source engine would have to include a large number of helicopter specific features to match what's in EECH already. It would be quite a chore to replace the existing engine in EECH, though. From what I've dug into so far, I think we can make a few minor changes here and there and have a pretty robust physics sim. It's mostly there already. It might be more interesting to add in a module to handle fixed wing VTOL aircraft like the Harrier...

#4420908 - 05/15/18 03:21 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
New flight physics for airplanes?
it will be unnoticeable for the player who is doing missions imo wink

#4420928 - 05/15/18 05:15 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
Right you are, not of interest to most players. Graphics improvements seem to be the most desired features. I'd like to see the terrain rendering/texturing go up a notch or two.

#4420937 - 05/15/18 06:21 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
it's true.for the past two years EECH has been using dx9, but there is not any graphical effect that offers dx9.

#4421123 - 05/16/18 11:02 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
OK, I went through all of the Advanced Dynamics settings files, pulled the numbers into a spreadsheet, and gathered up all the real numbers I could find for comparison to actual values. A lot of the dynamics values for a large number of the helos are the default numbers from the Apache which is why things don't feel quite right. A large heavy chopper shouldn't maneuver just like a nimble Apache. Some efforts were made by you guys to adjust some of these values, but I think we can improve that by quite a bit. The number of rotor blades has never been used, the distance to the tail rotor has never been updated, the default maximum main rotor rpm may be incorrectly set, things like that can be updated. I still need to dig into the dynamics equations to make sure i understand how all of the numbers are being used, and check the units for proper use. For example, all of the Power values are in horsepower, where all of the rest of the numbers are metric. I need to check and make sure the developers really meant to use hp and not kw's.

After some additional digging I've come to the conclusion that the developers really did intend on using hp for power levels, not kw's. Updating all of the numbers (especially the Inertial values) in the setup files is about as far as I can to go in correcting the physics, without the developer's raw equations it's pretty difficult to go much further than that. I'm still going to attempt to fix the location of the gravity force, though, and maybe a drag force or two.

Last edited by Javelin; 05/17/18 05:43 AM.
#4421207 - 05/17/18 03:10 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
it's not a flight model but ...out of curiosity, you can increase these parameters in eech.ini.to the values I have given. I love this inertia head.




g-force_head_movement=13.0 # amount of head movement caused by gravitational force (wideview only) (n = Gs, 1.0 = normal, 0.0 = off) (default = 1.0)
cockpit_vibrations=5.1

#4421217 - 05/17/18 04:08 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
Wow, 13 g's. That's a LOT!

#4421852 - 05/21/18 06:41 AM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
All Right! Stable-Hover-Hold is working!

I tested most of the helos and did a bit of tuning and it's working well. You hit Shft-H and it first stops the vertical motion, then pulls you back to the altitude where you hit the button. I tested it at the max climb rate, the max falling rate, and everything in between. When it locks in at an altitude it holds it there to within a meter. I suppose I could loosen up the loop and let it bob up and down a bit. What do you guys think of that?

Altitude-Hold is next.

#4421856 - 05/21/18 07:54 AM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
Well done, you are get in the scripts really quickly. Small altitude deviation sounds like a good idea, if it will not cause problems.

#4421946 - 05/21/18 04:14 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
Test bobup in another simulator.

#4421954 - 05/21/18 04:48 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
The only time you would notice the deviations would be hovering next to the ground, at altitude you won't even notice it. The chase camera bobs around a bit already, though. Right now I have it over damped, there is a slight bit of drift, but it locks in pretty tight.

Yes, I'm getting familiar with the code, the dynamics portion anyway. The developer has done some screwy things, but I'm figuring it out. The hardest part so far was tracking down the air_density problem. The developer has three physics models in the code, vector mode, a basic flight model, and flight model #2. The air_density parameter changes in each one and one of the mods missed the alterations in FM2. I had to fix that before the hovering code I wrote would work.

I haven't tried the bob-up feature yet, is it working or not? I could write one if it isn't working. All I'd have to do is input a step change into the target hovering altitude. My Hover-Hold isn't slow like the video, it moves really quickly. It would surge upwards and stop at the target altitude within a second or two, then wait for you to hit the key again to drop back down.

Last edited by Javelin; 05/21/18 05:02 PM.
#4421960 - 05/21/18 05:34 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Apr 2018
Posts: 300
Javelin Offline
Member
Javelin  Offline
Member

Joined: Apr 2018
Posts: 300
Idaho Falls, Idaho USA
OK, I re-read the manual and there is not an automated bob-up feature. Bob-up engages a display screen and lets your wingman know what you're doing. Do we want an automated bob-up function? I could set one up using a second press of the "O" key and use it to toggle up/down motion. You would use it in Hover mode.

#4421968 - 05/21/18 06:18 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Jan 2016
Posts: 486
XIII Offline
Member
XIII  Offline
Member

Joined: Jan 2016
Posts: 486
for me-yes please smile

#4421988 - 05/21/18 07:48 PM Re: EECH Hover Hold & Alt Hold Mods [Re: Javelin]  
Joined: Dec 2012
Posts: 1,382
thealx Offline
Member
thealx  Offline
Member

Joined: Dec 2012
Posts: 1,382
As we having Christmas days here, I have a request too.
As you know, autopilot is presented in the game but works pretty ugly - control of your helicopter is taken by AI and it's flying like on the rails. What will be great, and what actually I need for Hind project - waypoints following automatics, that uses same controls as a player. It will be not so accurate, but good enough to move from the base to the engagement area, and same time will act more natural. Technically, it should be not a replacement of current autopilot (which could be named "pass controls to the second pilot"), but addition to the existing hovering modes.
Maybe you will be interested as it will use same code that you are changing now.

Page 2 of 3 1 2 3

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
CD WOFF
by Britisheh. 03/28/24 08:05 PM
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0