There is some confusion and uncertainty about how PP uses and stores data so I will spell it out as best as I can.
Databases used by Plane Plotter
PP uses two SQLite databases: flightroute.sqb and BaseStation.sqb
flightroute.sqb
The first one is unique to PP and stores only the relationship between flight numbers and routes, along with a time tag showing the time at which the route data was updated. flightroute.sqb is stored in the PP log file directory (Options..Directories..Log files) and if it does not exist when PP is first run, it is automatically created with its correct formatting information. The database is checked when flight numbers are received and the route is displayed on the chart of that is enabled in Options..Chart..Options.
Since PP of itself receives no route information, this database is only ever populated by one of the add-on scripts calling the "SetRouteByHex" method.
While on the subject, it is possible to get into a muddle whereby the flightroute.sqb file exists but has zero length and does not contain the required formatting information. This can happen if the log file directory is changed while PP is processing and when it consults the non-existent file, SQLite, not PP, creates an empty file but with no formatting. In this condition, PP sees that the file exists, so it does not create it, but it cannot be written to because it does not have the formatting information. The fix is easy. Close PP, delete the zero-length flightroute.sqb file from the current log file directory and run PP again. A new flightroute.sqb file will be created with the correct formatting.
BaseStation.sqb
Unlike the first one, this file is not of PP's making. It originates in the Kinetic SBS-1 BaseStation software and contains a large number of tables and fields, most of which PP ignores. If you have an SBS-1, this file will reside in the application directory used by the Kinetic software (typically C:\Program Files\Kinetic\BaseStation\) and in order for PP to be able to find it, you must point Options..Directories..SBS1 to the correct place. If you don't have an SBS1, you can put a BaseStation.sqb file that you obtain from elsewhere, into any directory that you like, but you must be sure to point PP to it using Options..Directories..SBS1.
PP consults the BaseStation.sqb database (read only) pretty much any time a position report is received from a Mode-S receiver (not necessarily an SBS1) or from sharing. It looks in the database for the registration and the aircraft type, neither of which arrive in the Mode-S/ADS-B messages off air, but which may have been populated into the SBS1 database. If it finds them, it displays them on the chart (if such labelling is enabled in Options..Chart..Options). If the information is not found in the database, then PP will display any such information that it receives by sharing (which may or may not be right, depending on how the person uploading the data has populated their own database).
PP will only ever write to the BaseStation.sqb database of you have specifically enabled (checked) the option under Options..Mode-S..Kinetic..Update registrations. If you disable (uncheck) that option, the BaseStation.sqb database will never be changed by PP.
If you do enable the option, then there are three situations in which PP will write data to it.
- If you are simultaneously receiving ACARS messages (not limited to position reports, any ACARS message will do) and Mode-S/ADS-B messages, and if the same *flight number* occurs in an ACARS message and in a Mode-S/ADS-B message, then because ACARS messages all contain the registration but Mode-S messages do not, PP can tie up the registration with the Mode-S hex code and it will write the registration to the basestation.sqb database automatically (if enabled). Note that this only populates the registration, not the aircraft type because the type is not available in ACARS messages either. Sadly, because the format of the flight number in ACARS messages and in Mode-S/ADS-B messages is almost always subtly different, this useful facility hardly ever works.
- If you perform a Look-Up on an aircraft by right clicking on the aircraft symbol and then selecting the lookup button, PP will extract the registration and type from the response and write that data to BaseStation.sqb if enabled.
- If you have an external script that does something similar and then accesses PP using the SetPlaneTypeByHex or SetPlaneRegByHex methods, then that data will be written to BaseStation.sqb, if enabled.
Some apparent misunderstandings
- PP uses only two external databases - one flightroute.sqb; one BaseStation.sqb.
- You do not need an SBS1 to use the BaseStation.sqb feature, you just need a copy of that file. You must, however, point PP to the file using Options..Directories..SBS1. Note that because this directory points to both the database file and the SBS1 log file (if you use that access method) then you cannot use two copies of the file (one for BS itself and another one in another place for PP) if you also want PP to monitor the SBS1 log file. If you use TCP access to the SBS1, then you could, if you wanted to, have two copies.
- PP will only write to BaseStation.sqb if you enable it (Options..Mode-S..Kinetic..Update registrations.
- PP will always take the registration and type from your own database (basestation.sqb) if it is found there (and your directory is correctly identified). It will only show that info from sharing if there is nothing in your own database (or you haven't done the directory thing right).
- PP will never put data received from sharing into the BaseStation.sqb database. Your own database cannot be polluted by corrupt data from other users.
Registrations
Bev recently clarified what happens with Plane Plotter 5.1.5 and later when dealing with registrations:
- Accessing the SBS1 traffic from either the log file or the TCP port gives just about everything except the registration.
- For local traffic, PP will try to get the registration from the aforementioned database - provided the directory path is correct.
- For shared traffic, it will accept the registration provided by the sharing contributor, if any. Otherwise it will look in the sqb database.
- In either case, if it still has no registration, and if the aircraft is from one of the countries with an algorithmic approach to hex/rego conversions, PP will compute the registration from the hex code. This list includes USA (civil), Australia, Portugal, Romania, Switzerland, Turkey, Yugoslavia (?), Singapore, Canada, South Africa, Russia, Belgium, Denmark, Finland, Greece, France and Germany. For UK users, the absence of G-,PH- and EI- from this list is a nuisance.
- I haven't spelt it out elsewhere, but registrations are only inserted into the basestation.sqb database (if enabled) when they are obtained from the airframes site or if you are running ACARS decoding and the SBS1 and there is a flight number match between the two. The basestation.sqb database is not updated with registrations computed locally from the hex code.
This information was taken directly from a post by Bev in the Plane Plotter Yahoo group.
Comments (0)
You don't have permission to comment on this page.