Jump to content

Using FSX terrain for ridge lift calculation


B21

Recommended Posts

Thanks guys for testing the executable - now I know the basic build process is working for 'release' code and you've seen what sim_probe is capable of.

occasionally probes are left over?

Yes probes *are* left over with each SIM_START but I will add code to remove any existing probes on each SIM_START. It's important we keep the 0.xxx versioning of CumulusX! until we've cleaned up these small items and do not consider this sim_probe the final version. I wanted to get the sim_probe connected to CumulusX! as early as we could to identify where things need tidying up. At the moment sim_probe has things in it just to help see it working, including the use of purple igloos to mark where the probes are landing.

Peter very well done getting the client data connection to sim_probe working so quickly. The sim_probe version you have is actually "sim_probe_debug", i.e. it's the one with the 'write' statements enabled I will compile a 'release' version of sim_probe with those write statements off (it's the same code), plus sim_probe_monitor.exe, this morning and post those up.

I'm envious of your experience in actually flying in the sim with sim_probe injecting lift - I'm looking forward to finding out what it's like in practice - it's all been static testing for me so far.

My expectation is that sim_probe should be in the FSX startup file EXE.xml the same as CumulusX!, but I haven't tested this yet.

Ian

Link to comment
Share on other sites

updated sim_probe version 1.2 to not leave redundant probes on SIM_START:

b21_sim_probe.exe (version 1.2) NO CONSOLE OUTPUT

b21_sim_probe_debug_1_2.exe - SAME AS ABOVE BUT WRITES LIFT AND FACTORS TO CONSOLE

b21_sim_probe_monitor.exe - READS FROM CLIENT DATA & DISPLAYS IN CONSOLE

b21_sim_probe_monitor.cpp - monitor c++ source

Ian

Link to comment
Share on other sites

Oké Guys, you did it!!!! Great job!!!

I installed C0.911 and b21_......._ debug.exe, created exe.dll as described above, run fsx and .......debug.exe and all the options worked fine.

My wife will be dissapointed this weekend though, as I am planning to simfly from Sion (LSGS) to Zell am See (LOWZ) this weekend for test purpose (about 230NM). You will hear from me.

Bert

Link to comment
Share on other sites

Hi all,

first thanks for your great work.

Both programs are really a must have for flying gliders.

But I have a problem with SimProbe. After sometime it stop working, if I close it, reload it again and open a dialog in FSX it worked again for some time (10-15 minutes) and then it stops again.

Maybe the problem is related to the parallel use of Active Sky X (ASX) a "real" weather addon program, or related to Vista 64 Bit. It wouldnt be a big problem if SimProbe would restart automatic, but I must close the program, start it and switch too a dialog in FSX to reactivate it.

Hope that SimProbe would be integrated in CumulusX or similar. Maybe CumulusX could send a restart after detecting that SimProbe isnt active?

Again thanks for your work.

Maybe I could help a little by your programing. Im a C/C++ programmer with several years of making programs. I also make some small tools for FSX and FS9, like GA-Traffic, AI-Contrails and FSK2004 Metar.

Bye

Markus

Link to comment
Share on other sites

After sometime it stop working

...

Maybe CumulusX could send a restart after detecting that SimProbe isnt active?

..

.

Maybe I could help a little by your programing. Im a C/C++ programmer with several years of making programs. I also make some small tools for FSX and FS9, like GA-Traffic, AI-Contrails and FSK2004 Metar.

Markus

Thanks Markus. Can you confirm how you detected it 'stopped working', e.g. do you know whether sim_probe stopped generating the lift, or CumulusX! stopped using it? All clues will be useful. Whatever it was, if we can reproduce it I'm fairly sure we'll be able to resolve it.

Any issues with sim_probe can be tested just by running sim_probe_debug from a console window and checking the output there - you don't need CumulusX! to test just sim_probe at all. I haven't run it for 15 minutes yet to see if there's a situation which causes it to stop - the basic loop is SIMPLY to do a single request for user position, to be returned once-per-second. I can put code into sim_probe to detect whether the feed of those events from FSX has stopped for some reason, and re-initiate the request, if that is needed. The code is *development* at the moment but we're obviously close to the final program. I have a 'super_debug' version of sim_probe and I'll leave that running for an extended period to see what happens. **EDIT** I just ran sim_probe for an hour without any issues before I ended the test, so we'll probably need more information before this issue can be confirmed. I will post a more comprehensive version of sim_probe_debug and ask you to record the debug log if you can reproduce the problem. **END EDIT **

