Jump to content

Removed


CptSmiley

Recommended Posts

  • Replies 979
  • Created
  • Last Reply

Top Posters In This Topic

I believe there is roll rate limiting in the model, feel free to check out the code, there are many errors in and I am sure stuff is missing but I'm pretty certain there is the roll rate limiting portion of the FCS in there, just not sure if it is working as it should.

 

There aren't any plans for me to return to work on this, but anyone is free to improve it and publish their updates.

 

I have a question that is how can I know what kind of functions are available (e.g. call what func to get radio alt)? And how can I know which variables are DCS defined that will be used as interface parameters? Is there any ED guide to the template code?

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

Roll Rates work here, not sure if they are 100% correct as I am not a F-16 Pilot, but it is enabled and functioning.

 

AoA on the other hand...

 

It was weird that someone bumped a thread from 2008, that had screenshots of a F-16 Cockpit in an Official Update post from 2008 or so... and we had F-16 Renders at one point too...

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

Roll Rates work here, not sure if they are 100% correct as I am not a F-16 Pilot, but it is enabled and functioning.

 

AoA on the other hand...

 

It was weird that someone bumped a thread from 2008, that had screenshots of a F-16 Cockpit in an Official Update post from 2008 or so... and we had F-16 Renders at one point too...

 

I'm reading the code, and regarding the roll rate, do you add new function or the function already there?

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

Hey uboats the code is what you want it to be and you build up the forces and moments as you see fit. There is not set structure at all except for setting and retrieving environmental conditions, position data, and forces and moments. From then on you are on your own to define it however you want.

 

In short, you add your own function for whatever you want to accomplish

 

Got it.

What I thought was the template gave you a blank function, you need to fill in the code describing the perform of individual aircraft.

 

Then it's clear to start, but how I can know which variable can be finally sent to DCS engine through the interface. I mean, I can write many functions, but I need to link the interface to DCS engine. To do this, I need to know the variable names of pre-defined. For instance, fuel consumption, I can easily write a function to calculate the fuel cost per run frame based on some simple formula, but how can I send back the result to DCS engine? I know some parameters are used inside the model (I can define them personally), but some needs to be sent to DCS. Personally, I have experience of many c/c++ project like, circuit simulators (like SPICE), etc. I built up everything not doing something like plugin. So without know the interface variables, I'm kind of missing :P

 

thanks for your patience!


Edited by uboats

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

You'll absolutely have to sit down with the code that has been (generously!) provided and work through it piece by piece. There's no manual, no classes. The answers you're looking for are front and center in this project and the blank EFM template.

 

Yes, I know how it works now. Enjoying the code.

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

uboats, there isn't much more to say than what has already been said here, but here are the basics:

 

1) All interface functions with DCS begin with "ed_fm_". Some functions require returning a particular type of data, others require you to set the passed address spaces with the correct data and others are just purely passing you information.

 

2) Since this F-16 code was written, several new interface functions have been added to pass additional data. These can be found in the API folder of your DCS install.

 

3) EVERYTHING else is up to you to make it want you want it to be. You won't find any more formal support for the AFM API at this time, even as a 3rd party. If you want to understand it, you have to go through each line of code and figure it out, like a handful of others have thus far.

  • Like 1
Link to comment
Share on other sites

uboats, there isn't much more to say than what has already been said here, but here are the basics:

 

1) All interface functions with DCS begin with "ed_fm_". Some functions require returning a particular type of data, others require you to set the passed address spaces with the correct data and others are just purely passing you information.

 

2) Since this F-16 code was written, several new interface functions have been added to pass additional data. These can be found in the API folder of your DCS install.

 

3) EVERYTHING else is up to you to make it want you want it to be. You won't find any more formal support for the AFM API at this time, even as a 3rd party. If you want to understand it, you have to go through each line of code and figure it out, like a handful of others have thus far.

 

Thank you very much.

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

  • ED Team
uboats, there isn't much more to say than what has already been said here, but here are the basics:

 

1) All interface functions with DCS begin with "ed_fm_". Some functions require returning a particular type of data, others require you to set the passed address spaces with the correct data and others are just purely passing you information.

 

2) Since this F-16 code was written, several new interface functions have been added to pass additional data. These can be found in the API folder of your DCS install.

 

