Jump to content
The simFlight Network Forums

FSUIPC Weather set problem


Guest edward

Recommended Posts

Guest edward

Hi Pete,

I'm developing a software, a weather gen, I succeeded to set global weather (pressure, winds, visibility) into FS2K2, but I never be able to set clouds into FS, I tried using both local weather address and global weather address, and I can see the values I wrote using FSInvestigate, it is correctly (I saw it on factored column), but the clouds in sim still didn't changed at all. Do you have any idea what caused this? I'm using latest FSUIPC 2975 (if I'm correct).

Link to comment
Share on other sites

Guest edward

Hi Pete,

I'm developing a software, a weather gen, I succeeded to set global weather (pressure, winds, visibility) into FS2K2, but I never be able to set clouds into FS, I tried using both local weather address and global weather address, and I can see the values I wrote using FSInvestigate, it is correctly (I saw it on factored column), but the clouds in sim still didn't changed at all. Do you have any idea what caused this? I'm using latest FSUIPC 2975 (if I'm correct).

Link to comment
Share on other sites

I'm developing a software, a weather gen, I succeeded to set global weather (pressure, winds, visibility) into FS2K2, but I never be able to set clouds into FS, I tried using both local weather address and global weather address, and I can see the values I wrote using FSInvestigate, it is correctly (I saw it on factored column), but the clouds in sim still didn't changed at all. Do you have any idea what caused this? I'm using latest FSUIPC 2975 (if I'm correct).

Please use the FSUIPC weather logging (see Technical page) to help figure out what is happening. Maybe also enable IPC write logging. If you need me to check it, zip the appropriate log and send it as an attachment. Try to keep it short, please.

Pete

Link to comment
Share on other sites

I'm developing a software, a weather gen, I succeeded to set global weather (pressure, winds, visibility) into FS2K2, but I never be able to set clouds into FS, I tried using both local weather address and global weather address, and I can see the values I wrote using FSInvestigate, it is correctly (I saw it on factored column), but the clouds in sim still didn't changed at all. Do you have any idea what caused this? I'm using latest FSUIPC 2975 (if I'm correct).

Please use the FSUIPC weather logging (see Technical page) to help figure out what is happening. Maybe also enable IPC write logging. If you need me to check it, zip the appropriate log and send it as an attachment. Try to keep it short, please.

Pete

Link to comment
Share on other sites

Guest edward

This is the zipped files, consist of FSUIPC Log text, Part of VB's code to set Weather, and screenshot showing ATIS said cloud is clear although FSInterrogate displayed cloud values assigned correctly (also screenshot).

Please help me Why the cloud still not appear, although, if I use WeatherMaker program, it works (the clouds appeared).

Thanks alot before, Pete

post-1-128688947531_thumb.jpg

post-1-128688947539_thumb.jpg

Weather Problem.zip

Link to comment
Share on other sites

Guest edward

This is the zipped files, consist of FSUIPC Log text, Part of VB's code to set Weather, and screenshot showing ATIS said cloud is clear although FSInterrogate displayed cloud values assigned correctly (also screenshot).

Please help me Why the cloud still not appear, although, if I use WeatherMaker program, it works (the clouds appeared).

Thanks alot before, Pete

Link to comment
Share on other sites

Please help me Why the cloud still not appear, although, if I use WeatherMaker program, it works (the clouds appeared).

The data you are setting is not entirely valid. Going from the LOG (I do not know or use VB):

First setting:

583869 WRITE0 0EA4, 2 bytes: 64 0D

583869 WRITE0 0EA2, 2 bytes: 9D 12

583869 WRITE0 0EA6, 2 bytes: FF FF

583869 WRITE0 0EA8, 2 bytes: 39 05

583869 WRITE0 0EFE, 2 bytes: 04 00

583869 WRITE0 0F1E, 2 bytes: 49 09

583869 FS98 Cloud2: type=4, from 7798ft to 10764ft (+/- 1965ft), cover 8, turb 0, ice 0

You are setting Upper Cloud first. That won't work. The first cloud is Thunderstorm or Lower cloud. You can't have a second or third layer before you have a first layer. Don't ask me why, it is the way FS98 worked, and the interface you are using (unlike the Advanced Weather Interface) is based on FS98 practice.

Worse, you are trying to set cloud type 4. which is not defined. You see the list in the SDK document?