I will make the source of sim_probe available soon, when minor bugs are resolved, and it will be useful to have you take a look at it.

Peter: my suggestion is when CumulusX! reaches version 1.X (i.e. production code), it *only* accepts lift from sim_probe if it receives a sim_probe version >=2.0 (my production code). That will prevent prod versions of CumulusX! running with early development versions of sim_probe (current sim_probe version is 1.2, 1.X means pre_release development.) I should have versioned the dev sim_probe stuff 0.X to be consistent with CumulusX! but I'm a dope.

cheers - Ian

Link to comment
Share on other sites

Ian/Peter,

I flew two non-stop sessions, each for more than 3 hours. No problems.

First session I flew from Sion to Zell am See with wind north at 16 kts, and a cumulus layer set to 10.000-11.000ft. Needed several cheats, but that had nothing to do with not receiving slope lift where I expected it.

Afterwards I did the return track Zell to Sion under the same conditions. Only needed to cheat once, because at a certain area FSX temporarly changed the wind direction, so I could not soar over some high hills there.

It was a great experience.

Bert

Link to comment
Share on other sites

Thanks Markus. Can you confirm how you detected it 'stopped working', e.g. do you know whether sim_probe stopped generating the lift, or CumulusX! stopped using it? All clues will be useful. Whatever it was, if we can reproduce it I'm fairly sure we'll be able to resolve it.

Any issues with sim_probe can be tested just by running sim_probe_debug from a console window and checking the output there - you don't need CumulusX! to test just sim_probe at all. I haven't run it for 15 minutes yet to see if there's a situation which causes it to stop - the basic loop is SIMPLY to do a single request for user position, to be returned once-per-second. I can put code into sim_probe to detect whether the feed of those events from FSX has stopped for some reason, and re-initiate the request, if that is needed. The code is *development* at the moment but we're obviously close to the final program. I have a 'super_debug' version of sim_probe and I'll leave that running for an extended period to see what happens. **EDIT** I just ran sim_probe for an hour without any issues before I ended the test, so we'll probably need more information before this issue can be confirmed. I will post a more comprehensive version of sim_probe_debug and ask you to record the debug log if you can reproduce the problem. **END EDIT **

I will make the source of sim_probe available soon, when minor bugs are resolved, and it will be useful to have you take a look at it.

Peter: my suggestion is when CumulusX! reaches version 1.X (i.e. production code), it *only* accepts lift from sim_probe if it receives a sim_probe version >=2.0 (my production code). That will prevent prod versions of CumulusX! running with early development versions of sim_probe (current sim_probe version is 1.2, 1.X means pre_release development.) I should have versioned the dev sim_probe stuff 0.X to be consistent with CumulusX! but I'm a dope.

cheers - Ian

Hi Ian,

I use the debug version and it stop the update in the debug window too, so I guess SimProbe lost connection too SimConnect or SimConnect didnt respond too the request send by SimProbe. CumulusX shows SimProbe present=false and the Lift value remains at the last value.

But I found out the problem occure more if I use Active Sky X. If I didnt use this real weather program SimProbe runs longer. I guess the problem come from ASX, beacause sometimes ASX let disapear the default thermals and clouds for a few seconds. I guess that in this time ASX makes a "restart" of the FSX weather engine or SimConnect.

I will make a test using only FSX weather theme today and repost here.

Thanks again for this great program.

Link to comment
Share on other sites

I have some idea that the disappearance of the FSX thermals happens, when "Global weather" is updated. I happens with FSINN, too, and used to happen in prior FSUIPC 4 versions, until Peter Dowson switched to just updating nearby weather stations.

CumulusX! thermals normally are not affected.

regards,

Peter

Link to comment
Share on other sites

in04 - thanks for this - clearly CumulusX! and sim_probe are disconnecting somehow.

please note there are *two* debug windows we are talking about - one for CumulusX! and one for sim_probe. I think you are only looking at the CumulusX! debug window and that won't tell us for sure the status of sim_probe given that something has broken somewhere.

**EDIT**

here is a link to version 1.30 of sim_probe that gives more detailed DEBUG information

Please note the version is effectively the *same* as 1.2 but with the ability to set the debug detail from the command line. b21_sim_probe_1_3.exe replaces BOTH b21_sim_probe_1_2.exe AND b21_sim_probe_debug_1_2.exe.

From the command line (see below) you can add arguments "debug" or "debug calls" or "debug calls events" to get an increasing amount of debug trace information in the command window. E.g. "b21_sim_probe_1_3.exe debug calls events".

