Jump to content
The simFlight Network Forums

Frédéric-O DUCHEMIN

Members
  • Posts

    113
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Frédéric-O DUCHEMIN

  1. Well, maybe not. But it isn't a question for Paul Henty and his .Net DLL either. I don't often notice messages there, Paul picks them up.

    Here an example : http://forum.simflight.com/topic/80215-starting-fsx-from-vbnet-etc/

     

    Windows controls the Registry. All of the information you need to locate FS is in the Registry. Therefore you need to use functions provided by Windows to access the relevant parts of the Registry and obtain the information to locate FS. 

     

    "API" means "Application Programming Interface". You are programming an application to interface to Windows, therefore you use Windows APIs.

     

    You'll find all of the Registry API functins start with the letters "Reg" which makes them easy to spot.  I cannot teach you Windows programming so you'd need to do some work on this if you are new to Windows programming.

     

    For the Registry functions, check out this section in the MSDN: Registry Reference

    Thanks I already play with the reg path to check the FSUIPC version to the sim with the newer version I have declared to php file when my ACARS system is launched :)

     

    Ex: http://forum.simflight.com/topic/79503-howto-find-runway-in-use-by-wind-direction/#entry481072

    So but in this case I'm talking about the INSTALLER

     

    Fred

  2. You posted your question, with an unhelpful title, in the wrong place. I've moved it and re-titled it for you. Please use the Support Forum in future, and use more helpful titles.

    Sorry Pete it's not a support question for FSUIPC I have made  :oops: 

     

    Are you are programmer? If not I wouldn't try. If you are, then you just use the normal Registry API. Please refer to the copious Windows API documentation available on-line. The places to look in the Registry are clearly shown in the Installer log. Isn't that enough help?

    I think like you at your begining ! So I think there is a confusion, what's the purpose of Windows API to make an installer to find path ?

    Regards Fred

  3. Hello Peter,

     

    I would like to install into Modules Folder some lua scripts. So can you please share a piece of your code to detect in registry path where is located the sim path, like your installer?

    Installer for FSUIPC4.DLL version 4.948
    
    
    Looking in registry for FSX install path:
         HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0
         Parameter"SetupPath"
    ... >>>  OK! FOUND FSX!  <<< ...
         SetupPath=C:\Microsoft Games\Microsoft Flight Simulator X\
    
    Looking in registry for FSX-SE install path:
         HKEY_LOCAL_MACHINE\SOFTWARE\DovetailGames\FSX
         Parameter"Install_Path"
    Not there, so looking in:
         HKEY_CURRENT_USER\SOFTWARE\DovetailGames\FSX
         Parameter"AppPath"
    Not there, so looking in:
         HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0
         Parameter"SetupPath"
    Not there, so looking in:
         HKEY_CURRENT_USER\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator - Steam Edition\10.0
         Parameter"AppPath"
    ... NOT found! ...
    
    Looking in registry for Prepar3D v1 install path:
         HKEY_LOCAL_MACHINE\SOFTWARE\LockheedMartin\Prepar3D
         Parameter"SetupPath"
    Not there, so looking in:
         HKEY_CURRENT_USER\SOFTWARE\LockheedMartin\Prepar3D
         Parameter"AppPath"
    ... NOT found! ...
    
    Looking in registry for Prepar3D v2 install path:
         HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v2
         Parameter"SetupPath"
    Not there, so looking in:
         HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v2
         Parameter"AppPath"
    ... NOT found! ...
    
    Looking in registry for Prepar3D v3 install path:
         HKEY_LOCAL_MACHINE\SOFTWARE\Lockheed Martin\Prepar3D v3
         Parameter"SetupPath"
    Not there, so looking in:
         HKEY_CURRENT_USER\SOFTWARE\Lockheed Martin\Prepar3D v3
         Parameter"AppPath"
    ... NOT found! ...
    ===========================================================
    
    INSTALLATION FOR FSX:
    SetupPath="C:\Microsoft Games\Microsoft Flight Simulator X\"
    Checking version of the FSX EXE:
    ... Version 10.0.61637.0  (Need at least 10.0.60905.0)
    Checking compatibility with installed SimConnect:
        Found SimConnect build 60905 (Original)
        Found SimConnect build 61242 (SP1 May07)
        Found SimConnect build 61259 (Acc/SP2 Oct07)
    Checking if there's already a version of FSUIPC4 installed in:
           C:\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL
    ... Version 4.947d found.
    FSX Modules folder already exists.
    Okay -- installed FSUIPC4 into "C:\Microsoft Games\Microsoft Flight Simulator X\Modules\FSUIPC4.DLL"
    Looking for the current user's Application Data path: 
    ... found as "C:\Users\WinDEV\AppData\Roaming"
    Now finding \Microsoft\FSX\FSX.CFG for all users, including this one
    Looking in "C:\Users\All Users\AppData\Roaming"
     ... No FSX.CFG there
    Looking in "C:\Users\Default\AppData\Roaming"
     ... No FSX.CFG there
    Looking in "C:\Users\Default User\AppData\Roaming"
     ... No FSX.CFG there
    Looking in "C:\Users\Default.migrated\AppData\Roaming"
     ... No FSX.CFG there
    Looking in "C:\Users\Public\AppData\Roaming"
     ... No FSX.CFG there
    Looking in "C:\Users\WinDEV\AppData\Roaming"
    Found FSX.CFG in "C:\Users\WinDEV\AppData\Roaming\Microsoft\FSX\FSX.CFG"
    Now checking DLL.XML ...
    ... There is a previous DLL.XML, checking for FSUIPC4 section.
    ... FSUIPC4 section already exists but will be replaced.
         (for FSUIPC4, without Loader)
    ... FSUIPC4 section of DLL.XML written okay
    Now checking for a SimConnect.XML file ...
    ... There is a SimConnect.XML, checking for "local" section.
    ... "local" section already exists, file not modified.
    "Modules\FSUIPC Documents" folder already exists.
    Now installing additional files into the "Modules\FSUIPC Documents" folder:
       Installed "FSUIPC4 User Guide.pdf" okay
       Installed "FSUIPC4 for Advanced Users.pdf" okay
       Installed "FSUIPC4 History.pdf" okay
       Installed "List of FSX and P3D controls.pdf" okay
       Installed "FSUIPC Lua Library.pdf" okay
       Installed "FSUIPC Lua Plug-Ins.pdf" okay
       Installed "Lua License.pdf" okay
       Installed "Lua Plugins for VRInsight Devices.pdf" okay
       Installed "LuaFileSystem.pdf" okay
       Installed "Example LUA plugins.zip" okay
       Installed "ASN WX Radar facilities in FSUIPC4.pdf" okay
       Installed "Offset Mapping for PMDG 737NGX.pdf" okay
       Installed "Offset Mapping for PMDG 777X.pdf" okay
       Installed "FSUIPC4 Offsets Status.pdf" okay
       Installed "Profiles in Separate Files.pdf" okay
    ===========================================================
    
    All installer tasks completed.
    Registration check for FSUIPC4 and WideFS was successful! (result code 00)
    
    *************** End of Install Log ***************
    

    Help will be welcome :)

     

    Best regards Fred

  4. transponder.Length.ToString will not work.

     

    So it's working (I'm flying now)

    [10:53] PMDG 747-8F PMDG House Livery  B748
    [10:53] Flight  SDC7849 is ready to depart  LGAV with a final destination of  LFML
    [10:53] ZFW: 591801 lbs
    [10:53] TOW:  591801 lbs
    [10:53] METAR for departing airport: 2015/06/19 10:20
    LGAV 191020Z 34007KT 9999 FEW018 BKN025 23/12 Q1010 NOSIG
    [10:53] Boarding 
    [10:53] Parking Brake Applied 
    [10:58] Transponder set to 2234
    [10:58] Engine 1 ON 
    [10:58] Engine 4 ON 
    [10:59] Engine 2 ON 
    [10:59] Engine 3 ON 
    [11:00] Flaps at Position 1
    [11:00] Flaps at Position 5
    [11:00] Flaps at Position 10
    [11:00] Beacon lights ON
    [11:01] Taxi lights ON
    [11:01] QNH Set to: 1010
    [11:02] Parking Brake Released 
    [11:02] Taxiing to Runway 
    [11:09] Taxi lights OFF
    [11:09] Taxi lights ON
    [11:09] Landing lights ON 
    [11:09] Strobe lights ON
    [11:09] Taking Off with 293638 Cargo on board
    [11:09] Taking Off from Runway 03R
    [11:10] You Take off @ 186 kt 
    [11:10] Pitch angle 8 degrees and 146042 lbs FOB
    [11:10] Wind Heading  340  | Wind Speed  7 kt | Temperature  25 °C
    [11:10] Landing Gear Up |  192 kt and 560 ft
    [11:11] Flaps at Position 5 @ 197 kt
    [11:11] Climbing to TOC 
    [11:11] Flaps at Position 2 @ 211 kt
    [11:14] Flaps at Position 1 @ 240 kt
    [11:15] QNH Set to: 1011
    [11:15] QNH Set to: 1012
    [11:15] QNH Set to: STD
    [11:15] Taxi lights OFF
    [11:15] Landing lights OFF @ 10200 ft 
    [11:16] Flaps Retracted @ 256 kt
    [11:28] TOC reached. Cruise started 32000 ft
    
    
    but I have removed this part of code (before your answer). In the code actually I don't have the code bellow

     

        Private Sub txtTransponder_TextChanged(sender As Object, e As EventArgs) Handles txtTransponder.TextChanged
            If txtTransponder.Text.Length = 1 Then
                txtTransponder.Text = "000" & txtTransponder.Text
            End If
            If txtTransponder.Text.Length = 2 Then
                txtTransponder.Text = "00" & txtTransponder.Text
            End If
            If txtTransponder.Text.Length = 3 Then
                txtTransponder.Text = "0" & txtTransponder.Text
            End If
            logTransponder()
        End Sub

    Ah yes. I did not see that there is another variable being declared call transponder:

    Dim transponder As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & vbCrLf
    
    This is bad because it's the same name as the offset called transponder.
     

    Ok I will change after the flight. To the processflaps() function I have also get the aircraft model but in my example I have 2 conditions one for AIRBUS an other for BOEING But Now I'm flying with PMDG 747-8F is good is BOEING but the flaps detentes are not the same like 737-800... How todo a well loop by subcategories I have seen in the forum someone declare "obj".

    processflaps.txt

    Regards,

    Fred

  5. Private Sub tmrtrans_Tick(sender As Object, e As EventArgs) Handles tmrtrans.Tick
       If transponder.Value <> lastTransponder Then
          Dim transponder As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & vbCrLf
          My.Computer.FileSystem.WriteAllText(logname, transponder, True)
          Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & "*"  
          My.Computer.FileSystem.WriteAllText(reportname, xml, True)
          lastTransponder = transponder.Value
       End If
       tmrtrans.Stop()
    End Sub
    

     

    I have an error in VB 2012 Ultimate with this line with transponder.Value (as string)

    lastTransponder = transponder.Value
    
    I have made the changes bellow:

     

    Private lastTransponder as Integer
    
      Private Sub tmrtrans_Tick(sender As Object, e As EventArgs) Handles tmrtrans.Tick
       If transponder.Value <> lastTransponder Then
          Dim transponder As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & vbCrLf
          My.Computer.FileSystem.WriteAllText(logname, transponder, True)
          Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & "*"  
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                lastTransponder = transponder.Length.ToString
            End If
            tmrtrans.Stop()
        End Sub
    
        Private Sub txtTransponder_TextChanged(sender As Object, e As EventArgs) Handles txtTransponder.TextChanged
            tmrtrans.Start()
        End Sub
    
    It's work now but it's the good way to code ?! You told me to remove timers. I'm agree with you so how I can do that ?

    Thanks,

    Regards,

    Fred

  6. Hello Rob,
     
    The latest version is FSUIPC4939t supports Prepar3D version 2.5, builds 12942-5

    Install complete FSUIPC version 4.939t Install_FSUIPC4.939t for FSX, FSX-SE and Prepar3D versions 1.4 and 2.0-2.5
    -- Supports Prepar3D version 2.5, builds 12942-5
    -- Supports as yet unreleased FSX-SE build 62613.
    -- Supports PMDG 737NGX data mapping from update SP1d
    -- Provides offset for current Profile name string
    -- Installer copes with more common Registry mix-ups between FSX and FSX-SE.
    -- Installer fixed to prevent premature ending with FSX-SE only.
    -- Fixed a long-standing problem with some older FS98 style control assignments.
    -- Reverted a change to the way inhibited throttle controls are handled
    -- Improved handling of Lua plug-in event signalling (fixed in 4.939n)
    -- Facility added to use the SimConnect camera control function via FSUIPC offsets
    -- OOMcheckInterval parameter can be used to extend interval of memory checking
    -- Lua ipc.ask function now allows colur RED or WHITE to be selected.
    FSUIPC version 4.939t only for those with FSUIPC 4.939g or later already installed FSUIPC4939t

     

    You have the version of Prepar3D v2.4 maybe it's the problem ?!

     

    Regards,

     

    Fred

  7. Thanks Paul,

     

    Problem maybe the timer is stopped but never started

    Private Sub tmrtrans_Tick(sender As Object, e As EventArgs) Handles tmrtrans.Tick
       If transponder.Value <> lastTransponder Then
          Dim transponder As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & vbCrLf
          My.Computer.FileSystem.WriteAllText(logname, transponder, True)
          Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & "*"  
          My.Computer.FileSystem.WriteAllText(reportname, xml, True)
          lastTransponder = transponder.Value
       End If
       tmrtrans.Stop()
    End Sub
    

    I will make a try. I suppose all NAV and COM it's wrong ?!

     Private Sub txtNAV1_TextChanged(sender As Object, e As EventArgs) Handles txtNAV1.TextChanged
            tmrNAV1.Start()
        End Sub
        Private Sub tmrNAV1_Tick(sender As Object, e As EventArgs) Handles tmrNAV1.Tick
            If nav1.Value = txtNAV1.Text Then
            Else
                Dim nav1 As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "NAV1 set to " & txtNAV1.Text & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, nav1, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "NAV1 set to " & txtNAV1.Text & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                nav1 = txtNAV1.Text
            End If
            tmrNAV1.Stop()
        End Sub
    
        Private Sub txtCOM2_TextChanged(sender As Object, e As EventArgs) Handles txtCOM2.TextChanged
            tmrCOM2.Start()
        End Sub
        Private Sub tmrCOM2_Tick(sender As Object, e As EventArgs) Handles tmrCOM2.Tick
            If com2.Value = txtCOM2.Text Then
            Else
                Dim com2 As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "COM2 set to " & txtCOM2.Text & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, com2, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "COM2 set to " & txtCOM2.Text & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                com2 = txtCOM2.Text
            End If
            tmrCOM2.Stop()
        End Sub
    
        Private Sub txtCOM1_TextChanged(sender As Object, e As EventArgs) Handles txtCOM1.TextChanged
            tmrCOM1.Start()
        End Sub
        Private Sub tmrCOM1_Tick(sender As Object, e As EventArgs) Handles tmrCOM1.Tick
            If com1.Value = txtCOM1.Text Then
            Else
                Dim com1 As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "COM1 set to " & txtCOM1.Text & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, com1, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "COM1 set to " & txtCOM1.Text & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                com1 = txtCOM1.Text
            End If
            tmrCOM1.Stop()
        End Sub
    
    
        Private Sub Cbqnh_TextChanged(sender As Object, e As EventArgs) Handles Cbqnh.TextChanged
            tmrQNH.Start()
        End Sub
    
    
        Private Sub tmrQNH_Tick(sender As Object, e As EventArgs) Handles tmrQNH.Tick
            ' If qnh.Value.ToString = Cbqnh.Text Then
    
            If Cbqnh.Text = "1013" Then
                Dim vt As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "QNH Set to: STD" & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, vt, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "QNH Set to: STD" & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
            Else
                Dim vt As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "QNH Set to: " & Cbqnh.Text & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, vt, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "QNH Set to: " & Cbqnh.Text & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                'qnh = Cbqnh.Text
            End If
            '  End If
            tmrQNH.Stop()
    
        End Sub
    
  8. Hi Paul,

     

    Sometimes and some payware flood NAV com

     

    This an example

    19:23 UTC Transponder set to 0465
    19:23 UTC Transponder set to 0465
    19:24 UTC Transponder set to 0465
    19:24 UTC Transponder set to 0465
    19:24 UTC Transponder set to 0465
    19:24 UTC Transponder set to 0465
    19:25 UTC Transponder set to 0465
    19:25 UTC Transponder set to 0465
    19:25 UTC Transponder set to 0465
    19:25 UTC Transponder set to 0465
    19:26 UTC Transponder set to 0465
    19:26 UTC Transponder set to 0465
    19:26 UTC Transponder set to 0465
    19:27 UTC Transponder set to 0465
    19:27 UTC Transponder set to 0465
    

    Link: http://www.skydream-airlines.com/index.php/pireps/view/1649

     

    the code:

    Public transponder As Offset(Of Integer) = New FSUIPC.Offset(Of Integer)(&H354)
    
    Public Function gettransponder()
            Return (Conversion.Hex(transponder.Value)).ToString()
        End Function
    
     Private Sub tmrtrans_Tick(sender As Object, e As EventArgs) Handles tmrtrans.Tick
            If transponder.Value = txtTransponder.Text Then
            Else
                Dim transponder As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & vbCrLf
                My.Computer.FileSystem.WriteAllText(logname, transponder, True)
                Dim xml As String = DateTime.UtcNow.ToString("[HH:mm]") & Chr(32) & "Transponder set to " & txtTransponder.Text & "*"
                My.Computer.FileSystem.WriteAllText(reportname, xml, True)
                transponder = txtTransponder.Text
            End If
            tmrtrans.Stop()
        End Sub
    
        Private Sub txtTransponder_TextChanged(sender As Object, e As EventArgs) Handles txtTransponder.TextChanged
            If txtTransponder.Text.Length = 1 Then
                txtTransponder.Text = "000" & txtTransponder.Text
            End If
            If txtTransponder.Text.Length = 2 Then
                txtTransponder.Text = "00" & txtTransponder.Text
            End If
            If txtTransponder.Text.Length = 3 Then
                txtTransponder.Text = "0" & txtTransponder.Text
            End If
            tmrtrans.Start()
        End Sub
    

    The question: How to avoid to catch the value when is the same ?

     

     

    Regards,

     

    Fred

  9. Hi Bruno,

     

    Can you reset your flight situation go to your fsx.cg and delete situation like mine:

    [USERINTERFACE]
    PageID=1
    OpenATCOnCreate=0
    SHOW_MISSION_CAPTIONS=1
    PAUSE_ON_LOST_FOCUS=0
    PROMPT_ON_EXIT=1
    SITUATION=C:\Users\WinDEV\Documents\Fichiers Flight Simulator X\Defaut
    Map_Orientation=2
    ShowAllACPaintSchemes=1
    SelectAircraftManufacturer=Tous
    SelectAircraftPublisher=Tous
    SelectAircraftType=Tous
    DisplayFuelAsWeight=1
    

    Maybe your *.FLT is corrupt So try to change your aircraft and make a try

     

    Regards,

     

    Fred

  10. 1. The number of passengers on board is not recorded in FS. Each plane, depending on how it's written, has a different number of payload stations. For example, the default 737 has playload stations representing rows of seats: e.g. First Class, Coach 3-10. All you can do is read and write the total weight for all these passengers.

     

    Some complex payware aircraft have a payload station per seat.

     

    Maybe ask to TOPCAT dev ?! I will make a try.

     

    1a. The Max Takeoff Weight is not available in FS. You can get the Max Gross Weight which is usually close. I've added this to the PayloadServices (new DLL attached). Either use the Max Gross Weight or you can just hold the real-world information in a table in your application.

            Dim ps As PayloadServices = FSUIPCConnection.PayloadServices
            ps.RefreshData()
            MsgBox(ps.MaxGrossWeightKgs.ToString("F0") & "Kg")
    

    Thank for improve your DLL ;)

     

    2. You can get back a weather structure from the weather services. You can then construct your string from the various properties. There is full Intellisense documentation to help with this. For example, making a temperature string:

            Dim ws As WeatherServices = FSUIPCConnection.WeatherServices
            Dim weather As FsWeather = ws.GetWeatherAtAircraft()
            Dim message As String = "Temperature " & weather.TemperatureLayers(0).DayCelsius & "°C"
            MsgBox(message)
    

    I'm thinking to get part of string (METAR return)

     

    6. Offset 0x0D06, bit 6. See this thread on how to use a bitarray to make it easier. http://forum.simflight.com/topic/79536-little-understanding-problem-reading-from-project-magenta-offset/

    Sorry in your FSUIPCClientExample_VB you have already answer to my question. So in the forum I have seen that it's seem easiest method to check value

    Private Sub chkAvionics_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chkAvionics.CheckedChanged
            Me.avionics.Value = IIf(chkAvionics.Checked, 1, 0)
        End Sub
    

    7. Offset 0x31F4 controls the pushback. I cannot see anywhere in your application that this is declared or used. Looks like to need to add this.

    Yes it is but with bad offset

    Public pushback As Offset(Of Integer) = New Offset(Of Integer)(&H31F0)
    
    Public Function getpushbackflag()
            Return pushback.Value < 3
        End Function
    
     

    Thanks again,

     

    Regards,

     

    Fred

  11. Hello Paul,

     

     

    How to:

     

    1) How to return number off pax onboard (I mean update by PayloadServices)

    1.a) Takeoff Weight: 65054 kg

    2) weather doecoded like this( Weather: Wind 196/1 | Temperature 25°C | Visibility 9999 m | QNH 1015)

    3) QNH set to auto pilot (Altimeter setting changed to 1013 at 10 ft AGL)

    4) Auto pilot on/off dual or single

    5) Find ils etablished by NAV 1

    6) Recognition Lights

    7) Push back mine doesn't work anymore

    Thanks by advance

    Regards Fred

  12. Hey Paul,

     

    I have found the problem (lose FSUIPC connection)

     Dim msgcontrol As Offset(Of Short) = New FSUIPC.Offset(Of Short)("msg", &H32FA)
            Dim msg As Offset(Of String) = New FSUIPC.Offset(Of String)("msg", &H3380, 128)
            msg.Value = "SKYDreamTracker is Connected to SIM !!! Have a nice flight;)"
            msgcontrol.Value = 5
            FSUIPCConnection.Process("msg")
    

    During my multiple try the message appear during a longtime not the 5s I would like...So Since yesterday no message appear but I lost FSUIPC connection.

     

    Regards,

     

    Fred

  13. Thanks a lot Paul, for your attention and your adds ;)
     
     

        Private Function getWindDirectionFromMETAR(metar As String) As Double
            Dim heading As Double = 0
            Dim endPos As Integer = metar.IndexOf("KT")
            If endPos >= 0 Then
                Dim startPos As Double = metar.LastIndexOf(" ", endPos)
                If startPos >= 0 Then
                    heading = metar.Substring(startPos + 1, 3)
                End If
            End If
            Return heading
        End Function
    
    

    Here a modified version of the getRunways function that takes in the wind direction and the ICAO...


    Thanks for those adds ;) call like this: (maybe Each ?)

        headingdeparture = FsuipcData.getWindDirectionFromMETAR(lblWXDep.Text)
            depart = getActiveRunway(lblDeparture.Text, headingdeparture)
            Me.lstDeparture.Items.Clear()
            Me.lstDeparture.Items.Add(depart.ToString())
            headingarrival = FsuipcData.getWindDirectionFromMETAR(lblWXArr.Text)
            arrival = getActiveRunway(lblArrival.Text, headingarrival)
            Me.lstArrival.Items.Clear()
            Me.lstArrival.Items.Add(arrival.ToString())
    

    I've added a new property to the DLL to get the FSUIPC Version number (new DLL attached). You need to be connected to FSUIPC first:

    FSUIPCConnection.FSUIPCVersion.ToString

    I don't know how you would get the version directly from the fsuipc.dll file on the disk.


    By file property and Php Script
     

     
       Public Function CheckVersion()
            Dim pathtosim As String = ""
            Dim fsxpath As String = ""
            Dim fs9path As String = ""
    
            If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0", "SetupPath", Nothing) IsNot Nothing Then
                fsxpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\10.0", "SetupPath", Nothing).ToString
            Else
                If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\microsoft games\flight simulator\10.0", "SetupPath", Nothing) IsNot Nothing Then
                    fsxpath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\microsoft games\flight simulator\10.0", "SetupPath", Nothing).ToString
                Else
                    If My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0", "AppPath", Nothing) IsNot Nothing Then
                        fsxpath = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\10.0", "AppPath", Nothing).ToString
                    End If
                End If
            End If
    
            If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\9.1", "EXE Path", Nothing) IsNot Nothing Then
                fs9path = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Games\Flight Simulator\9.1", "EXE Path", Nothing).ToString
            Else
                If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\microsoft games\flight simulator\9.0", "EXE Path", Nothing) IsNot Nothing Then
                    fs9path = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\microsoft games\flight simulator\9.0", "EXE Path", Nothing).ToString
                Else
                    If My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\9.0", "EXE Path", Nothing) IsNot Nothing Then
                        fs9path = My.Computer.Registry.GetValue("HKEY_CURRENT_USER\Software\Microsoft\Microsoft Games\Flight Simulator\9.0", "EXE Path", Nothing).ToString
                    End If
                End If
            End If
    
            If fsxpath IsNot "" And fs9path IsNot "" Then
                If MsgBox("FSX and FS9 detected. " & vbCrLf & "Is your primary simmulator FSX?", MsgBoxStyle.YesNo + vbQuestion, "Warning") = vbYes Then pathtosim = fsxpath
            Else
                pathtosim = fs9path
            End If
            If fsxpath IsNot "" And pathtosim = "" Then pathtosim = fsxpath
            If fs9path IsNot "" And pathtosim = "" Then pathtosim = fs9path
            If fsxpath = "" And fs9path = "" Then
                MsgBox("Can not find path to Flight simulator. " & vbCrLf & "Select path to FS instalation folder.")
                Dim fbd As New FolderBrowserDialog
                fbd.ShowDialog()
                pathtosim = fbd.SelectedPath & "\"
                fbd.Dispose()
            End If
            pathtosim = pathtosim.Trim
            Do While pathtosim.Contains("\.")
                pathtosim = pathtosim.Replace("\.", "\")
            Loop
    
            Dim fversion As String = FileVersionInfo.GetVersionInfo(pathtosim & "Modules\FSUIPC4.DLL").FileVersion
            Dim fversion2 As String = fversion.Substring(0, 5)
            Dim fversion3 As String = fversion2.Replace(".", "")
            Return fversion3
        End Function 
     

    Now I have a big problem losing FSUIPC connection > 2mn and I can't reconnect (close to finish)

    Regards,

    Fred

    post-93923-0-57721200-1433920813_thumb.p

  14. Problems:
     
    1) When I call the function just departure are show 
    2) when the sim is paused issue and crash of app
    3) It would be easy to retrieve windir after downloading metar by NOAA weather instead FSUIPCConnection.WeatherServices because I have some troubles with the FSUIPC connection goes after click on startlog.

    4) this code is correct ? 

    Try
                    depart = getActiveRunway(lblDeparture.Text)
                    Me.lstDeparture.Items.Clear()
                    Me.lstDeparture.Items.Add(depart.ToString())
                    arrival = getActiveRunway(lblArrival.Text)
                    Me.lstArrival.Items.Clear()
                    Me.lstArrival.Items.Add(arrival.ToString())
                Catch ex As Exception
    
                End Try
    

    5) Howto check FSUIPC.dll version in "SIMroot\modules" and paste the result to the label and make an action if sim_fsuipc < actual_version

    6) add menu () doesn't work it's not the function doesn't work it's a problem of timing like others problem due to  how the fsuipc connection is make

     

    PS: I'm sorry for this newbie questions, so I'm try to close quickly this thread.

     

    Regards Fred

×
×
  • 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.