BaseStation to MYSQL

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
leeus
Posts: 41
Joined: October 16th, 2009, 5:42 am

BaseStation to MYSQL

Postby leeus » August 2nd, 2010, 5:44 pm

Is there any tools out there that will log the BaseStation output directly to a MYSQL database at all?

Thanks,

Lee
ImagePlane Finder for iPhone - click image to download

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » August 2nd, 2010, 6:33 pm

I was working on an adaptation of some software I was writing, where the output data would feed various database tables, and then these tables would feed other (higher level) tables, either through triggers or more code.

Sad to say I got bogged-down trying to design the tables. Obviously you need aircraft tables (target tables if you want to include ground vehicles), but how much data should the tables contain? All the hits, hits that have changed, etc. When should data be archived, etc.

Anyway, the actual software to interface the Basestation socket or Boris socket is not that difficult, but would be different for each database design.

What kind of tables do you envision your database having, and what software is going to be on the other side extracting the data?

User avatar
leeus
Posts: 41
Joined: October 16th, 2009, 5:42 am

Re: BaseStation to MYSQL

Postby leeus » August 2nd, 2010, 6:35 pm

All I think I want is current live aircraft in the system of my local BaseStation with possibly a timeout of 15 minutes before it gets purged. I am not interested in historical at all.

The reason I want this is to run some queries on it and pull off some stats at various points of the day and possibly take some snapshots and save them off as XML files.
ImagePlane Finder for iPhone - click image to download

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » August 3rd, 2010, 11:35 am

obsolete
Last edited by edgy31 on December 22nd, 2010, 6:32 pm, edited 4 times in total.

User avatar
leeus
Posts: 41
Joined: October 16th, 2009, 5:42 am

Re: BaseStation to MYSQL

Postby leeus » August 4th, 2010, 5:55 am

Am I also thinking that this is not a GUI app and just a console application? I just built in Eclipse and seems to work well! :-)

Very useful indeed!

Thank you
ImagePlane Finder for iPhone - click image to download

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » August 4th, 2010, 7:09 am

Yes, it probably needs to have a GUI, so you can shut it down easier, and maybe show the number of records. I was going to add a thread that deletes old records after 15 minutes also, but figured that could be done in the database. I just wanted to put something out there that populated a table for you to get started with. Java has a pretty simple MySQL interface, which makes it easy to throw something together.

User avatar
leeus
Posts: 41
Joined: October 16th, 2009, 5:42 am

Re: BaseStation to MYSQL

Postby leeus » August 4th, 2010, 3:37 pm

No that is perfect, need to dust off my java skills now :-(
ImagePlane Finder for iPhone - click image to download

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » August 4th, 2010, 8:42 pm

obsolete
Last edited by edgy31 on December 22nd, 2010, 6:32 pm, edited 1 time in total.

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » August 7th, 2010, 4:54 pm

As you can tell, I'm not very good with SQL. I would like to create some triggers that would add records to a "target" table. That is, add a record if the Mode-S code hasn't been seen before. Then maybe a trigger IF:THEN to update the values of records already created. Say, update the last-seen timestamp, but not the first-seen timestamp, etc.

Alternatively, I could write a Java thread that went through the detection table, and modified the target records, and then deleted the detection records as they were consumed. That seems like a better way to save disk space, and backup space.

Just some thoughts...

Sand0rf
Posts: 1
Joined: April 5th, 2010, 5:13 pm

Re: BaseStation to MYSQL

Postby Sand0rf » October 15th, 2010, 5:46 pm

I'm in the same situation as the topicstarter, trying to get the basestation data in a MySQL database and then display it on a Google Maps Page. That last part, the Google Maps App, is already done and working fine however I'm still scratching my head about the part box to database. I've tried to download the program made by edgy31 since it will cover everything I need but the files aren't anymore available on the skydrive :(

Is there any other host where the program/source code is available or is there another similar program?

Greetings from Holland,

Sander

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » October 16th, 2010, 2:41 am

obsolete
Last edited by edgy31 on December 22nd, 2010, 6:31 pm, edited 1 time in total.

vk4tec
Posts: 104
Joined: September 10th, 2010, 10:46 am

Re: BaseStation to MYSQL

Postby vk4tec » October 16th, 2010, 6:29 pm

leeus wrote:Is there any tools out there that will log the BaseStation output directly to a MYSQL database at all?

Thanks,

Lee


Yes perl DBI DBD Net::Telnet

Andrew

edgy31

Re: BaseStation to MYSQL

Postby edgy31 » October 16th, 2010, 9:34 pm

obsolete


Return to “Development”

Who is online

Users browsing this forum: No registered users and 1 guest