Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 11-04-2011, 09:00 AM
E69_vencejo E69_vencejo is offline
Approved Member
 
Join Date: Nov 2008
Posts: 46
Default

Sure I can wait until Sunday ... but no more please...
Seriously, I like to test the aircraft and I think that your script is very useful, so I'll be here as long as needed.
Thank you very much for the effort.

Quote:
there is a 3D XYZ world var that says it is accelerations in XYZ
I will looking for this.
Reply With Quote
  #2  
Old 11-06-2011, 03:50 PM
FST FST is offline
Approved Member
 
Join Date: Oct 2011
Posts: 19
Default

Hey partner

I going to re-write the script in a way that will allow you to turn portions of it on and off.. Ill upload them in a bit. I was also thinking of another thing to try right now..

Not 100% sure if you 'need' to do this next step, but it would be very interesting to see if this fixes your problem. You may 'need' to install the FREE

Microsoft Visual Studio C# 2010 ESPRESS

Again, not 100% sure if you 'need' to, in that I think winXP and win7 comes with the file allready installed but I am not sure. My reasoning a script that only use madox includes wont need this, but, if you start making use of 'other' includes as I have done you might need to install it. Again, give it a try and if it works, we found it, if not, well you can uninstall it.
Reply With Quote
  #3  
Old 11-06-2011, 04:34 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

You should test the .getParameter(part.ParameterTypes.I_MagneticCompas s, -1); about null value, not every plane has a magnetic compass in game (blenheim for example).
Reply With Quote
  #4  
Old 11-06-2011, 05:20 PM
FST FST is offline
Approved Member
 
Join Date: Oct 2011
Posts: 19
Default

Quote:
Originally Posted by FG28_Kodiak View Post
You should test the .getParameter(part.ParameterTypes.I_MagneticCompas s, -1); about null value, not every plane has a magnetic compass in game (blenheim for example).
That is a good point parr! Ill add that in, I don't think that is E69_vencejo problem though.. In that looking at his pics he was using the Spit from the mis file I provided.
Reply With Quote
  #5  
Old 11-06-2011, 06:20 PM
FST FST is offline
Approved Member
 
Join Date: Oct 2011
Posts: 19
Default

Quote:
Originally Posted by E69_vencejo View Post
Sure I can wait until Sunday ...
Hey Parr

Ok, re-worked the script a little bit for ya. See below

Code:
//-$debug
using System;
using maddox.game;
using maddox.game.world;

public class Mission : AMission
{
    //User Control
    bool do_get = true;
    bool do_log = true;
    bool do_hud = true;

    //Define and Init
    AiAircraft cur_Plane;
    double cur_Time = 0.0;
    bool flag_do_once = false;
    double I_VelocityIAS = 0.0;
    double I_Altitude = 0.0;
    double I_Variometer = 0.0;
    double I_Peilzeiger = 0.0;
    double I_MagneticCompass = 0.0;
    double I_Slip = 0.0;
    double Z_Overload = 0.0;
    double Z_AltitudeAGL = 0.0;
    double Z_AltitudeMSL = 0.0;
    double Z_VelocityIAS = 0.0;
    double Z_VelocityTAS = 0.0;
    double Z_VelocityMach = 0.0;
    double Z_AmbientAirTemperature = 0.0;
    string str_log = "";
    string str_hud = "";
    string str_hdr = "";
    string str_tmp = "";

    //Create Stream
    System.IO.StreamWriter sw;

    //Create Log File
    System.IO.FileInfo fi = new System.IO.FileInfo("C:\\BLACK_BOX_DATA.CSV");

