[STICKY] Operator Flags and Model Silhouettes

Are you having trouble getting Virtual Radar Server installed and running? If so then this is the place to ask about it.
Post Reply
Posts: 2213
Joined: Fri Feb 17, 2012 3:20 am

[STICKY] Operator Flags and Model Silhouettes

Post by agw » Mon Dec 28, 2015 5:40 pm

The Virtual Radar Server installer does not install operator flags or model silhouette images. The first step in getting these working for your installation is to download a set of flags and silhouettes and unzip them onto your machine.

You can download silhouettes and operator flags from Kinetic's website here: http://www.kinetic.co.uk/resourcesdownloads.php

The Silhouettes Logos file contains the model silhouettes, there's only one of those. You have a choice of different operator flags, they're the files Operator Logos Version 1 through Version 4. To get things going just pick version 1, you can experiment with the others later and pick one you like.

Unzip the two files into separate folders. Remember where you unzipped them.

In Virtual Radar Server go to Tools | Options.

In the Data Sources section enter the full path to the folder where you unzipped Silhouettes Logos into Silhouettes folder, and the full path to the folder where you unzipped Operator Logos Version 1 into Flags folder.

If you do not have a BaseStation.sqb configured then ensure that you have Lookup aircraft details online ticked.

Click OK. If everything worked then you should start seeing silhouettes and operator flags on the web site.

Posts: 16
Joined: Tue Dec 20, 2016 3:36 am

Re: [STICKY] Operator Flags and Model Silhouettes

Post by RickBoatright » Tue Dec 20, 2016 4:23 pm

That link is superceded. Scroll down for better, newer instructions.
There is an updated step by step instructions and valid links for zips with various flag and silhouette options in this post viewtopic.php?f=1&t=1237#p6362

Valid as of December 2016. Eventually link-rot and updates will make it wrong, but it's good for now.
Last edited by RickBoatright on Fri May 24, 2019 10:39 pm, edited 1 time in total.

Posts: 3
Joined: Sat Feb 25, 2017 11:55 pm

Re: [STICKY] Operator Flags and Model Silhouettes

Post by shinesamuel » Sat Feb 25, 2017 11:59 pm

Need Help to configure Silhouettes and Flags? I have downloaded some silhouettes but it was not working with VRS.

Posts: 16
Joined: Tue Dec 20, 2016 3:36 am

Re: [STICKY] Operator Flags and Model Silhouettes

Post by RickBoatright » Fri May 24, 2019 10:38 pm

Updated instructions for getting operator flags and silhouettes working in VRS 2.4 or later.

The following is valid as of May 2019. I can't prevent linkrot so it is possible links will not work at some later date.

Have VRS entirely installed and working other than flags and silhouettes before you start this.

Simple (little or no customization) version. I.E. Part one.
  • Make a folder that you will use to hold the images for VRS. DO NOT use the \program files\ folder VRS is installed in, use something else. Personally, I like \VirtualRadar\ or perhaps \users\yourlogin\VRS\. It doesn't matter, just make one.
  • Go to the Bones Aviation download page.
  • Download the Operator Logo Starter Pack Size 85 x 20.
  • Unzip it somewhere, and put the flags images (yes, all 1384 of them) into a flags folder under the folder you made above. So, lets say \VirtualRadar\flags. These are all 85x20 pixel bmp files and they all go right into the flags folder.
  • Don't bother trying to download silhouettes from the links on that page. They rotted long ago.
  • Now, you need to register for an account at Radarspotting. You'll want to do that anyway. Go to the RadarSpotting registration page, scroll down to the bottom and click the button that you accept their terms. Fill in the registration form, manage the captcha, and it will send you the usual registration confirmation email.
  • Go find the email confirmation, and then return to RadarSpotting and go to their Silhouettes and Logos download page..
  • They have many many flag and silhouette sets (over 47,000 image files) to download. I'm particularly fond of Steve Hibberd's 85x20 pixel Side View Logos. Download the ones you want and unzip them. Assuming we're talking about silhouettes and not operator logos, put the 85x20 images into a silhouettes folder under the folder you made above, for example \VirtualRadar\silhouettes.
  • If you see other sets you like, download them, unzip them and copy the images into either the flags folder or the silhouettes folder we have now created. Go crazy.
  • If you want some particular operator flag that might have been done that isn't (yet) in any of the bulk downloads, you can search the forum. For example, back in 2017 I asked Ian K for some custom flags that you can see (and download) [url-https://radarspotting.com/forum/index.p ... l#msg32204]at this link into the forum[/url].
  • In the VR server app, go to tools/options and point the flags and silhouettes pointers to the two folders you just populated and then exit out of VR and re-start it.
