Paul Henty
Members-
Posts
1,652 -
Joined
-
Days Won
74
Content Type
Profiles
Forums
Events
Gallery
Downloads
Everything posted by Paul Henty
-
That error means there is a mismatch somewhere between 64 and 32 bit. Is it compiled to x64 only, or it is "Any CPU"?. If it's "Any" then your DLL will run in 32 bit if the exe or process it's running in is 32 bit. When the host application is running, check the Windows Task Manager. If it's running as 32 bit it will add this to the end of the name. Paul
-
The other thing to check is that you're compiling your application as a 64bit application (targeting x64). Or, if your compiling for "Any CPU" make sure you've unchecked "prefer 32-bit". Since WAPID.DLL is 64 bit your application will also need to be running as a 64bit application. You'll find these in the project properties under the 'Build' tab. Paul
-
No, I can't see any way of doing that. Paul
-
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