Jump to content
The simFlight Network Forums


Popular Content

Showing content with the highest reputation since 11/14/2017 in all areas

  1. 2 points
  2. 2 points
    It works fine here on FSX Steam Edition. Private NearestICAO As Offset(Of String) = New Offset(Of String)(&H658, 4) FSUIPCConnection.Process() MessageBox.Show("Nearest Airport is " + NearestICAO.Value) It won't work on FS9 (this feature is not included in FSUIPC3), and the documentation says it doesn't work on FSX earlier than SP2. If you want a solution that will work with all sims including FS9 you will need use the makerunways files. Here is an example of a function that reads the runways.csv file produced by makerunways.exe. It assembles a list of all airports within a requested radius. First you'll need to define this structure (outside any other classes) Public Structure AirportInfo Public ICAO As String Public DistanceNM As Double Public Sub New(ICAO As String, DistanceNM As Double) Me.ICAO = ICAO Me.DistanceNM = DistanceNM End Sub End Structure Then add this function to your normal class/form: Private Function getAirportsInRangeNM(ByVal playerPos As FsLatLonPoint, ByVal radiusNM As Double) As List(Of AirportInfo) Dim AirportsInRange As List(Of AirportInfo) = New List(Of AirportInfo)() ' Search the Runways.csv file Dim foundAirports As Dictionary(Of String, Double) = New Dictionary(Of String, Double)() Dim runwaysFile As String = "E:\SteamLibrary\steamapps\common\FSX\Runways.csv" ' !!CHANGE THIS!! Using MyReader As New FileIO.TextFieldParser(runwaysFile) MyReader.TextFieldType = FileIO.FieldType.Delimited MyReader.SetDelimiters(",") While Not MyReader.EndOfData Try Dim currentRow As String() = MyReader.ReadFields() Dim icao As String = currentRow(0) Dim lat As Double = Double.Parse(currentRow(2)) Dim lon As Double = Double.Parse(currentRow(3)) ' Work out the distance from the player Dim runwayPoint As FsLatLonPoint = New FsLatLonPoint(New FsLatitude(lat), New FsLongitude(lon)) Dim distance As Double = runwayPoint.DistanceFromInNauticalMiles(playerPos) If (distance) <= radiusNM Then If (foundAirports.ContainsKey(icao)) Then ' if this runway is closer we'll use this one If distance < (foundAirports(icao)) Then foundAirports(icao) = distance End If Else foundAirports.Add(icao, distance) End If End If Catch ex As FileIO.MalformedLineException 'MsgBox("Line " & ex.Message & "is not valid and will be skipped.") End Try End While MyReader.Close() MyReader.Dispose() End Using ' Now have all the airports in range ' Add them to the output list and sort by distance For Each icao As String In foundAirports.Keys AirportsInRange.Add(New AirportInfo(icao, foundAirports(icao))) Next AirportsInRange.Sort(Function(x, y) x.DistanceNM.CompareTo(y.DistanceNM)) Return AirportsInRange End Function Note that I've hard-coded my path to the runways.csv file. If your app is not just for you, you'll need to have a variable with the users FS install path in. Here's an example of how it's used: 1. You'll need the current players lon/lat if you haven't got those already: Public playerLatitude As Offset(Of Long) = New Offset(Of Long)(&H560) Public playerLongitude As Offset(Of Long) = New Offset(Of Long)(&H568) 2. This code calls the function and displays all airports within 50nm in a message box: FSUIPCConnection.Process() ' Set up current player position Dim playerPos As FsLatLonPoint = New FsLatLonPoint(New FsLatitude(playerLatitude.Value), New FsLongitude(playerLongitude.Value)) ' get list of airports within 50nm Dim airports As List(Of AirportInfo) = getAirportsInRangeNM(playerPos, 50) ' print them out Dim msg As String = "" For Each airport As AirportInfo In airports msg += airport.ICAO + ": " + airport.DistanceNM.ToString("F0") + "NM" + vbNewLine Next MessageBox.Show(msg) The List of airports is in order of distance, the closest will be index 0. Paul
  3. 1 point
    Because Southwest does not fly out of terminal E. https://www.mccarran.com/Terminals
  4. 1 point
    Hi Benny, Here's a new version with the requested changes. There is now a Clear() method on the AirportsDatabase object. You can call that if your app no longer needs the database to free up the memory. (It'll be marked for GC so it won't be instant). There is now an overload of Load() that takes a Hashset<string>. Populate this hashset with the ICAO codes (all CAPS) of the airports you are interested in. These will be the only airports that will be loaded. I've also optimised the parsing of the large runways.xml file, so it should be a bit quicker. On my machine it's down from 3 seconds to 2. Paul FSUIPCClient3.0_RC6.zip
  5. 1 point
    SimConnect allows me to set 'x' individually for each data request. It cuts down on the traffic to/from SimConnect by only asking for changes which would be noticeable. This value is per data request, so, yes, it will vary according to the data requested. 'x' is called the "epsilon" by SimConnect, and actually, by default, FSUIPC does these days default it to zero for all values. But there is an FSUIPC INI parameter which will make FSUIPC use different values for each value (with 'x' decided by my judgement about reasonable desirable precisions). Maybe it would help in those installations which have several SimConnect users clamouring for data and gradually clogging the interface up. This option is documented in the Advanced User's guide, thus: UseEpsilon is normally omitted altogether. If needed, it can be added, in the [General] section of the INI file, set to “Yes”. This will impose change limitations on most variables sent to FSUIPC by SimConnect Pete
  6. 1 point
    Hi Benny, The database is just in-memory, internal the the DLL. There are no external files produced. The airport data is stored in an FsAirport class which are all stored in a single List<FsAirport>. This collection can then be used in the normal ways including filtering with LINQ (either extension methods or the query language). The data is read from the various output files from MakeRunways. These are a mixture of XML and CSV. These are placed in the main FS folder by MakeRunways every time you run it. When you add new scenery you need to rerun Makerunways. I just read those current files from the main FS folder. The initial read and parsing takes about 3 seconds on my machines here, which is quite old now (about 7 years). This only has to be done once when your application starts and after that the operations on the database are instant. I'm still optimising so this parse time might improve. For the 'airports in-range' operations you call a method that sets a reference point. This can be any Lon/Lat, an airport or, if nothing is specified the DLL will read the current player Lon/Lat automatically and use that. When you set the reference point each airport is updated with the distance from that point and its relative bearing. After setting the reference point you can use a helper method or plain LINQ to query all airports within a certain distance, and any other requirements as well. To use the database, call the load() method AFTER the connection is open: (Note, you must have the makerunways files in the main FS folder). FSUIPCConnection.AirportsDatabase.Load(); Then you can get a specific airport or query the database with LINQ. e.g: // Get airport by ICAO FsAirport heathrow = db.Airports["EGLL"]; // get list of airports with 'ranch' in the name and order by name List<FsAirport> ranchList = db.Airports.FindAll(ap => ap.Name.ToLower().Contains("ranch")).OrderBy(ap => ap.Name).ToList(); // Same as above, but done using LINQ Query var ranchListQuery = from ap in db.Airports where ap.Name.ToLower().Contains("ranch") orderby ap.Name select ap; List<FsAirport> ranchList2 = ranchListQuery.ToList(); To use the distance/bearing feature, set a reference position. Here we just use the player position by passing no parameters. // Set reference position to player db.SetReferencePosition(); Now you can get airports in range using the helper method: // Get all airports within 50nm // (InRange method automatically sorts by distance) List<FsAirport> inRange = db.Airports.InRangeOfNauticalMiles(50); You can further narrow down the list using the WithRunway helper method, or a LINQ Query. // Get all airports within 50nm with ILS and has a runway over 1500m. List<FsAirport> inRange2 = db.Airports.InRangeOfNauticalMiles(50).WithRunway(runway => runway.ILSInfo != null && runway.LengthMeters >= 1500); // Save as above but with LINQ Query var inRangeQuery = from ap in db.Airports where ap.DistanceNauticalMiles <= 50 && (from rw in ap.Runways where rw.ILSInfo != null && rw.LengthMeters >= 1500 select rw).Count() > 0 orderby ap.DistanceNauticalMiles select ap; List<FsAirport> inRange3 = inRangeQuery.ToList(); There is a quite a bit of information about airports, runways, helipads, coms frequencies and gates. The property names will appear on the Intellisense, but I haven't added any comments yet. Paul
  7. 1 point
    personally i would like it to display the last given command, as you would make a note with a pen/pencil in real life, it should appear on the strip in game too.
  8. 1 point
    No, sorry. I've just tested on P3D4.1 and it's just as bad: EDDC nearest EDCM (17nm) EDDF nearest ETOU (7nm) KJFK nearest 4NY2 (8nm) The only add-on airports I have installed on this test system are EGLL and EGCC. EGLL seems okay, but EGCC gives EGCB as nearet. I'll report it to L-M so that it might just get fixed one day ... Pete
  9. 1 point
    Looks like some Real Traffic files are in the wrong folder which could be impacting Real Color. The files airplanes_pack1 and airplanes_pack1.manifest need to be moved to the Airplanes folder.
  10. 1 point
    Folks, At the beginning of the development we had an idea for camera movements but when we begun playing the sim with that we decided to pull it because it was so annoying (a typical case when something looks just right on paper but doesn't work in real life). That's when we decided to pull this action camera at all from the game. However some testers thought let's leave it with a switch that a user can turn ON/OFF within the game so we did and we adjusted the action camera a bit further allowing (just like you noticed) the airport designer decide where can the camera be triggered. As much as I hate saying that but I always want to be honest with you; probably we should've pulled this action camera from this release. For sure the next version will have a totally new camera system written from scratch. Unfortunately we can't change this one to this new idea as it would require to rebuild pretty much everything within the game. We received so many requests for European airports and we always said no because of the satellite licensing issue (I saw some Youtubber said we pull the data from Google, it made me smile as we wish it would be just like that :) ). However recently we begun testing something that would possibly allow us to make worldwide airports. If the theory works then you will see better ground quality in the upcoming airports (maybe around the 4th from now) and if it works we may streamline that technology into the new version of the game that would allow us for much nicer camera solutions. Thank you Vic
  11. 1 point
    First impressions: Overall, it looks very nice. It does a good job of capturing the atmosphere of KLGA, which is a small but very crowded and very busy field. However, it is still in need of some polishing. This is not surprising, since literally every airport released for Tower3D (including the default airports) has needed adjustments, and some still do. The good: The airport looks great. I love the close in buildings, though to my memory there are not quite so many tall buildings so close to the airport in real life. The prison buildings on Riker's island also looked a bit too modern and fancy for reality. I especially loved the way SimSmith designed the surrounding freeways and interchanges. They look more detailed and complex than those we have seen in other Tower3D airports. I also liked the way the auto cut-to scenes are zoomed in closer on the aircraft than they are in typical FeelThere releases. The taxiway layout gives the controller some interesting choices for how to route aircraft, and I am glad to see that they did make the Marine Air Terminal fully functional. This adds an interesting challenge being on the opposite side of the runway from the other terminals. Finally, it looks gorgeous at night; very nicely done lighting. The not so good: Practical: Aircraft at some gates (especially in Terminal A) cannot fully push back if the gate across the taxi ally is occupied. I recall that KPHL has some similar problems in the beginning which have since been fixed. Visual: It is a shame they left out the raised earth berm on the north side of Runway 13/31 with the giant "Welcome to New York" sign. It is a very distinctive feature of this airport. Andrew
  12. 1 point
    If Pro is like 2011, each airplane type has a defined takeoff length, landing length, and several other attributes. Looking at the 77W in 2011, the takeoff length is 10500 feet1. The longest runway at KBOS is 15R/33L at 10083 feet. Clearly in Pro the takeoff length of the 77W exceeds 10083. Takeoff distance is determined by a lot of factors but the 77Ws that serve KBOS are obviously configured to takeoff under 10083 feet. 10500 is not necessarily an incorrect attribute value for a 77W, but it is at KBOS. We'll probably need to ask Nyerges to tweak the 77W in Real Traffic (assuming it is a prefab level attribute). Craig 1 We could edit the attributes in 2011, I do not recall if I did or not for the 77W.