Skip to content

Commit 7a84df0

Browse files
committed
Adjust mark based on antenna height/ARP
Feature #417
1 parent b282fe1 commit 7a84df0

File tree

3 files changed

+156
-92
lines changed

3 files changed

+156
-92
lines changed

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
font-weight: bold;
5959
}
6060

61+
.box-small {
62+
margin-left: 0px;
63+
width: 30%;
64+
}
65+
6166
.box-margin20 {
6267
margin-left: 20px;
6368
}
@@ -1133,18 +1138,30 @@ <h2>
11331138
</div>
11341139

11351140
<div class="form-group row">
1136-
<label for="fixedAltitude" class="box-margin40 col-sm-3 col-5 col-form-label">HAE
1137-
Mark/Alt(m):
1138-
<span class="tt" data-bs-placement="right"
1141+
<div class="form-group row">
1142+
<label for="fixedAltitude" class="box-margin40 col-sm-3 col-6 col-form-label">HAE
1143+
Mark/Alt(m):
1144+
<span class="tt" data-bs-placement="right"
11391145
title="Height Above Ellipsoid of the mark. This is the coordinate or altitude of the mark or monument on the ground.">
11401146
<span class="icon-info-circle text-primary ms-2"></span>
11411147
</span>
1142-
</label>
1143-
<div class="col-sm-4 col-5">
1144-
<input type="number" class="form-control" id="fixedAltitude">
1145-
<p id="fixedAltitudeError" class="inlineError"></p>
1148+
</label>
1149+
<div class="col-sm-4 col-4">
1150+
<input type="number" class="form-control" id="fixedAltitude">
1151+
</div>
11461152
</div>
1147-
</div><br>
1153+
<p id="fixedAltitudeError" class="inlineError"></p>
1154+
</div>
1155+
1156+
<div class="form-check box-margin40">
1157+
<label class="form-check-label" for="adjustHAEMark">Adjust Mark</label>
1158+
<input class="form-check-input" type="checkbox" value="" id="adjustHAEMark"
1159+
onClick="adjustHAE()">
1160+
<span class="tt" data-bs-placement="right"
1161+
title="If enabled, HAE Mark is calculated by *subtracting* the entered Antenna Height and ARP from the altitude reported by the GNSS receiver. This is handy when measuring a mark with a known pole height and ARP, but unknown mark elevation. Note: The HAE Mark value is always recorded to the Commonly Used Coordinates table.">
1162+
<span class="icon-info-circle text-primary ms-2"></span>
1163+
</span>
1164+
</div>
11481165

11491166
<div class="form-group row">
11501167
<label for="antennaHeight" class="box-margin40 col-sm-3 col-5 col-form-label">Antenna
@@ -1814,36 +1831,29 @@ <h2>
18141831
</div>
18151832

18161833
<div id="enableLoggingDetails" class="collapse mb-2">
1817-
<div id="maxLogTime Input" class="row">
1818-
<div class="col-sm-4 col-9 form-group">
1819-
<label for="maxLogTime_minutes" class="form-group box-margin20">Max Log
1820-
Time (min):<span class="tt" data-bs-placement="right"
1821-
title="Once the max log time is achieved, logging will cease. This is useful for limiting long term, overnight, static surveys to a certain length of time. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1822-
<span class="icon-info-circle text-primary ms-2"></span>
1823-
</span>
1824-
</label>
1825-
</div>
18261834

1827-
<div class="col-sm-4 col-5 ms-3 form-group">
1828-
<input type="number" class="form-control" id="maxLogTime_minutes">
1829-
<p id="maxLogTime_minutesError" class="inlineError"></p>
1830-
</div>
1835+
<div class="form-group row">
1836+
<label for="maxLogTime_minutes" class="box-margin40 col-sm-3 col-7 col-form-label">Max Log
1837+
Time (min):
1838+
<span class="tt" data-bs-placement="right"
1839+
title="Once the max log time is achieved, logging will cease. This is useful for limiting long term, overnight, static surveys to a certain length of time. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1840+
<span class="icon-info-circle text-primary ms-2"></span>
1841+
</span>
1842+
</label>
1843+
<input type="number" class="form-control box-small" id="maxLogTime_minutes">
1844+
<p id="maxLogTime_minutesError" class="inlineError"></p>
18311845
</div>
18321846

1833-
<div id="maxLogLength Input" class="row">
1834-
<div class="col-sm-4 col-9 form-group">
1835-
<label for="maxLogLength_minutes" class="form-group box-margin20">Max Log
1836-
Length (min):<span class="tt" data-bs-placement="right"
1837-
title="Once this length of time is achieved, a new log will be created. This is useful for creating multiple logs over a long survey. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1838-
<span class="icon-info-circle text-primary ms-2"></span>
1839-
</span>
1840-
</label>
1841-
</div>
1847+
<div class="form-group row">
1848+
<label for="maxLogLength_minutes" class="box-margin40 col-sm-3 col-7 col-form-label">Max Log
1849+
Length (min):<span class="tt" data-bs-placement="right"
1850+
title="Once this length of time is achieved, a new log will be created. This is useful for creating multiple logs over a long survey. Default: 1440 minutes. Limit: 1 to 2880 minutes.">
1851+
<span class="icon-info-circle text-primary ms-2"></span>
1852+
</span>
1853+
</label>
18421854

