Jump to content
The simFlight Network Forums

scruffyduck

Members
  • Posts

    146
  • Joined

  • Last visited

Everything posted by scruffyduck

  1. Hi Pete could you confirm whether or not the value which can be sent to 'set' controls is in the same units etc as described in the offset list? thanks in advance Jon
  2. When I write a value for visibility to the normal weather offsets it changes on a continuous basis by 100ths as Pete states. This is not reflected accurately in the FS weather setting menus which only have step wise changes. The value being read back from one of the visibility offsets is in 100ths however. I write the values both the the visibility around the aircraft and the mormal offsets. I'm pretty sure that if I wrote it only to the visibility around the aircraft offset then the value would not be reflected in any other offset value.
  3. Thanks Pete That is what I am doing - checking them and then clearing them on a regular cycle. Yep - been there made that mistake :oops: in normal closure my program cleans up the hot key entries it creates. Presumably since FSUIPC does no clearing itself any program which ends abnormally will leave it's key assignments in the table?
  4. Pete Quick follow-up. Am I right in assuming that once a key is pressed the state of byte 3 persists. In othe words if I am looking for the user to press say '1' but '2' get pressed by mistake then FSUIPC will show that '2' was pressed until my application clears it? Dunno if I am explaining it very well but if I am checking for a keypress every second say then I need to clear all the byte 3's down to zero after the test otherwise if I test for '2' later in the program it will be set even though it was not pressed when I expected it but earlier by mistake ======================= OK re-reading the programmers guide I think that answers the question - I do need to clear them ========================= thanks
  5. Hi Pete Just looking at how to implement hot keys using offsets 320C etc. I think I understand the process. As I read it the value in 320C should be 56. if it is zero then something is wrong! As far as the virtual keycode is concerned I write that to byte zero of a free slot and any shift state in byte 1. I monitor byte 3 for non zero and that tells me the key has been pressed. Looking at byte 2 it seems that I would trap this and the key would not pass to FS unless I set bit 1 of byte 2. I checked the advanced user guide for virtual key codes - I am interested in the main keyboard numbers 1 thru 3 and these have the codes 97, 98, and 99. In the advanced user guide it says that the virtual keycode is the number followed by K. Is the K required for the hot key function or do I just write the value? thanks in advance
  6. John We seem to be working on something similar except that my 'language' is very high level and is interpreted. The program is in two parts - a development environment and a runtime program - not a dll. Mine is more of an adventure language interacting with the aircraft systems and the weather around the aircraft. If you think we might have a common area of interest then drop me an email - jon@scruffyduck.co.uk
  7. Hi Pete I have it working now thanks - I was writing a rubbish number to the offset - basically forgot that I was dealing with 100ths of a mile coming from my application so the values were 100 times bigger than they should have been :oops: Jordi I am sure Pete will give you the definitive answer but I believe that your application must write the value at an interval less than 14 seconds. My application writes the value every 10 seconds - I do not think there is any other way if you are using this offset. There are other ways to set visibility however - I guess the best would be to use the New Weather Interface which interacts with the FS9 weather engine. The other methods use either an FS98 offset or offsets related to FS2000/02. writing to these is not guaranteed to change the visibility at the aircraft because of the way that the FS9 engine works
  8. Ah - ok Pete - my misunderstanding - I thought you were talking about setting visbility using other offsets. Makes sense if what you are doing working directly with the video drivers - I will check that out - thanks
  9. Hi Pete If I write visibility any other way I get the changes I expect plus there is no loss of textures.
  10. Hi Pete I have been trying to set local visibility using offset 2DF0. I have converted the value to meters then I am writing the 8 byte value to that offset every 10 seconds. What actually seems to happen is that I am not getting any changes in visibility at the aircraft but I am losing all the autogen textures and runway textures :? :?: Trying to check the value of visibility using FSInterrogate to read 0F8C seems to show that it is zero Clearly I must be doing something wrong since there are no 'scenery' offsets nearby - any suggestions much appreciated
  11. Hi Pete Many thanks for that Well I don't think so - how you managed to sort out what MS had done is definitely in the miracle happens here box as far as I am concerned. So it looks like I needs to get into writing to individual weather stations then :cry: That makes it kinda difficlut to completely control the weather at a airport which is not a weather station though as far as I can see The information on reads and writes make sense to me. Just reading the original documentation again I do not need to specify a lat/lon if I specify an ICAO - is that correct? Is the best way to get a list of weatherstations to download a metar cycle. I could then add something into the program to stop the use of non valid ICAOs
  12. Hi Pete I am just now getting to grips with the NWI for FS9 and have a couple of questions: Firstly I assumed that I needed to write all 1024 bytes at one go but reading this post: http://forums.simflight.com/viewtopic.pht=weather it seems that I don't need to. In the same post you write that to get the data to change I need to write to the signature field - is that just any randomised number. I read in your notes that it is important for reading data - but is that what causes the changes to take effect. I am pretty much at the start of the learning curve on this. My first attempt was to put the vairous bits of data into the weather structure using GLOB and then write it to FS. I am actually writing it every 10 seconds of so to fix it - but I suspect that is the wrong thing to be doing :? :? At the moment I am getting the expected results with the weather items such as visibility and pressure which are not set in layers. Do I need to keep track of the layers myself? I am not sure how they work. For example could I send that there are 24 layers and say treat each one as being related to 1000ft of altitude. The one that gets the data is the one which relates to the base of the items such as cloud or wind. Probably that is the completely wrong way to go about it. Do the layers have to be in order so that layer 1 is lower than layer 2, or are they just items in an array? Sorry for so many questions
  13. Hi Pete Thanks for the reply - yes I do need to support FS2k2 and FS9 - at the moment I am trying to get the 2k2 stuff to work - I plan to use the NWI for FS9. I guess ther will not be many users on FS2k2 but I know of several that would need to use the program I am writing. I don't need to do anything clever - since this is a sort of 'adventure' generator I am mostly looking to create weather conditions near the aircraft and change them over the life of the flight - a couple of layers of wind, cloud, temp etc are going to be plenty :D :D
  14. Hi Pete I wonder if you could give me a bit of guidance on this. I am setting wind using the AWI offsets. Reading your notes in this I can set only the upper altitude at which the wind operates so if, for example I set a wind layer up to 2000ft with one speed and direction and then another up to 4000ft then I get the settings for the 4000ft one overriding the first one. They are processed in the same process call to FSUIPC - does that matter? Now it may very well be my lack of understanding because I am not clear on the differences between Set and addAt. I am setting layers one at a time so I have been using ADDat rather than set. Also I would appreciate some guidance on the use of nAfter in the data structures. If I set a single layer then presumably nAfter is zero. If I set another one below if then is nAfter 1 for that layer? and if I set one above it is nAfter zero again. Sorry for all these questions... Thanks in advance
  15. Thanks Pete - I will have a fiddle :D Update Hmmm tried writing binary 11111 to 310B (hopefully that is right - not very up on binary flags :oops: ) but it has no effect :cry:
  16. Hi Pete I am trying to stop a pilot from using the slew function. I have been writing 0 to &H05DC which as your documentation suggests works fine in FS2002 but not in FS9. You say in your notes that it is works but is different from FS2002. Can you tell me what that difference is please? What is happening is that I am writing 0 every second or so to that offset - in FS9 the plane does not move but stutters on the spot - is that the behavior I should expect and if so are you aware of any other way to lock down the slew mode? I can only identify that one offset for it using FSInterrogate. Thanks in advance
  17. As far as I know you cannot. FSNav is a module which runs inside FS, it is not an external program that links to FS. If you want to use an external flight planner then you need to look at something else. Tony lists a bunch of alternatives here http://www.tony.smiths.btinternet.co.ukte_nav.htm
  18. Yes please Thomas - that would be most helpful. my email address is jon@scruffyduck.co.uk
  19. thanks Pete - just thought someone else may have done it - I will follow up your suggestion
  20. Quick question - is there an easy way to extract the playing time of sound from a wav file. I suspect I could do it with a win32 API declare but can't find that one in my documentation thanks in advanve
  21. thanks Pete - I presume that FS9 weather management really is better than FS2k2 :D :D it certainly does not seem to make it easy to control it accurately from outside the sim :? :? I will have a play around with the flight load and see what I can come up with
  22. Thanks Pete for the quicK reply :D Actually I have written a simple programming language (bit like ABL which does not manage weather). The language commands are independent of the way that I execute them at runtime so when I am interpreting the program code I can write the weather information differently depending on sim - I hope to use the NWI for FS2004 and the AWI for FS2002 - I do not plan to support anything older. Not there yet by a LONG way :? :? but I have the langauge designed - the development environment working and am now working on the runtime interface with FS. I am also only really interested in controlling the weather at the aircraft's position and not over any great distance bweyond that - could I do that in FS9 by clearing all the weather and then just writing to GLOB?? Can I ask another question? I am able to load a flight situation file into FS using the appropriate offsets. This obvisouly takes time - I can just put a sleep in after this to allow it to complete, but given all the different FS setups out there that seems rather crude - what would you advice be on the best way to know when the load was completed so that I can execute the next set of instructions?
×
×
  • 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.