Skip to content

Commit 599a176

Browse files
committed
Support and auto-detect various coordinate input types
Fix for #428. This adds auto-detect for coordinates entered with the following formats: * DD.ddddddddd * DDMM.mmmmmmm * DD MM.mmmmmmm * DD-MM.mmmmmmm * DDMMSS.ssssss * DD MM SS.ssssss * DD-MM-SS.ssssss
1 parent 8852f3e commit 599a176

File tree

7 files changed

+2441
-1691
lines changed

7 files changed

+2441
-1691
lines changed

Firmware/RTK_Surveyor/AP-Config/index.html

Lines changed: 58 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -72,22 +72,22 @@
7272
}
7373

7474
.battery {
75-
position: absolute;
76-
z-index: 1000;
77-
right: 10px;
78-
max-width: 600px;
79-
margin-top: 5px;
75+
position: absolute;
76+
z-index: 1000;
77+
right: 10px;
78+
max-width: 600px;
79+
margin-top: 5px;
8080
}
8181
</style>
8282
</head>
8383

8484
<body>
85-
<div class="container" id="batteryIcon">
86-
<div align="right" class="battery">
87-
<img id="batteryIconFileName" src="src/Battery2_Charging.png" alt="Battery level"> <span id="batteryPercent" class="small"
88-
style="display:inline;">+67</span>
89-
</div>
90-
</div>
85+
<div class="container" id="batteryIcon">
86+
<div align="right" class="battery">
87+
<img id="batteryIconFileName" src="src/Battery2_Charging.png" alt="Battery level"> <span id="batteryPercent"
88+
class="small" style="display:inline;">+67</span>
89+
</div>
90+
</div>
9191

9292
<div class="container" style="display:none; margin-top:20px;max-width:600px;" id="resetInProcess">
9393
<b>Resetting</b><br><br>RTK device is rebooting. Please wait...
@@ -1162,20 +1162,27 @@
11621162
</div>
11631163

11641164
<div class="form-group row">
1165-
<label for="fixedLat"
1165+
<label for="fixedLatText"
11661166
class="box-margin40 col-sm-3 col-4 col-form-label">Latitude:</label>
11671167
<div class="col-sm-4 col-6">
1168-
<input type="number" class="form-control" id="fixedLat">
1169-
<p id="fixedLatError" class="inlineError"></p>
1168+
<input type="text" class="form-control" id="fixedLatText">
1169+
<p id="fixedLatTextError" class="inlineError"></p>
11701170
</div>
11711171
</div>
11721172

11731173
<div class="form-group row">
1174-
<label for="fixedLong"
1174+
<label for="fixedLongText"
11751175
class="box-margin40 col-sm-3 col-4 col-form-label">Longitude:</label>
11761176
<div class="col-sm-4 col-6">
1177-
<input type="number" class="form-control" id="fixedLong">
1178-
<p id="fixedLongError" class="inlineError"></p>
1177+
<input type="text" class="form-control" id="fixedLongText">
1178+
<p id="fixedLongTextError" class="inlineError"></p>
1179+
</div>
1180+
</div>
1181+
1182+
<div class="form-group row">
1183+
<div id="detectedFormat" class="box-margin40">
1184+
<label class="form-check-label">Detected Format:</label>
1185+
<span id="detectedFormatText" style="display:inline;"></span>
11791186
</div>
11801187
</div>
11811188

@@ -1401,95 +1408,97 @@
14011408
<div class="card card-body" style="margin-top:5px;">
14021409

14031410
<div style="margin-bottom:5px;">
1404-
<button type="button" class="btn btn-primary"
1405-
onClick="resetToRTCMDefaults()">Reset to Defaults</button>
1411+
<button type="button" class="btn btn-primary" onClick="resetToRTCMDefaults()">Reset to
1412+
Defaults</button>
14061413
</div>
14071414
<div style="margin-bottom:5px;">
1408-
<button type="button" class="btn btn-primary"
1409-
onClick="resetToLowBandwidthRTCM()">Reset to Low Bandwidth Link</button>
1415+
<button type="button" class="btn btn-primary" onClick="resetToLowBandwidthRTCM()">Reset
1416+
to Low Bandwidth Link</button>
14101417
</div>
14111418

14121419
<hr>
14131420