    //Script Main
    public override void OnTickGame()
    {
        //Init Ticker
        base.OnTickGame();

        //loop rate set to ~1/30th of a second, i.e. 30 ticks = ~1 second
        if (Time.tickCounter() % 30 == 1)
        {
            //Get player aircraft
            cur_Plane = GamePlay.gpPlayer().Place() as AiAircraft;

            if (cur_Plane != null)
            {
                //Get Data ------------------------------------------------------------------------
                if (do_get)
                {
                    cur_Time                = Time.current();
                    I_MagneticCompass       = cur_Plane.getParameter(part.ParameterTypes.I_MagneticCompass, -1);
                    I_Altitude              = cur_Plane.getParameter(part.ParameterTypes.I_Altitude, -1);
                    I_VelocityIAS           = cur_Plane.getParameter(part.ParameterTypes.I_VelocityIAS, -1);
                    I_Variometer            = cur_Plane.getParameter(part.ParameterTypes.I_Variometer, -1);
                    I_Peilzeiger            = cur_Plane.getParameter(part.ParameterTypes.I_Peilzeiger, -1);
                    I_Slip                  = cur_Plane.getParameter(part.ParameterTypes.I_Slip, -1);
                    Z_Overload              = cur_Plane.getParameter(part.ParameterTypes.Z_Overload, -1);
                    Z_AltitudeAGL           = cur_Plane.getParameter(part.ParameterTypes.Z_AltitudeAGL, -1);
                    Z_AltitudeMSL           = cur_Plane.getParameter(part.ParameterTypes.Z_AltitudeMSL, -1);
                    Z_VelocityIAS           = cur_Plane.getParameter(part.ParameterTypes.Z_VelocityIAS, -1);
                    Z_VelocityTAS           = cur_Plane.getParameter(part.ParameterTypes.Z_VelocityTAS, -1);
                    Z_VelocityMach          = cur_Plane.getParameter(part.ParameterTypes.Z_VelocityMach, -1);
                    Z_AmbientAirTemperature = cur_Plane.getParameter(part.ParameterTypes.Z_AmbientAirTemperature, -1);
                }

                //Display HUD ---------------------------------------------------------------------
                if (do_hud)
                {
                    str_hud = "TIME: " + cur_Time.ToString("0.00") +                    //TIME
                              "    HDG: " + I_MagneticCompass.ToString("0.00") +        //HDG
                              "    ALT: " + I_Altitude.ToString("0.00") +               //ALT
                              "    IAS: " + I_VelocityIAS.ToString("0.00") +            //IAS
                              "    ROC: " + I_Variometer.ToString("0.00") +             //ROC
                              "   TEMP: " + Z_AmbientAirTemperature.ToString("0.00");   //TEMP
                    GamePlay.gpHUDLogCenter(str_hud);
                }

                //Log Data ------------------------------------------------------------------------
                if (do_log)
                {
                    str_hdr =   "TIME,HDG,ALT,IAS,ROC,PEI,SLIP,OL,AGL,MSL,WIAS,WTAS,WMACH,TEMP";
                    str_log =   cur_Time.ToString("0.00") + "," +           //TIME
                                I_MagneticCompass.ToString("0.00") + "," +  //HDG
                                I_Altitude.ToString("0.00") + "," +         //ALT
                                I_VelocityIAS.ToString("0.00") + "," +      //IAS
                                I_Variometer.ToString("0.00") + "," +       //ROC
                                I_Peilzeiger.ToString("0.00") + "," +       //PEI
                                I_Slip.ToString("0.00") + "," +             //SLIP
                                Z_Overload.ToString("0.00") + "," +         //OL
                                Z_AltitudeAGL.ToString("0.00") + "," +      //AGL
                                Z_AltitudeMSL.ToString("0.00") + "," +      //MSL
                                Z_VelocityIAS.ToString("0.00") + "," +      //WIAS
                                Z_VelocityTAS.ToString("0.00") + "," +      //WTAS
                                Z_VelocityMach.ToString("0.00") + "," +     //WMACH
                                Z_AmbientAirTemperature.ToString("0.00");   //TEMP

                    if (flag_do_once == false)
                        str_tmp = str_hdr;
                    else
                        str_tmp = str_log;

                    sw = fi.AppendText();
                    sw.WriteLine(str_tmp);
                    sw.Close();
                }

                //Set Flag
                flag_do_once = true;

            }
        }
    }
}
Note at the top of the script where it says..

Code:
    //User Control
    bool do_get = true;
    bool do_log = true;
    bool do_hud = true;
There you can control what you want to happen.. So delete the code that is in your current 'black_box.cs" file and copy-n-paste this code into your 'black_box.cs' file.

1st TEST

Code:
    //User Control
    bool do_get = true;
    bool do_log = false;
    bool do_hud = true;
Set the values above where data logging is OFF.

Than run the 'black_box.mis'. You should see the HUD but you will not be logging any data..

If you see the HUD, than we have narrowed down our search..

If you don't see the HUD goto next test

2nd TEST

Code:
    //User Control
    bool do_get = true;
    bool do_log = true;
    bool do_hud = false;
Set the values above where HUD display is OFF.

Than run the 'black_box.mis'. You should NOT see the HUD but you should be logging any data..