1843-
<div class="col-sm-4 col-5 ms-3 form-group">
1844-
<input type="number" class="form-control" id="maxLogLength_minutes">
1845-
<p id="maxLogLength_minutesError" class="inlineError"></p>
1846-
</div>
1855+
<input type="number" class="form-control box-small" id="maxLogLength_minutes">
1856+
<p id="maxLogLength_minutesError" class="inlineError"></p>
18471857
</div>
18481858

18491859
<div id="logFile" class="row">

Firmware/RTK_Surveyor/AP-Config/src/main.js

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,18 +1071,19 @@ document.addEventListener("DOMContentLoaded", (event) => {
10711071
});
10721072

10731073
ge("fixedAltitude").addEventListener("change", function () {
1074-
var hae = Number(ge("fixedAltitude").value) + Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000;
1075-
ge("fixedHAE_APC").value = hae.toFixed(3);
1074+
adjustHAE();
10761075
});
10771076

10781077
ge("antennaHeight").addEventListener("change", function () {
1079-
var hae = Number(ge("fixedAltitude").value) + Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000;
1080-
ge("fixedHAE_APC").value = hae.toFixed(3);
1078+
adjustHAE();
10811079
});
10821080

10831081
ge("antennaReferencePoint").addEventListener("change", function () {
1084-
var hae = Number(ge("fixedAltitude").value) + Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000;
1085-
ge("fixedHAE_APC").value = hae.toFixed(3);
1082+
adjustHAE();
1083+
});
1084+
1085+
ge("fixedHAE_APC").addEventListener("change", function () {
1086+
adjustHAE();
10861087
});
10871088
})
10881089

@@ -1116,8 +1117,7 @@ function addECEF() {
11161117
function deleteECEF() {
11171118

11181119
var val = ge("StationCoordinatesECEF").value;
1119-
if (val > "")
1120-
{
1120+
if (val > "") {
11211121
var parts = recordsECEF[val].split(' ');
11221122
var nickName = parts[0];
11231123

@@ -1203,8 +1203,7 @@ function addGeodetic() {
12031203

12041204
function deleteGeodetic() {
12051205
var val = ge("StationCoordinatesGeodetic").value;
1206-
if (val > "")
1207-
{
1206+
if (val > "") {
12081207
var parts = recordsGeodetic[val].split(' ');
12091208
var nickName = parts[0];
12101209

@@ -1215,6 +1214,22 @@ function deleteGeodetic() {
12151214
updateGeodeticList();
12161215
}
12171216

1217+
function adjustHAE() {
1218+
var hae;
1219+
if (ge("adjustHAEMark").checked) {
1220+
ge("fixedHAE_APC").disabled = false;
1221+
ge("fixedAltitude").disabled = true;
1222+
hae = Number(ge("fixedHAE_APC").value) - (Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000);
1223+
ge("fixedAltitude").value = hae.toFixed(3);
1224+
}
1225+
else {
1226+
ge("fixedHAE_APC").disabled = true;
1227+
ge("fixedAltitude").disabled = false;
1228+
hae = Number(ge("fixedAltitude").value) + (Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000);
1229+
ge("fixedHAE_APC").value = hae.toFixed(3);
1230+
}
1231+
}
1232+
12181233
function loadGeodetic() {
12191234
var val = ge("StationCoordinatesGeodetic").value;
12201235
if (val > "") {
@@ -1226,8 +1241,15 @@ function loadGeodetic() {
12261241
ge("antennaHeight").value = parts[4];
12271242
ge("antennaReferencePoint").value = parts[5];
12281243

1229-
var hae = Number(ge("fixedAltitude").value) + Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000;
1230-
ge("fixedHAE_APC").value = hae.toFixed(3);
1244+
var hae;
1245+
if (ge("adjustHAEMark").checked) {
1246+
hae = Number(ge("fixedHAE_APC").value) - (Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000);
1247+
ge("fixedAltitude").value = hae.toFixed(3);
1248+
}
1249+
else {
1250+
hae = Number(ge("fixedAltitude").value) + (Number(ge("antennaHeight").value) / 1000 + Number(ge("antennaReferencePoint").value) / 1000);
1251+
ge("fixedHAE_APC").value = hae.toFixed(3);
1252+
}
12311253

12321254
clearError("nicknameGeodetic");
12331255
clearError("fixedLat");

0 commit comments

Comments
 (0)