3) EVERYTHING else is up to you to make it want you want it to be. You won't find any more formal support for the AFM API at this time, even as a 3rd party. If you want to understand it, you have to go through each line of code and figure it out, like a handful of others have thus far.

 

I'd like to sit down and try and understand it, but I am worried my head would explode :)

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

I'd like to sit down and try and understand it, but I am worried my head would explode :)

 

Mine would overheat and melt, I can understand some things for aerodynamics, but programming controller logic, forget about it.. lol.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

All the F-16C AFM really needs is:

Working Langing Gear

AoA Limiter

(Unless I'm doing something wrong, when I fly, if I keep speed up and use gentle inputs I'm fine, but under 300 knots, and stick movement past 25% throws me into a free fall pretty much).

 

I'd like to start building Up a Full 6DoF Pit, with working hud and MFDs at least, but the cockpit code is complex and I'd have to start from the beginning, which I dont have time to do.

 

I dont even think the 3d Cockpit is linked in the Cockpit Folders, I just think we dropped the EDM in the Shapes folder and specified that specific EDM when Smiley was coding it.

 

AFAIK, the 3d Cockpit included is just a 3d Model, not 100% Modelled for 6DoF, Originally built for StrikeFighters2 by Ravenclaw,(Seat and Panels aren't 100% Modeled.)

 

It was used as a place holder internally so we didnt have to fly viewing internal meshes of the External Model.

I Have Earlier Block Pits that are more realistic to the F-16C in DCS, I Am awaiting for Confirmation from Author that it's OK to Use one of those in DCS.

 

 

Coding the Cockpit Systems however is not gonna happen anytime soon by me. I can animate Gauge Needles and stuff if someone else wanted to program them, but I wont be able to get around to jumping into cockpit code until other Projects are more completed.


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

  • ED Team
My path to understanding was not brain fault free. ;)

 

I have enough brain faults as it is, I am not sure I should introduce any new ones :)

 

Anyways, its on my todo list... I would love to have a basic understanding of it atleast.... if that is possible :)

64Sig.png
Forum RulesMy YouTube • My Discord - NineLine#0440• **How to Report a Bug**

1146563203_makefg(6).png.82dab0a01be3a361522f3fff75916ba4.png  80141746_makefg(1).png.6fa028f2fe35222644e87c786da1fabb.png  28661714_makefg(2).png.b3816386a8f83b0cceab6cb43ae2477e.png  389390805_makefg(3).png.bca83a238dd2aaf235ea3ce2873b55bc.png  216757889_makefg(4).png.35cb826069cdae5c1a164a94deaff377.png  1359338181_makefg(5).png.e6135dea01fa097e5d841ee5fb3c2dc5.png

Link to comment
Share on other sites

All the F-16C AFM really needs is:

Working Langing Gear

AoA Limiter

(Unless I'm doing something wrong, when I fly, if I keep speed up and use gentle inputs I'm fine, but under 300 knots, and stick movement past 25% throws me into a free fall pretty much).

 

I'd like to start building Up a Full 6DoF Pit, with working hud and MFDs at least, but the cockpit code is complex and I'd have to start from the beginning, which I dont have time to do.

 

I dont even think the 3d Cockpit is linked in the Cockpit Folders, I just think we dropped the EDM in the Shapes folder and specified that specific EDM when Smiley was coding it.

 