The arguments mean:

debug: display lift, wind and probe altitude info

debug calls: as above PLUS internal procedure call trace

debug calls events: as above PLUS FSX events

NOTE these areguments are cumulative, i.e these are the only three combinations permitted.

**END EDIT**

To see the sim_probe debug information:

(1) start FSX but end any flight you are in if one auto-loads, i.e. you want to be at the start page

(2) start CumulusX!

(3) open a 'command window' ('Start' -- 'All Programs' -- 'Accessories' -- 'Command Prompt' )

(4) change directory to the folder you have the sim_probe_debug_1_2.exe file in, using the "cd" command

(5) type "b21_sim_probe_1_3.exe debug calls events" at the command prompt and hit enter - you should see a "connected to FSX" message appear

(6) in FSX start your flight in windowed mode (Alt-Enter if you're in full screen)

(7) in the 'command prompt' window you'll see scrolling messages of the lift sim_probe is calculating plus other internal stuff. Leave this window open and fly around the sim, but PLEASE NOTE if the sim_probe_debug messages stop scrolling when the failure occurs.

(8) if you get the point where you have a sense of what's causing the problem, you could re-run the test and 'redirect' the debug output into a file and post that, by using this command line: "b21_sim_probe_1_3.exe debug calls events >log.txt"

Thanks,

Ian

Link to comment
Share on other sites

Hi Ian,

I use the debug version and it stop the update in the debug window too, so I guess SimProbe lost connection too SimConnect or SimConnect didnt respond too the request send by SimProbe. CumulusX shows SimProbe present=false and the Lift value remains at the last value.

But I found out the problem occure more if I use Active Sky X. If I didnt use this real weather program SimProbe runs longer. I guess the problem come from ASX, beacause sometimes ASX let disapear the default thermals and clouds for a few seconds. I guess that in this time ASX makes a "restart" of the FSX weather engine or SimConnect.

I will make a test using only FSX weather theme today and repost here.

Thanks again for this great program.

Hi,

made some test with weather themes, weather download within FSX and ASX again and got stop respondings on SimProbe in all tests.

If possible a restart routine would be great. Didnt know if the stop responding is a SimConnect problem. I normaly use TrackIR 4 and this use SimConnect too.

I found no pattern for the test without ASX when the stop responding occure. In one flight it occure just after takeoff, than SimProbe runs for an hour and stop responding just at the time i got on final.

Maybe its a Vista 64 Bit problem?

Bye

Markus

Link to comment
Share on other sites

in04 - thanks for this - clearly CumulusX! and sim_probe are disconnecting somehow.

please note there are *two* debug windows we are talking about - one for CumulusX! and one for sim_probe. I think you are only looking at the CumulusX! debug window and that won't tell us for sure the status of sim_probe given that something has broken somewhere.

**EDIT**

here is a link to version 1.30 of sim_probe that gives more detailed DEBUG information

Please note the version is effectively the *same* as 1.2 but with the ability to set the debug detail from the command line. b21_sim_probe_1_3.exe replaces BOTH b21_sim_probe_1_2.exe AND b21_sim_probe_debug_1_2.exe.

From the command line (see below) you can add arguments "debug" or "debug calls" or "debug calls events" to get an increasing amount of debug trace information in the command window. E.g. "b21_sim_probe_1_3.exe debug calls events".

The arguments mean:

debug: display lift, wind and probe altitude info

debug calls: as above PLUS internal procedure call trace

debug calls events: as above PLUS FSX events

NOTE these areguments are cumulative, i.e these are the only three combinations permitted.

**END EDIT**

To see the sim_probe debug information:

(1) start FSX but end any flight you are in if one auto-loads, i.e. you want to be at the start page

(2) start CumulusX!

(3) open a 'command window' ('Start' -- 'All Programs' -- 'Accessories' -- 'Command Prompt' )

(4) change directory to the folder you have the sim_probe_debug_1_2.exe file in, using the "cd" command

(5) type "b21_sim_probe_1_3.exe debug calls events" at the command prompt and hit enter - you should see a "connected to FSX" message appear

(6) in FSX start your flight in windowed mode (Alt-Enter if you're in full screen)

(7) in the 'command prompt' window you'll see scrolling messages of the lift sim_probe is calculating plus other internal stuff. Leave this window open and fly around the sim, but PLEASE NOTE if the sim_probe_debug messages stop scrolling when the failure occurs.

(8) if you get the point where you have a sense of what's causing the problem, you could re-run the test and 'redirect' the debug output into a file and post that, by using this command line: "b21_sim_probe_1_3.exe debug calls events >log.txt"

Thanks,

Ian

Hi Ian,

here is the file. It is a Exception 3.

..in process_profile() (all profiles valid).. ..entering ridge_lift()..

agl_factor = ,1.000, Factors ,-0.000,0.001,0.000,0.000, ..leaving ridge_lift().

.

,[Lift = ,0.0,] (Wind: 1 m/s @ 347) Probes: ,1440,1440,1432,1429,1440 ..leaving

process_profile()..

[REQUEST_USER_POS_AND_PROFILE]

..entering get_profile().. ..entering get_user_pos().. ..leaving get_user_pos().

. ..leaving get_profile()..

***** EXCEPTION=3 SendID=1598 Index=2 cbData=24

[REQUEST_USER_POS] [REQUEST_PROBE_POS1]

***** EXCEPTION=3 SendID=1603 Index=3 cbData=24

[REQUEST_PROBE_POS3] [REQUEST_PROBE_POS4] [REQUEST_USER_POS_AND_PROFILE]

..entering get_profile().. ..entering get_user_pos().. ..leaving get_user_pos().

. ..leaving get_profile()..

Hope this helps.

Thanks for the debug version.

Bye

Markus

New_Text_Document__2_.txt

Link to comment
Share on other sites

Ian and Peter, I believe I am also having a problem with it stopping creating lift. I haven't had too much of a chance to test the SimProbe option within CumulusX!, but was finally able to make a connection yesterday. It doesn't seem to have a pattern of when it happens and where. I did notice once that the box was neither green nor red when getting lift at one point.

I'll try to download the version 1.30 as directed above and see what I can come up with. I am on WinXP SP2 32bit and FSX Acceleration/SP2.

sf4JC

Link to comment
Share on other sites

Hey Markus that text log file is perfect - I'll have a good look at it. Can you confirm it is un-editted? I.e. a straight dump of the output. It's ok if you've trimmed stuff off from earlier.

Thanks.... Ian

**EDIT** great ! I can already see where the problem is happening... FSX is somehow 'forgetting' about one of the probes I've created and coming back with an 'unrecognized' exception when I try and move it. I'll trap this error and remove/recreate the probes if it occurs. It has never happened to me though. I'll post up a new version, watch this space. ** END EDIT **

**EDIT2** I'm now able to fake the error and sim_probe behaves as you have seen, and I'm working on the fix **

**EDIT3** Please try sim_probe version 1.4

This version now has code in it to detect the loss of a probe within FSX and re-creates them all. As with the prior version, you can run the executable with "debug calls events" as arguments and it will generate a comprehensive log. FYI if a probe goes AWOL within FSX the log will look something like this (using just mode 'debug') (the 'EVENT_Z' is me triggering the error). You can see the agl_factor lines returning to normal as sim_probe recovers from flushing and replacing all the probes:

agl_factor = ,1.000, Factors ,0.000,0.121,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,456,454,289,86,447
 agl_factor = ,1.000, Factors ,0.000,0.121,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,456,454,289,86,447
 agl_factor = ,1.000, Factors ,0.001,0.121,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,457,453,288,86,447
 agl_factor = ,1.000, Factors ,0.001,0.120,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,457,452,288,86,447
[EVENT_Z] - breaking probe_id[2] ...

SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=0)

SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=1)

