News:

Precision Simulator update 10.173 (24 February 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

NEW: PSX_Wheramium, a moving map

Started by martin, Sat, 21 Mar 2020 16:32

martin

Hello Robert,

if you can see the correct coordinates on the web page, it means that Wheramium "per se" does work: the data are coming from the Boost server to the PSX client built into Wheramium), and then the webpage gets them from the webserver (also built into Wheramium).

The part not working for you is thus the delivery of the actual map or satellite image from the Cesium/Bing servers.
And that can have many reasons.

Instead of a map, do you see a large empty brown area?
Or do you see some kind of black textbox there, with a lot of (incomprehensible) Cesium error messages in yellow?

If the area is simply empty (just the brown background): This happened to me frequently. The reason is that I am running an anti-Schnüffel plugin for Firefox (uBlock origin), and often forgot to tell it that data coming from "virtualearth.com" (which is the Bing map server address) are OK and should not be blocked.

So perhaps this, or something similar, in your setup, too, is blocking it? Hard to say from the distance.

BTW, which browser are you using anyway?

If you use Firefox (Google Chrome has something similar), you could open the Developer Tools (in FF: ctrl-shift-i), and go to the "Network" tab.
This will show all GET requests made from the webpage to anywhere. The requests to the Wheramium webserver address (see browser address bar!) should all have a "200" flag (meaning "request and reply OK").
If there is any other number, it would tell us more about the problem. (E.g. "404" means something the webpage requested could not be found on the server, etc.).

Cheers,
Martin

martin


Quote from: HoppieNext... use aeronautical maps and charts instead!    :-P

You did get the Road Map at least... :D

Cheers,
<Martin
   O  O


Hessel Oosten

QuoteYou did get the Road Map https://i.ytimg.com/vi/kcBD4sJ6fuc/maxresdefault.jpg at least...

Heeee, is that Steff's bus ???

H.

Avi

Quote from: martin on Sun, 22 Mar 2020 13:32

Quote from: AviHowever, can you increase the zoom out?
Technically not a problem (I think...), but by how much?

Martin,

I checked it only for few minutes on the ground.
Max zoom in was too much, I couldn't see a thing and had to zoom out.
Max zoom out was also too much for taxi, I had to zoom in to see the taxiways.
That means it is ok for ground operations.

I still didn't check it inflight but if it looks as in your print screen (and I'm sure it is), it is ok too so no modification is needed.

Cheers,
Avi Adin
LLBG

Captain_Crow

#24
@Hessel. No it isn´t my bus... :-) mine is much nicer ! :-)

Guys,
I have no cheance to get this stuff to run. After Connecting the page gets black and a failure message occurs

RangeError: invalid array length
updateFrustums@http://localhost:10314/cesium_min/Build/Cesium/Cesium.js:139930:9
createPotentiallyVisibleSet@http://localhost:10314/cesium_min/Build/Cesium/Cesium.js:140080:27
render@http://localhost:10314/cesium_min/Build/Cesium/Cesium.js:140494:36
Scene.prototype.render@http://localhost:10314/cesium_min/Build/Cesium/Cesium.js:140534:19
tick@http://localhost:10314/fetchCoords.js:181:9

Any help?
Best
Steff

cavaricooper

Steff-

I got caught out by the PSX port (mine is the default 10747 not the one that Martin uses).  Once I changed that it all started working.  It appears that you may be running port : 10314.  Is that intentional, and does your Boost Server broadcast on that? I'm not a genius at networking, so perhaps Hoppie or some other kind soul will look in soon.

I did not change the IP as it runs on the machine that a Boost Server runs on.

HTH- C

PS- Martin- Ta mate!
Carl Avari-Cooper, KTPA

Captain_Crow

#26
Hi Carl,
after reloading the machine it seems to work now..But wondering about just 20fps now...

Testing yet...
Best
Steff

P.S:disregard, doesn´t move the aircraft position in the webbrowser.. still just 20 fps alsowithout using the program... hmm..

Will

I installed and ran it with no initial problems.

But PSX runs at about 25 fps (down from 72 fps), and the moving map tends to magnify PSX movements. Like if PSX makes a minimum radius turn on the ground at 3 kts (per GS display on the ND), then the Whereamium map shows a turn with a much increased radius, maybe 10 times as large. There's no way to stay on the Whereamium map's runway, even if the aircraft is still on the PSX runway. I did not have time to troubleshoot.
Will /Chicago /USA

martin

Hello Avi,

Quote from: Aviso no modification is needed.

I'm glad to hear it. :)

The problem here is that the program has to start with some initial zoom value (I decided on 1x), which will always be OK in some situations but not in others, depending on where you are, and how high above ground. So some initial manual correction will always be needed (at least until the day when I add Artificial Intelligence).

Still, the zoom range could be changed if necessary.  If someone else encounters difficulties, please report, including a description of the situation where the current zoom range was not sufficient.

Cheers,
Martin

Captain_Crow

My greater problem is that I still get just 20 fps since I tried to use Wheramium yesterday. No Idea how to get back to 50 or so...
Any ideas?
Best
Steff

