Jump to content

ed_fm_change_mass() freezing sim?


CptSmiley
 Share

Recommended Posts

Hey guys,

 

So I'm try to dynamically alter the mass and inertia of the aircraft using the ed_fm_change_mass() function, however it locks up the sim when I utilize this function (return true to say I changed the mass and/or inertia). If I return false it works fine but obviously doesn't change my mass/inertia.

 

It even crashes still when I set all the delta's to 0 but still return true. Any ideas?

"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

Link to comment
Share on other sites

You got me wondering how you got the AFM API. It's in the dev build of the sim, but not in any public release AFAIK.

 

You are going to find it extremely hard to get support for this until you are a 3rd Party Developer. None of us can say anything as we are under NDA.

 

Best regards,

Tango.

Link to comment
Share on other sites

You got me wondering how you got the AFM API. It's in the dev build of the sim, but not in any public release AFAIK.

 

You are going to find it extremely hard to get support for this until you are a 3rd Party Developer. None of us can say anything as we are under NDA.

 

Best regards,

Tango.

 

ummm, you do know that it is in the 1.2.1 version as I clearly don't have a 3rd party dev version? Everyone and anyone has access to it...

 

Why have a How To forum if no one can help? So much for asking questions around here

"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

Link to comment
Share on other sites

I know I have the API in one of the Eagle Dynamics/DCS World/ folders...

Maybe the version left in 1.2.1's folder is older or incomplete compared to the version the 3rd party devs have?

 

But yeah,

This trend of asking a question,

Followed by crickets,

Then losing a night's sleep experimenting and figuring it out for ourselves

 

is getting a bit ....Tiring? I Guess.... But maybe it's for our own benefit.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, R7970 Lightning @ 1.2 / 6 GHz Memory

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Keep asking questions. The problem right now, people in the know may not be able to anserwer you. If you can get your 3rd party, as Tango said, you may or may not get some anserwers.

Am I vauge enough?


Edited by Krebs20

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I know I have the API in one of the Eagle Dynamics/DCS World/ folders...

Maybe the version left in 1.2.1's folder is older or incomplete compared to the version the 3rd party devs have?

 

But yeah,

This trend of asking a question,

Followed by crickets,

Then losing a night's sleep experimenting and figuring it out for ourselves

 

is getting a bit ....Tiring? I Guess.... But maybe it's for our own benefit.

 

Man am I glad I'm not the only feeling that way

  • Like 1

"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

Link to comment
Share on other sites

if a frogfoot crashes in the middle of abandoned North East Georgia... does it make a Sound?..

 

 

That seems to be the common response "if/when you get 3rd party developer status"

  • Like 1

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, R7970 Lightning @ 1.2 / 6 GHz Memory

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Sorry guys but we are under NDA. I'm guessing you don't honor those?

 

SE did the work on this, and I put the skeleton code together. This is what I know about the AFM, but can't say:

 

 

I think I made my point clear enough?

 

I know I have the API in one of the Eagle Dynamics/DCS World/ folders...

Maybe the version left in 1.2.1's folder is older or incomplete compared to the version the 3rd party devs have?

No idea. I didn't even know it was left in the public release.

 

But yeah,

This trend of asking a question,

Followed by crickets,

Then losing a night's sleep experimenting and figuring it out for ourselves

 

is getting a bit ....Tiring? I Guess.... But maybe it's for our own benefit.

We were the first 3rd Party with a working AFM. Who helped us? ;) But I get your point. Remember, we are competitors as well as developers, so there are things we know that can't be shared for other reasons, talk of NDAs aside.

 

Best regards,

Tango.


Edited by Tango
Link to comment
Share on other sites

Sorry guys but we are under NDA. I'm guessing you don't honor those?

 

Best regards,

Tango.

 

We do, we are in the process of obtaining 3rd Party Dev License... Emails exhanged, package being prepared for ED etc.

 

Hopefully ED see's us worthy, and we are able to continue working on items with better help/assistance.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, R7970 Lightning @ 1.2 / 6 GHz Memory

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

Sorry guys but we are under NDA. I'm guessing you don't honor those?

 

SE did the work on this, and I put the skeleton code together. This is what I know about the AFM, but can't say:

 

 

I think I made my point clear enough?

 

Best regards,

Tango.

 

I am currently under no NDA so have no clue what I can/can't ask. The AFM API, as it is in 1.2.1 is available to everyone and I am asking questions about the features within that code, which I believe would fall under the umbrella of "modding".

 