583869 WRITE0 0F1C, 2 bytes: 40 0B

Writing to 0F1C is the same as writing to 0E9A -- as clearly documented. You should really be only writing to 0F1C upwards in any case. The 0E9A area is for reading. But FSUIPC enforces this rule in any case. Writing to both as you are only wastes time.

584069 WRITE0 0EA4, 2 bytes: F4 05

584069 WRITE0 0EA2, 2 bytes: 6E 15

584069 WRITE0 0EA6, 2 bytes: FF 9F

584069 WRITE0 0EA8, 2 bytes: E8 0B

584069 WRITE0 0EFE, 2 bytes: 07 00

584340 FS98 Cloud1: type=7, from 5000ft to 17998ft (+/- 10000ft), cover 5, turb 0, ice 0

Again, there's no type 7, and you cannot have a variation in cloud base of 10000 feet when the cloudbase is only 5000 feet in the first place. Variations are usually small, like 50-300 feet. Possibly, apart from the invalid cloud type FS doesn't like such a big variation.

From the FSInterrogate pictures you attached, I also noticed that the Storm layer coverage is set to 1 but with no cloud altitudes set nor a type. This seems to be left over from a previous setting (?), but you should take care to clear the storm data before setting the lower cloud.

So the order is:

1. clear storm layer (or, of course, set it if required)

2. set lower layer (taking care to ensure VALID numbers)

3. if more than one layer, set upper layer (with VALID numbers)

and you do all this in the 0F1C- area (same applies to all the other weather data).

This is the FS98 way, so you are limited to two cloud layers, plus the optional stom lowest layer. FS2000 ad FS2002 can have many more layers, but to use them you'd have to switch to the AWI.

Regards,

Pete

Link to comment
Share on other sites

Please help me Why the cloud still not appear, although, if I use WeatherMaker program, it works (the clouds appeared).

The data you are setting is not entirely valid. Going from the LOG (I do not know or use VB):

First setting:

583869 WRITE0 0EA4, 2 bytes: 64 0D

583869 WRITE0 0EA2, 2 bytes: 9D 12

583869 WRITE0 0EA6, 2 bytes: FF FF

583869 WRITE0 0EA8, 2 bytes: 39 05

583869 WRITE0 0EFE, 2 bytes: 04 00

583869 WRITE0 0F1E, 2 bytes: 49 09

583869 FS98 Cloud2: type=4, from 7798ft to 10764ft (+/- 1965ft), cover 8, turb 0, ice 0

You are setting Upper Cloud first. That won't work. The first cloud is Thunderstorm or Lower cloud. You can't have a second or third layer before you have a first layer. Don't ask me why, it is the way FS98 worked, and the interface you are using (unlike the Advanced Weather Interface) is based on FS98 practice.

Worse, you are trying to set cloud type 4. which is not defined. You see the list in the SDK document?

583869 WRITE0 0F1C, 2 bytes: 40 0B

Writing to 0F1C is the same as writing to 0E9A -- as clearly documented. You should really be only writing to 0F1C upwards in any case. The 0E9A area is for reading. But FSUIPC enforces this rule in any case. Writing to both as you are only wastes time.

584069 WRITE0 0EA4, 2 bytes: F4 05

584069 WRITE0 0EA2, 2 bytes: 6E 15

584069 WRITE0 0EA6, 2 bytes: FF 9F

584069 WRITE0 0EA8, 2 bytes: E8 0B

584069 WRITE0 0EFE, 2 bytes: 07 00

584340 FS98 Cloud1: type=7, from 5000ft to 17998ft (+/- 10000ft), cover 5, turb 0, ice 0

Again, there's no type 7, and you cannot have a variation in cloud base of 10000 feet when the cloudbase is only 5000 feet in the first place. Variations are usually small, like 50-300 feet. Possibly, apart from the invalid cloud type FS doesn't like such a big variation.

From the FSInterrogate pictures you attached, I also noticed that the Storm layer coverage is set to 1 but with no cloud altitudes set nor a type. This seems to be left over from a previous setting (?), but you should take care to clear the storm data before setting the lower cloud.

So the order is:

1. clear storm layer (or, of course, set it if required)

2. set lower layer (taking care to ensure VALID numbers)

3. if more than one layer, set upper layer (with VALID numbers)