14141421
<div class="form-group row" id="msgUBX_RTCM_1005Base">
14151422
<label for="UBX_RTCM_1005Base" class="col-sm-3 col-5 col-form-label">RTCM_1005:</label>
1416-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1005Base"
1417-
value="0">
1423+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1424+
id="UBX_RTCM_1005Base" value="0">
14181425
<p id="UBX_RTCM_1005BaseError" class="inlineError"></p>
14191426
</div>
14201427
</div>
14211428
<div class="form-group row" id="msgUBX_RTCM_1074Base">
14221429
<label for="UBX_RTCM_1074Base" class="col-sm-3 col-5 col-form-label">RTCM_1074:</label>
1423-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1074Base"
1424-
value="0">
1430+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1431+
id="UBX_RTCM_1074Base" value="0">
14251432
<p id="UBX_RTCM_1074BaseError" class="inlineError"></p>
14261433
</div>
14271434
</div>
14281435
<div class="form-group row" id="msgUBX_RTCM_1077Base">
14291436
<label for="UBX_RTCM_1077Base" class="col-sm-3 col-5 col-form-label">RTCM_1077:</label>
1430-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1077Base"
1431-
value="0">
1437+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1438+
id="UBX_RTCM_1077Base" value="0">
14321439
<p id="UBX_RTCM_1077BaseError" class="inlineError"></p>
14331440
</div>
14341441
</div>
14351442
<div class="form-group row" id="msgUBX_RTCM_1084Base">
14361443
<label for="UBX_RTCM_1084Base" class="col-sm-3 col-5 col-form-label">RTCM_1084:</label>
1437-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1084Base"
1438-
value="0">
1444+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1445+
id="UBX_RTCM_1084Base" value="0">
14391446
<p id="UBX_RTCM_1084BaseError" class="inlineError"></p>
14401447
</div>
14411448
</div>
14421449
<div class="form-group row" id="msgUBX_RTCM_1087Base">
14431450
<label for="UBX_RTCM_1087Base" class="col-sm-3 col-5 col-form-label">RTCM_1087:</label>
1444-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1087Base"
1445-
value="0">
1451+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1452+
id="UBX_RTCM_1087Base" value="0">
14461453
<p id="UBX_RTCM_1087BaseError" class="inlineError"></p>
14471454
</div>
14481455
</div>
14491456
<div class="form-group row" id="msgUBX_RTCM_1094Base">
14501457
<label for="UBX_RTCM_1094Base" class="col-sm-3 col-5 col-form-label">RTCM_1094:</label>
1451-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1094Base"
1452-
value="0">
1458+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1459+
id="UBX_RTCM_1094Base" value="0">
14531460
<p id="UBX_RTCM_1094BaseError" class="inlineError"></p>
14541461
</div>
14551462
</div>
14561463
<div class="form-group row" id="msgUBX_RTCM_1097Base">
14571464
<label for="UBX_RTCM_1097Base" class="col-sm-3 col-5 col-form-label">RTCM_1097:</label>
1458-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1097Base"
1459-
value="0">
1465+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1466+
id="UBX_RTCM_1097Base" value="0">
14601467
<p id="UBX_RTCM_1097BaseError" class="inlineError"></p>
14611468
</div>
14621469
</div>
14631470
<div class="form-group row" id="msgUBX_RTCM_1124Base">
14641471
<label for="UBX_RTCM_1124Base" class="col-sm-3 col-5 col-form-label">RTCM_1124:</label>
1465-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1124Base"
1466-
value="0">
1472+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1473+
id="UBX_RTCM_1124Base" value="0">
14671474
<p id="UBX_RTCM_1124BaseError" class="inlineError"></p>
14681475
</div>
14691476
</div>
14701477
<div class="form-group row" id="msgUBX_RTCM_1127Base">
14711478
<label for="UBX_RTCM_1127Base" class="col-sm-3 col-5 col-form-label">RTCM_1127:</label>
1472-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1127Base"
1473-
value="0">
1479+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1480+
id="UBX_RTCM_1127Base" value="0">
14741481
<p id="UBX_RTCM_1127BaseError" class="inlineError"></p>
14751482
</div>
14761483
</div>
14771484
<div class="form-group row" id="msgUBX_RTCM_1230Base">
14781485
<label for="UBX_RTCM_1230Base" class="col-sm-3 col-5 col-form-label">RTCM_1230:</label>
1479-
<div class="col-sm-8 col-7"><input type="number" class="form-control" id="UBX_RTCM_1230Base"
1480-
value="0">
1486+
<div class="col-sm-8 col-7"><input type="number" class="form-control"
1487+
id="UBX_RTCM_1230Base" value="0">
14811488
<p id="UBX_RTCM_1230BaseError" class="inlineError"></p>
14821489
</div>
14831490
</div>
14841491
<div class="form-group row" id="msgUBX_RTCM_4072_0Base">
1485-
<label for="UBX_RTCM_4072_0Base" class="col-sm-4 col-6 col-form-label">RTCM_4072_0:</label>
1492+
<label for="UBX_RTCM_4072_0Base"
1493+
class="col-sm-4 col-6 col-form-label">RTCM_4072_0:</label>
14861494
<div class="col-sm-7 col-6"><input type="number" class="form-control"
14871495
id="UBX_RTCM_4072_0Base" value="0">
14881496
<p id="UBX_RTCM_4072_0BaseError" class="inlineError"></p>
14891497
</div>
14901498
</div>
14911499
<div class="form-group row" id="msgUBX_RTCM_4072_1Base">
1492-
<label for="UBX_RTCM_4072_1Base" class="col-sm-4 col-6 col-form-label">RTCM_4072_1:</label>
1500+
<label for="UBX_RTCM_4072_1Base"
1501+
class="col-sm-4 col-6 col-form-label">RTCM_4072_1:</label>
14931502
<div class="col-sm-7 col-6"><input type="number" class="form-control"
14941503
id="UBX_RTCM_4072_1Base" value="0">
14951504
<p id="UBX_RTCM_4072_1BaseError" class="inlineError"></p>
@@ -1532,8 +1541,7 @@
15321541