Let the mission run for a few min, than exit the game, goto the root of your C:\ drive and open the file called 'BLACK_BOX_DATA.CSV' to see if any data was written to the file..

If you see the data in the file, than we have narrowed down our search..

If you don't see data in the file goto next test

3rd TEST

Code:
    //User Control
    bool do_get = false;
    bool do_log = true;
    bool do_hud = true;
Set the values above where get data is OFF.

Than run the 'black_box.mis'. You should see the HUD and you should be logging any data.

Let the mission run for a few min, while it is 'see' if all the HUD values are ZERO (0.0), they should be because we did not 'get' any data thus only the init values are displayed. Than exit the game and goto the root of your C:\ drive and open the file called 'BLACK_BOX_DATA.CSV' to see if any data was written to the file.. All the data should be ZERO (0.00)

If you saw all ZEROS in the HUD display and you see all ZEROS in the log file than we have narrowed down our error to a 'get' issue

If you didn't see the HUD display and the log file is empty.. Than.. well.. shoot Ill have to ponder it some more! ;l

PS before you start each TEST above goto the root of your C:\ drive and delete the file called 'BLACK_BOX_DATA.CSV' if there is one.
Reply With Quote
  #6  
Old 11-06-2011, 08:29 PM
E69_vencejo E69_vencejo is offline
Approved Member
 
Join Date: Nov 2008
Posts: 46
Default

Uau...
I will check all test right now and i´ll post it.
Reply With Quote
  #7  
Old 11-06-2011, 11:11 PM
E69_vencejo E69_vencejo is offline
Approved Member
 
Join Date: Nov 2008
Posts: 46
Default

Finish the very first test.
All work, including the 3 test and excel file. THANKS!
Hud data:
Working all data default, with remarks:
TIME: Refresh every 0.9 seconds in my pc ( processor 2.66 mgh @ 3.6).
ROC: no work in bf´s (they dont have climb/descent rate gauge) and Tiger (it have it).
HEADING: work on all models.

Questions:
What is PEI?
What is the difference between "I_VelocityIAS" and "Z_VelocityIAS"?
What is the difference between "I_Altitude" and "Z_AltitudeAGL/Z_AltitudeMSL"? (i think agl=altitude from ground level and msl=from sea level)

Well, is too late for me now, so I leave the rest for tomorrow
Good night and thanks again.
Reply With Quote
  #8  
Old 11-07-2011, 12:00 AM
FST FST is offline
Approved Member
 
Join Date: Oct 2011
Posts: 19
Default

Yee Haa that is good news!

Question.

Did you install the Microsoft Measurement Studio C# EXPRESS software? If not, I wonder what caused it to start working for you?

As for the difference in those different values. I'm working on a readme to explain/cover those. Also working on variables that are not depended on wether or not the plane has 'said' gauge. I hope to have it done by next weekend.
Reply With Quote
  #9  
Old 11-07-2011, 03:34 PM
E69_vencejo E69_vencejo is offline
Approved Member
 
Join Date: Nov 2008
Posts: 46
Default

I do not install it because finally it was not necessary.

I really do not know why it started to work.
The first steep I did was copy and paste the script in the *. cs file, and did not work.
The next steep was to open the mission in FMB and paste the script in the tab "script", save and fly the mission. It was then that it worked.
It may be that when I copied the first time the script to paste in the *. cs not copy everything.
Although this does not explain why it works now and before, with the zip files, no.
Reply With Quote
  #10  
Old 05-10-2012, 11:12 AM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default

Quote:
Originally Posted by FST View Post
Yee Haa that is good news!

Question.

Did you install the Microsoft Measurement Studio C# EXPRESS software? If not, I wonder what caused it to start working for you?

As for the difference in those different values. I'm working on a readme to explain/cover those. Also working on variables that are not depended on wether or not the plane has 'said' gauge. I hope to have it done by next weekend.
Hi

an old thread I know, and seen in other places, but I wondered if you could explain something.

I am getting Z_VelocityTAS readings of roughly half I_VelocityIAS. Am I misunderstanding this as 'True Airspeed'? Also the Z_VelocityIAS is similarly about half the I_VelocityIAS. Any thoughts?

I'd also like to know what I_Peilzeiger is
Pfeilzeiger seems to be german for mouse pointer but don't see where that fits in

One other thing, I'm trying to find out if we are given 'Standard Day' temps, pressures etc as there is a discrepancy between on and off line speeds. The temperatures at altitude suggest not. Have you found a variable for air pressure that might also help?
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
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 07:52 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.