and you do all this in the 0F1C- area (same applies to all the other weather data).

This is the FS98 way, so you are limited to two cloud layers, plus the optional stom lowest layer. FS2000 ad FS2002 can have many more layers, but to use them you'd have to switch to the AWI.

Regards,

Pete

Link to comment
Share on other sites

Pete,

First of all, I want to say BIG THANK YOU :D for your answer, I nearly hopeless because there are no other documentation besides FSUIPC SDK Doc. and I'm really fresh newbie in FSUIPC programming. :D

You are setting Upper Cloud first. That won't work. The first cloud is Thunderstorm or Lower cloud. You can't have a second or third layer before you have a first layer.

Gosh I never realized that I set Upper Cloud first :D I thought, if the cloud will be in high altitude, then I should set it as upper clouds :D

Worse, you are trying to set cloud type 4. which is not defined. You see the list in the SDK document?

Yup, I read the docs, but I thought the cloud type is ranged between 0 and 9. (0=user-defined, 1=cirrus, 8=stratus, 9=cumulus) Btw, I use random number between 0 to 9 to set this cloud. No wonder it set 4 as cloud type.

From the FSInterrogate pictures you attached, I also noticed that the Storm layer coverage is set to 1 but with no cloud altitudes set nor a type. This seems to be left over from a previous setting (?), but you should take care to clear the storm data before setting the lower cloud.

For this one, I never set storm cloud, I don't know how FSInterrogate interpreted it as value 1, although you can see that the raw data is actually 0.

FS2000 ad FS2002 can have many more layers, but to use them you'd have to switch to the AWI.

How? Could you please tell me how to use AWI or could you give a hint where I could find a tutorial/docs/examples how to use AWI? I read it on SDK but I thought it just constants for FS Adventures.

Anyway, I will follow your advice tonight, Thank You Very Much Pete!

BRegards,

Edward

Link to comment
Share on other sites

Pete,

First of all, I want to say BIG THANK YOU :D for your answer, I nearly hopeless because there are no other documentation besides FSUIPC SDK Doc. and I'm really fresh newbie in FSUIPC programming. :D

You are setting Upper Cloud first. That won't work. The first cloud is Thunderstorm or Lower cloud. You can't have a second or third layer before you have a first layer.

Gosh I never realized that I set Upper Cloud first :D I thought, if the cloud will be in high altitude, then I should set it as upper clouds :D

Worse, you are trying to set cloud type 4. which is not defined. You see the list in the SDK document?

Yup, I read the docs, but I thought the cloud type is ranged between 0 and 9. (0=user-defined, 1=cirrus, 8=stratus, 9=cumulus) Btw, I use random number between 0 to 9 to set this cloud. No wonder it set 4 as cloud type.

From the FSInterrogate pictures you attached, I also noticed that the Storm layer coverage is set to 1 but with no cloud altitudes set nor a type. This seems to be left over from a previous setting (?), but you should take care to clear the storm data before setting the lower cloud.

For this one, I never set storm cloud, I don't know how FSInterrogate interpreted it as value 1, although you can see that the raw data is actually 0.

FS2000 ad FS2002 can have many more layers, but to use them you'd have to switch to the AWI.

How? Could you please tell me how to use AWI or could you give a hint where I could find a tutorial/docs/examples how to use AWI? I read it on SDK but I thought it just constants for FS Adventures.

Anyway, I will follow your advice tonight, Thank You Very Much Pete!

BRegards,

Edward

Link to comment
Share on other sites

Gosh I never realized that I set Upper Cloud first :D I thought, if the cloud will be in high altitude, then I should set it as upper clouds :D

Yes, it is odd the way it worked in FS98. It was the folks who had got FS98 weather programs working who told me these things. I've never used them myself.

I thought the cloud type is ranged between 0 and 9. (0=user-defined, 1=cirrus, 8=stratus, 9=cumulus) Btw, I use random number between 0 to 9 to set this cloud. No wonder it set 4 as cloud type.

I think MS intended to add more types but didn't.

For this one, I never set storm cloud, I don't know how FSInterrogate interpreted it as value 1, although you can see that the raw data is actually 0.

Ah, I didn't notice that. Forget what I said then, except it is a good idea to clear the storm layer since it may have been set from before.