Unless you tell me what I can and can't ask, I'll continue to try to find out how to do things.

 

It has nothing to do with "not honoring an NDA" but why have a HowTo forum when nothing can be talked about, should just make it private. That or tell me what I can or can't ask. Thanks!


Edited by CptSmiley

"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

Link to comment
Share on other sites

I think he meant we shouldnt be discussing this or trying to get answers on the open forums and that if we sign a NDA and get a license and access to the 3rd party stuff they'll help us there?

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, R7970 Lightning @ 1.2 / 6 GHz Memory

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

We do, we are in the process of obtaining 3rd Party Dev License... Emails exhanged, package being prepared for ED etc.

 

Hopefully ED see's us worthy, and we are able to continue working on items with better help/assistance.

I hope you are successful! :thumbup:

 

Best regards,

Tango.

Link to comment
Share on other sites

I am currently under no NDA so have no clue what I can/can't ask. The AFM API, as it is in 1.2.1 is available to everyone and I am asking questions about the features within that code, which I believe would fall under the umbrella of "modding".

 

Unless you tell me what I can and can't ask, I'll continue to try to find out how to do things.

 

It has nothing to do with "not honoring an NDA" but why have a HowTo forum when nothing can be talked about, should just make it private. That or tell me what I can or can't ask. Thanks!