Created probe 1, id = 972
Created probe 2, id = 973
Created probe 3, id = 974
Created probe 4, id = 975
SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=1)

SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=1)

SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=1)

SIMCONNECT_EXCEPTION_UNRECOGNIZED_ID: FSX has lost a probe? (suppressed=1)

Resetting suppress_object_id_exceptions to false.

 agl_factor = ,1.000, Factors ,0.002,0.120,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,458,451,287,86,447
 agl_factor = ,1.000, Factors ,0.003,0.119,0.000,0.000,,[Lift = ,1.5,] (Wind: 12 m/s @ 305) Probes: ,458,450,287,86,448

Thanks, Ian

Link to comment
Share on other sites

**EDIT** great ! I can already see where the problem is happening... FSX is somehow 'forgetting' about one of the probes I've created and coming back with an 'unrecognized' exception when I try and move it. I'll trap this error and remove/recreate the probes if it occurs. It has never happened to me though. I'll post up a new version, watch this space. ** END EDIT **

Mabye it happens if you try to create a probe underground. I had a similar error with creating thermals before, when by certain reason, a negative altitude occured. In this case FSX didn't create the object.

regards,

Peter

Link to comment
Share on other sites

Mabye it happens if you try to create a probe underground.

Thanks Peter - my basic idea is only to create the probes once and after than I just move them around with altitude 0 and "OnGround" set to true so it's hard to see what's different after successfully running for a while. I think the most likely guess is FSX at some point decides to cull an AI object either through a bug or some internal memory cleanup or some action initiated by another addon, and the best thing for me to do was to build a bit of resilience into sim_probe so it re-creates the probes if it thinks anything has happened to one or more of them. It's was quite straightforward to do, the only hassle being that FSX gives a completely generic "missing object" error without relating that to an earlier request or even telling you the object id it didn't like, so I have to delete *all* the probes (which triggers some more 'missing object' exceptions) and recreate them all. This only takes a millisecond so it's not a drama, in fact I considered removing and creating new probes each second, but have stuck with the better efficiency of the method I have. I guess I've flown with CumulusX! and sim_probe a few hours now and the glitch has never happened to me though, but the workaround I put into version 1.4 should mean sim_probe just recovers and continues if it does happen.