You should now get operator logo flags and silhouettes in your VR list.

Now to start having fun with non-default flags and codes. Part two:

This part describes how to set up VRS so that you can enjoy those custom operator flag and custom silhouettes you may have uploaded above.
  • Download the Database Writer plugin from the VRS web site and run the install.
  • In VRS go to Tools / Plugins and click on the Database Writer plugin.
    • Make sure enabled is checked.
    • Uncheck "Only update databases that this plugin created.
    • In the database filename, use the folder you created above and enter something like

      Code: Select all

    • Spell Basestation correctly.
    • Do not use the \Program files\... folder, use the folder you created in step one. (the one with the flags and silhouettes folders in it.
  • Check "Save Online Lookups in database".
  • UN CHECK "Overwrite details on existing aircraft.
  • Click the "Create Database" button. (Once only ever.) This will create the database that you can record information about planes in.
  • Click OK and then Close.
That starts looking up planes as VRS sees them and entering their data into a SQLite database that you named in this part. That's critical because it's where the system will store the CUSTOM information we're going to be entering.

Background so the rest of this makes sense.

VRS looks up the information about a plane on PlaneBase (http://planebase.biz/) for the flag and silhouette we're interested in two pieces of information, the ICAO Operator Code and the ICAO model code. If the planes operator is registered with the ICAO then they will have created a three letter code identifying that operator. For example Southwest is SWA and FlexJets is LXA. BIG airlines have logical codes, smaller or newer ones are kind of "Oh well we picked something." The thing is, VRS looks for an operator flag that is XXX.bmp where XXX is the operator code of that airline.

Simlarly, the ICAO has assigned model codes for various planes. A Bombardier Challenger 300 has the code CL30, a Embraer ERJ-145 XR has the code E45X and so on. As you can probably guess, VRS looks in the silhouettes folder we pointed to above for a file named CL30.bmp or E45X.bmp and displays that. So far so good.

But lots and lots of airplanes are flown and owned by someone who is NOT registered with ICAO. What if I have a plane I see all the time that is owned and operated by Kansas State University. It would be cool if I could have the system bring up a purple flag with a wildcat on it but the Operator Code field in the database when we look up that plane is blank. This sort of sucks. Not only that, but its even more complex if the plane is owned by some regional airline, for example the fictional SantaFe Air, but it has contracted to fly as "United Express" so the operator code comes up as SFE but we want to display the flag for UAE (no, I just made those up.)

So, for this sort of thing, we download another plugin, the "Database Editor" plugin (same link as above) and install it. Again go to Tools Plugins, click the database editor plugin. Click enable, and set the default access to "Allow." OK, Close, restart VRS and refresh your browser again. (Shift-click or clear your cache some other way.)

Now, you can go into Database Editor when you select a plane and enter a CUSTOM operator code (not restricted to 3 characters) and/or a custom model code to display a custom flag or silhouette. For example I have operator flags for K-State and K.U. and Hormel because I see those planes a lot. I have silhouettes for some custom painted planes like Southwest's Texas and New Mexico planes. I changed the operator codes for those from blank to KSTATE or UKANS and the model codes from B737 to SWATX and SWANM respetivly. That's why it was important to tell the database writer to not update planes it's already created entries for, or it would overwrite the custom entries we make.

Enough for now, further, fancier custom flags and silhouettes later.

Posts: 16
Joined: Tue Dec 20, 2016 3:36 am

Re: [STICKY] Operator Flags and Model Silhouettes

Post by RickBoatright » Sat May 25, 2019 10:12 am

Advanced custom flags

Please have read and completed the first steps on custom flags in the post above.

in the previous post we installed the database writer and database editor plugins to allow us to choose custom silhouettes and flags on a plane by plane basis. As useful and cool as that is, there is more that we can do. This post goes into two methods to connect various aircraft to custom flags and silhouettes, one automatic and one semi-manual but still better than one-plane-at-a-time. There may be further tutorials in the future, but let's get this done.

Fully automatic linking

Many planes have no operator code, or are just tagged as "Private". It would be cool if those planes displayed SOMETHING in the operator flag column. Fortunately for us, Andre Villela has created a custom bit of javascript that takes care of that for us. If there is nothing in the operator code field, then his program links in a custom operator flag based on several options:
  • If there is a file in the flags folder with the tail number of the plane, then that is displayed as the flag. For example: if you see N486RW the flag will show you a red CocaCola flag.
  • If there's no file matching the tail number, it looks for a file with the same name as the manufacturer of the plane, so a Falcon 900B gets a pretty Dassault flag while a G550 gets a Gulfstream flag and a Legacy 600 has a blue Embraer flag.
It's really nice. Complete instructions, and all the files can be found at my Github repository or at Andre's Github repository.

Batch database updating - but still manual...

Let's pretend that you live, like I do, in eastern Kansas near four airforce bases that have US Air Force KC135 tankers of various versions flying in and out of them (Omaha, Topeka, Wichita and Tulsa), and you have either created yourself, or asked someone on radarspotting to create for you a custom silhouette for the KC135 with tail colors indicating if it is a Kansas Coyote US Air National Guard plane flying out of Topeka or an multi-role tanker, electronic surveilance plane flying out of Omaha, or, or or and you have not three or four but DOZENS of planes that need to have their model code changed to a custom string like oh, I don't know, KSANG-KC135 or something.

You COULD go in with the database editor one-by-one and update them, or you could take advantage of the fact that the Basestation.sqb file is a SQLite ( SQL -lite ) file and can be updated, modified, and etc using the SQLite program. SQLite is the most used database engine in the world and the SQLite file format is stable, cross-platform, and backwards compatible and the developers pledge to keep it that way through at least the year 2050.

MAKE A BACKUP OF Basestation.sqb before doing anything to it. If you don't and you mess it up, it's not my fault. I will laugh.

Go to the SQLite home page and download the latest version of the Windows PreCompiled Binary Tools package. The file name starts: sqlite-tools-win32. Unzip it, and copy the three exe files into the folder your Basestation.sqb file is in.

Now, make a backup copy of Basestation.sql. Now. Copy it somewhere safe, or I swear I will laugh when you complain that you destroyed your file.

Open a command window. Yes, SQLite is a command line tool and you'll have to type nasty, horrible SQL commands.

Change directories to the folder where your Basestation.sqb file is. You'll type something like cd \VirtualRadar\ or something like that.

Type SQLite3 Basestation.sqb that wil run the SQLite program and present you with a prompt having opened your database.

Type .tables and enter and you'll see a list of the tables in the database. There are a lot of cool programmer-y things you can do with this, but for now, we're interested in the table called "Aircraft".

It has the following fields: AircraftID|FirstCreated|LastModified|ModeS|ModeSCountry|Country|Registration|CurrentRegDate|PreviousID|FirstRegDate|Status|DeRegDate|Manufacturer|ICAOTypeCode|Type|SerialNo|PopularName|GenericName|AircraftClass|Engines|OwnershipStatus|RegisteredOwners|MTOW|TotalHours|YearBuilt|CofACategory|CofAExpiry|UserNotes|Interested|UserTag|InfoURL|PictureURL1|PictureURL2|PictureURL3|UserBool1|UserBool2|UserBool3|UserBool4|UserBool5|UserString1|UserString2|UserString3|UserString4|UserString5|UserInt1|UserInt2|UserInt3|UserInt4|UserInt5|OperatorFlagCode

We're going to ignore most of them, but I hope you can see some opportunities, especially the unused-by-VRS "user" fields...

Now, I'm not going to teach you SQL. If you've never used it, go find any of the excellent SQL tutorials out there. In my case, I have a problem. All the variations of the KC-135 use the same ICAO model code ( K35R ) and I would very much like to have different silhouettes for KC-135R vs KC-135T and U and also RC-135's in their varients and so forth. Oddly, the type NAME distinguishes them, but the ICAO type code doesn't. So, I'm going to type in several commands. Note that each one that doesn't start with a . (dot) ends in a semi-colon and that each is followed by hitting enter.

--- that turns on column headers.

Select * from Aircraft where Type like '%KC135T%;
-- this prints out a list of all the rows where the string "KC135T" is contained in the "Type" field so that I can check that these are the ones I want. And, indeed they are. They all have an ICAOTypeCode of K35R -- which is just wrong. Now, on to doing an update. Did I mention you should have made a backup?

Update Aircraft set ICAOTypeCode = 'KC135T' where Type like '%KC135T%';
-- if you've ever done any work with databases at all, that line should be self explanitory. If not, go find a copy of SQL for Dummys.

Hopefully you can see how you can do all sorts of cool things updating the various fields with values based on stuff in the Type or Callsign or Operator fields.

Have fun, but stay safe.

Post Reply