Closed length967 closed 9 months ago
Open the MMM-FlightRadarTracker.js file. In the config section, add after line 10:
distanceUnits: 'metric',
In what becomes line 113/114, change the altitudeUnits to distanceUnits:
const distance = aircraft.distance * (this.config.distanceUnits === 'metric' ? 1 : 3.28084);
if (this.config.distanceUnit === 'metric' && distance >= 10000) {
And in line 118, also change the altitudeUnits to distanceUnits:
subHeading.push(`<span><i class="fas fa-location-arrow dimmed"></i>${Math.floor(distance)}<sup>${this.config.distanceUnits === 'metric' ? 'm' : 'ft'}</sup></span>`);
-update- I've added a pull request #13 for this.
altitudeUnits controls both the distance from me and the height. I'd like to see the height in feet but in this case the distance would also be a large number in ft (often around 100,000ft). Can these 2 be set independently to show the distance from me in KM/Miles and height in FT?