The problem is not what you can ask, but what we can say (which isn't much).

 

You are the only team outside of the 3rd Party Devs who are trying to build an AFM, AFAIK. I'm not even sure the AFM SDK should be publicly available.

 

I'm in an interesting situation in that I work with TWO dev companies, so I have to be even more careful than I already had to be. I work with both the Virtual Patriots and VEAO Ltd. As I'm sure you can appreciate, that means I'm privvy to a lot more than if I just worked with one team.

 

Best regards,

Tango.


Edited by Tango
Link to comment
Share on other sites

The problem is not what you can ask, but what we can say (which isn't much).

 

You are the only team outside of the 3rd Party Devs who are trying to build an AFM, AFAIK. I'm not even sure the AFM SDK should be publicly available.

 

I'm in an interesting situation in that I work with TWO dev companies, so I have to be even more careful than I already had to be.

 

Best regards,

Tango.

 

Understood, how would one even get approved to be a 3rd party dev if they haven't first proven coding competency to write an AFM in the first place? That was my reasoning behind why they might have made some form of the AFM API available publicly.

"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

Link to comment
Share on other sites

Cant Get a License without a Working Proof Of Concept,

But we cant get a 100% Working Proof of Concept with out answers...

 

 

Maybe we're setting Proof of Concept Bar a bit high or over understanding it's definition,

 

As we want it to be a pretty much Fully functional Module that needs just to be tweaked w/ assistance.

 

and we wanted a 100% working AFM to submit as PoC for AFM Coding.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill,

X470 Taichi Ultimate, R7970 Lightning @ 1.2 / 6 GHz Memory

3x ASUS VS248HP + Oculus HMD, Thrustmaster Warthog HOTAS + MFDs

Link to comment
Share on other sites

As an aside to the weights/moments of inertia thing. Since weight force and moment of inertia are done automatically by DCS, and the fact that there are no inertia variables in the lua config. How does DCS determine the moment of inertia of the aircraft? Does it take the lua provided weight, the length, height, span, etc.. and calculate the inertias by distributing mass evenly?

 

I'm just curious if it is estimating the moments of inertia for my F-16 correctly or closely. Thanks guys

"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

Link to comment
Share on other sites

Without bothering to read the whole thread, I can tell you third party status doesn't get you the answers to your questions. I have had the same three questions about the EFM (one of them involves fm mass) for three months now. I believe ED devs are much too busy with FC3 and such at the moment.

 

Tango may be under NDA for his involvement with VEAO projects, but I am not, as we do not have a formal contract with our L-39. Considering the fact that ED released the flight model API with the latest public release, I can't see why there should be any secrets about it. This section of the forum already has members with way more API understanding than was conveyed to third parties at its release.


Edited by SilentEagle
Link to comment
Share on other sites

I'm neither dev nor informatician but I consider it's amazing how the community CAN interact to develop and share the knowledge about the 'under the hood' of the sim. It's kind of 'positive emulsion' here around.

OK, there is NDA things that is a serious thing but anyway, some member are f*** talented and CAN actually make this sim better. I find it amazing.

DCS Wish: Turbulences affecting surrounding aircraft...

[sIGPIC] [/sIGPIC]

Gigabyte GA-Z170-HD3P - Intel Core i5 6600K - 16Gb RAM DDR4-2133 - Gigabyte GeForce GTX 1080 G1 Gaming - 8 Go - 2 x SSD Crucial MX300 - 750 Go RAID0 - Screens: HP OMEN 32'' 2560x1440 + Oculus Rift CV1 - Win 10 - 64bits - TM WARTHOG #889 - Saitek Pro Rudder.

Link to comment
Share on other sites

I'm neither dev nor informatician but I consider it's amazing how the community CAN interact to develop and share the knowledge about the 'under the hood' of the sim. It's kind of 'positive emulsion' here around.

OK, there is NDA things that is a serious thing but anyway, some member are f*** talented and CAN actually make this sim better. I find it amazing.

:thumbup:

I know a sh*** about these things, though I like to read trough it. So much talented people around here, amaze me every time.

Deutsche DCS-Flughandbücher

SYSSpecs: i7-4790K @4GHz|GA-Z97X-SLI|16GB RAM|ASUS GTX1070|Win10 64bit|TrackIR5|TM Warthog/Saitek Pro Pedals

Link to comment
Share on other sites

  • ED Team
Hey guys,

 

So I'm try to dynamically alter the mass and inertia of the aircraft using the ed_fm_change_mass() function, however it locks up the sim when I utilize this function (return true to say I changed the mass and/or inertia). If I return false it works fine but obviously doesn't change my mass/inertia.

 

It even crashes still when I set all the delta's to 0 but still return true. Any ideas?

 

if nothing change you need return false.

 

once again according to template

 

/*
Mass handling 

will be called  after ed_fm_simulate :
you should collect mass changes in ed_fm_simulate 

double delta_mass = 0;
double x = 0;
double y = 0; 
double z = 0;
double piece_of_mass_MOI_x = 0;
double piece_of_mass_MOI_y = 0; 
double piece_of_mass_MOI_z = 0;

//
while (ed_fm_change_mass(delta_mass,x,y,z,piece_of_mass_MOI_x,piece_of_mass_MOI_y,piece_of_mass_MOI_z))
{
//internal DCS calculations for changing mass, center of gravity,  and moments of inertia
}
*/

 

keyword for this is "WHILE" while you return true it will try to change mass

why i use loop for it : mass changing can be in various places of aircraft and various reasons : for example geeting fuel pump move fuel from one tank to another . it is two actions : remove mass from one tank , add to another

typical using of ed_fm_change_mass should be :

 

in ed_fm_simulate you collect mass changes to stack like structure :

 

 

 

std::list<mass_changes> *changes_;
..
changes_.push_back(change_one);
changes_.push_back(change_another);

 

 

bool ed_fm_change_mass *(double & delta_mass,
					double & delta_mass_pos_x,
					double & delta_mass_pos_y,
					double & delta_mass_pos_z,
					double & delta_mass_moment_of_inertia_x,
					double & delta_mass_moment_of_inertia_y,
					double & delta_mass_moment_of_inertia_z
					)
{
if (changes_.empty())
return false;


mass_changes  mass = changes_.front();
       changes_.pop_front();// remove 

        delta_mass 		= mass.mass;
delta_mass_pos_x	= mass.pos_x;
delta_mass_pos_y	= mass.pos_y;
delta_mass_pos_z	= mass.pos_z;
delta_mass_moment_of_inertia_x	= mass.moi_x;
delta_mass_moment_of_inertia_y	= mass.moi_y;
delta_mass_moment_of_inertia_z	= mass.moi_z; 
      return true;
}


Edited by Alex O'kean
  • Like 2
sigpic2354_5.gif
Link to comment
Share on other sites

Thanks Alex, my basic process before was...

 

if(inertia.x != f16inertiadata.x)

{

delta_mass_moment_of_inertia_x = f16inertiadata.x - inertia.x;

return true;

}

else

{

return false;

}

 

where inertia.x is the one pulled from the get_mass state function and f16inertiadata.x is what I want it to be...

 

that, I hoped, would force the inertias to match the data values I want instead of the internally calculated inertias, however that is done.

 

Is there a way I completely overwrite the mass/inertias without sending it deltas? I'll try to format like your method above and see if I have any success.

 

Thanks again Alex!

 

EDIT: Oh and any tips on the gear state issue? Figured it woudln't hurt to ask!


Edited by CptSmiley

"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

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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