Advanced Flight Model Set Gear State?? - Page 3 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-26-2012, 10:03 PM   #21
BR=55=Sevas
Senior Member
 
BR=55=Sevas's Avatar
 
Join Date: Apr 2008
Location: Севастополь
Posts: 1,681
Default

Smiley, may be I wrong, but probably you need to use ed_fm_set_draw_args function?
In default template there is working 28 and 29 arguments for forsage animation connected to throttle position. You need look for gear arg number and connect it to gear lever.
I cant test it cause my model is not animated yet.

Last edited by BR=55=Sevas; 10-26-2012 at 10:10 PM.
BR=55=Sevas is offline   Reply With Quote
Old 10-26-2012, 10:06 PM   #22
CptSmiley
3rd Party Developer
 
CptSmiley's Avatar
 
Join Date: Apr 2009
Posts: 1,046
Default

Hey Sevas, yep I have that portion working, but that is purely cosmetic...

I can lower raise the gear "cosmetically" all day long. But the sim itself does not know to use the gear as the physical impact point with the ground so the gear essentially sinks into the ground and uses the body as the impact point. In my next video I'll try to describe it
__________________
"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”
― Carl Sagan
CptSmiley is offline   Reply With Quote
Old 10-26-2012, 11:15 PM   #23
Blaze
Veteran
 
Join Date: Mar 2009
Location: Orlando, FL
Posts: 3,199
Default

We had the same issues as well with our FM, visually we can extend and retract the gear with no problem, but there is no interaction with the ground collision-wise or handling-wise. Not sure if it's implemented yet.
__________________
i7 7700K - 16GB RAM - GTX 1080 8GB - Oculus Rift CV1 w/ Touch - HOTAS Warthog - Win 10

"Just when you think you’ve idiot-proofed something,
they come out with a newer, more inept level of idiot."
Blaze is offline   Reply With Quote
Old 10-27-2012, 12:59 AM   #24
CptSmiley
3rd Party Developer
 
CptSmiley's Avatar
 
Join Date: Apr 2009
Posts: 1,046
Default

Quote:
Originally Posted by Blaze View Post
We had the same issues as well with our FM, visually we can extend and retract the gear with no problem, but there is no interaction with the ground collision-wise or handling-wise. Not sure if it's implemented yet.
Thanks Blaze, I don't feel so alone now, I'll keep working on the FCS model and hopefully something will come to light in the mean time
__________________
"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”
― Carl Sagan
CptSmiley is offline   Reply With Quote
Old 10-27-2012, 07:43 AM   #25
Simas
Junior Member
 
Join Date: Aug 2012
Location: Lithuania
Posts: 64
Default

Quote:
Originally Posted by Tango View Post
You realize that constitutes reverse engineering of a copyrighted product??
DLL exports are public stuff. Always was. You don't need hex editor to see exported functions, you can do this with a Notepad. I fail to see how this is different from looking at a LUA file.

The problem is that neither P-51 or A10C or any other ED product is using wHumanCustomPhysicsAPI.h interface (they have their own base EagleFM API). This is a new thing they rolled for third-parties and it is far from being complete (I imagine we will get expanded API in later DCS World updates).

Last edited by Simas; 10-27-2012 at 07:50 AM.
Simas is offline   Reply With Quote
Old 10-27-2012, 05:24 PM   #26
Blaze
Veteran
 
Join Date: Mar 2009
Location: Orlando, FL
Posts: 3,199
Default

Quote:
Originally Posted by simast View Post
The problem is that neither P-51 or A10C or any other ED product is using wHumanCustomPhysicsAPI.h interface (they have their own base EagleFM API). This is a new thing they rolled for third-parties and it is far from being complete (I imagine we will get expanded API in later DCS World updates).
That is, so far, the plan.
__________________
i7 7700K - 16GB RAM - GTX 1080 8GB - Oculus Rift CV1 w/ Touch - HOTAS Warthog - Win 10

"Just when you think you’ve idiot-proofed something,
they come out with a newer, more inept level of idiot."
Blaze is offline   Reply With Quote
Old 10-27-2012, 05:58 PM   #27
CptSmiley
3rd Party Developer
 
