Another server to display output on a Google Maps page

This forum is for users who are developing applications (or resources) to work alongside BaseStation (i.e. add-ons) and who wish to discuss development techniques.

Moderators: KineticChris, KineticDavid, Moderators

User avatar
dogo
Posts: 248
Joined: November 13th, 2005, 11:17 am
Location: Ashford, Kent
Contact:

Re: Another server to display output on a Google Maps page

Post by dogo » June 27th, 2010, 10:32 am

Thanks for the reply edgy31..

Done all of your suggestions, I don’t think it’s a router problem, as I said I can access my internet ip address ok from home (not 192.168.1.1) so typing in the ISP assigned ip address at home everythink is ok! I just cant seem to use the ISP assigned address at work!
Darren - Kinetic Beta team member

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 27th, 2010, 10:35 am

dogo wrote:Are all the coms done through port 80
Yes, it's just port 80 TCP. If you can see the page then communication with the server probably isn't the problem.

Accessing the page via your Internet IP address while you're on the local network isn't always the perfect test of your visibility from the Internet. Some routers will just route it back to the local network without passing it through the firewall, so you can't see what (if anything) is being blocked. If you like you can PM me with your Internet IP address - I can have a try from here and see if I get the same result.

If you'd rather not do that then which browser are you using from work? When you say "it shows no aircraft" do you that mean that:
1) The list of aircraft is working but the aircraft aren't on the map?
2) The list of aircraft is showing 0 aircraft being tracked but otherwise that side of the page looks like it's all there?
3) The side with the list of aircraft on it has bits missing from it, or is missing entirely?

In the status bar on the browser are there any warning icons or messages about Javascript errors? If so, what are they?

Dan Dare
Posts: 11
Joined: January 6th, 2010, 11:38 am
Location: Eagle Island

Re: Another server to display output on a Google Maps page

Post by Dan Dare » June 27th, 2010, 11:35 am

I have updated basestation software from v.129 to v146 redone all my settings and all ok.
Basestation running on one computer and VirtualRadar on another via a wired local network.
I can't however get my operator logos to appear on the VirtualRadar screen.
I have checked closely the folder path in VirtualRadar Basestation set-up and seems ok.
Is there something else I need to check.

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 27th, 2010, 12:25 pm

Dan Dare wrote:I can't however get my operator logos to appear on the VirtualRadar screen.
I have checked closely the folder path in VirtualRadar Basestation set-up and seems ok.
Is there something else I need to check.
The operator logos works off of the OperatorFlagCode field. It takes the content of the field, adds .BMP to it and looks for the corresponding file in the folder you specify. It then loads it and sends it back to the browser in whatever format was asked for (usually PNG). So one thing to check would be that the OperatorFlagCode field is being filled in correctly.

There is a bug in the current version whereby if the OperatorFlagCode has an underscore in it then the server tries to search for the wrong file and sends back a blank image instead. If your OperatorFlagCodes have underscores in them then just hold tight for the next version.

If you are happy that the OperatorFlagCode is correct then I would open up a Windows Explorer window on the same computer as the server. Cut and paste (don't copy by hand) the folder name out of the server options and into the address bar of Windows Explorer. If you can't see the address bar in Windows Explorer then press Alt+D to bring it up. Check that (a) you can see the folder contents, (b) that the folder is full of files like BAW.bmp, VIR.bmp etc. and (c) when you double-click one of the files it opens up correctly in Windows. If you have any problems there then check that the folder name is correct and that you have read permissions on the flags folder, particularly if BaseStation is on another computer.

If you can see the folder from Windows Explorer, the files are all .BMP files and your OperatorFlagCode is being filled in then check the log file to see if there are any exceptions in there about the image processing.

If that all looks OK then see if the server is serving the files but you can't see them. To do this pick a flag from the folder (say BAW.BMP). Open a web browser and (e.g. for a server running on 192.168.1.1) enter the address http://192.168.1.1/VirtualRadar/Image_OpFlag.BAW.png

If that works then it may be that the code that tries to figure out the size of the image flags is wrong. Enter the address http://192.168.1.1/VirtualRadar/AircraftList.json - you will get a text file sent back. At the top are a couple of lines like this:

flgH: 20,
flgW: 85,

What values do you have for those two? Please don't cut and paste the entire file, only those two lines are of interest :)

Dan Dare
Posts: 11
Joined: January 6th, 2010, 11:38 am
Location: Eagle Island

Re: Another server to display output on a Google Maps page

Post by Dan Dare » June 27th, 2010, 1:08 pm

Thanks for your response. Will investigate a little later this evening and report.
Great programme.

User avatar
dogo
Posts: 248
Joined: November 13th, 2005, 11:17 am
Location: Ashford, Kent
Contact:

Re: Another server to display output on a Google Maps page

Post by dogo » June 27th, 2010, 4:16 pm

agw wrote:
dogo wrote:Are all the coms done through port 80
If you'd rather not do that then which browser are you using from work? When you say "it shows no aircraft" do you that mean that:
1) The list of aircraft is working but the aircraft aren't on the map?
2) The list of aircraft is showing 0 aircraft being tracked but otherwise that side of the page looks like it's all there?
3) The side with the list of aircraft on it has bits missing from it, or is missing entirely?

