Welcome to Radarspotting. Please login or sign up.

May 02, 2024, 12:32:34 PM

Login with username, password and session length

New Members

New Members

You should get an activation email when you join.  If not, please use the Contact option.

BaseStation 184 SQL help please?

Started by Andos, February 12, 2019, 09:02:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andos

Hi,
I've recently added my own Routes table to the BaseStation.sqb file for the purpose of displaying the Routes of any callsigns received. The Table is populated with about 100,000 routes.  However, I am still not able to get the Routes to display on the Radar screen or in the Aircraft List. I am trying to show them in the Generic Name field(s) as ADU SBS Utility has taken over the Popular Name field.

Can anybody out there give me advice as to what I might be doing wrong or point me in the right direction? I'm beginning to suspect that some code tweaking might be required within the BaseStation program as all my settings are set in BaseStation's settings to display the Generic Name field on both Radar & Aircraft List(s). Any help with coding would also be appreciated.

     Yours hopefully,

                        Andos.
Andos.

Anmer

Hi

Just saw this on my way to bed.

I'll respond fully tomorrow morning (UK time).
Here to Help.

Anmer

Hi Andos

To display the Generic Name field on the aircraft label on the map:

Settings-> Display Settings-> Scope Fields.

To display the Generic Name Field in the Aircraft List you need some "outside help".

There's a great app for BaseStation called the BS Aircraft List Configurator, developed by our member acarslogger

Unfortunately the app isn't hosted on this forum.  But you should find it here:

https://bsrs.jetvision.de/index.php

The app will allow you to select the data fields to show in the aircraft list and in what order.

Good luck.
Here to Help.

Andos

Hi Anmer,
                I don't think I have explained myself problem very clearly.  I already have GenericName field displaying in both, the Radar & Aircraft List in BaseStation.  What is not displaying are the Routes from my added Routes Table within those respective fields in BaseStation.

      1.     ie.  There are no Routes being displayed in the GenericName fields.


      2.     eg.   If, for example,    my SBS receives a  ModeS transmission from, let's say,  AIC117.  The usual, the Hexcode; Lat/Long etc...  is displayed in their respective columns in BaseStation both on the Radar and on the Aircraft List. ADU populates the rest.  The Callsign field(s) would be populated with AIC117 However,   my Route data is not being displayed in the GenericName  Field/Column on either the Radar nor the Aircraft List.  In this example, the GenericName fields should be displaying DEL-BHX.  I know it is not character space issue because I have set the relevant columns to receive 15 characters both in BaseStation and in my Routes Tables/Columns in my sqb file to handle multi-sector routes.


       I hope this explains my dilemma a little better.


                        Andos.
Andos.

Triple7

Hi Andos,

Can you please explain a bit more about your "added routes table?

If you have added an extra table in your sqb file, surely BaseStation will be "blind" to that as it was not part of the original schema when Kinetic designed it. The GenericName field (in the Aircraft table) is relevant to a particular hex code which, obviously, is not fixed to any particular route. So, if you are asking BS to show the contents of the GenericName field, surely that will be blank unless you are somehow dynamically adding the route info for a specific aircraft into that field.

Tim
SBS-1eR, FA ProStick + 1090 filter

Anmer

Quote from: Andos on February 13, 2019, 09:28:28 PM
I don't think I have explained myself problem very clearly.  I already have GenericName field displaying in both, the Radar & Aircraft List in BaseStation.  What is not displaying are the Routes from my added Routes Table within those respective fields in BaseStation.

Sorry, my misunderstanding.

As Tim has alluded, you will need something to lookup a callsign and populate the routes in the Generic Name field.

Flight Display used to do something similar.
Here to Help.

Andos

Hi Tim,
            I have created the table called Routes to contain the following columns in the following order:

rowid:            (automatically created)

RoutesID:       int  Primary Key

Callsign:         varchar

GenericName: varchar (this contains the routes upto 4 sectors ie: AAA-BBB-CCC-DDD)


I have added a RoutesID column to the Flights Table  and created a foreign key  for Callsign with the Flights Table also.  I have then added a GenericName column to the Flights Table also with a Foreign from 'my' Routes Table.

Obviously, this will not work as you have now pointed out to me that the GenericName column is tied into the ModeS colunmn within the Aircraft Table.  (-which is where I have been going wrong!).

I am still feeling my way around SQL and learning as I go but I can now see the problem for myself.

Would I be right in assuming that I will not only have to create foreign keys in the Aircraft Table, but also would probably have to create and link another database/sqb to the BaseStation sqb or am I overthinking it?

Could you please let me know what you think would be the correct approach?


                    Andos.
Andos.

Triple7

Quote from: Andos on February 14, 2019, 08:19:30 PM
Could you please let me know what you think would be the correct approach?
I'm afraid I cannot offer you any guidance, my knowledge of SQL is almost non-existent. My post was based on a bit of logical thinking and nothing more.  ;D

I hope someone else might be able to assist you further.

Tim
SBS-1eR, FA ProStick + 1090 filter

Andos

That's ok.  Thanks for taking the time to read this.


                 Andos.
Andos.