mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
[Advanced Logbook] Added antenna azimuth and elevation columns
This commit is contained in:
@@ -573,6 +573,8 @@ class Logbookadvanced extends CI_Controller {
|
||||
$json_string['profilename']['show'] = $this->input->post('profilename');
|
||||
$json_string['stationpower']['show'] = $this->input->post('stationpower');
|
||||
$json_string['distance']['show'] = $this->input->post('distance');
|
||||
$json_string['antennaazimuth']['show'] = $this->input->post('antennaazimuth');
|
||||
$json_string['antennaelevation']['show'] = $this->input->post('antennaelevation');
|
||||
$json_string['region']['show'] = $this->input->post('region');
|
||||
|
||||
$obj['column_settings']= json_encode($json_string);
|
||||
|
||||
@@ -56,7 +56,9 @@
|
||||
\"profilename\":{\"show\":\"true\"},
|
||||
\"stationpower\":{\"show\":\"true\"},
|
||||
\"distance\":{\"show\":\"true\"},
|
||||
\"region\":{\"show\":\"true\"}
|
||||
\"region\":{\"show\":\"true\"},
|
||||
\"antennaazimuth\":{\"show\":\"true\"},
|
||||
\"antennaelevation\":{\"show\":\"true\"}
|
||||
}";
|
||||
}
|
||||
$current_opts = json_decode($options);
|
||||
@@ -133,6 +135,14 @@
|
||||
echo "\nvar o_template = { region: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
if (!isset($current_opts->antennaazimuth)) {
|
||||
echo "\nvar o_template = { antennaazimuth: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
if (!isset($current_opts->antennaelevation)) {
|
||||
echo "\nvar o_template = { antennaelevation: {show: 'true'}};";
|
||||
echo "\nuser_options={...user_options, ...o_template};";
|
||||
}
|
||||
|
||||
|
||||
foreach ($mapoptions as $mo) {
|
||||
@@ -724,6 +734,12 @@ $options = json_decode($options);
|
||||
} ?>
|
||||
<?php if (($options->distance->show ?? "true") == "true") {
|
||||
echo '<th class="distance-column-sort">' . __("Distance") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->antennaazimuth->show ?? "true") == "true") {
|
||||
echo '<th data-bs-toggle="tooltip" data-bs-placement="top" title="' . __("Antenna azimuth") . '">' . __("Ant az") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->antennaelevation->show ?? "true") == "true") {
|
||||
echo '<th data-bs-toggle="tooltip" data-bs-placement="top" title="' .__("Antenna elevation") .'">' . __("Ant el") . '</th>';
|
||||
} ?>
|
||||
<?php if (($options->profilename->show ?? "true") == "true") {
|
||||
echo '<th>' . __("Profile name") . '</th>';
|
||||
|
||||
@@ -154,6 +154,14 @@
|
||||
<td><?= __("Distance"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="distance" type="checkbox" <?php if (($options->distance->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("Antenna azimuth"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="antennaazimuth" type="checkbox" <?php if (($options->antennaazimuth->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("Antenna elevation"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="antennaelevation" type="checkbox" <?php if (($options->antennaelevation->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?= __("Profile name"); ?></td>
|
||||
<td><div class="form-check"><input class="form-check-input" name="profilename" type="checkbox" <?php if (($options->profilename->show ?? "true") == "true") { echo 'checked'; } ?>></div></td>
|
||||
|
||||
@@ -133,6 +133,12 @@ function updateRow(qso) {
|
||||
if (user_options.distance.show == "true"){
|
||||
cells.eq(c++).text(qso.distance);
|
||||
}
|
||||
if (user_options.antennaazimuth.show == "true"){
|
||||
cells.eq(c++).text(qso.antennaazimuth);
|
||||
}
|
||||
if (user_options.antennaelevation.show == "true"){
|
||||
cells.eq(c++).text(qso.antennaelevation);
|
||||
}
|
||||
if (user_options.profilename.show == "true"){
|
||||
cells.eq(c++).text(qso.profilename);
|
||||
}
|
||||
@@ -310,6 +316,12 @@ function loadQSOTable(rows) {
|
||||
if (user_options.distance.show == "true"){
|
||||
data.push(qso.distance);
|
||||
}
|
||||
if (user_options.antennaazimuth.show == "true"){
|
||||
data.push(qso.antennaazimuth);
|
||||
}
|
||||
if (user_options.antennaelevation.show == "true"){
|
||||
data.push(qso.antennaelevation);
|
||||
}
|
||||
if (user_options.profilename.show == "true"){
|
||||
data.push(qso.profilename);
|
||||
}
|
||||
@@ -1270,6 +1282,8 @@ function saveOptions() {
|
||||
region: $('input[name="region"]').is(':checked') ? true : false,
|
||||
continent: $('input[name="continent"]').is(':checked') ? true : false,
|
||||
distance: $('input[name="distance"]').is(':checked') ? true : false,
|
||||
antennaazimuth: $('input[name="antennaazimuth"]').is(':checked') ? true : false,
|
||||
antennaelevation: $('input[name="antennaelevation"]').is(':checked') ? true : false,
|
||||
qrz: $('input[name="qrz"]').is(':checked') ? true : false,
|
||||
profilename: $('input[name="profilename"]').is(':checked') ? true : false,
|
||||
stationpower: $('input[name="stationpower"]').is(':checked') ? true : false,
|
||||
|
||||
@@ -84,6 +84,8 @@ class QSO
|
||||
|
||||
private string $stationpower;
|
||||
private float $distance;
|
||||
private string $antennaazimuth;
|
||||
private string $antennaelevation;
|
||||
|
||||
private string $measurement_base;
|
||||
|
||||
@@ -273,6 +275,8 @@ class QSO
|
||||
|
||||
$this->stationpower = $data['COL_TX_PWR'] ?? '';
|
||||
$this->distance = (float)$data['COL_DISTANCE'] ?? 0;
|
||||
$this->antennaazimuth = $data['COL_ANT_AZ'] ?? '';
|
||||
$this->antennaelevation = $data['COL_ANT_EL'] ?? '';
|
||||
|
||||
if ($CI->session->userdata('user_measurement_base') == NULL) {
|
||||
$measurement_base = $CI->config->item('measurement_base');
|
||||
@@ -1222,7 +1226,9 @@ class QSO
|
||||
'profilename' => $this->profilename,
|
||||
'stationpower' => $this->stationpower,
|
||||
'distance' => $this->getFormattedDistance(),
|
||||
'region' => $this->region
|
||||
'region' => $this->region,
|
||||
'antennaelevation' => $this->antennaelevation,
|
||||
'antennaazimuth' => $this->antennaazimuth
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user