Jump to content
The simFlight Network Forums

Recommended Posts

Posted

i want programming the AWI and need some help. It is no problem to get the access of all UIPC-variabels, however the interesting Variabeles are either Read Only or does't work. Is there somebody who can give me an souce-example. :?: (VB6,Delphi,C++)

Thanks a lot

Posted
i want programming the AWI and need some help.

Can you be more specific?

If you are intending to do weather programming for FS2004 then you wil be pleased to know I'm providing a New Weather Interface (NWI) for this version of FS, which is much easier to program and is much more powerful -- it includes facilities for setting and reading weather for any METAR station, not just being confined to the global default weather like the FS98 interface or the AWI.

I can supply details of the NWI for you, now, if you like, in advance of the FSUIPC SDK update. Let me know. But the NWI will not be compatible with FS2002 or before.

If you need to stick to something for FS2002 and before as well, then you have to either handle the old FS98-compatible weather offsets, or deal with the AWI. On the latter I can answer specific questions but cannot provide a tutorial, Sorry.

It is no problem to get the access of all UIPC-variabels, however the interesting Variabeles are either Read Only or does't work.

This statement does does seem to relate to your first. The AWI is not variable or offset based, but it completely procedural, in the sense that it consists of commands and parameters. If you really do mean "offsets", which ones are you wanting to write which are "read only" and which "don't work"?

Regards,

Pete

Posted

Thanks Pete for your comment to FS2004.

I'll try to use the new NWI, however it's not released yet.

Until that time, i use the FS2002 interface.

The UIPCwrite-command on specific offsets doesn't work, so now i need some information how the AWI on FS2002 work. I have the AdvWeather.h file and i don't understand how i put these in my source code (address are over $FFFF ?).

For this problem it will be much easier to have a short example.

The manuell give me no further information than it based of commands and parameters.

For every infomation i will be appreciative.

Posted

The UIPCwrite-command on specific offsets doesn't work

Which ones? I don't know of any that you should be able to write to that you can't. Please list them and tell me the problems. I cannot hope to help, or fix things if they are wrong, without more details.

You should know that ActiveSky and Squawkbox both use the FS98-style weather offsets to set weather, FSMeteo and WidevieW use AWI.

so now i need some information how the AWI on FS2002 work. I have the AdvWeather.h file and i don't understand how i put these in my source code (address are over $FFFF ?).

This is the deifference between memory mapped access and command + parameter procedural access. The AWI uses the "offset" field in the IPC interface as a command number, not as a memory offset. The data then becomes the parameters for that command. You have to get used to a completely different way of thinking.

I know it is complicated, that is why not many people have used it, and also why I am changing back to a memory-mapped method in the NWI, for FS2004. If I were you, if you do not understand the AWI, I would stick to the old FS98 method until you get FS2004 and want to use the NWI.

The manuell give me no further information than it based of commands and parameters.

Yes, sorry. I never had time to do much about that, and the only people who were interested in the AWI (Marc Philibert for FSMeteo and Luciano Napolitano for WidevieW) figured it all out from what I published without any help from me, so nothing else was ever needed. It really should be easy enough for an experienced C programmer, but maybe too much otherwise.

I won't have time to help with the AWI until after FS2004 release, and after I've completed the SDK updates, and by then I really think you'd be better using the new interface.

Let me know why you think you can't use the FS98 interface and I'll try to help with that. Sorry to say it, but if you cannot manage to set/read weather with the old method you probably don't stand any chance with AWI. Ask me the questions, tell me the problems, please don't just say it doesn't work and give up.

Regards,

Pete

Posted

I thought a simple exaple will say more than 1000 words.

Here is my particular Source-code in Delphi.

I intend to create a Lower Layer with base of 306 and ceiling of 762

Metres, I assume?

overcast cover, variation of 100 and cloudtype nr. 9.

Okay.

Interrogate show me these modifications for a second, thereafter the writen data will be erased. I have no idea why.

Let's see:

a1:=306;

FSUIPC_Write($0EA4, 2, @a1, dwResult); //lower cloud layer base

a2:=762;

FSUIPC_Write($0EA2, 2, @a2, dwResult); //lower cloud layer ceiling

a3:=$FFFF;

FSUIPC_Write($0EA6, 2, @a3, dwResult); //lower cloud layer coverage

a4:=100;

FSUIPC_Write($0EA8, 2, @a4, dwResult); //lower cloud layer variation

a5:=9;

FSUIPC_Write($0EFE, 2, @a5, dwResult); //lower cloud layer Type

FSUIPC_Process(dwResult)

Well, I don't know Delphi (is "dwResult" a pointer to where the result is placed? If so, why is the @ needed in front of the data variable names? Shouldn't it be @dwResult for the same reason?), but it looks okay except that you should really be writing to the weather SETTING area, 0F1C onwards, as documented. You are writing to the current weather reading area. However, FSUIPC should be converting those offsets for you -- but it may be misleading you, reading back there, Your values will go to the write area. Please check the Programmers Guide, look at what it says at 0E9A and 0F1C.

The main thing that would help me (and you) would be to see the section of the FSUIPC Log showing what is happening. You *do* use the logging, don't you? Go to the Technical page and enable both weather and IPC write logging. Then we can both see exactly what happens.

The princip of mory mapped accessing and command-relate programming (like AWI) i fully unterstand, however i dont' know how i put the commands into UIPC.

You use FSUIPC Writes with the command as offset and the parameters in their correct structure positions as parameters. What is the problem, exactly. In AWI the offsets are used as the commands, the data is still just data. FSUIPC interprets these upon receipt. Where is your misunderstanding?

Neither ActiveSky nor Squawkbox i use.

Shame, as with either you could use the FSUIPC Logging to see how it is done. In fact any program, right back to the earliest FS98 weather program (freeware) would show you, through logging. It was by putting logging in that I first worked out what all the offsets in FS98 were used for so I could write FSUIPC to be compatible in the first place.

Regards,

Pete

Posted

Hi Pete,

The solution is sometimes more obvious as i thought. Simply the wrong offset was the reason.

And i told you it seems to be just read only.

My first test is looking good.

Thanks for point to.

I know, everybody would that you present the solution for their problems at whole.

Thanks again Pete and i'll waiting of NWI documentaion.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.