martin

Hello Steff,
Quote from: SteffAfter connecting the page gets black and a failure message occurs:
RangeError: invalid array length
updateFrustums@http://localhost:10314/cesium_min/Build/Cesium/Cesium.js:139930:9
...

This is a tricky one, alas.

Somewhere one of the Cesium contributors themselves described it as "unfortunately kind of a catch-all error from the inside of the Cesium render loop", meaning it will pop up for all sorts of very different reasons (some of them deep inside the Cesium engine), and will give not many clues to the actual cause.

I have seen this, too, when I had actual errors in my Javascript code. But that cannot be the cause here, for then everyone would run into this.

The other possibility is (perhaps) that for some reason, the Cesium/Bing map data do not arrive in your browser.
You could try and monitor the net traffic via the Firefox or Chrome Developer Tools (see above), or check if the Console tab (also in those Dev Tools) shows any Javascript error messages.

Alternatively, try one of the Cesium demos to see if the problem is only with Wheramium or with Cesium use in general.
For the most simple test, go to their "Sandcastle", and if not already visible, select the "Hello World" example at the bottom.
Ignore the left hand box with the code, enlarge the right hand box (with the Earth) to full screen, and see how it goes.

Other than that it's hard to give advice without involving more debugging tools.

Cheers,
Martin



martin

Hello Carl and everyone else,

Caution with the port numbers!

Quote from: CarlI got caught out by the PSX port (mine is the default 10747 not the one that Martin uses).  Once I changed that it all started working.  It appears that you may be running port : 10314.  Is that intentional, and does your Boost Server broadcast on that?

Some confusion here perhaps.

To clarify:
¤ 10747 is default the port for the PSX MAIN server; alternatively it can be changed to 10748 (in the PSX Preferences)
¤ 10749 is the port for the PSX BOOST server; this can not be changed (I think).
¤ 10314 is the port for the Wheramium webserver; hardcoded and thus cannot be changed either.

So the address "//localhost:10314/etc" in that cryptic Cesium error message is actually correct and not the reason for the error.

To complete the confusion, I have painted a clarifying picture. The upper part shows the configuration where everything is on one computer.
The lower part is the setup where PSX+Wheramium are on one box, and the browser with the map on a second one.

(This is a thumbnail only! >Click on image for readable full size! :) )

Hope this helps.

Cheers,
Martin


Captain_Crow

Hi dear Martin,
thanks for the last explanation. For now I just want to get my good FPS back to 50 or so... Do you have an idea how your program can influence the fps in PSX ?
Since I tried it out yesterday I just have 20 fps instead of 50, seting 48.

best
Steff

martin

Hello Steff and Will,

in this reply I'll address only the more urgent problem that low fps don't go back up again even when Wheramium is (supposed to be) closed:

Quote from: SteffI still get just 20 fps since I tried to use Wheramium yesterday. No Idea how to get back to 50 or so...
Any ideas?

Why the fps goes down at all  so much is a mystery in itself*...
But it certainly should not stay down once Wheramium has been exited.

The only thing I can think of is that Wheramium is in fact still running in the background.
¤ Did you use the EXIT button in order to stop the program?
¤ If so, what did the bottom of the web page say afterwards?
(See the doc.s about this.)

To verify if Wheramium has really stopped, check it in the Task Manager ("Details" tab) or in Process Explorer if you have it.
If you find a process for "javaw.exe" (and you are not running other Java programs except PSX), kill it.
!!! Do  not kill "java.exe" as that will be the PSX process.

BTW:
¤ When you say you "can't get back to 50 fps or so", do you mean not even after restarting PSX?
And not even after stopping the Boost server, too, to make sure it is not talking to Wheramium or its zombie process?

EDIT: With regard to your latest post above (was crossing with my reply):
Just for completeness: Did you since yesterday reboot the computer? If you did, there is of course no chance anyway that Wheramium is still running. And it does of course not mess in any way with the permanent PSX settings.
If you did not reboot, try Task Manager as mentioned above.

In any case: even when still running (but not actually connected to PSX, and not actually moving the map), Wheramium should not be able to infliuence PSX or its frame rate in any way. Something else is going on here...

Cheers,
Martin

* I'll send another reply later about the issue that the PSX frame goes down dramatically when Wheramium is being used.


Captain_Crow

Hi Martin,
found javaw.exe and killed it, no change in fps. restarted the computer after switching off yesterday evening.
further investigation needed..:-)
Steff

Captain_Crow

Installed PSXfresh from the disk, version 10.1.7 in a new folder and also just 20 fps, so it seems there is something wrong with my system at all... hmm...
Steff

martin

Hello again, Will and Steff,

regarding the steep decrease in PSX frame rate you are reporting (I am assuming this is the frame rate as indicated by PSX itself):

Quote from: WillBut PSX runs at about 25 fps (down from 72 fps), and the moving map tends to magnify PSX movements. Like if PSX makes a minimum radius turn on the ground at 3 kts (per GS display on the ND), then the Whereamium map shows a turn with a much increased radius, maybe 10 times as large

