The Java Feeder

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

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 1st, 2011, 10:44 am

Yes the conf files are in that directory but the ADSViewer.jar file is in a sub-directory under e:\adsb_radar and running the command in that directory yields this error:

E:\adsb_radar>java -jar ADSviewer.jar
Using config file: C:\Users\Xxxxx\adsviewer.conf
Main::main exception Map Parsing Error java.io.FileNotFoundException: \Users\bea
st\map.dat (The system cannot find the path specified)

But this is the content of the c:\Users\Xxxxx:

C:\Users\Xxxxx>dir/w
Volume in drive C has no label.
Volume Serial Number is AA8F-5190

Directory of C:\Users\Xxxxx

[.] [..] [.entrance] [.idlerc]
[.razorsql] [.rs] [.VirtualBox] adsnet.conf
adsnetwork2.conf adsviewer.conf [amaya] [Contacts]
[Desktop] [Documents] [Downloads] [Dropbox]
[Favorites] [Links] map-se.dat map.dat
maporig.dat [Music] [Pictures] [Saved Games]
[Searches] [Videos]
6 File(s) 6,837,121 bytes
20 Dir(s) 8,619,134,976 bytes free
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 1st, 2011, 11:32 am

When you bring up explorer (right click start button on task bar and select explore), go to Tools->Folder Options-View and make sure you have "show hidden files and folders" set to on (checked) and "hide extensions for known file types" set to off (unchecked).

Maybe map.dat is really called map.dat.txt as Windows is quite defective in this regard.

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 2nd, 2011, 9:21 pm

That's my natural operating state for folder and file extensions, so map.dat is map.dat.
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 2nd, 2011, 11:04 pm

I think the bug is that the ADSViewer.jar file has to be in your C:\Users\Xxxxx directory.

The error "Main::main exception Map Parsing Error java.io.FileNotFoundException: \Users\Xxxxx\map.dat

is missing the C: and I think that might be the bug. In my code I forgot to add "homeDrive" to the mapPath:

Code: Select all

homePath = System.getenv("HOMEPATH");
OSConfPath = homeDrive + homePath + "\\" + conf;
mapPath = <----- should have homeDrive here--------> + homePath + "\\" + map;


I think...

Anyway, try moving ADSViewer.jar into your home directory.

By the way, it should work with the Xxxxx connected to Planeplottter, and planeplotter set to serve on port 30003.

The part that doesn't work very well is the Tabular Display. I failed miserably on that.

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 2nd, 2011, 11:35 pm

That fixed it! OK, I can now play with the map contents, thanks Steve.
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 2nd, 2011, 11:50 pm

That weird though, I just copied mine to another directory, and ran it just fine. I wonder if Vista just takes a default drive, while Win7 doesn't?? Anyway it was a bug that no one else found, ha.

You'll have to fine-tune the runway centerline headings as well. I think there's an example in Australia that has them crooked just using the right heading, so you have to give them a different heading so they will line up.

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 3rd, 2011, 12:05 am

Are the headings Magnetic or True?
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 3rd, 2011, 12:07 am

I think everything is true in ads-b (GPS related).

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 3rd, 2011, 12:23 am

My next question is, can I NOT run Basestation and still tap into the SBS-1er Port 30003? Is that what the Vodka patch does?
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 3rd, 2011, 12:43 am

You will have to create a new adsnet.conf for the basestation.

I would change planeplotter server to port 30004 or something, and keep basestation at 30003. So one adsnet.conf would point at planeplotter, and the other at basestation.

When you startup ADSNet.jar, you will need to add a commandline switch to your desktop shortcut, example:

java -jar ADSNet.jar -c adsnet-basestation.conf

or, start it up in a DOS window.

I think you can have more than one ADSNet.jar running on one machine. You'll have to test that. The unicast.port and socket.port have to be different in each config. If you send unicast reports out onto the Internet, then your router can only point at one adsnet though. In your case, you probably just want to keep the unicast commented out.

That was the idea anyway, to combine sensors into one view. The limitation being two programs can't grab the same TCP ports.

nzradar
Posts: 66
Joined: May 16th, 2011, 7:14 pm

Re: The Java Feeder

Postby nzradar » July 3rd, 2011, 4:16 am

I don't think I worded my question well:

Q. Can I run the java ADSNet.jar and ADSViewer.jar and receive data from the SBS-1er without Basestation running? I'm keen to reduce overhead by having a simpler viewer at the expense of BS. And secondly, since I'm also running ADSNetwork 127L can this provide the data for ADSViewer through any configuration?
Michael
New Zealand
Home Website: http://www.nzradar.com
ADS-B Traffic: http://www.nzradar.com/?page_id=16
SBS-1er/microadsb
BaseStation/PlanePlotter
Windows 8 Consumer Preview

edgy31

Re: The Java Feeder

Postby edgy31 » July 3rd, 2011, 2:21 pm

Q. Can I run the java ADSNet.jar and ADSViewer.jar and receive data from the SBS-1er without Basestation running?


No, the ADSNet works only with the basestation socket. The theory being, that I didn't have to decode the mode-s bits.

edgy31

Re: The Java Feeder

Postby edgy31 » July 5th, 2011, 2:06 am

I uploaded a simple viewer that connects to the SBS-1 decoder box if you are interested.

It displays enough downlink formats to interest the audience (maybe).

It's not being actively developed, as it was mostly just a "can I get it to work" type program, and cut and paste from other projects.

I'm not sure if it works with an "er" model.
Last edited by edgy31 on July 11th, 2011, 8:33 pm, edited 1 time in total.

User avatar
bones
Posts: 9737
Joined: August 8th, 2005, 4:44 am
Location: Isle of Man
Contact:

Re: The Java Feeder

Postby bones » July 5th, 2011, 2:15 pm

No luck getting it to launch here. It triggers Java momentarily but it doesn't go any further.

The DLL's and the Lib folder are set up correctly but do the other jar files in the zip need to go anywhere specific? Mine are in an adsb-viewer folder placed in the user root folder. The adsb-viewer folder has the six sub folders for adsview, gui, lib etc complete with all the jar files.

edgy31

Re: The Java Feeder

Postby edgy31 » July 5th, 2011, 3:07 pm

bones wrote:The DLL's and the Lib folder are set up correctly but do the other jar files in the zip need to go anywhere specific?


After you login to windows you fall into a login directory (C:\users\<login directory> on Vista). So the ADSView.jar, adsview.conf, map.dat, and the two DLL files go in there. Then create a lib directory and move J2DXX.jar into that.

The other stuff is java source code and you can delete it, or put it anywhere you want. I guess I need to separate that into a source zip.

I'm typing this off my head, and hope I have the names right. I think you can put the DLL files in c:\windows\system32 as well, but try the login for now.



EDIT: Mine sometimes doesn't connect to the box, and I have to stop and start it again. Haven't quite broken the code on 100% reliable connect.

Also, if you start the program in a DOS window, it outputs debug statements:

c:
cd \users\logindir
java -jar ADSView.jar


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest