Jump to content
The simFlight Network Forums

peterk54

Members
  • Content count

    23
  • Joined

  • Last visited

Community Reputation

0 Neutral

About peterk54

  • Rank
    Member
  • Birthday 07/19/1938

Profile Information

  • Gender
    Male
  • Location
    Oberglatt / ZH (LSZH)
  • Interests
    Simulators
  1. peterk54

    How to check if P3D is running

    Dear hkhoanguyen We use VB6. You may adopt to .NET our proposal. You can use the Windows API FindWindow and search for class "FS98MAIN". Take the hadle received to read with Windows API GetWindowText. The P3D windows does change from "Lockheed Martin® Prepar3D® v3 with WideServer: waiting for clients" to "Lockheed Martin® Prepar3D® v3 with WideServer: 1 connected" where 1 shows total clients connected. when this is up, P3D and FSUIPC do run properly. During flying check offset &H3F02, 2, VarPtr(FS_FLTSTN_RELOAD) against a variable xxx_OLD if it does increase. If it does, wait until reloaded with offset &H3365, 1, VarPtr(FS_MENUDIALOG_FLAG). Wait until not anymore 1 but 0. Reload all new data required into your application. Hope this assists. Regards Peter
  2. Dear Volker You know my respect for your work ! Just a very small unconvenience: 1. Prepar3D 3.4.22.19868 / 4.1.7.22841 2. FSUIPC* 4.966c/ 5.103 and WideFS 6.999c 3. I use the FSC in a network! Yes 4. FS Commander 9.6 v9 01-July-2017 and Database Manager 9.6 v9 Build 7-July-2017 5. Navigraph AIRAC Cycle 1501 Rev 1 Jan08-Feb04/15 6. Simmarket download version 7. Operating System Windows 7 -32/-64 Professional 8. How many monitors are used = 1 When flight plan is opened the menu item "Show Plan" under "Flight-Plan" should be marked ON. Now to remove two mouse-clicks are required. Thanks & best regards Peter
  3. Guten Abend Volker 1. Prepar3D 3.4.22.19868 / 4.1.7.22841 2. FSUIPC* 4.966c/ 5.103 and WideFS 6.999c 3. I use the FSC in a network! Yes 4. FS Commander 9.6 v9 01-July-2017 and Database Manager 9.6 v9 Build 7-July-2017 5. Navigraph AIRAC Cycle 1501 Rev 1 Jan08-Feb04/15 6. Simmarket download version 7. Operating System Windows 7 -32/-64 Professional 8. How many monitors are used = 1 Die Angabe Total Fuel welche FSUIPC - oder sogar SimConnect - zur Verfügung stellt ist falsch. Um welchen Betrag ist mir unklar, scheint Prozentual zu sein. Die korrekte Menge kann mittels Daten aus FSUIPC berechnet werden. Wir müssen das für unsere Programme auch so lösen. Sende gerne den Quellcode in VB6 zu. Herzliche Grüsse Peter
  4. Good afternoon Volker As ever fast reply ! OK, I accept your system and will read the manual. We mostly do "dirty" flight plans not using SID / STAR nor Transitions. And we fly VOR to VOR or Intersec. Best regards Peter
  5. Dear Volker, Dear janar737 I respond as I found similar issue using FSC flightplans. This is a part of the plan created in FSC 9.6 rev 7: VHHH ... BARUG LNZ SBG KPT ... LSZH At creation everything is fine. But if OK button in the Flight Plan window is pushed or the plan is reopened, SBG is not anymore close to Salzburg. Now it is Strathbogie, Australie. We assume this error: The flightplan at reloading does take the first entry in the database rather to check with the correct coordinates found saved in the "pln" file. we tried several NDB's, VOR with same name and had alltime the same error. We use FSX or P3D v3.4, Win7-32, local or FSUIPC 4.966c with Wideclient 6.999z4, FSC Database Manger 9.6 rev 7 NET. We may found a solution ? Best regards, Peter
  6. Dear sxa1376 Great ! Such things happened to me as well ! Let me know if you have other questions. Best regards Peter
  7. To sx1376 Pete is correct, you should receive 7 tanks from offset 1400 to 1520. I write exactly to these offsets: Upper Deck, Section A to E. Payload in 1550 and 1580. A) Wrong offsets increase 1400 to 1430 ar steps of 30 (in hex) , 48 (in dec). You mixed up ? B) Wrong definitions Check read 4 bytes at offset 13FC. Do you get equal or more of your total PAX sections and payload ? Check your aircraft.cfg. Only one line of "max_number_of_stations=n" ? Sample: max_number_of_stations=9 station_name.0 ... station_name.8 station_load.0 ... station_load.8 C) No more ideas, wait your feedback ! Best regards Peter
  8. Dear sxa1376 We agree with Pete. We programm in VB6. However it is the same in C++. We assume you have FSUIPC4 Offsets Status.pdf open to your hands. Fuel You need to change the Percentage-Level of the tanks, start with offset &H0B74, 4 bits, Fuel: centre tank level, % * 128 * 65536. 100% = 8'388'607 (= 128 * 65536), equals at 50% to 4'194'303 to be written into the 4 bits Payload It depends of your aircraft.cfg file. Start to research on offsett &H1400. Each Station has 48 Bites. Write the weight in lbs into &H1400 + 0 = &H1400, a double of 8 bits. Next station: &H1400 + 48 bits equals to &H1400 + &H30 = &H1430. Write the weight in lbs into &H1430 + 0 = &H1430, a double of 8 bits. And so on until you have all stations set. By the way you can put as much you want and make your Cessna 172 1'000'000 pounds heavy. Best regards from Switzerland Peter
  9. Dear Pete There are enough happy user around, please be assured. You do a great job and overall it's very appreciate. Take my thanks in place for many other users ! Best regards, Peter
  10. Dear Pete & Paul :razz: :idea: With your help I could find 2 errors in my definitions (shame on my :oops: ) and write the code as described by Paul. I get the METAR strings out now !!! I can send GLOB as ICAO and get the global weather back. Now I go further Many thanks and best regards Peter
  11. Dear Pete Suffix & (&H0000 or &H0000&) We will investigate. We never used the suffix &. Seems that VB3 and earlier handled small vaulues not as long to economise on memory. VB6 should not make any difference. Structure or single variables So to set the airport / ICAO just need to send the string, not entire NewWeather structure Signature and timestamp Until now no risk other programm disturbs. So we just disregard and do not read/set at this time. I'm just reading again thru documents ... Target 1. Get weather / METAR of DEP airport and ARR airport of the flight 2. If we succeed set weather global for the flight / actual moment Thanks Pete ! :razz: Peter
  12. Dear Peter I'm really sorry to come back on this NWI - METAR Interface. There are several topics on this and most end by no real success, especially in VB6. I know VB6 is not used much anymore, unfortunattely I can't change. As we can read/write everything else with FSUIPC as documented except the weather NWI at &HB000 / &HC000 and the "Detecting runways in use" at &HD000, our non-understanding must be caused by principal techniques doing wrong rather the VB6 programming itself. Further please do not forget for us English is not the mother language. We Swiss have to translate from Swiss German (our dialect, in this I think) to German, than from German to English, and back. So sometimes translating may be an issue as well. 1. observation :???: We can not get any data back from FSX in &HB000 / &HC000 blocks either by Byte-array's, strings or other variables. We can see the data in FSInterrogate2std. 2. observation :oops: We can not write any data into in &HB000 / &HC000 blocks. We can't see the data changing in FSInterrogate2std. Confused :evil: Confusing is i.e. once it is stated write complete structure only, else write "GLOB" or "NW_CLEAR" in some location. What is correct ? Further we are not clear with the signature (can I set one number and use it for ever ...?) and time-stamp (just wait 2 seconds until next read not ok ?) VB6 translation :idea: We setup the structures translated into VB6 and are almost sure to be correct. Strings must be converted from Byte-arrays charakter by charakter with ASC(xx) Conversion unsigned etc. solved in VB6 Please / Steps :razz: Please explain steps by steps simple, i.e. ------- Start ------- Write "NW_CLEAR" into &Hxxx, 4 bytes Write "GLOB" into &Hxxx, 4 bytes Process write Read "Whatever" from &Hxxxx, 8 bytes ------- Wait 2 seconds or read "timestamp" until changed ------- next step ------- and so on. Sorry Pete, normally I'm thought not to be so complicated und more clever ... You still are in holidays, do not hurry ! Best regards Peter
  13. peterk54

    Reading METAR in FSX

    - FSX - Yes studied the SDK and documents So the procedure is: - Declared NW_CLEAR and NW_GLOBAL as other similar constants in VB6 - Write or WriteS (?) the string "GLOB" to &HC808, 8, - Write the command parameter NW_GLOBAL=3 &HC800, 8 - Call FSUIPC_Process - Then Write or WriteS (?) the string "xxx" containing the METAR string to &HB000 (I take sample METAR string from one I found in the forum told "working") - Call FSUIPC_Process - No really required, just to see if changes take place: Wait until FSUIPC has got new data then read &HB000 a string to verify - Call FSUIPC_Process I try later again.
  14. peterk54

    Reading METAR in FSX

    Hello Pete Sorry, can not get working the weather interface. I'm sure that basically my VB6 code is correct as well the variables or variable arrays. Just confused how the process really is, need towrite what there ? Need to read something where ??? What I want to do is globally change weather with a metar string. With this we can fly alltime in weather conditions we wanted ? Everything else works so nicelly ! Peter www.airforcecenter.ch, select English and see under simulators ...
  15. Pete Yes, can confirm: if I write into &H1400 + (offset &H30 per payload station) the weights, the CG in &H2EF8 changes. On my aircraft depending on 4 freight stations from 15 to 31% as described in the offset list. The fuel qty does not so influence the CG as they are quite close arranged around the CG. The last part: Should move it to the other thread: http://forum.simflight.com/topic/78022-reading-metar-in-fsx/?hl=metar I can not get the weather working ... Sorry for confusion Peter
×

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.