15331542
<div class="form-group row">
15341543
<label for="imuYaw" class="col-sm-4 col-6 col-form-label">Yaw Angle:
1535-
<span class="tt" data-bs-placement="right"
1536-
title="User defined IMU mount angle for yaw.">
1544+
<span class="tt" data-bs-placement="right" title="User defined IMU mount angle for yaw.">
15371545
<span class="icon-info-circle text-primary ms-2"></span>
15381546
</span>
15391547
</label>
@@ -1545,8 +1553,7 @@
15451553

15461554
<div class="form-group row">
15471555
<label for="imuPitch" class="col-sm-4 col-6 col-form-label">Pitch Angle:
1548-
<span class="tt" data-bs-placement="right"
1549-
title="User defined IMU mount angle for pitch.">
1556+
<span class="tt" data-bs-placement="right" title="User defined IMU mount angle for pitch.">
15501557
<span class="icon-info-circle text-primary ms-2"></span>
15511558
</span>
15521559
</label>
@@ -1558,8 +1565,7 @@
15581565

15591566
<div class="form-group row">
15601567
<label for="imuRoll" class="col-sm-4 col-6 col-form-label">Roll Angle:
1561-
<span class="tt" data-bs-placement="right"
1562-
title="User defined IMU mount angle for roll.">
1568+
<span class="tt" data-bs-placement="right" title="User defined IMU mount angle for roll.">
15631569
<span class="icon-info-circle text-primary ms-2"></span>
15641570
</span>
15651571
</label>
@@ -1570,7 +1576,8 @@
15701576
</div>
15711577

15721578
<div class="form-check mt-3">
1573-
<label class="form-check-label" for="sfDisableWheelDirection">Disable Wheel Tick Direction Detection</label>
1579+
<label class="form-check-label" for="sfDisableWheelDirection">Disable Wheel Tick Direction
1580+
Detection</label>
15741581
<input class="form-check-input" type="checkbox" value="" id="sfDisableWheelDirection">
15751582
<span class="tt" data-bs-placement="right"
15761583
title="Automatically identify the wheel tick direction using GNSS heading. Default: False">
@@ -1581,8 +1588,7 @@
15811588
<div class="form-check mt-3">
15821589
<label class="form-check-label" for="sfCombineWheelTicks">Combine Wheel Ticks</label>
15831590
<input class="form-check-input" type="checkbox" value="" id="sfCombineWheelTicks">
1584-
<span class="tt" data-bs-placement="right"
1585-
title="Use combined rear wheel ticks instead of the
1591+
<span class="tt" data-bs-placement="right" title="Use combined rear wheel ticks instead of the
15861592
single tick. Default: False">
15871593
<span class="icon-info-circle text-primary ms-2"></span>
15881594
</span>

0 commit comments

Comments
 (0)