In the status bar on the browser are there any warning icons or messages about Javascript errors? If so, what are they?
Sorry should made my post somewhat clearer its option 2 :-)
Darren
Darren - Kinetic Beta team member

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 27th, 2010, 11:04 pm

rogerlong wrote:Just tried this but everytime I start i I get a box come up 'Cannot Start Web Server' "Cannot start the web server for prefix http://*.80/VirtualRadar/: The process cannot access the file because it is being used by another process"
I've uploaded a new version - if you try that and in the installer choose a different port. I'd start with 8080 but any number above 1024 should be fine.

You might want to uninstall the previous version first (it won't require a reboot and it won't lose your settings) so that the uninstaller can undo any configuration changes it made to Windows with regards to port 80. It won't hurt if you don't, it'll just keep things tidy and keep the number of open ports to a minimum.

User avatar
rogerlong
Posts: 675
Joined: January 26th, 2007, 2:06 pm
Location: Boscombe Down

Re: Another server to display output on a Google Maps page

Post by rogerlong » June 28th, 2010, 6:45 am

All working fine using port 8080, thanks very much.

manu67a
Posts: 30
Joined: April 29th, 2010, 4:32 pm
Contact:

Re: Another server to display output on a Google Maps page

Post by manu67a » June 29th, 2010, 4:44 pm

Thanks for the latest version, nice to see that the soft indicates the release of an update....

With the version before and this version it happens that I get some strange behaviour meaning no plane displayed, even if I refresh the screen. I thought first that it was related to my VM and to the netwokr part but even in the VM itself I can reproduce the problem. Restarting the application does not solve the problem, restarting the VM also no joy.
I have also tried to restart the basestation soft and machine without success.

Looking at the logs i get some Exception messages like those:
29.06.2010 18:06:12 [t:9] EXCEPTION during processing of web request for 'http://radar-gva.surleweb.eu/VirtualRad ... Order2=asc': System.Net.HttpListenerException: Le nom réseau spécifié n'est plus disponible
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text, Encoding encoding, String mimeType)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text)
at VirtualRadar.WebContent.AircraftList.ServePage(String page, HttpListenerContext context, String mimeType)
at VirtualRadar.WebServer.ProcessRequest(HttpListenerContext context)
at VirtualRadar.WebServer.GetContextHandler(IAsyncResult asyncResult)
29.06.2010 18:06:14 [t:5] EXCEPTION during processing of web request for 'http://radar-gva.surleweb.eu/VirtualRad ... Order2=asc': System.Net.HttpListenerException: Le nom réseau spécifié n'est plus disponible
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text, Encoding encoding, String mimeType)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text)
at VirtualRadar.WebContent.AircraftList.ServePage(String page, HttpListenerContext context, String mimeType)
at VirtualRadar.WebServer.ProcessRequest(HttpListenerContext context)
at VirtualRadar.WebServer.GetContextHandler(IAsyncResult asyncResult)
29.06.2010 18:06:16 [t:9] EXCEPTION during processing of web request for 'http://radar-gva.surleweb.eu/VirtualRad ... Order2=asc': System.Net.HttpListenerException: Le nom réseau spécifié n'est plus disponible
at System.Net.HttpResponseStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text, Encoding encoding, String mimeType)
at VirtualRadar.WebPage.SendText(HttpListenerContext context, String text)
at VirtualRadar.WebContent.AircraftList.ServePage(String page, HttpListenerContext context, String mimeType)
at VirtualRadar.WebServer.ProcessRequest(HttpListenerContext context)
at VirtualRadar.WebServer.GetContextHandler(IAsyncResult asyncResult)

