2020-01-03 21:16:40 +01:00
// --------------------------------------------------------
//
// This file is for the default settings, use config.js instead to make settings.
//
// --------------------------------------------------------
"use strict" ;
2020-01-17 13:31:04 +01:00
// avoid errors for people who don't understand javascript and change config.js
2020-03-27 08:45:56 +01:00
let yes = true ;
let no = false ;
let enabled = true ;
let disabled = false ;
2020-01-17 13:31:04 +01:00
2020-01-03 21:16:40 +01:00
// -- Title Settings --------------------------------------
// Show number of aircraft and/or messages per second in the page title
2020-03-27 08:45:56 +01:00
let PlaneCountInTitle = false ;
let MessageRateInTitle = false ;
2020-01-03 21:16:40 +01:00
// -- Output Settings -------------------------------------
2022-04-09 08:41:06 +02:00
// The DisplayUnits setting controls whether nautical (ft, nmi, kt),
2023-03-29 14:01:48 +02:00
// metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the
2020-01-03 21:16:40 +01:00
// plane table and in the detailed plane info. Valid values are
// "nautical", "metric", or "imperial".
2020-03-27 08:45:56 +01:00
let DisplayUnits = "nautical" ;
2020-01-03 21:16:40 +01:00
// -- Map settings ----------------------------------------
// These settings are overridden by any position information
// provided by dump1090 itself. All positions are in decimal
// degrees.
// Default center of the map.
2020-03-27 08:45:56 +01:00
let DefaultCenterLat = 40.56 ;
let DefaultCenterLon = - 73.66
2020-01-03 21:16:40 +01:00
// The google maps zoom level, 0 - 16, lower is further out
2020-03-27 08:45:56 +01:00
let DefaultZoomLvl = 9 ;
2020-01-03 21:16:40 +01:00
2023-07-28 10:25:07 +02:00
let autoselectCoords = null ;
2020-12-19 18:07:19 +01:00
let showGrid = false ;
2020-01-03 21:16:40 +01:00
// Center marker. If dump1090 provides a receiver location,
// that location is used and these settings are ignored.
2020-03-27 08:45:56 +01:00
let SiteShow = true ; // true to show a center marker
let SiteLat = null ; // position of the marker
let SiteLon = null ;
let SiteName = "My Radar Site" ; // tooltip of the marker
2020-01-03 21:16:40 +01:00
2023-04-13 18:12:01 +02:00
// Update GPS location (keep map centered on GPS location)
let updateLocation = false ;
2020-01-03 21:16:40 +01:00
// Color controls for the range outline
2020-03-27 08:45:56 +01:00
let range _outline _color = '#0000DD' ;
2023-05-05 15:07:59 +01:00
let range _outline _alpha = 1.0 ;
2020-03-27 08:45:56 +01:00
let range _outline _width = 1.7 ;
let range _outline _colored _by _altitude = false ;
2021-07-01 08:57:59 +02:00
let range _outline _dash = null ; // null - solid line, [5, 5] - dashed line with 5 pixel lines and spaces in between
// Style controls for the actal range outline:
let actual _range _outline _color = '#00596b' ;
let actual _range _outline _width = 1.7 ;
let actual _range _outline _dash = null ; // null - solid line, [5, 5] - dashed line with 5 pixel lines and spaces in between
2022-06-14 11:09:35 +02:00
//
let actual _range _show = true ;
2020-01-03 21:16:40 +01:00
// which map is displayed to new visitors
2023-05-03 23:37:19 +02:00
let MapType _tar1090 = "osm" ;
2022-03-18 22:24:42 +01:00
let defaultOverlays = [ ] ;
2022-03-18 22:31:15 +01:00
let dwdLayers = 'dwd:RX-Produkt' ;
2020-01-03 21:16:40 +01:00
// Default map dim state
2020-03-27 08:45:56 +01:00
let MapDim = true ;
2020-04-20 17:11:26 +02:00
let mapDimPercentage = 0.45 ;
let mapContrastPercentage = 0 ;
2020-01-03 21:16:40 +01:00
2022-04-16 06:39:18 +02:00
let offlineMapDetail = - 1 ;
2020-01-03 21:16:40 +01:00
// -- Marker settings -------------------------------------
2020-04-12 19:54:57 +02:00
// different marker size depending on zoom lvl
let markerZoomDivide = 8.5 ;
// marker size when the zoom level is less than markerZoomDivide
let markerSmall = 1 ;
// marker size when the zoom level is more than markerZoomDivide
let markerBig = 1.18 ;
2020-01-03 21:16:40 +01:00
2020-03-27 08:45:56 +01:00
let largeMode = 1 ;
2020-02-07 07:17:01 +01:00
2020-04-06 09:23:52 +02:00
let lineWidth = 1.15 ;
2020-01-03 21:16:40 +01:00
2020-04-13 09:47:56 +02:00
// Outline color for aircraft icons
let OutlineADSBColor = '#000000' ;
// Outline width for aircraft icons
2023-08-17 07:25:30 +02:00
let outlineWidth = 0.90 ;
2020-04-13 09:47:56 +02:00
2020-02-29 20:01:51 +01:00
// constant html color for markers / tracks
2020-03-27 08:45:56 +01:00
let monochromeMarkers = null ;
let monochromeTracks = null ;
2020-02-29 19:04:08 +01:00
2023-04-01 16:01:13 +02:00
let altitudeChartDefaultState = true ;
2020-01-03 21:16:40 +01:00
// These settings control the coloring of aircraft by altitude.
// All color values are given as Hue (0-359) / Saturation (0-100) / Lightness (0-100)
2020-10-27 23:41:32 -04:00
let ColorByAlt = {
2020-01-03 21:16:40 +01:00
// HSL for planes with unknown altitude:
2020-03-21 18:57:34 +01:00
unknown : { h : 0 , s : 0 , l : 20 } ,
2020-01-03 21:16:40 +01:00
// HSL for planes that are on the ground:
ground : { h : 220 , s : 0 , l : 30 } ,
air : {
// These define altitude-to-hue mappings
// at particular altitudes; the hue
// for intermediate altitudes that lie
// between the provided altitudes is linearly
// interpolated.
//
// Mappings must be provided in increasing
// order of altitude.
//
// Altitudes below the first entry use the
// hue of the first entry; altitudes above
// the last entry use the hue of the last
// entry.
h : [ { alt : 0 , val : 20 } , // orange
{ alt : 2000 , val : 32.5 } , // yellow
{ alt : 4000 , val : 43 } , // yellow
{ alt : 6000 , val : 54 } , // yellow
{ alt : 8000 , val : 72 } , // yellow
{ alt : 9000 , val : 85 } , // green yellow
{ alt : 11000 , val : 140 } , // light green
{ alt : 40000 , val : 300 } , // magenta
{ alt : 51000 , val : 360 } , // red
] ,
s : 88 ,
l : [
{ h : 0 , val : 53 } ,
{ h : 20 , val : 50 } ,
2020-04-05 21:21:08 +02:00
{ h : 32 , val : 54 } ,
{ h : 40 , val : 52 } ,
2020-04-06 21:37:54 +02:00
{ h : 46 , val : 51 } ,
{ h : 50 , val : 46 } ,
{ h : 60 , val : 43 } ,
{ h : 80 , val : 41 } ,
{ h : 100 , val : 41 } ,
{ h : 120 , val : 41 } ,
{ h : 140 , val : 41 } ,
2020-04-05 21:21:08 +02:00
{ h : 160 , val : 40 } ,
{ h : 180 , val : 40 } ,
2020-04-06 09:23:52 +02:00
{ h : 190 , val : 44 } ,
2020-04-05 21:21:08 +02:00
{ h : 198 , val : 50 } ,
2020-04-06 21:37:54 +02:00
{ h : 200 , val : 58 } ,
{ h : 220 , val : 58 } ,
{ h : 240 , val : 58 } ,
2020-04-07 23:30:26 +02:00
{ h : 255 , val : 55 } ,
{ h : 266 , val : 55 } ,
2020-04-06 21:37:54 +02:00
{ h : 270 , val : 58 } ,
2020-04-05 21:21:08 +02:00
{ h : 280 , val : 58 } ,
2020-01-03 21:16:40 +01:00
{ h : 290 , val : 47 } ,
{ h : 300 , val : 43 } ,
2020-04-05 21:21:08 +02:00
{ h : 310 , val : 48 } ,
2020-01-03 21:16:40 +01:00
{ h : 320 , val : 48 } ,
{ h : 340 , val : 52 } ,
{ h : 360 , val : 53 } ,
] ,
} ,
// Changes added to the color of the currently selected plane
selected : { h : 0 , s : 10 , l : 5 } ,
// Changes added to the color of planes that have stale position info
stale : { h : 0 , s : - 35 , l : 9 } ,
// Changes added to the color of planes that have positions from mlat
mlat : { h : 0 , s : 0 , l : 0 }
} ;
// For a monochrome display try this:
// ColorByAlt = {
// unknown : { h: 0, s: 0, l: 40 },
// ground : { h: 0, s: 0, l: 30 },
// air : { h: [ { alt: 0, val: 0 } ], s: 0, l: 50 },
// selected : { h: 0, s: 0, l: +30 },
// stale : { h: 0, s: 0, l: +30 },
// mlat : { h: 0, s: 0, l: -10 }
// };
2020-01-22 20:49:11 +01:00
// Also called range rings :)
2020-03-27 08:45:56 +01:00
let SiteCircles = true ; // true to show circles (only shown if the center marker is shown)
2020-01-03 21:16:40 +01:00
// In miles, nautical miles, or km (depending settings value 'DisplayUnits')
2020-10-16 10:00:22 -04:00
let SiteCirclesDistances = new Array ( 100 , 150 , 200 ) ;
// When more circles defined than cirle colors last color will be used or black by default
let SiteCirclesColors = [ '#000000' , '#000000' , '#000000' ] ;
2020-10-17 20:29:42 +02:00
// Show circles using dashed line (CAUTION, can be slow, especially when zooming in a lot)
2020-10-16 10:00:22 -04:00
let SiteCirclesLineDash = null ; // null - solid line, [5, 5] - dashed line with 5 pixel lines and spaces in between
2020-01-03 21:16:40 +01:00
// Controls page title, righthand pane when nothing is selected
2020-03-27 08:45:56 +01:00
let PageName = "tar1090" ;
2020-01-03 21:16:40 +01:00
// Show country flags by ICAO addresses?
2020-03-27 08:45:56 +01:00
let ShowFlags = true ;
2020-01-03 21:16:40 +01:00
// Path to country flags (can be a relative or absolute URL; include a trailing /)
2020-03-27 08:45:56 +01:00
let FlagPath = "flags-tiny/" ;
2020-01-03 21:16:40 +01:00
// Set to false to disable the ChartBundle base layers (US coverage only)
2020-03-27 08:45:56 +01:00
let ChartBundleLayers = true ;
2020-01-03 21:16:40 +01:00
// Provide a Bing Maps API key here to enable the Bing imagery layer.
// You can obtain a free key (with usage limits) at
// https://www.bingmapsportal.com/ (you need a "basic key")
//
// Be sure to quote your key:
// BingMapsAPIKey = "your key here";
//
2020-03-27 08:45:56 +01:00
let BingMapsAPIKey = null ;
2020-01-03 21:16:40 +01:00
2020-03-27 08:45:56 +01:00
let pf _data = [ "chunks/pf.json" ]
2020-01-03 21:16:40 +01:00
2020-03-27 08:45:56 +01:00
let mapOrientation = 0 ; // This determines what is up, normally north (0 degrees)
2020-01-03 21:16:40 +01:00
2022-01-08 07:01:08 +01:00
// NO LONGER USED
let utcTimes = null ;
2022-01-07 21:20:14 +01:00
// Use UTC for live labels
let utcTimesLive = false ;
// Use UTC for historic labels
let utcTimesHistoric = true ;
2021-07-21 20:08:58 +02:00
2020-01-03 21:16:40 +01:00
// Only display labels when zoomed in this far:
2020-03-27 08:45:56 +01:00
let labelZoom = 0 ;
let labelZoomGround = 14.8 ;
2020-01-03 21:16:40 +01:00
2020-03-27 08:45:56 +01:00
let labelFont = 'bold 12px tahoma' ;
2020-01-03 21:16:40 +01:00
2020-03-27 08:45:56 +01:00
let displayUATasADSB = false ;
2020-05-13 21:17:34 +02:00
let uatNoTISB = false ;
2020-01-03 21:16:40 +01:00
// Don't display any TIS-B planes
2020-03-27 08:45:56 +01:00
let filterTISB = false ;
2020-01-03 21:16:40 +01:00
2023-06-17 10:32:10 -07:00
// image configuration link (back to a webUI for feeder setup)
let imageConfigLink = "" ;
let imageConfigText = "" ;
2020-03-27 08:45:56 +01:00
let flightawareLinks = false ;
2021-09-25 12:05:22 -05:00
let shareBaseUrl = false ;
2022-01-30 20:39:43 +01:00
let planespottersLinks = false ;
2020-01-03 21:16:40 +01:00
2021-06-20 08:41:47 +02:00
// show links to various registration websites (not all countries)
let registrationLinks = true ;
2020-01-03 21:16:40 +01:00
// Filter implausible positions (required speed > Mach 2.5)
2020-03-19 14:23:58 +01:00
// valid values: true, false, "onlyMLAT" ("" required)
2022-06-09 21:09:19 +02:00
let positionFilter = false ;
2020-03-27 08:45:56 +01:00
let positionFilterSpeed = 2.5 ; // in Mach
2020-01-03 21:16:40 +01:00
// filter speed is based on transmitted ground speed if available
// this factor is used to give the actual filter speed
2020-03-27 08:45:56 +01:00
let positionFilterGsFactor = 2.2 ;
let debugPosFilter = false ;
2020-01-03 21:16:40 +01:00
2022-06-09 21:09:19 +02:00
let altitudeFilter = false ;
2020-01-03 21:16:40 +01:00
// time in seconds before an MLAT position is accepted after receiving a
// more reliable position
2020-03-27 08:45:56 +01:00
let mlatTimeout = 30 ;
2020-01-03 21:16:40 +01:00
// enable/disable mouseover/hover aircraft information
2020-03-27 08:45:56 +01:00
let enableMouseover = true ;
2020-01-03 21:16:40 +01:00
// enable/disable temporary aircraft trails
2020-03-27 08:45:56 +01:00
let tempTrails = false ;
let tempTrailsTimeout = 90 ;
2020-09-29 13:24:11 +02:00
let squareMania = false ;
2020-01-03 21:16:40 +01:00
// Columns that have a // in front of them are shown.
2020-03-27 08:45:56 +01:00
let HideCols = [
2020-01-03 21:16:40 +01:00
"#icao" ,
// "#flag",
// "#flight",
2023-04-21 19:12:49 +02:00
// "#route",
2020-01-03 21:16:40 +01:00
"#registration" ,
// "#aircraft_type",
// "#squawk",
// "#altitude",
// "#speed",
"#vert_rate" ,
// "#distance",
"#track" ,
"#msgs" ,
"#seen" ,
// "#rssi",
"#lat" ,
"#lon" ,
"#data_source" ,
2021-10-03 17:02:43 +02:00
"#military" ,
2020-01-03 21:16:40 +01:00
]
2020-01-10 14:52:47 +01:00
2021-03-13 08:35:12 +01:00
// show aircraft pictures
let showPictures = true ;
2021-11-08 03:27:28 +01:00
// get pictures from planespotters.net
2021-03-13 08:35:12 +01:00
let planespottersAPI = true ;
2023-03-29 14:01:48 +02:00
let planespottersAPIurl = "https://api.planespotters.net/pub/photos/" ;
2021-11-08 03:27:28 +01:00
// get pictures from planespotting.be
let planespottingAPI = false ;
2021-03-13 08:35:12 +01:00
2023-03-20 21:23:08 -07:00
// get flight route from routeApi service
let useRouteAPI = false ;
// which routeApi service to use
let routeApiUrl = "https://api.adsb.lol/api/0/routeset" ;
2021-06-02 15:20:30 +02:00
// show a link to jetphotos, only works if planespottersAPI is disabled
let jetphotoLinks = false ;
2021-03-12 21:33:41 +01:00
let showSil = false ;
2021-03-13 08:35:12 +01:00
// this shows small pictures in the details but they need to be provided by the user in the folder /usr/local/share/tar1090/aircraft_sil
// showPictures needs to be enabled as well
// to only get these pictures disable the planespottersAPI
// pictures need to be named A330.png and so forth with the type code in the form TYPE.png
// provide ZZZZ.png to be shown when the type is not known.
// this feature is provided as is please don't expect tar1090's support for getting the pictures right.
2022-01-08 12:37:34 +01:00
let labelsGeom = false ; // labels: uses geometric altitude (WGS84 ellipsoid unless geomUseEGM is enabled
let geomUseEGM = false ; // use EGM96 for displaying geometric altitudes (extra load time!)
2021-03-13 08:35:12 +01:00
2021-12-20 19:59:04 +01:00
let windLabelsSlim = false ;
let showLabelUnits = true ;
2021-03-12 15:48:34 +01:00
let wideInfoBlock = false ;
2021-03-12 21:33:41 +01:00
let baseInfoBlockWidth = 200 ;
2020-01-23 20:45:54 +01:00
// enable DWD Radolan (NEXRAD like weather for Germany)
2020-03-27 08:45:56 +01:00
let enableDWD = true ;
2020-02-04 21:14:54 +01:00
2020-03-27 08:45:56 +01:00
let lastLeg = true ;
2020-03-01 00:11:19 +01:00
2020-03-27 08:45:56 +01:00
let hideButtons = false ;
2020-04-30 01:09:35 +02:00
let askLocation = false ; // requires https for geolocation
2020-05-23 20:30:06 +02:00
let filterMaxRange = 1e8 ; // 100 000 km should include all planes on earth ;)
2020-06-01 20:50:52 +02:00
2020-12-23 23:55:29 +01:00
let jaeroTimeout = 35 * 60 ; // in seconds
2022-08-01 00:29:35 +02:00
let seenTimeout = 58 ; // in seconds
let seenTimeoutMlat = 58 ; // in seconds
2020-12-23 23:55:29 +01:00
2021-08-14 08:36:14 +02:00
let darkModeDefault = true ; // turn on dark mode by default (change in browser possible)
2020-06-01 20:50:52 +02:00
2022-04-10 16:43:00 +02:00
let tableInView = false ; // only show aircraft in current view (V button)
2020-06-01 20:50:52 +02:00
// legacy variables
let OutlineMlatColor = null ;
2020-11-22 23:06:29 +01:00
let tableColorsDark ;
let tableColorsLight ;
let tableColors = {
unselected : {
adsb : "#d8f4ff" ,
mlat : "#FDF7DD" ,
uat : "#C4FFDC" ,
adsr : "#C4FFDC" ,
adsc : "#C4FFDC" ,
2020-12-04 08:45:59 +01:00
modeS : "#d8d8ff" ,
2020-11-22 23:06:29 +01:00
tisb : "#ffd8e6" ,
unknown : "#dcdcdc" ,
2021-04-05 10:35:35 +02:00
other : "#dcdcdc" ,
2020-11-22 23:06:29 +01:00
} ,
selected : {
adsb : "#88DDFF" ,
mlat : "#F1DD83" ,
uat : "#66FFA6" ,
adsr : "#66FFA6" ,
adsc : "#66FFA6" ,
2020-12-04 08:45:59 +01:00
modeS : "#BEBEFF" ,
2020-11-22 23:06:29 +01:00
tisb : "#FFC1D8" ,
unknown : "#bcbcbc" ,
2021-04-05 10:35:35 +02:00
other : "#bcbcbc" ,
2020-11-22 23:06:29 +01:00
} ,
special : {
2022-05-13 22:23:32 +02:00
7500 : "#ff0000" ,
7600 : "#ff0000" ,
7700 : "#ff0000" ,
2020-11-22 23:06:29 +01:00
}
} ;
2022-07-28 15:57:43 +02:00
let disableGeoLocation = false ;
2022-08-28 07:29:39 +02:00
// when data is available from both 1090 and 978, give some preference to the 978 data for up to X seconds old 978 data (set this to 15 or 30 for example)
let prefer978 = 0 ;
2023-02-16 15:55:49 +01:00
let dynGlobeRate = false ; // enable use of globeRates.json in index.html directory to steer client refresh rate