mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
fixed heard stations
This commit is contained in:
parent
7bc7e155e9
commit
f1b3e2937d
1 changed files with 33 additions and 2 deletions
|
@ -1,5 +1,14 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|
||||||
|
const {
|
||||||
|
locatorToLatLng,
|
||||||
|
distance,
|
||||||
|
bearingDistance,
|
||||||
|
latLngToLocator,
|
||||||
|
} = require("qth-locator");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import {saveSettingsToFile} from '../js/settingsHandler'
|
import {saveSettingsToFile} from '../js/settingsHandler'
|
||||||
|
|
||||||
import { setActivePinia } from 'pinia';
|
import { setActivePinia } from 'pinia';
|
||||||
|
@ -12,6 +21,28 @@ const settings = useSettingsStore(pinia);
|
||||||
import { useStateStore } from '../store/stateStore.js';
|
import { useStateStore } from '../store/stateStore.js';
|
||||||
const state = useStateStore(pinia);
|
const state = useStateStore(pinia);
|
||||||
|
|
||||||
|
|
||||||
|
function getDateTime(timestampRaw){
|
||||||
|
var datetime = new Date(timestampRaw * 1000).toLocaleString(
|
||||||
|
navigator.language,
|
||||||
|
{
|
||||||
|
hourCycle: "h23",
|
||||||
|
year: "numeric",
|
||||||
|
month: "2-digit",
|
||||||
|
day: "2-digit",
|
||||||
|
hour: "2-digit",
|
||||||
|
minute: "2-digit",
|
||||||
|
second: "2-digit",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return datetime
|
||||||
|
}
|
||||||
|
|
||||||
|
function getMaidenheadDistance(dxGrid){
|
||||||
|
return parseInt(distance(settings.mygrid, dxGrid));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
|
@ -68,12 +99,12 @@ const state = useStateStore(pinia);
|
||||||
<tbody id="heardstations">
|
<tbody id="heardstations">
|
||||||
<!--https://vuejs.org/guide/essentials/list.html-->
|
<!--https://vuejs.org/guide/essentials/list.html-->
|
||||||
<tr v-for="item in state.heard_stations" :key="item.timestamp">
|
<tr v-for="item in state.heard_stations" :key="item.timestamp">
|
||||||
<td>{{ item.timestamp }}</td>
|
<td>{{ getDateTime(item.timestamp) }}</td>
|
||||||
<td>{{ item.frequency }}</td>
|
<td>{{ item.frequency }}</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
<td>{{ item.dxcallsign }}</td>
|
<td>{{ item.dxcallsign }}</td>
|
||||||
<td>{{ item.dxgrid }}</td>
|
<td>{{ item.dxgrid }}</td>
|
||||||
<td>{{ item.distance }}</td>
|
<td>{{ getMaidenheadDistance(item.dxgrid)}} km</td>
|
||||||
<td>{{ item.datatype }}</td>
|
<td>{{ item.datatype }}</td>
|
||||||
<td>{{ item.snr }}</td>
|
<td>{{ item.snr }}</td>
|
||||||
<!--<td>{{ item.offset }}</td>-->
|
<!--<td>{{ item.offset }}</td>-->
|
||||||
|
|
Loading…
Reference in a new issue