AFAIK, the 3d Cockpit included is just a 3d Model, not 100% Modelled for 6DoF, Originally built for StrikeFighters2 by Ravenclaw,(Seat and Panels aren't 100% Modeled.)

 

It was used as a place holder internally so we didnt have to fly viewing internal meshes of the External Model.

I Have Earlier Block Pits that are more realistic to the F-16C in DCS, I Am awaiting for Confirmation from Author that it's OK to Use one of those in DCS.

 

 

Coding the Cockpit Systems however is not gonna happen anytime soon by me. I can animate Gauge Needles and stuff if someone else wanted to program them, but I wont be able to get around to jumping into cockpit code until other Projects are more completed.

 

In DCS, we have two units categories to display: metric and imperial.

Those can be switched just for display info to players.

But for calculation, is metric used in DCS kernel or imperial?

[sIGPIC][/sIGPIC]

My DCS Mods, Skins, Utilities and Scripts

 

| Windows 10 | i7-4790K | GTX 980Ti Hybrid | 32GB RAM | 3TB SSD |

| TM Warthog Stick | CH Pro Throttle + Pro Pedal | TIR5 Pro | TM MFD Cougar | Gun Camera: PrtScn |

Link to comment
Share on other sites

...

AoA Limiter

...

I threw together a very simple AoA-limiter for the F-16 about a year ago. Can't test it right now as my DCS is crashing...

// At around line 570 in F_16Demo.cpp...

   if (F16::alpha_DEG >= 25) 
   {
       updates_over_AoA++;
       F16::elevator_DEG_commanded = F16::elevator_DEG_commanded * (1 - (0.01 * updates_over_AoA));

   } else
   {
       updates_over_AoA = updates_over_AoA - 1;
       if (updates_over_AoA <= 0) 
       {
           updates_over_AoA = 0;
       } else {
           F16::elevator_DEG_commanded = F16::elevator_DEG_commanded * (1 - (0.01 * updates_over_AoA));
       }
   };
   if (updates_over_AoA>0 && F16::elevator_DEG_commanded>-15) F16::elevator_DEG_commanded = -15;

   double overAlpha = F16::alpha_DEG - 25;
   if (overAlpha > 0)
   {
       F16::elevator_DEG_commanded = F16::elevator_DEG_commanded + (overAlpha * 2);
     }

 

Edit: Opps! Now when I actually read the code it seems like there are two solutions, don't remember which one worked best, but I do remember I was eventually pretty happy with the resutl.


Edited by RagnarDa
Read BEFORE posting!

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

In DCS, we have two units categories to display: metric and imperial.

Those can be switched just for display info to players.

But for calculation, is metric used in DCS kernel or imperial?

Metric.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

But for calculation, is metric used in DCS kernel or imperial?

 

Most likely metric. Imperial is just too much of a PITA. Also ED people are russian.

Good, fast, cheap. Choose any two.

Come let's eat grandpa!

Use punctuation, save lives!

Link to comment
Share on other sites

I threw together a very simple AoA-limiter for the F-16 about a year ago. Can't test it right now as my DCS is crashing...

// At around line 570 in F_16Demo.cpp...

   if (F16::alpha_DEG >= 25) 
   {
       updates_over_AoA++;
       F16::elevator_DEG_commanded = F16::elevator_DEG_commanded * (1 - (0.01 * updates_over_AoA));

   } else
   {
       updates_over_AoA = updates_over_AoA - 1;
       if (updates_over_AoA <= 0) 
       {
           updates_over_AoA = 0;
       } else {
           F16::elevator_DEG_commanded = F16::elevator_DEG_commanded * (1 - (0.01 * updates_over_AoA));
       }
   };
   if (updates_over_AoA>0 && F16::elevator_DEG_commanded>-15) F16::elevator_DEG_commanded = -15;

   double overAlpha = F16::alpha_DEG - 25;
   if (overAlpha > 0)
   {
       F16::elevator_DEG_commanded = F16::elevator_DEG_commanded + (overAlpha * 2);
     }

 

So I should be able to open the file and paste this into it?

 

F-16C Demo does work with 1.2.7 too just in case anyone was wondering.

 

Will set aside some time to Get an earlier Block Cockpit imported, and stuff, maybe a Demo Clip for Oooh and Ahhhss Sake


Edited by SkateZilla

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

dont remember off hand if engine spool times were integrated...

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

So I should be able to open the file and paste this into it?

 

F-16C Demo does work with 1.2.7 too just in case anyone was wondering.

 

Will set aside some time to Get an earlier Block Cockpit imported, and stuff, maybe a Demo Clip for Oooh and Ahhhss Sake

 

 

Yes I think its enough to paste it in at the right place and compile the code.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

see, compiling is my issue, lol... if it were copy/paste and then boot DCS and test it'd be one thing,

 

Copy/paste, then compile.... I cant do.

Windows 10 Pro, Ryzen 2700X @ 4.6Ghz, 32GB DDR4-3200 GSkill (F4-3200C16D-16GTZR x2),

ASRock X470 Taichi Ultimate, XFX RX6800XT Merc 310 (RX-68XTALFD9)

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

Link to comment
Share on other sites

  • Recently Browsing   0 members

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