/* Copyright (c) 2023-forever Douglas Malnati. All rights reserved. See the /faq/tos page for details. (If this generated header is stamped on a file which is a 3rd party file or under a different license or copyright, then ignore this copyright statement and use that file's terms.) */ import * as utl from '/js/Utl.js'; export class ColumnBuilderTelemetryBasic { Match(msg) { return msg.IsTelemetryBasic(); } GetColNameList() { return [ "BtGpsValid", "BtGrid56", "BtTempC", "BtTempF", "BtVoltage", "BtAltM", "BtAltFt", "BtKPH", "BtMPH", ]; } GetColMetaDataList() { return [ {}, {}, { rangeMin: -50, rangeMax: 39, }, { rangeMin: utl.CtoF_Round(-50), rangeMax: utl.CtoF_Round(39), }, { rangeMin: 3, rangeMax: 4.95, }, { rangeMin: 0, rangeMax: 21340, }, { rangeMin: 0, rangeMax: utl.MtoFt_Round(21340), }, { rangeMin: 0, rangeMax: utl.KnotsToKph_Round(82), }, { rangeMin: 0, rangeMax: utl.KnotsToMph_Round(82), }, ]; } GetValList(msg) { let gpsValid = msg.decodeDetails.basic.gpsIsValid; let grid56 = msg.decodeDetails.basic.grid56; let kph = utl.KnotsToKph_Round(msg.decodeDetails.basic.speedKnots); let altFt = utl.MtoFt_Round(msg.decodeDetails.basic.altitudeMeters); let tempF = utl.CtoF_Round(msg.decodeDetails.basic.temperatureCelsius); let mph = utl.KnotsToMph_Round(msg.decodeDetails.basic.speedKnots); return [ gpsValid, grid56, msg.decodeDetails.basic.temperatureCelsius, tempF, msg.decodeDetails.basic.voltageVolts, msg.decodeDetails.basic.altitudeMeters, altFt, kph, mph, ]; } }