Regards,

Ian

Link to comment
Share on other sites

Hi Guys,

I changed my exe.dll as described below. Now Cumulusx! and Simprobe start when starting FSX. They stay alive though when I close FSX, I have to close them manually.

An ever happier simsoarer,

Bert

<?xml version="1.0" encoding="Windows-1252"?>

<SimBase.Document Type="Launch" version="1,0">

<Descr>Launch</Descr>

<Filename>EXE.xml</Filename>

<Disabled>False</Disabled>

<Launch.ManualLoad>False</Launch.ManualLoad>

<Launch.Addon>

<Disabled>False</Disabled>

<ManualLoad>False</ManualLoad>

<Name>Addon Application</Name>

<Path>modules\Cumulusx!\CumulusX.exe</Path> -----this is an example: insert your current cumulusX!-location between <path> and </Path> and delete this explaining text in your exe.dll----

<CommandLine></CommandLine>

<NewConsole>True</NewConsole>

</Launch.Addon>

<Launch.Addon>

<Disabled>False</Disabled>

<ManualLoad>False</ManualLoad>

<Name>Addon Application</Name>

<Path>modules\Cumulusx!\b21_sim_probe.exe</Path> -----this is an example: insert your current simprobe-location between <path> and </Path> and delete this explaining text in your exe.dll----

<CommandLine></CommandLine>

<NewConsole>True</NewConsole>

</Launch.Addon>

</SimBase.Document>

Link to comment
Share on other sites

Thanks for that info Bert! I tried doing this the other day and stopped since I was not getting lift at times. Thought that maybe I was doing something wrong. Now that I know someone else is doing it without error, except for the not shutting down part, I'll redo it and go from there.

sf4JC

Link to comment
Share on other sites

The not shutting down part

sim_probe has code in it to detect FSX closing, and it should automatically exit, either back to the command prompt if you entered the sim_probe command yourself, or the whole command prompt window should close if you started it in exe.xml or by clicking on it in a folder window.

Please try the latest (1.40) release, and let me know if you are *sure* this is not the case for you.

The CumulusX! 0.911 release currently has the window remaining open after you quit FSX, which is something I'm sure Peter is looking at. * EDIT * See Peter's "CumulusX!" thread - there's an 'autostart' setting that also 'auto-exits'... *END EDIT*

Ian

Link to comment
Share on other sites

Simprobe 1.4 closes when I exit FSX.

Thanks Bert - a very useful confirmation.

P.S. Peter you were right about questioning the strength of the SINK produced by sim_probe, and I've adjusted the formula affecting how the factor from the upwind slope is used. Where that factor was forced to be zero or positive, that is still true for a positive upwind slope (i.e. lift isn't reduced by a downward slope downwind of the aircraft), but for a negative upwind slope (local sink) the downwind slope can range from negative (increasing the sink) or positive (decreasing the sink). If you're the wrong side of a typical ridge, both the upwind and downwind probes will typically be indicating a negative slope (i.e. sink) and these will add together.

I've a fair amount of flying time with sim_probe plus CumulusX! now and it's quite a lot of fun.

Ian

Link to comment
Share on other sites

Hi Ian / Peter,

I've just finished posting an error message to the "CumulusX!"-Thread, but as it seems to regard both, CumulusX! and(or) Sim_Probe 1.4 I thought I should really leave you a message here. It would be great if you could have a look to my description in the other topic.

Thanks.

Dirk.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

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. Privacy Policy & Terms of Use