Could you please tell me how to use AWI or could you give a hint where I could find a tutorial/docs/examples how to use AWI?

Sorry, I don't know VB -- I suspect it would get quite complicated in VB. It is defined in terms of C of course. Maybe someone else could help (thought the only two persons I know who have used the AWI are Marc Philibert, in FSMeteo, and Luciano Napolitano, in WidevieW).

Pete

Link to comment
Share on other sites

Gosh I never realized that I set Upper Cloud first :D I thought, if the cloud will be in high altitude, then I should set it as upper clouds :D

Yes, it is odd the way it worked in FS98. It was the folks who had got FS98 weather programs working who told me these things. I've never used them myself.

I thought the cloud type is ranged between 0 and 9. (0=user-defined, 1=cirrus, 8=stratus, 9=cumulus) Btw, I use random number between 0 to 9 to set this cloud. No wonder it set 4 as cloud type.

I think MS intended to add more types but didn't.

For this one, I never set storm cloud, I don't know how FSInterrogate interpreted it as value 1, although you can see that the raw data is actually 0.

Ah, I didn't notice that. Forget what I said then, except it is a good idea to clear the storm layer since it may have been set from before.

Could you please tell me how to use AWI or could you give a hint where I could find a tutorial/docs/examples how to use AWI?

Sorry, I don't know VB -- I suspect it would get quite complicated in VB. It is defined in terms of C of course. Maybe someone else could help (thought the only two persons I know who have used the AWI are Marc Philibert, in FSMeteo, and Luciano Napolitano, in WidevieW).

Pete

Link to comment
Share on other sites

Guest edward

Pete, I have modified my program to use only valid cloud types, and set lower cloud first and then upper cloud, and it worked, Thank Alot Pete!

Regarding AWI, I hope someone else in this forum could give me some insight/sample program/links how to use AWI.

and a question for jd,

you might also consider doing one fsuipc_process, instead of a bunch

Do you mean I can do multiple FSUIPC_Write (set wind speed, wind dir, wind altitude,etc) and then call 1 FSUIPC_Process at the bottom of the procedure instead every time I call FSUIPC_Write, I call FSUIPC_Process also?

If so, what is the difference between the twos? (except the performace I think)

BRegards,

Edward

Link to comment
Share on other sites

Guest edward

Pete, I have modified my program to use only valid cloud types, and set lower cloud first and then upper cloud, and it worked, Thank Alot Pete!

Regarding AWI, I hope someone else in this forum could give me some insight/sample program/links how to use AWI.

and a question for jd,

you might also consider doing one fsuipc_process, instead of a bunch

Do you mean I can do multiple FSUIPC_Write (set wind speed, wind dir, wind altitude,etc) and then call 1 FSUIPC_Process at the bottom of the procedure instead every time I call FSUIPC_Write, I call FSUIPC_Process also?

If so, what is the difference between the twos? (except the performace I think)

BRegards,

Edward

Link to comment
Share on other sites

Regarding AWI, I hope someone else in this forum could give me some insight/sample program/links how to use AWI.

If I were you, now, I'd hold off. The weather facilities in FS9 are going to be substantially improved and I am looking at an easier way of taking advantage of it rather than extending the AWI. Admittedly, the new facilities will not be backward compatible to FS2002 or FS2000 as the AWI is (or to FS98 as the method you are now using is), but even so ...

Do you mean I can do multiple FSUIPC_Write (set wind speed, wind dir, wind altitude,etc) and then call 1 FSUIPC_Process at the bottom of the procedure instead every time I call FSUIPC_Write, I call FSUIPC_Process also?

That is certainly how it is intended to be used. Every time you call the Process routine Windows has to do a process switch, allocate memory, send the message, free memory, and process switch again. You not only slow down your program, but also FS.

It's even worse if your program is run on a Networked PC under WideFS, as not only all that has to happen, but WideClient also has to send a Network block over for each call.

The Read and Write calls merely add data to a block in your memory, forming it all up ready to send. Takes no time at all.

It's the same as this message -- how efficient would it be if I put each sentence in a difference response to you, or worse, each word?

Regards,

Pete

Link to comment
Share on other sites

Regarding AWI, I hope someone else in this forum could give me some insight/sample program/links how to use AWI.

