A320_Pilot Posted February 13, 2014 Report Posted February 13, 2014 Hello! And what to do with the FSX, my client gives an error - FSUIPC_ERR_SEND_MSG, in FS9 is no such! Thanks!
Paul Henty Posted February 13, 2014 Report Posted February 13, 2014 Hi, Things you can try: 1. If you are running FSX 'as administrator' you need to run your client program 'as administrator' as well. If you're not running FSX 'as administrator' then make sure you don't run your client program 'as administrator'. 2. If your FSUIPC4 is registered make sure the date on the PC is set correctly. 3. Test your FSUIPC4 installation by running a different FSUIPC program (e.g. FSInterrogate that comes with the FSUIPC SDK, or TrafficLook available in the downloads sub-forum). If other FSUIPC programs do not connect then something is wrong with your FSUIPC4 installation. Paul 1
A320_Pilot Posted February 13, 2014 Author Report Posted February 13, 2014 All aplications are working, but my client, dont connect to fsx, write a error! FSUIPC_ERR_SEND_MSG With FS9 - no problems!
Paul Henty Posted February 13, 2014 Report Posted February 13, 2014 Well if other FSUIPC programs are working then I don't know what else to suggest. The whole point about FSUIPC is that there is no difference between connecting to FSUIPC3 or FSUIPC4. What is the line that is throwing this error? Is it the FSUIPCConnection.Open() or one of the Process() calls? Is there anything shown in the FSUIPC4 log file (in the FSX Modules folder)? Maybe post the contents of the log file here; it might help. Paul 1
A320_Pilot Posted February 13, 2014 Author Report Posted February 13, 2014 If with FS9 is working, with FSX should working too! With FS9 all data are displaying correctly! In log file nothing!
Paul Henty Posted February 13, 2014 Report Posted February 13, 2014 You have not answered this question yet: What is the line that is throwing this error? Is it the FSUIPCConnection.Open() or one of the Process() calls? Also when you say "In log file nothing!", do you mean you can't see anything interesting or there is no text at all in the log file? I still think you should paste the contents of FSUIPC4.log here. Paul 1
A320_Pilot Posted February 13, 2014 Author Report Posted February 13, 2014 End strings from FSUIPC log: Running inside FSX (SimConnect Acc/SP2 Oct07) Module base=61000000 Wind smoothing fix is fully installed DebugStatus=255 62 System time = 01:52:00 78 FLT UNC path = "\\AEROFLOT\Users\Георгий\Documents\Flight Simulator X Files\" 78 FS UNC path = "C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\" 609 LogOptions=00000001 609 SimConnect_Open succeeded: waiting to check version okay 11453 Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0) 11453 Initialising SimConnect data requests now 11453 FSUIPC Menu entry added 11484 C:\Users\Георгий\Documents\Flight Simulator X Files\Flight.FLT 11484 C:\Program Files (x86)\Microsoft Games\Microsoft Flight Simulator X\SimObjects\Airplanes\Aerosoft Airbus X A320 Extended CFM\A320.AIR 61984 System time = 01:53:02 61984 *** FSUIPC log file being closed Memory managed: 2 Allocs, 2 Freed ********* FSUIPC Log file closed *********** What is the line that is throwing this error? Is it the FSUIPCConnection.Open() or one of the Process() calls? This write then i click "start flight" button!
Paul Henty Posted February 13, 2014 Report Posted February 13, 2014 Are you running a very old version of FSUIPC4? If you're not using 4.929, please update (see the downloads sub-forum) and try again. Paul 1
A320_Pilot Posted February 14, 2014 Author Report Posted February 14, 2014 Hello Paul! Modest question: what offset is responsible for the acceleration in the simulator, well that display there "x1, x4" and so on? Thanks
Paul Henty Posted February 14, 2014 Report Posted February 14, 2014 I think you want the 'simulation rate' at 0C1A. Lookup this offset in "FSUIPC4 Offset Status.pdf" as there are some limitations writing to this offset for FSX. Reading is fine though. You need to declare it as 'ushort' and you need to divide the .value by 256 to get the correct value. Paul 1
A320_Pilot Posted February 14, 2014 Author Report Posted February 14, 2014 private Offset<short> simrate = new Offset<short>(0x0C1A); Correct?
A320_Pilot Posted February 14, 2014 Author Report Posted February 14, 2014 Paul, help please, where is a error? double simrate = ((double)simrate.Value / 256d); this.usk_m.Text = simrate.ToString("F0");
A320_Pilot Posted February 14, 2014 Author Report Posted February 14, 2014 Ok, Paul And what offset responsible for refueling aircraft?
Paul Henty Posted February 14, 2014 Report Posted February 14, 2014 Well there isn't a single offset that makes the plane refuel is that's what you mean. You can set the level of each fuel tank in the aircraft. These offsets start at 0B7C, but it's much easier to set fuel using the payload services in my DLL. Please see this post for details: http://forum.simflight.com/topic/74848-fsuipc-client-dll-for-net-version-24/?p=457925 Using the payload services makes it easy to set the fuel by % level, weight (lbs or kgs) or volume (litres or gallons). Paul 1
A320_Pilot Posted February 15, 2014 Author Report Posted February 15, 2014 I just do not understand what to do with this: foreach (FsPayloadStation payloadStation in ps.PayloadStations) { payloadStation.WeightLbs = 0; }
A320_Pilot Posted February 15, 2014 Author Report Posted February 15, 2014 While I still like this: private void start_fuel_Click(object sender, EventArgs e) { try { PayloadServices ps = FSUIPCConnection.PayloadServices; ps.RefreshData(); //---------------------------------------------------------------------------------// //Refueling aircraft and start the flight //---------------------------------------------------------------------------------// string external1 = external1_m.Text; string external2 = external2_m.Text; string center = center_m.Text; string center2 = center2_m.Text; string center3 = center3_m.Text; string left_main = left_main_m.Text; string right_main = right_main_m.Text; string left_aux = left_aux_m.Text; string right_aux = right_aux_m.Text; string left_tip = left_tip_m.Text; string right_tip = right_tip_m.Text; //---------------------------------------------------------------------------------// foreach (FsPayloadStation payloadStation in ps.PayloadStations) { payloadStation.WeightLbs = 0; } ps.WriteChanges(); } catch (Exception ex) { MessageBox.Show(ex.Message, FSUIPC_ERR0_RU, MessageBoxButtons.OK, MessageBoxIcon.Error); } //---------------------------------------------------------------------------------//
Paul Henty Posted February 15, 2014 Report Posted February 15, 2014 Hi, You seem to be working with the payload stations rather than the fuel tanks. It's not well documented so I've written some examples of working with fuel. I think these will cover your requirements. Example 1: Setting all fuel tanks to 100% full. // Fill all fuel tank PayloadServices ps = FSUIPCConnection.PayloadServices; ps.RefreshData(); foreach(FsFuelTank fuelTank in ps.FuelTanks) { if (fuelTank.CapacityLitres > 0) // If the tank is not in use for this aircraft, capacity = 0 { fuelTank.LevelPercentage = 100; } } ps.WriteChanges(); Example 2: Setting individual tanks from text boxes on a form: // Add fuel levels from textboxes // Example covers only three main tanks // Capacity is tested to make sure the tank is in use for current aircraft PayloadServices ps = FSUIPCConnection.PayloadServices; ps.RefreshData(); if (ps.GetFuelTank(FSFuelTanks.Centre_Main).CapacityLitres > 0) { ps.GetFuelTank(FSFuelTanks.Centre_Main).LevelPercentage = double.Parse(this.txtCentreTankLevel.Text); } if (ps.GetFuelTank(FSFuelTanks.Left_Main).CapacityLitres > 0) { ps.GetFuelTank(FSFuelTanks.Left_Main).LevelPercentage = double.Parse(this.txtLeftTankLevel.Text); } if (ps.GetFuelTank(FSFuelTanks.Right_Main).CapacityLitres > 0) { ps.GetFuelTank(FSFuelTanks.Right_Main).LevelPercentage = double.Parse(this.txtRightTankLevel.Text); } ps.WriteChanges(); Example 3: Showing/Hiding textboxes according to tanks used by current aircraft // Show hide textboxes according to tank usage on current aircraft PayloadServices ps = FSUIPCConnection.PayloadServices; ps.RefreshData(); this.txtCentreTankLevel.Visible = ps.GetFuelTank(FSFuelTanks.Centre_Main).CapacityLitres > 0; this.txtLeftTankLevel.Visible = ps.GetFuelTank(FSFuelTanks.Left_Main).CapacityLitres > 0; this.txtRightTankLevel.Visible = ps.GetFuelTank(FSFuelTanks.Right_Main).CapacityLitres > 0; Paul 1
A320_Pilot Posted March 14, 2014 Author Report Posted March 14, 2014 Hello Paul! I still do not understand how to be a database, how to extract from them ICAO codes and how to measure the distance between the two airports (((( Help me please!!!
Graham Pollitt Posted March 14, 2014 Report Posted March 14, 2014 I still do not understand how to be a database, how to extract from them ICAO codes and how to measure the distance between the two airports (((( Run makerwys.exe, copy the r5.csv file to your project folder or path directly to the file in the FS directory. Code a parser reader to find the two airports that you want from the r5.csv file and to obtain the lat/lon co-ordinates of those two airports Read here for the formulae you'll need for the distance between two lat/lon points. You'll have to decide which point you want to use for each airport http://williams.best.vwh.net/avform.htm
A320_Pilot Posted March 15, 2014 Author Report Posted March 15, 2014 Run makerwys.exe, copy the r5.csv file to your project folder or path directly to the file in the FS directory. Code a parser reader to find the two airports that you want from the r5.csv file and to obtain the lat/lon co-ordinates of those two airports Read here for the formulae you'll need for the distance between two lat/lon points. You'll have to decide which point you want to use for each airport http://williams.best.vwh.net/avform.htm Base airports made, and here's the code to C # can not write (((
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now