CptSmiley's Avatar
 
Join Date: Apr 2009
Posts: 1,046
Default

Yep, for now I'll concentrate on the flight model and hope they add the ability to alter such things as the gear state from the AFM or else nobody can really utilize the AFM
__________________
"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”
― Carl Sagan
CptSmiley is offline   Reply With Quote
Old 11-09-2012, 02:40 AM   #28
CptSmiley
3rd Party Developer
 
CptSmiley's Avatar
 
Join Date: Apr 2009
Posts: 1,046
Default

Hey all I know I'm being a pain but here goes...

I've both found out how to "draw" the gear but not actually change the gear state...I've been able to set the draw args both through C++ via the external flight model, I've also been able to manipulate the gear position via LUA through a cockpit system...

I've also found this function in Export.lua:

Code:
LoGetMechInfo() -- mechanization info
result_is =
{
	gear          = {status,value,main = {left = {rod},right = {rod},nose =  {rod}}}
	flaps		  = {status,value}  
	speedbrakes   = {status,value}
	refuelingboom = {status,value}
	airintake     = {status,value}
	noseflap      = {status,value}
	parachute     = {status,value}
	wheelbrakes   = {status,value}
	hook          = {status,value}
	wing          = {status,value}
	canopy        = {status,value}
	controlsurfaces = {elevator = {left,right},eleron = {left,right},rudder = {left,right}} -- relative vlues (-1,1) (min /max) (sorry:(
}
Is there a way in the LUA code as a cockpit system I can manipulate the gear state like the function above, except I'm wanting something like "LoSetMechInfo" not "Get".

To be clear I am looking for how to set the gear STATE not just draw the gear being extended through the 3D model, here is a video example of drawing the gear out but the sim still thinks it is in a "gear up" STATE...I'm super desperate for any help it is just bugging me to no end.

To also prevent people thinking I'm being dumb, when I start off a mission on the runway, my aircraft is correctly at the right heigh according to the gear locations set in the aircraft config LUA but it drops a meter or so on its belly...so it isn't that my gear positions in the LUA are incorrect.

I really hope someone can help me....thanks again Tango for the help you've provided so far.

__________________
"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”
― Carl Sagan
CptSmiley is offline   Reply With Quote
Old 11-09-2012, 04:07 AM   #29
aaron886
Veteran
 
Join Date: Oct 2007
Posts: 3,590
Default

LoGetMechInfo is deprecated. You now have get_base_data() to fulfill that purpose in lua, which can do many of those things. (example, getRightMainLandingGearDown. See the bottom of the test aircraft's mainpanel_init.lua.)

I have not delved into EFMs yet, but I'm pretty sure the game changes when you move away from SFMs. (And even this method does not work in SFM, as of 1.2.2.) However, presently I set gear position up or down using the many arguments as seen at the bottom of Export.lua, combined with dispatch_action(). (Example: dispatch_action(nil,147))

Again, this won't solve your problem. Something is different in 1.2.2, and I'm hoping it's the result of a solution not yet revealed!
aaron886 is offline   Reply With Quote
Old 11-09-2012, 04:14 AM   #30
CptSmiley
3rd Party Developer
 
CptSmiley's Avatar
 
Join Date: Apr 2009
Posts: 1,046
Default

Hey aaron, well I know for certain I can run aircraft systems and call lua functions within those aircraft systems even with an EFM running...so could I call a dispatch_action within there to get my gear state change accomplished? Thanks for your help and insight...I'm willing to give anything a shot that I've found and your suggestion is one I haven't yet heard

I just tried it really quick with no success did a dispatch_action 431 (gear down) in my aircraft system in the same place I was drawing the gear down and still no go...
__________________
"Witness mere F-14s taking off from adjacent flight decks, gracefully canting left and right, afterburners flaming, and there’s something that sweeps you away—or at least it does me. And no amount of knowledge of the potential abuses of carrier task forces can affect the depth of that feeling. It simply speaks to another part of me. It doesn’t want recriminations or politics. It just wants to fly.”
― Carl Sagan

Last edited by CptSmiley; 11-09-2012 at 04:26 AM.
CptSmiley is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:34 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.