By the way thanks for the reply regarding the linux server, would love to have that and if I can help in any way on that part, please let me know.

Thanks

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 29th, 2010, 6:57 pm

manu67a wrote:29.06.2010 18:06:12 [t:9] EXCEPTION during processing of web request for 'http://radar-gva.surleweb.eu/VirtualRad ... Order2=asc': System.Net.HttpListenerException: Le nom réseau spécifié n'est plus disponible
French exception messages - not seen those before :) It's saying that it was asked for an aircraft list but the connection had been closed or dropped before it could reply. This happens anyway, just from people closing the browser while the site it up, so on its own it's no cause for concern. You shouldn't be getting lots together all with "lts=0" in the address though.

Unfortunately there's not a lot I can do on the server side if the connection is being dropped before I can reply. Which browser are you using? How reproducible is it?

manu67a
Posts: 30
Joined: April 29th, 2010, 4:32 pm
Contact:

Re: Another server to display output on a Google Maps page

Post by manu67a » June 29th, 2010, 8:07 pm

agw wrote:Unfortunately there's not a lot I can do on the server side if the connection is being dropped before I can reply. Which browser are you using? How reproducible is it?
You're right, nothing to do if the browser is closed while you transmit data. I thought it could be an interesting message but I agree with French in it, it is less interesting of course :)

I will try to reproduce that behavior but I could not do it so far. As I have some visitors lately, I don't want to stop the service to reproduce this.
By the way how many simultaneous visitors is your little tool able to handle ? I guess there is also a machine issue if not powerful enough or if the bandwidth is not sufficient but I was wondering if on your side there is any kind of limit ?
So far I was able to handle 25 simultaneous connections or so according to the bandwidth graphs I have.

And while here, could it be possible to sort the connections by "last request" ascending, descending ? and can I have more than one instance running on the same machine but on a different listening port of course ?

Sorry for all my questions :)

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 30th, 2010, 12:06 am

manu67a wrote:how many simultaneous visitors is your little tool able to handle ?
I really have no idea, I never investigated it. The server doesn't generally have much work to do, I would imagine you're probably going to be limited by your upload bandwidth before anything else. I do have plans to give people more control over how much information is sent to the browser, particularly for connections coming from the Internet.
manu67a wrote:could it be possible to sort the connections by "last request" ascending, descending
I'll add it to the list of things to do :)
manu67a wrote:can I have more than one instance running on the same machine but on a different listening port
No - the port is stored in a configuration file written by the installer, the first instance will register itself as listening to the port and then the second instance will fail when it tries to listen to the same port. There's no facility in the program to support multiple instances for the same user on different ports.
agw wrote:Sorry for all my questions
No worries :)

manu67a
Posts: 30
Joined: April 29th, 2010, 4:32 pm
Contact:

Re: Another server to display output on a Google Maps page

Post by manu67a » June 30th, 2010, 5:27 am

agw wrote:No - the port is stored in a configuration file written by the installer, the first instance will register itself as listening to the port and then the second instance will fail when it tries to listen to the same port. There's no facility in the program to support multiple instances for the same user on different ports.
I often see programs with one installation but you can run several instances by specifying different config files.
I guess that the mandatory parameters would be those that you find in the options menu.

Would it be possible to have let's say a default .ini file with all the parameters stored in it, the program starts by default with this .ini file if no config file is specified.
If you specify a config file when you start your tool let's say like this: C:\Program Files\VirtualRadar\VirtualRadar.exe -c config_file.ini you could have different instances running on different listening ports ? :)

Thanks for your time reading my dreams :)

agw
Posts: 33
Joined: May 9th, 2010, 12:37 pm

Re: Another server to display output on a Google Maps page

Post by agw » June 30th, 2010, 7:01 pm

manu67a wrote:I often see programs with one installation but you can run several instances by specifying different config files.
The thought of trying to support a program when I don't know for sure where the configuration and log files are stored is not one that fills me with joy :) I'll be sticking with just the one configuration folder.

manu67a
Posts: 30
Joined: April 29th, 2010, 4:32 pm
Contact:

Re: Another server to display output on a Google Maps page

Post by manu67a » June 30th, 2010, 7:50 pm

agw wrote: The thought of trying to support a program when I don't know for sure where the configuration and log files are stored is not one that fills me with joy :)
Could be easily solved, but I understand your point :)

Again, thanks for your tool.

Post Reply