Add some mechanical hexid->registration conversions.

This commit is contained in:
Oliver Jowett 2016-09-09 17:16:17 +01:00
parent 08fba4e3b0
commit e5912c322f
3 changed files with 316 additions and 2 deletions
public_html

View file

@ -44,9 +44,12 @@ function PlaneObject(icao) {
this.markerStyleKey = null;
this.markerSvgKey = null;
// request metadata
this.registration = null;
// start from a computed registration, let the DB override it
// if it has something else.
this.registration = registration_from_hexid(this.icao);
this.icaotype = null;
// request metadata
getAircraftData(this.icao).done(function(data) {
if ("r" in data) {
this.registration = data.r;