If I were you, now, I'd hold off. The weather facilities in FS9 are going to be substantially improved and I am looking at an easier way of taking advantage of it rather than extending the AWI. Admittedly, the new facilities will not be backward compatible to FS2002 or FS2000 as the AWI is (or to FS98 as the method you are now using is), but even so ...

Do you mean I can do multiple FSUIPC_Write (set wind speed, wind dir, wind altitude,etc) and then call 1 FSUIPC_Process at the bottom of the procedure instead every time I call FSUIPC_Write, I call FSUIPC_Process also?

That is certainly how it is intended to be used. Every time you call the Process routine Windows has to do a process switch, allocate memory, send the message, free memory, and process switch again. You not only slow down your program, but also FS.

It's even worse if your program is run on a Networked PC under WideFS, as not only all that has to happen, but WideClient also has to send a Network block over for each call.

The Read and Write calls merely add data to a block in your memory, forming it all up ready to send. Takes no time at all.

It's the same as this message -- how efficient would it be if I put each sentence in a difference response to you, or worse, each word?

Regards,

Pete

Link to comment
Share on other sites

Guest edward
If I were you, now, I'd hold off. The weather facilities in FS9 are going to be substantially improved and I am looking at an easier way of taking advantage of it rather than extending the AWI. Admittedly, the new facilities will not be backward compatible to FS2002 or FS2000 as the AWI is (or to FS98 as the method you are now using is), but even so

Hmm.... it seems you're refering to FS2003 (Century Of Flight) don't you? Ms is gonna change how they process the weather, so this AWI might be outdated. :) Thanks Pete for your insight, I think 2 cloud layer + 1 storm cloud should be enough :)

The Read and Write calls merely add data to a block in your memory, forming it all up ready to send. Takes no time at all.

I see... well a got new knowledge every time you reply my post. :D

It's the same as this message -- how efficient would it be if I put each sentence in a difference response to you, or worse, each word?

:lol: :lol: :lol:

Many Many Thanks for your response Pete!

Best Regards,

Edward

Link to comment
Share on other sites

Guest edward
If I were you, now, I'd hold off. The weather facilities in FS9 are going to be substantially improved and I am looking at an easier way of taking advantage of it rather than extending the AWI. Admittedly, the new facilities will not be backward compatible to FS2002 or FS2000 as the AWI is (or to FS98 as the method you are now using is), but even so

Hmm.... it seems you're refering to FS2003 (Century Of Flight) don't you? Ms is gonna change how they process the weather, so this AWI might be outdated. :) Thanks Pete for your insight, I think 2 cloud layer + 1 storm cloud should be enough :)

The Read and Write calls merely add data to a block in your memory, forming it all up ready to send. Takes no time at all.

I see... well a got new knowledge every time you reply my post. :D

It's the same as this message -- how efficient would it be if I put each sentence in a difference response to you, or worse, each word?

:lol: :lol: :lol:

Many Many Thanks for your response Pete!

Best Regards,

Edward

Link to comment
Share on other sites

it seems you're refering to FS2003 (Century Of Flight) don't you?

I've never heard of it referred to as FS2003. It was originally FS2004, then FS9, the "Century of Flight" seems to have stuck now, but I wouldn't swear that it'll stil be that on release. So, "FSCOF"

Ms is gonna change how they process the weather, so this AWI might be outdated.

Not exactly. The weather in FS9 will be more advanced. There was almost no change from FS2000 to FS2002 so the AWI, designed for FS2000, was sufficient. I aim to retain the AWI but not enhance it. I will add completely new facilities to take full advantage of the developments in the weather. But I may not have time to do that in the first released version.

Regards,

Pete

Link to comment
Share on other sites

it seems you're refering to FS2003 (Century Of Flight) don't you?

I've never heard of it referred to as FS2003. It was originally FS2004, then FS9, the "Century of Flight" seems to have stuck now, but I wouldn't swear that it'll stil be that on release. So, "FSCOF"

Ms is gonna change how they process the weather, so this AWI might be outdated.

Not exactly. The weather in FS9 will be more advanced. There was almost no change from FS2000 to FS2002 so the AWI, designed for FS2000, was sufficient. I aim to retain the AWI but not enhance it. I will add completely new facilities to take full advantage of the developments in the weather. But I may not have time to do that in the first released version.

Regards,

Pete

Link to comment
Share on other sites

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.