New Members

New Members

You should get an activation email when you join.  If not, please contact

info@radarspotting.com
Welcome, Guest. Please login or register.
August 25, 2019, 03:56:54 am

Login with username, password and session length

Members
Users Online
Users: 1
Guests: 54
Total: 55

Silhouettes, Profiles and Operator Logos

If you're looking for a bulk download, we have nearly 47,000 aircraft silhouettes, profiles and operator logos available in bmp file format, 85x20 pixels. You can find all the Zip files here.  

And you can request new logos or silhouettes in the the Logo section - Ian K, Paulm, Steve Hibberd, Mustang51, Chris Alder, s92driver and Simon Brooke.  Latest Additions






Author Topic: BaseStation 184 SQL help please?  (Read 386 times)

0 Members and 1 Guest are viewing this topic.

Offline Andos

  • Member
  • **
  • Posts: 33
  • Country: gb
  • Spotting since 1973
BaseStation 184 SQL help please?
« on: February 12, 2019, 09:02:00 pm »
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.


  • Raspberry Pi 3B>FlightAware
Andos.

Offline Anmer

  • Administrator
  • Top Poster
  • *****
  • Posts: 8331
  • Country: wales
    • https://radarspotting.com/forum/index.php?PHPSESSID=69c9c8868f611961315ed115e41abdcb&action=treasury
Re: BaseStation 184 SQL help please?
« Reply #1 on: February 12, 2019, 10:44:13 pm »
Hi

Just saw this on my way to bed.

I'll respond fully tomorrow morning (UK time).
  • SBS-1, SBS-1eR, SBS-3 and RadarBox
Here to Help.

Offline Anmer

  • Administrator
  • Top Poster
  • *****
  • Posts: 8331
  • Country: wales
    • https://radarspotting.com/forum/index.php?PHPSESSID=69c9c8868f611961315ed115e41abdcb&action=treasury
Re: BaseStation 184 SQL help please?
« Reply #2 on: February 13, 2019, 08:45:29 am »
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.
  • SBS-1, SBS-1eR, SBS-3 and RadarBox
Here to Help.

Offline Andos

  • Member
  • **
  • Posts: 33
  • Country: gb
  • Spotting since 1973
Re: BaseStation 184 SQL help please?
« Reply #3 on: February 13, 2019, 09:28:28 pm »
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.
  • Raspberry Pi 3B>FlightAware
Andos.

Offline Triple7

  • Member
  • ****
  • Posts: 903
  • Country: england
    • http://radarspotting.com/forum/index.php?action=treasury
Re: BaseStation 184 SQL help please?
« Reply #4 on: February 13, 2019, 09:53:26 pm »
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, RPi2 + FA Pro Stick & 1090 filter

Offline Anmer

  • Administrator
  • Top Poster
  • *****
  • Posts: 8331
  • Country: wales
    • https://radarspotting.com/forum/index.php?PHPSESSID=69c9c8868f611961315ed115e41abdcb&action=treasury
Re: BaseStation 184 SQL help please?
« Reply #5 on: February 14, 2019, 07:40:20 am »
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.
  • SBS-1, SBS-1eR, SBS-3 and RadarBox
Here to Help.

Offline Andos

  • Member
  • **
  • Posts: 33
  • Country: gb
  • Spotting since 1973
Re: BaseStation 184 SQL help please?
« Reply #6 on: February 14, 2019, 08:19:30 pm »
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.
  • Raspberry Pi 3B>FlightAware
Andos.

Offline Triple7

  • Member
  • ****
  • Posts: 903
  • Country: england
    • http://radarspotting.com/forum/index.php?action=treasury
Re: BaseStation 184 SQL help please?
« Reply #7 on: February 15, 2019, 10:00:23 am »
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, RPi2 + FA Pro Stick & 1090 filter

Offline Andos

  • Member
  • **
  • Posts: 33
  • Country: gb
  • Spotting since 1973
Re: BaseStation 184 SQL help please?
« Reply #8 on: February 18, 2019, 07:16:18 pm »
That's ok.  Thanks for taking the time to read this.


                 Andos.
  • Raspberry Pi 3B>FlightAware
Andos.