Jump to content
The simFlight Network Forums

japh

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

About japh

  • Birthday 01/01/1970

Contact Methods

  • Website URL
    http://

japh's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Note that my experience is FS9 only. Fuel leak = "Easy" to implement (just reduce the quantity in small steps), though it's quite easy to crash FS, if you try to set the quantity to an "unsupported" (negative) value by means of a miscalculation (been there, done that ...) Other leaks (oil, F.I.): from my tests, the quantities and/or pressures *DO* decrease, but with no influence whatsoever on the plane itself: the engines keep on running and no alarms are generated ... If anyone has ideas on generating failures, I'll be glad to readand share some info on my tests too. Regards, Paulo
  2. Hi all. I'm sorry if this isn't the right place to ask this, but if it isn't I honestly can't figure out a better one :) I need ideas for inflight failuresand how to "create" them using (of course) FSUIPC. I've already figured out how to simulate a fuel leak, gear and flap failure (although the gear and flap failures are still not quite "real": inhibiting only the usage doesn't sound 'right' ...) and engine failure (well, "shutdown" at least), but I want some moreso here I am asking for ideas :-) P.S. - Peter, I hope that your trip to my neighbour country (I'm from Portugal) was fine :) Northen Spain ? I hope you had the chance to visit "Picos da Europa" (Asturias)pretty nice place ;-) Regards,
  3. As Pete already said, the answer is "no" but ... Recipe: - text file with "central spot" coordinates for all airports in the world, one airport per line, like this: LPPT;LISBOA;38.781311;-9.135919;374 EGLL;HEATHROW;51.4775;-0.461389;83 LFPG;CHARLES DE GAULLE;49.012778;2.55;392 (...) Note: I believe there is a way to generate it from FS itself... - The following bit of (ugly) VB code - A lot of patience to tweak it to your needs ... Sub mylocation(ByVal curlat As Double, ByVal curlon As Double) Dim path As String = airportdata 'Full path including filename to the airport coordinates file, like C:\myairport.txt Dim latdif As Double = 10000 Dim londif As Double = 10000 ' Open the stream and read it back. Dim sr As StreamReader = File.OpenText(path) Do While sr.Peek() Dim somatemp As Double = 0 Dim Alat As Double Dim Blon As Double Dim temp As String = sr.ReadLine() Dim TestArray() As String = Split(temp, ";") If TestArray(0) = "" Then Exit Do Alat = Val(TestArray(2)) Blon = Val(TestArray(3)) If (Math.Abs(Alat - curlat) < latdif) And (Math.Abs(Blon - curlon) < londif) Then latdif = Math.Abs(Alat - curlat) londif = Math.Abs(Blon - curlon) arpt = TestArray(0) End If Loop sr.Close() End Sub When calling mylocation(curFSlat,curFSlon), it *should* set the "arpt" variable to the current airport ICAO. Be advised that if you're just *near* the airport (and not *at* the airport) it will still set the "arpt" to the nearest airport ICAO ... Of course you can tweak this: after finding the nearest airport, you can check if the altitude AGL is the same (give or take some feet) as the TestArray(4) - airport elevation- and/or check if the distance from the current location to the airport known location is less or equal than "X" nautical miles ... Yeah, it *still* can fail, but heybetter than nothing :) P.S. - If you tweak the code, share it ;-) Regards,
  4. Hello all. As I dig around trying to make my small app work (it will, someday), I'll try to share some VB2008 code snippets so others can use, in case they need it. The next subroutine will set the "arpt" global variable to the current airport's ICAO. Recipe: - You need a text file with all the airports, formatted like this: Maybe you can start with the one provided here (verify if the usage license allows you to use it in your app !) Code: You'll need: In the form declarations (so it is globally available): The subroutine itself (I didn't pay attention to the var types, so everyting is "double"feel free to correct my code !): Now, everytime you want to know in what airport your aircraft is, just call the subroutine like this: using offsets 0x6010 for the latitude value and 0x6018 for the longitude one, and your "arpt" variable should reflect the current airport ICAO. Feel free to correct my code (it's not pretty, but it's working for me ! ) and to share your own code snippets :-) For instance, I'm looking for a "total payload weight calculator" subroutine for VB2008... ;-) "V"
  5. Hello :) First of all, this is my first incursion into programming something in VB to make something happen in FS through FSUIPCso don't set *me* on fire if this is something already known :) I've searched the forum but with no avail, so here is the question: Is there any way to "start an engine fire" on FS2004 ? I mean, I think I understand correctly that the offset 3366 is "read only" in FS9, so I can't "ignite" the engine that waybut, is there any way to do it ? Regards
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.