Quote from: SteffMy greater problem is that I still get just 20 fps since I tried to use Wheramium yesterday.

As far as PSX is concerned, Wheramium is strictly "read-only":
¤ The PSX Boost server pumps data out as it always does (at the frequency set in the Preferences, e.g. max. 73 fps),
¤ Wheramium (PSX client part) reads them at user-defined intervals (POLLINTV in the INI file)
¤ and the webpage fetches (requests) them from Wheramium (webserver part) at other user-defined intervals (REQINTV in the INI file).

At no point does Wheramium send anything to PSX, let alone try to control any of PSX settings or behaviour.

So if the fps go down, the only thing I can think of is that running Wheramium (over)loads the system (CPU or possibly graphics card, etc.) so much that PSX is slowed down far below its set frame rate limit.

If and to what degree this happens is of course highly dependent on the hardware, the operating system, and the general system configuration.
But with current boxes, I find it difficult to see how Wheramium can force the fps value down from ca 50 or even 70 to ca 20 or even lower, just by putting extra load on the CPU etc.

Things which were good to know:

¤ When exactly does this slow-down happen?
   ¤ As soon as Wheramium is started (but before the webpage is loaded in the browser)?
   ¤ As soon as the webpage is loaded (but before it is connected to Wheramium/PSX)
   ¤ Only after the connection is made (and the map is now actually being updated constantly)?

¤ Similar: At what point does the frame rate go up again (if it does, which is not the case for Steff).

¤ Also: try to vary the REQINTV and POLLINTV settings. making Wheramium fetch and process the data at large intervals,
e.g. POLLINTV=200 (data read from PSX only 5x per second),
and REQINTV=500 (data requested by browser only 2x per second),
The map will then stutter badly of course, but the point is to see if this relieves the CPU and thus helps with the slow-down of the PSX frame rate at all.
 
Finally: a test.
(I am aware the situation may be overly "favourable" for Wheramium (i.e."best case"), but it should be on the ground (because of the taxying problems reported by Will), and it should use a SITU which is the same for all of us. Feel free to suggest other situations to test... ;)

¤ load the situ "Basic 004 - Cleared for takeoff.situ"  which comes with PSX.
¤ start Wheramium (if possible from a Command Prompt, to see any error messages)
¤ load the webpage for Wheramium
¤ (optional: open the browser's Dev Tools so you can monitor any error messages on the webpage side, and perhaps also the GET requests)
¤ connect webpage to Wheramium/PSX
¤ zoom out until the coastline/surf becomes visible at the left edge of the screen*
¤ check that the "heartbeat" indeed shows activity (numbers changing), and that the correct coordinates are displayed
¤ in PSX, unlock the parking brake
¤ in the Instructor (Situation > Position > TAS field) set a ground speed of 12 kn
¤ let her trundle down the (extended) runway with throttle at idle (speed will increase anyway by a few knots, it's a 744)
¤ take the first exit to the right (shortly before the actual threshold)
¤ roll on to the apron and do some more turns etc at your discretion.

On my box, during all of this exercise, I never saw a PSX frame rate less than 73 fps. I took the turn (and some more on the apron), somewhat boldly but intentionally, at 19 kn and had no issue with the turn radius. Also, frame rate was still not affected (although turns always generate higher loads).
I didn't even see a major increase in CPU temperature (which perhaps indicates the test is indeed too "harmless"?? ;D
Obviously, YMMV.

Will: If I understand correctly, you are seeing these wrong turn radii only on the map but not in PSX itself?
Which would mean that map movement and PSX are actually not in sync?
This is strange: what I would expect (if the map lags behind the actual movement and cannot catch up) is that it jumps, but even then it should not be able to put the marker to a position which is different from the PSX one (although perhaps delayed).
In other words: instead of a smooth arc, the marker would describe a kind of "polygon", jumping from one corner to the next, but the radius should still be the same, and those marker positions which are displayed (even if updated at large intervals) should still be in the respective correct places.

Cheers,
Martin

* I realise only now that the zoom value in the webpage display should have more decimals; only one decimal is not informative for the lower range.
(It used actually to be 4 decimals during development, and then I overcorrected... :) )

martin

Quote from: Stefffresh from the disk, version 10.1.7 in a new folder and also just 20 fps
Over to Hardy...  ;D

Cheers,
Martin

PS.
Random idea: Could this be a *.situ thing?
Something wrong buried in the situ which thus survives even restarting the computer?

Hardy Heinlin

Quote from: martin on Mon, 23 Mar 2020 09:21
Random idea: Could this be a *.situ thing?
Something wrong buried in the situ which thus survives even restarting the computer?

Nope.

Fresh from the DVD there isn't even a saved situ but a fresh situ from the DVD.

Maybe Firefox taking all resources since the last experiment?


|-|

Robert Staudinger

Hello Martin,

everything works with Firefox perfect and FPS is 73 to 74. Chrome or IE11 produce a nice error screen as you predicted.

Hardy, my screen is just 18cm diagonal, the setup in my Covid19 retreat is very provisionally.

Thanks to both of you for your help, Robert