
Paul Henty
Members-
Posts
1,724 -
Joined
-
Days Won
77
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Paul Henty
-
Hi Matthias, I can't find a way of doing this. I can only iterate through using the NEXT_VIEW and PREVIOUS_VIEW controls like you. These view windows are accessible via the Win32 API (on FSX at least - I don't have P3D). So you could use that to find them and give them focus, but you'd have to be familiar with the Win32 API and it wouldn't work over WideFS. Paul
-
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
I don't sorry. Maybe try downloading some free ones and see. Or ask in the support forums of popular commercial scenery like Orbx. Paul -
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
If you want the voice prompts as you previously described then you need the taxiway names. I can only suggest using free or commercial scenery that includes the correct names in the BGL files. These will then be extracted into the Airports Database via MakeRunways.exe. An alternative would be to your application to find a route to the runway and just give 'turn left/right/hold short' voice instructions (no need for taxiway names). This would not necessarily be the route given by the VATSIM controllers. Maybe they can make allowances for blind pilots by either allowing self-navigation to the runway, or giving step-by-step instructions during the taxiing over the radio to guide the pilot to the runway. Paul -
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
If I generate the taxiway names in the DLL they are unlikely to match the real-world names. Vatsim controllers will be using the real world names so it would be very confusing for you to have different names. It's probably not a good idea. Paul -
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
I think all taxiways have name in real life, but the scenery (BGL) files built into FSX have only a few named taxiways. I don't know if this is any better in later versions of flight sim, but I would think most commercial add-on scenery would be better at this. There are ICAO rules for naming taxiways and now we know which are connected it should be possible to automatically name the missing ones in a realistic way. It's unlikely to get the names the same as real life, but at least they'll have names. Let me know if that's a feature that would be useful and I'll look into it. Paul -
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
Hi Andy, Version 3.2.7 is now on NuGet. There is a new feature that add TaxiwayIntersection objects to Taxiways, Runways, Gates and Helipads. You can use these intersections to find which taxiways are connected and where they go (e.g. gate, runway). Each intersection also has a Lat/Lon point identifying where the junction is. Hopefully this will enable you to do most of what you want. Here is some sample code explaining how it works: C# // Setup AirportsDatabase DB = FSUIPCConnection.AirportsDatabase; DB.LoadTaxiways = true; DB.Load(); // To use intersections you must first calculate them for the airport you are interested in FsAirport EGJJ = DB.Airports["EGJJ"]; EGJJ.CalculateTaxiwayIntersections(); // Now each Taxiway has a number of collections of FsTaxiwayIntersections. // e.g.: // Get taxiway B FsTaxiway taxiwayB = EGJJ.Taxiways["B"]; FsTaxiwayIntersectionCollection<FsTaxiway> connectedTaxiways = taxiwayB.TaxiwayIntersections; FsTaxiwayIntersectionCollection<FsGate> connectedGates = taxiwayB.GateIntersections; FsTaxiwayIntersectionCollection<FsRunway> connectedRunways = taxiwayB.RunwayIntersections; FsTaxiwayIntersectionCollection<FsHelipad> connectedHelipads = taxiwayB.HelipadIntersections; // For each of these collections you can step through and get the information about the intersection // This example works on the gates connected to this taxiway: foreach(FsTaxiwayIntersection<FsGate> gateIntersection in connectedGates) { // Get the location where the taxiway connects to the gate FsLatLonPoint intersectionLocation = gateIntersection.Location; // The object property points to the gate itself string gateName = gateIntersection.Object.ID; } // FsGate. FsHelipad and FsRunway objects also have a collection of taxiway intersections // e.g. get all taxiways that join with runway 27 FsRunway rw27 = EGJJ.Runways["27"]; foreach (FsTaxiwayIntersection<FsTaxiway> taxiwayIntersection in rw27.TaxiwayIntersections) { FsLatLonPoint location = taxiwayIntersection.Location; string taxiwayName = taxiwayIntersection.Object.Name; } VB.NET ' Setup Dim DB As AirportsDatabase = FSUIPCConnection.AirportsDatabase DB.LoadTaxiways = True DB.Load() ' To use intersections you must first calculate them for the airport you are interested in Dim EGJJ As FsAirport = DB.Airports("EGJJ") EGJJ.CalculateTaxiwayIntersections() ' Now each Taxiway has a number of collections of FsTaxiwayIntersections. ' e.g.: ' Get taxiway B Dim taxiwayB As FsTaxiway = EGJJ.Taxiways("B") Dim connectedTaxiways As FsTaxiwayIntersectionCollection(Of FsTaxiway) = taxiwayB.TaxiwayIntersections Dim connectedGates As FsTaxiwayIntersectionCollection(Of FsGate) = taxiwayB.GateIntersections Dim connectedRunways As FsTaxiwayIntersectionCollection(Of FsRunway) = taxiwayB.RunwayIntersections Dim connectedHelipads As FsTaxiwayIntersectionCollection(Of FsHelipad) = taxiwayB.HelipadIntersections ' For each of these collections you can step through and get the information about the intersection ' This example works on the gates connected to this taxiway: For Each gateIntersection As FsTaxiwayIntersection(Of FsGate) In connectedGates ' Get the location where the taxiway connects to the gate Dim intersectionLocation As FsLatLonPoint = gateIntersection.Location ' The object property points to the gate itself Dim gateName As String = gateIntersection.Object.ID Next ' FsGate. FsHelipad and FsRunway objects also have a collection of taxiway intersections ' e.g. get all taxiways that join with runway 27 Dim rw27 As FsRunway = EGJJ.Runways("27") For Each taxiwayIntersection As FsTaxiwayIntersection(Of FsTaxiway) In rw27.TaxiwayIntersections Dim Location As FsLatLonPoint = taxiwayIntersection.Location Dim taxiwayName As String = taxiwayIntersection.Object.Name Next Paul -
I don't think so. When you use offset 0x0D70 in FSUIPC7 it has to get the data from the WASM module. There's no where else to get it. Previous versions of flight sim had other ways (e.g. Panels.dll) but those methods don't exist in MSFS. I think I read somewhere that the WASM module is installed by the FSUIPC7 installer, so installing the WASM module shouldn't present any particular issues. Paul
-
Hi Pete, Access to datarefs would only be possible if they are supported by XPUIPC (mirroring the LVAR facilities in FSUIPC). I'm guessing that's not the case, so unfortunately there is no way to access datarefs with my DLL. This .NET library (available on NuGet) uses a direct connection to XPlane (rather than via XPUIPC). Its features include: You can send commands and subscribe to DataRef. An event OnDataRefReceived is fired every time the value of a subscribed DataRef changes. https://www.nuget.org/packages/XPlaneConnector Paul
-
Best way to make browser interface with FSUIPC?
Paul Henty replied to Firefly's topic in FSUIPC Support Pete Dowson Modules
Great, thanks for letting me know. Yes I'll continue to support this. It's good to know people are using it and finding it useful. Paul -
Best way to make browser interface with FSUIPC?
Paul Henty replied to Firefly's topic in FSUIPC Support Pete Dowson Modules
Okay. It sounds like there might be a problem in the server code. I'll run this tomorrow and see if I can reproduce the disconnection. Paul -
Best way to make browser interface with FSUIPC?
Paul Henty replied to Firefly's topic in FSUIPC Support Pete Dowson Modules
Hi Manuel, The server doesn't close the socket after a single request. It remains open for multiple requests until you close it. If you're seeing the socket being closed then it's probably your code that's closing it unintentionally. Look for places in your code that you calling ws.close(). Check that this isn't being called by mistake when your handling the response from the server. (e.g. is a case statement falling through with no 'break'?) It might help if you post your code so I can try it here. Paul -
Building a network of taxiways at an airport
Paul Henty replied to Andy B.'s topic in FSUIPC Client DLL for .NET
Hi Andy, Sorry for the delay in replying. I've been away. I've looked through your bullet point requirements. Items 1 & 4 can be done with FsTaxiway object at the moment as it tells you if the player is on a particular taxiway or not. The others all rely on intersections of taxiways. These are not currently in the FsTaxiway object but I think it's fairly simple to calculate these and add them to the class. Each taxiway will have a list of intersections. Each intersection will include the position of the intersection and a pointer to the taxiway/runway it intersects with. This will give you a network of taxiways rather than a flat list like it is now. Going through the remaining bullet points, these all seem possible if you know the intersection points. It's just a case of testing how far they are from the player and in which direction. I'll add this over the next week or 2. Paul -
Hi Markus, If you're using my .NET Client DLL then please download the Example Code Application from the website (A VB.NET Version is available): http://fsuipc.paulhenty.com/#downloads There are helper classes in the DLL that can assist you with repositioning the aircraft and calculating Longitude/Latitude points. This examples for these are in the section called "Lon/Lat Helper Classes". You will also need to know the locations of airports and runway headings etc. If you don't have your own database for this the DLL has an Airport Database facility. Examples are in the section called "Airport\Runways Database". Paul
-
Hi Paulus, Your application must be running at the same privilege level as FSUIPC7. For example if you start FSUIPC7 'as administrator' then you must also start your application (or Visual Studio if you are coding/debugging) 'as administrator'. Or you can run both not 'as administrator'. The most likely cause of this error is that one is 'as administrator' but the other isn't. Paul
-
Best way to make browser interface with FSUIPC?
Paul Henty replied to Firefly's topic in FSUIPC Support Pete Dowson Modules
Yes you can create 2 offsets (best done in a separate declare request). They must be in this order: 0x3114 - uint 4 - Parameter 0x3110 - uint 4 - Control In the offfset.write request, set your control number (e.g. 66241) and any parameter. (set 0 if there is no parameter like for TOGGLE_MASTER_BATTERY). Yes, I think you assign them to free offsets and then use the offsets and normal. For FSUIPC4,5 and 6 I would need to update the websocket server for LVars as the offset trick is not available for those version. Paul -
Monitor an offset that can only be written
Paul Henty replied to Skino2412's topic in FSUIPC Client DLL for .NET
Not really. You can try reading that offset looking for 59. But you might miss it if you read it too slowly, or if the aircraft software resets the value to 0 too quickly. Also, if the user presses the Init button in the sim, that isn't going to show up at all in that offset. Generally, when reading data from the Sim , you're reading the effects of pressing the button, not the buttons themselves. e.g. you're detecting the autopilot being switched on/off, not the pilot pressing the autopilot toggle button. Paul -
Can I get the FS local time of any airport?
Paul Henty replied to Skino2412's topic in FSUIPC Client DLL for .NET
Not via offsets. The best you can do is the local time at the players location. If you use the Airports Database built into the DLL you can get the Lon/Lat of the airport. With this you can use a NuGet package called GeoTimeZone to get the time zone at that location. https://github.com/mattjohnsonpint/GeoTimeZone You can then use another NuGet package called TimeZoneConverter to convert this to the normal .NET TimeZoneInfo class. https://github.com/mattjohnsonpint/TimeZoneConverter You can then use that to work out the local time from the UTC Simulator time from the DLL: (FSUIPCConnection.UTCDateTime). Something like this: string timeZoneIANA = TimeZoneLookup.GetTimeZone(apLat, apLon).Result; TimeZoneInfo tzInfo = TZConvert.GetTimeZoneInfo(timeZoneIANA); DateTime airportLocalTime = TimeZoneInfo.ConvertTimeFromUtc(FSUIPCConnection.UTCDateTime, tzInfo); Paul -
Hi everyone, John made some very useful changes to the WAPI DLL. This has enabled me to improve the way the MSFSVariableServices works. See version 3.2.3-Beta of my DLL. Note that you will need version 0.5.0 or later of the FSUIPC_WAPID.dll. (See the first post for the location of the download). The first post in this thread has been updated to include the new changes and also a quick-start example. The main change is that RefreshData() has now been removed. You don't need to call this anymore because it's now purely event-driven. The MSFSVariableServices module will now automatically maintain the current LVar values in the background (according to the LVARUpdateFrequency property). Two new events are now available: OnVariablesReadyChanged will tell you when the variable have been discovered by the WASM module and it's ready to use. (Check the OnVariablesReady property). OnValuesChanged will tell you when at least one of the LVar values has been changed. I can't test here so please report success/failure here. Thanks, Paul
-
Hello, I don't know, sorry. I don't use FSUIPC7 so I'm not following it's development. I can only suggest trying it. If John has added LVAR access via offset 0x0D70 then the ReadLVar() method will just start working again. I remember you having problems with MSFSVariableServices. Have you given up with it? John is upgrading his WASM API soon which will allow me to make considerable improvements to MSFSVariableServices. Mainly, it will let you know when the LVars are ready to read (so no more waiting random seconds) and also it will move to a purely event-driven model. i.e. No need for RefreshData() anymore. Hopefully this will solve the problems people are having with timings and variable discovery. Paul
-
P3D v4.5 stürzt ab, wohl duch FSUIPC6
Paul Henty replied to Hoorn's topic in FSUIPC Client DLL for .NET
Try flying without the tools. If it doesn't crash then one of the tools is the problem. Add back your tools one at a time until you find the problem tool. If it still crashes without tools then it could be the P3D installation itself, or hardware issues, or driver (e.g. graphics card) issues. You should also make sure you are running the latest updates to P3D, your tools, aircraft, graphics drivers etc. It would be better to ask about your problem on the P3D support forums. They also have troubleshooting guides there. I can't help you any further here as this is a programming forum and I don't have P3D. I don't know sorry. I don't have any problems but only write in English. Paul