fix: rename max_geo_range to ADC scale, and make it so its not user configurable.
fix: change max_geo_range_enum to geo_range with two options (normal and sensitive)
This commit is contained in:
+5
-13
@@ -831,11 +831,6 @@
|
||||
<div class="hint">Alarm flagged when any geo channel exceeds this level</div>
|
||||
</div>
|
||||
|
||||
<div class="cfg-field">
|
||||
<label>Max Range — Geo (in/s)</label>
|
||||
<input type="number" id="cfg-max-range" step="0.001" min="0.001" placeholder="e.g. 6.206" />
|
||||
<div class="hint">Full-scale calibration constant — only change if you have a cal cert</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Project / operator strings -->
|
||||
@@ -1037,7 +1032,7 @@ let unitInfo = null;
|
||||
let eventList = [];
|
||||
let currentEvent = 0;
|
||||
let charts = {};
|
||||
let geoRange = 6.206;
|
||||
let geoAdcScale = 6.206;
|
||||
const DBL_REF = 2.9e-9; // 20 µPa in psi — reference pressure for dBL
|
||||
const CHANNEL_COLORS = { Tran:'#58a6ff', Vert:'#3fb950', Long:'#d29922', Mic:'#bc8cff' };
|
||||
|
||||
@@ -1189,7 +1184,7 @@ function populateDeviceBar() {
|
||||
qs('di-project').textContent = cc.project || '—';
|
||||
qs('di-client').textContent = cc.client || '—';
|
||||
qs('di-operator').textContent = cc.operator || '—';
|
||||
geoRange = cc.max_range_geo ?? 6.206;
|
||||
geoAdcScale = cc.geo_adc_scale ?? 6.206;
|
||||
}
|
||||
|
||||
// ── Monitoring ─────────────────────────────────────────────────────────────────
|
||||
@@ -1331,7 +1326,7 @@ function populateDeviceTab() {
|
||||
['Record Time', cc.record_time != null ? `${cc.record_time.toFixed(2)} s` : '—'],
|
||||
['Trigger Level (geo)', cc.trigger_level_geo != null ? `${cc.trigger_level_geo.toFixed(4)} in/s` : '—'],
|
||||
['Alarm Level (geo)', cc.alarm_level_geo != null ? `${cc.alarm_level_geo.toFixed(4)} in/s` : '—'],
|
||||
['Max Range (geo)', cc.max_range_geo != null ? `${cc.max_range_geo.toFixed(4)} in/s` : '—'],
|
||||
['ADC Scale Factor (geo)', cc.geo_adc_scale != null ? `${cc.geo_adc_scale.toFixed(4)} in/s` : '—'],
|
||||
['Setup Name', cc.setup_name || '—'],
|
||||
];
|
||||
renderTable('compliance-table', complianceRows);
|
||||
@@ -1366,7 +1361,6 @@ function populateConfigFromDeviceInfo() {
|
||||
if (cc.record_time != null) qs('cfg-record-time', cc.record_time.toFixed(1));
|
||||
if (cc.trigger_level_geo != null) qs('cfg-trigger', cc.trigger_level_geo.toFixed(4));
|
||||
if (cc.alarm_level_geo != null) qs('cfg-alarm', cc.alarm_level_geo.toFixed(4));
|
||||
if (cc.max_range_geo != null) qs('cfg-max-range',cc.max_range_geo.toFixed(4));
|
||||
if (cc.project) qs('cfg-project', cc.project);
|
||||
if (cc.client) qs('cfg-client', cc.client);
|
||||
if (cc.operator) qs('cfg-operator', cc.operator);
|
||||
@@ -1375,7 +1369,7 @@ function populateConfigFromDeviceInfo() {
|
||||
}
|
||||
|
||||
function clearConfigForm() {
|
||||
['cfg-sample-rate','cfg-record-time','cfg-trigger','cfg-alarm','cfg-max-range',
|
||||
['cfg-sample-rate','cfg-record-time','cfg-trigger','cfg-alarm',
|
||||
'cfg-project','cfg-client','cfg-operator','cfg-seis-loc','cfg-notes']
|
||||
.forEach(id => { const el = qs(id); el.tagName === 'SELECT' ? el.selectedIndex = 0 : el.value = ''; });
|
||||
setCfgStatus('');
|
||||
@@ -1413,8 +1407,6 @@ async function writeConfig() {
|
||||
if (trig) body.trigger_level_geo = parseFloat(trig);
|
||||
const alarm = qs('cfg-alarm').value;
|
||||
if (alarm) body.alarm_level_geo = parseFloat(alarm);
|
||||
const mr = qs('cfg-max-range').value;
|
||||
if (mr) body.max_range_geo = parseFloat(mr);
|
||||
const proj = qs('cfg-project').value.trim();
|
||||
if (proj) body.project = proj;
|
||||
const cli = qs('cfg-client').value.trim();
|
||||
@@ -1565,7 +1557,7 @@ function renderWaveform(data) {
|
||||
let plotData, peakLabel, yUnit, ttFmt, tickFmt;
|
||||
|
||||
if (isGeo) {
|
||||
const scale = geoRange / 32767;
|
||||
const scale = geoAdcScale / 32767;
|
||||
plotData = samples.map(s => s * scale);
|
||||
// Use the device-recorded peak from the 0C waveform record — authoritative
|
||||
// and matches Blastware. Computing from raw samples can catch rogue
|
||||
|
||||
Reference in New Issue
Block a user