v1
This commit is contained in:
parent
d73c1c774f
commit
f5b27ba23a
28
403.html
Normal file
28
403.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>403</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.jpg" type="image/jpeg">
|
||||
<link type="text/css" rel="stylesheet" href="https://1.cdn.ianxia.com/static/site/404/css/errors.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error-page">
|
||||
<div>
|
||||
<h1 data-h1="403">403</h1>
|
||||
<p data-p="FORBIDDEN">FORBIDDEN</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tsparticles"></div>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="https://cdn.ghink.net/js/tsparticles/1.18.11/tsparticles.min.js"></script>
|
||||
<script type="text/javascript" src="https://1.cdn.ianxia.com/static/site/404/js/errors.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
28
404.html
Normal file
28
404.html
Normal file
@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>404</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.jpg" type="image/jpeg">
|
||||
<link type="text/css" rel="stylesheet" href="https://1.cdn.ianxia.com/static/site/404/css/errors.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="error-page">
|
||||
<div>
|
||||
<h1 data-h1="404">404</h1>
|
||||
<p data-p="NOT FOUND">NOT FOUND</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tsparticles"></div>
|
||||
|
||||
<script type="text/javascript"
|
||||
src="https://cdn.ghink.net/js/tsparticles/1.18.11/tsparticles.min.js"></script>
|
||||
<script type="text/javascript" src="https://1.cdn.ianxia.com/static/site/404/js/errors.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
209
base64/en_US.html
Normal file
209
base64/en_US.html
Normal file
@ -0,0 +1,209 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Encode / Decode Base64</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Encode / Decode Base64</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="text-center">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="text-tab" data-toggle="tab" href="#text" role="tab" aria-controls="text"
|
||||
aria-selected="true">
|
||||
<h6>Text</h6>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="text" role="tabpanel" aria-labelledby="text-tab">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Source: </b> </label>
|
||||
<input type="text" class="form-control" v-model="source_text" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Base64: </b> </label>
|
||||
<textarea type="text" class="form-control" v-model="based_text" placeholder="Please enter the content"></textarea><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Base64 URI: </b> </label>
|
||||
<textarea type="text" class="form-control" v-model="based_uri_text" placeholder="Please enter the content"></textarea><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>Library used: <a href="https://github.com/dankogai/js-base64">js-base64</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script src="https://cdn.ghink.net/js/base64/3.7.2/base64.min.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
source_text: "Please enter the content",
|
||||
based_text: Base64.encode('Please enter the content'),
|
||||
based_uri_text: Base64.encodeURI('Please enter the content')
|
||||
},
|
||||
watch: {
|
||||
source_text: function() {
|
||||
this.based_text = Base64.encode(this.source_text);
|
||||
this.based_uri_text = Base64.encodeURI(this.source_text);
|
||||
},
|
||||
based_text: function() {
|
||||
this.source_text = Base64.decode(this.based_text);
|
||||
this.based_uri_text = Base64.encodeURI(this.source_text);
|
||||
},
|
||||
based_uri_text: function() {
|
||||
this.source_text = Base64.decode(this.based_uri_text);
|
||||
this.based_text = Base64.encode(this.source_text);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
base64/index.html
Normal file
7
base64/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
209
base64/zh_CN.html
Normal file
209
base64/zh_CN.html
Normal file
@ -0,0 +1,209 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Base64编解码</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Base64编解码</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="text-center">
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" id="text-tab" data-toggle="tab" href="#text" role="tab" aria-controls="text"
|
||||
aria-selected="true">
|
||||
<h6>文本</h6>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content border border-top-0" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="text" role="tabpanel" aria-labelledby="text-tab">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-10">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>原文:</b> </label>
|
||||
<input type="text" class="form-control" v-model="source_text" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Base64:</b> </label>
|
||||
<textarea type="text" class="form-control" v-model="based_text" placeholder="请输入内容"></textarea><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Base64 URI:</b> </label>
|
||||
<textarea type="text" class="form-control" v-model="based_uri_text" placeholder="请输入内容"></textarea><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>使用类库:<a href="https://github.com/dankogai/js-base64">js-base64</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script src="https://cdn.ghink.net/js/base64/3.7.2/base64.min.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
source_text: "请输入内容",
|
||||
based_text: Base64.encode('请输入内容'),
|
||||
based_uri_text: Base64.encodeURI('请输入内容')
|
||||
},
|
||||
watch: {
|
||||
source_text: function() {
|
||||
this.based_text = Base64.encode(this.source_text);
|
||||
this.based_uri_text = Base64.encodeURI(this.source_text);
|
||||
},
|
||||
based_text: function() {
|
||||
this.source_text = Base64.decode(this.based_text);
|
||||
this.based_uri_text = Base64.encodeURI(this.source_text);
|
||||
},
|
||||
based_uri_text: function() {
|
||||
this.source_text = Base64.decode(this.based_uri_text);
|
||||
this.based_text = Base64.encode(this.source_text);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
354
commu_a_c/en_US.html
Normal file
354
commu_a_c/en_US.html
Normal file
@ -0,0 +1,354 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Calculate communication azimuth and great-circle distance</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
<script>
|
||||
function sgn(n) {
|
||||
if (n > 0) {
|
||||
return 1;
|
||||
} else if (n < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fndeg(d, m, s) {
|
||||
return d + sgn(d) * (m / 60 + s/ 3600);
|
||||
}
|
||||
|
||||
function fnacs(x) {
|
||||
return Math.PI / 2 - 2 * Math.atan(x / (1 + Math.sqrt(1 - x * x)));
|
||||
}
|
||||
|
||||
function calc(tlongd, tlatd, rlongd, rlatd) {
|
||||
let ro = 6370;
|
||||
|
||||
let gcdkm;
|
||||
let btrd;
|
||||
let brtd;
|
||||
|
||||
let r2d = 180 / Math.PI;
|
||||
let d2r = Math.PI / 180;
|
||||
|
||||
let tlong = tlongd * d2r;
|
||||
let tlat = tlatd * d2r;
|
||||
let rlong = rlongd * d2r;
|
||||
let rlat = rlatd * d2r;
|
||||
|
||||
if (tlong < 0) {
|
||||
tlong = Math.PI * 2 + tlong;
|
||||
}
|
||||
if (rlong < 0) {
|
||||
rlong = Math.PI * 2 + rlong;
|
||||
}
|
||||
|
||||
let dlong = tlong - rlong;
|
||||
if (Math.abs(dlong) > Math.PI) {
|
||||
dlong = dlong - Math.PI * 2 * sgn(dlong);
|
||||
}
|
||||
|
||||
let x = Math.sin(tlat) * Math.sin(rlat) + Math.cos(tlat) * Math.cos(rlat) * Math.cos(dlong);
|
||||
let gcd = fnacs(x);
|
||||
|
||||
if (gcd < 0.0000001) {
|
||||
gcd = 0.0000001;
|
||||
}
|
||||
|
||||
if (Math.cos(tlat) - 0.0000001 <= 0) {
|
||||
let btr;
|
||||
if (tlat >= 0) {
|
||||
btr = 0;
|
||||
} else {
|
||||
btr = Math.PI;
|
||||
}
|
||||
|
||||
if (Math.cos(rlat) - 0.0000001 > 0) {
|
||||
x = (Math.sin(tlat) - Math.sin(rlat) * Math.cos(gcd)) / (Math.cos(rlat) * Math.sin(gcd));
|
||||
let brt = fnacs(x);
|
||||
if (dlong < 0) {
|
||||
brt = Math.PI * 2 - brt;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
} else {
|
||||
let brt;
|
||||
if (rlat >= 0) {
|
||||
brt = 0;
|
||||
} else {
|
||||
brt = Math.PI;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
}
|
||||
} else {
|
||||
x = (Math.sin(rlat) - Math.sin(tlat) * Math.cos(gcd)) / (Math.cos(tlat) * Math.sin(gcd));
|
||||
let btr = fnacs(x);
|
||||
|
||||
if (dlong > 0) {
|
||||
btr = Math.PI * 2 - btr;
|
||||
}
|
||||
|
||||
if (Math.cos(rlat) - 0.0000001 > 0) {
|
||||
x = (Math.sin(tlat) - Math.sin(rlat) * Math.cos(gcd)) / (Math.cos(rlat) * Math.sin(gcd));
|
||||
let brt = fnacs(x);
|
||||
if (dlong < 0) {
|
||||
brt = Math.PI * 2 - brt;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
} else {
|
||||
let brt;
|
||||
if (rlat >= 0) {
|
||||
brt = 0;
|
||||
} else {
|
||||
brt = Math.PI;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
}
|
||||
}
|
||||
|
||||
return [gcdkm, btrd, brtd];
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Calculate communication azimuth and great-circle distance</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>Longitude of sending point</b> </label>
|
||||
<input type="number" class="form-control" v-model="tlongdd" max="180" min="-180" placeholder="Degree(s)" style="width:70px; height:30px;"> Degree(s)
|
||||
<input type="number" class="form-control" v-model="tlongdm" max="60" min="-60" placeholder="Minute(s)" style="width:70px; height:30px;"> Minute(s)
|
||||
<input type="number" class="form-control" v-model="tlongds" max="60" min="-60" placeholder="Second(s)" style="width:70px; height:30px;"> Second(s)
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>Latitude of sending point</b> </label>
|
||||
<input type="number" class="form-control" v-model="tlatdd" max="90" min="-90" placeholder="Degree(s)" style="width:70px; height:30px;"> Degree(s)
|
||||
<input type="number" class="form-control" v-model="tlatdm" max="60" min="-60" placeholder="Minute(s)" style="width:70px; height:30px;"> Minute(s)
|
||||
<input type="number" class="form-control" v-model="tlatds" max="60" min="-60" placeholder="Second(s)" style="width:70px; height:30px;"> Second(s)
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>Longitude of receving point</b> </label>
|
||||
<input type="number" class="form-control" v-model="rlongdd" max="180" min="-180" placeholder="Degree(s)" style="width:70px; height:30px;"> Degree(s)
|
||||
<input type="number" class="form-control" v-model="rlongdm" max="60" min="-60" placeholder="Minute(s)" style="width:70px; height:30px;"> Minute(s)
|
||||
<input type="number" class="form-control" v-model="rlongds" max="60" min="-60" placeholder="Second(s)" style="width:70px; height:30px;"> Second(s)
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>Latitude of receving point</b> </label>
|
||||
<input type="number" class="form-control" v-model="rlatdd" max="90" min="-90" placeholder="Degree(s)" style="width:70px; height:30px;"> Degree(s)
|
||||
<input type="number" class="form-control" v-model="rlatdm" max="60" min="-60" placeholder="Minute(s)" style="width:70px; height:30px;"> Minute(s)
|
||||
<input type="number" class="form-control" v-model="rlatds" max="60" min="-60" placeholder="Second(s)" style="width:70px; height:30px;"> Second(s)
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>Calculation results: </h5>
|
||||
<h5>The circle distance is {{gcdkm}}(km)</h5>
|
||||
<h5>The azimuth angle from the sending point to the receiving point is {{btrdd}}Degree(s) {{btrdm}}Minute(s) {{btrds}}Second(s)</h5>
|
||||
<h5>The azimuth angle from the receiving point to the sending point is {{brtdd}}Degree(s) {{brtdm}}Minute(s) {{brtds}}Second(s)</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>Algorithm source: Amateur Radio Communications 童效勇BA1AA 陈方BA4RC Appendix 18</h5>
|
||||
<h5>Language translation: Bigsk (<a href="https://gitea.ghink.net/bigsk/commu_a_c" target="_blank">Git Repo</a>)</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
function result(object) {
|
||||
let tlongd = fndeg(parseInt(object.tlongdd), parseInt(object.tlongdm), parseInt(object.tlongds))
|
||||
let tlatd = fndeg(parseInt(object.tlatdd), parseInt(object.tlatdm), parseInt(object.tlatds))
|
||||
let rlongd = fndeg(parseInt(object.rlongdd), parseInt(object.rlongdm), parseInt(object.rlongds))
|
||||
let rlatd = fndeg(parseInt(object.rlatdd), parseInt(object.rlatdm), parseInt(object.rlatds))
|
||||
return calc(tlongd, tlatd, rlongd, rlatd)
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
tlongdd: 103,
|
||||
tlongdm: 45,
|
||||
tlongds: 0,
|
||||
tlatdd: 36,
|
||||
tlatdm: 2,
|
||||
tlatds: 0,
|
||||
rlongdd: 121,
|
||||
rlongdm: 29,
|
||||
rlongds: 0,
|
||||
rlatdd: 31,
|
||||
rlatdm: 14,
|
||||
rlatds: 0
|
||||
},
|
||||
computed: {
|
||||
gcdkm: function () {
|
||||
return result(this)[0]
|
||||
},
|
||||
btrdd: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
return d
|
||||
},
|
||||
btrdm: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
let m = Math.trunc((result(this)[1] - d) * 60)
|
||||
return m
|
||||
},
|
||||
btrds: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
let m = Math.trunc((result(this)[1] - d) * 60)
|
||||
let s = Math.trunc((result(this)[1] - d - m / 60) * 3600)
|
||||
return s
|
||||
},
|
||||
brtdd: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
return d
|
||||
},
|
||||
brtdm: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
return m
|
||||
},
|
||||
brtds: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
let s = Math.trunc((result(this)[2] - d - m / 60) * 3600)
|
||||
return s
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
commu_a_c/index.html
Normal file
7
commu_a_c/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
354
commu_a_c/zh_CN.html
Normal file
354
commu_a_c/zh_CN.html
Normal file
@ -0,0 +1,354 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>计算通信方位角和大圆距离</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
<script>
|
||||
function sgn(n) {
|
||||
if (n > 0) {
|
||||
return 1;
|
||||
} else if (n < 0) {
|
||||
return -1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function fndeg(d, m, s) {
|
||||
return d + sgn(d) * (m / 60 + s/ 3600);
|
||||
}
|
||||
|
||||
function fnacs(x) {
|
||||
return Math.PI / 2 - 2 * Math.atan(x / (1 + Math.sqrt(1 - x * x)));
|
||||
}
|
||||
|
||||
function calc(tlongd, tlatd, rlongd, rlatd) {
|
||||
let ro = 6370;
|
||||
|
||||
let gcdkm;
|
||||
let btrd;
|
||||
let brtd;
|
||||
|
||||
let r2d = 180 / Math.PI;
|
||||
let d2r = Math.PI / 180;
|
||||
|
||||
let tlong = tlongd * d2r;
|
||||
let tlat = tlatd * d2r;
|
||||
let rlong = rlongd * d2r;
|
||||
let rlat = rlatd * d2r;
|
||||
|
||||
if (tlong < 0) {
|
||||
tlong = Math.PI * 2 + tlong;
|
||||
}
|
||||
if (rlong < 0) {
|
||||
rlong = Math.PI * 2 + rlong;
|
||||
}
|
||||
|
||||
let dlong = tlong - rlong;
|
||||
if (Math.abs(dlong) > Math.PI) {
|
||||
dlong = dlong - Math.PI * 2 * sgn(dlong);
|
||||
}
|
||||
|
||||
let x = Math.sin(tlat) * Math.sin(rlat) + Math.cos(tlat) * Math.cos(rlat) * Math.cos(dlong);
|
||||
let gcd = fnacs(x);
|
||||
|
||||
if (gcd < 0.0000001) {
|
||||
gcd = 0.0000001;
|
||||
}
|
||||
|
||||
if (Math.cos(tlat) - 0.0000001 <= 0) {
|
||||
let btr;
|
||||
if (tlat >= 0) {
|
||||
btr = 0;
|
||||
} else {
|
||||
btr = Math.PI;
|
||||
}
|
||||
|
||||
if (Math.cos(rlat) - 0.0000001 > 0) {
|
||||
x = (Math.sin(tlat) - Math.sin(rlat) * Math.cos(gcd)) / (Math.cos(rlat) * Math.sin(gcd));
|
||||
let brt = fnacs(x);
|
||||
if (dlong < 0) {
|
||||
brt = Math.PI * 2 - brt;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
} else {
|
||||
let brt;
|
||||
if (rlat >= 0) {
|
||||
brt = 0;
|
||||
} else {
|
||||
brt = Math.PI;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
}
|
||||
} else {
|
||||
x = (Math.sin(rlat) - Math.sin(tlat) * Math.cos(gcd)) / (Math.cos(tlat) * Math.sin(gcd));
|
||||
let btr = fnacs(x);
|
||||
|
||||
if (dlong > 0) {
|
||||
btr = Math.PI * 2 - btr;
|
||||
}
|
||||
|
||||
if (Math.cos(rlat) - 0.0000001 > 0) {
|
||||
x = (Math.sin(tlat) - Math.sin(rlat) * Math.cos(gcd)) / (Math.cos(rlat) * Math.sin(gcd));
|
||||
let brt = fnacs(x);
|
||||
if (dlong < 0) {
|
||||
brt = Math.PI * 2 - brt;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
} else {
|
||||
let brt;
|
||||
if (rlat >= 0) {
|
||||
brt = 0;
|
||||
} else {
|
||||
brt = Math.PI;
|
||||
}
|
||||
gcdkm = gcd * ro;
|
||||
btrd = btr * r2d;
|
||||
brtd = brt * r2d;
|
||||
}
|
||||
}
|
||||
|
||||
return [gcdkm, btrd, brtd];
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>计算通信方位角和大圆距离</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>发信点经度</b> </label>
|
||||
<input type="number" class="form-control" v-model="tlongdd" max="180" min="-180" placeholder="度" style="width:70px; height:30px;"> 度
|
||||
<input type="number" class="form-control" v-model="tlongdm" max="60" min="-60" placeholder="分" style="width:70px; height:30px;"> 分
|
||||
<input type="number" class="form-control" v-model="tlongds" max="60" min="-60" placeholder="秒" style="width:70px; height:30px;"> 秒
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>发信点纬度</b> </label>
|
||||
<input type="number" class="form-control" v-model="tlatdd" max="90" min="-90" placeholder="度" style="width:70px; height:30px;"> 度
|
||||
<input type="number" class="form-control" v-model="tlatdm" max="60" min="-60" placeholder="分" style="width:70px; height:30px;"> 分
|
||||
<input type="number" class="form-control" v-model="tlatds" max="60" min="-60" placeholder="秒" style="width:70px; height:30px;"> 秒
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>收信点经度</b> </label>
|
||||
<input type="number" class="form-control" v-model="rlongdd" max="180" min="-180" placeholder="度" style="width:70px; height:30px;"> 度
|
||||
<input type="number" class="form-control" v-model="rlongdm" max="60" min="-60" placeholder="分" style="width:70px; height:30px;"> 分
|
||||
<input type="number" class="form-control" v-model="rlongds" max="60" min="-60" placeholder="秒" style="width:70px; height:30px;"> 秒
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<label><b>收信点纬度</b> </label>
|
||||
<input type="number" class="form-control" v-model="rlatdd" max="90" min="-90" placeholder="度" style="width:70px; height:30px;"> 度
|
||||
<input type="number" class="form-control" v-model="rlatdm" max="60" min="-60" placeholder="分" style="width:70px; height:30px;"> 分
|
||||
<input type="number" class="form-control" v-model="rlatds" max="60" min="-60" placeholder="秒" style="width:70px; height:30px;"> 秒
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>计算结果:</h5>
|
||||
<h5>大圆距离为{{gcdkm}}(km)</h5>
|
||||
<h5>发信点对收信点的方位角为{{btrdd}}度{{btrdm}}分{{btrds}}秒</h5>
|
||||
<h5>收信点对发信点的方位角为{{brtdd}}度{{brtdm}}分{{brtds}}秒</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>算法来源:《业余无线电通信》 童效勇BA1AA 陈方BA4RC 附录18</h5>
|
||||
<h5>语言翻译:Bigsk (<a href="https://gitea.ghink.net/bigsk/commu_a_c" target="_blank">Git仓库</a>)</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
function result(object) {
|
||||
let tlongd = fndeg(parseInt(object.tlongdd), parseInt(object.tlongdm), parseInt(object.tlongds))
|
||||
let tlatd = fndeg(parseInt(object.tlatdd), parseInt(object.tlatdm), parseInt(object.tlatds))
|
||||
let rlongd = fndeg(parseInt(object.rlongdd), parseInt(object.rlongdm), parseInt(object.rlongds))
|
||||
let rlatd = fndeg(parseInt(object.rlatdd), parseInt(object.rlatdm), parseInt(object.rlatds))
|
||||
return calc(tlongd, tlatd, rlongd, rlatd)
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
tlongdd: 103,
|
||||
tlongdm: 45,
|
||||
tlongds: 0,
|
||||
tlatdd: 36,
|
||||
tlatdm: 2,
|
||||
tlatds: 0,
|
||||
rlongdd: 121,
|
||||
rlongdm: 29,
|
||||
rlongds: 0,
|
||||
rlatdd: 31,
|
||||
rlatdm: 14,
|
||||
rlatds: 0
|
||||
},
|
||||
computed: {
|
||||
gcdkm: function () {
|
||||
return result(this)[0]
|
||||
},
|
||||
btrdd: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
return d
|
||||
},
|
||||
btrdm: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
let m = Math.trunc((result(this)[1] - d) * 60)
|
||||
return m
|
||||
},
|
||||
btrds: function () {
|
||||
let d = Math.trunc(result(this)[1])
|
||||
let m = Math.trunc((result(this)[1] - d) * 60)
|
||||
let s = Math.trunc((result(this)[1] - d - m / 60) * 3600)
|
||||
return s
|
||||
},
|
||||
brtdd: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
return d
|
||||
},
|
||||
brtdm: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
return m
|
||||
},
|
||||
brtds: function () {
|
||||
let d = Math.trunc(result(this)[2])
|
||||
let m = Math.trunc((result(this)[2] - d) * 60)
|
||||
let s = Math.trunc((result(this)[2] - d - m / 60) * 3600)
|
||||
return s
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
294
d_r_trans/en_US.html
Normal file
294
d_r_trans/en_US.html
Normal file
@ -0,0 +1,294 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Radian / Degree Converter</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Radian / Degree Converter</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Degree: </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg" @input="degWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Radian: </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="rad" @input="radWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Radian / π: </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="rad_pi" @input="rad_piWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Angle Group (Degree): </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_d" @input="deg_dWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Angle Group (Minute): </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_m" @input="deg_mWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Angle Group (Second): </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_s" @input="deg_sWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Degree (Minute Only): </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_mo" @input="deg_moWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Degree (Second Only): </b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_so" @input="deg_soWatch($event.target.value)" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
function degWatch(n) {
|
||||
v.deg = parseFloat(n);
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function radWatch(n) {
|
||||
v.rad = parseFloat(n);
|
||||
v.rad_pi = parseFloat(v.rad) / Math.PI;
|
||||
v.deg = parseFloat(v.rad) / Math.PI * 180;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function rad_piWatch(n) {
|
||||
v.rad_pi = parseFloat(n);
|
||||
v.rad = parseFloat(v.rad_pi) * Math.PI;
|
||||
v.deg = parseFloat(v.rad_pi) * 180;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function deg_dWatch(n) {
|
||||
v.deg_d = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_mWatch(n) {
|
||||
v.deg_m = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_sWatch(n) {
|
||||
v.deg_s = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_moWatch(n) {
|
||||
v.deg_mo = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_mo) / 60;
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_soWatch(n) {
|
||||
v.deg_so = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_so) / Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
let v = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
deg: 180,
|
||||
rad_pi: 1,
|
||||
rad: Math.PI,
|
||||
deg_d: 180,
|
||||
deg_m: 0,
|
||||
deg_s: 0,
|
||||
deg_mo: 10800,
|
||||
deg_so: 64800
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
d_r_trans/index.html
Normal file
7
d_r_trans/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
294
d_r_trans/zh_CN.html
Normal file
294
d_r_trans/zh_CN.html
Normal file
@ -0,0 +1,294 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>弧度 / 角度换算器</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>弧度 / 角度换算器</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度:</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg" @input="degWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>弧度:</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="rad" @input="radWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>弧度 / π:</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="rad_pi" @input="rad_piWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度组(度):</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_d" @input="deg_dWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度组(分):</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_m" @input="deg_mWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度组(秒):</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_s" @input="deg_sWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度(仅分):</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_mo" @input="deg_moWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>角度(仅秒):</b> </label>
|
||||
<input type="number" class="form-control" step="0.01" :value="deg_so" @input="deg_soWatch($event.target.value)" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
function degWatch(n) {
|
||||
v.deg = parseFloat(n);
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function radWatch(n) {
|
||||
v.rad = parseFloat(n);
|
||||
v.rad_pi = parseFloat(v.rad) / Math.PI;
|
||||
v.deg = parseFloat(v.rad) / Math.PI * 180;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function rad_piWatch(n) {
|
||||
v.rad_pi = parseFloat(n);
|
||||
v.rad = parseFloat(v.rad_pi) * Math.PI;
|
||||
v.deg = parseFloat(v.rad_pi) * 180;
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
}
|
||||
function deg_dWatch(n) {
|
||||
v.deg_d = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_mWatch(n) {
|
||||
v.deg_m = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_sWatch(n) {
|
||||
v.deg_s = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_d) + parseFloat(v.deg_m) / 60 + parseFloat(v.deg_s) / Math.pow(60, 2);
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_moWatch(n) {
|
||||
v.deg_mo = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_mo) / 60;
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
v.deg_so = parseFloat(v.deg) * Math.pow(60, 2);
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
function deg_soWatch(n) {
|
||||
v.deg_so = parseFloat(n);
|
||||
v.deg = parseFloat(v.deg_so) / Math.pow(60, 2);
|
||||
v.deg_d = Math.floor(parseFloat(v.deg));
|
||||
v.deg_m = Math.floor((parseFloat(v.deg) - parseFloat(v.deg_d)) * 60);
|
||||
v.deg_s = Math.round((parseFloat(v.deg) - parseFloat(v.deg_d) - parseFloat(v.deg_m) / 60) * Math.pow(60, 2));
|
||||
v.deg_mo = parseFloat(v.deg) * 60;
|
||||
v.rad = parseFloat(v.deg) / 180 * Math.PI;
|
||||
v.rad_pi = parseFloat(v.deg) / 180;
|
||||
}
|
||||
let v = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
deg: 180,
|
||||
rad_pi: 1,
|
||||
rad: Math.PI,
|
||||
deg_d: 180,
|
||||
deg_m: 0,
|
||||
deg_s: 0,
|
||||
deg_mo: 10800,
|
||||
deg_so: 64800
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
175
en_US.html
Normal file
175
en_US.html
Normal file
@ -0,0 +1,175 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>IanTools</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/js/axios/1.1.3/axios.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://tools.ianxia.com">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Tools</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="container" id="app">
|
||||
<span v-html="body"></span>
|
||||
</div>
|
||||
<br>
|
||||
<hr>
|
||||
<script>
|
||||
let language = "en_US";
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
body: "<center><h1>Loading...</h1></center>"
|
||||
},
|
||||
mounted () {
|
||||
let me = this;
|
||||
axios
|
||||
.get('list.json')
|
||||
.then(function (response) {
|
||||
let body = '';
|
||||
for (let i=0;i<response.data.length;i+=3) {
|
||||
body += `<div class="row text-center">`;
|
||||
for (let j=0;i+j<response.data.length && j<3;j++) {
|
||||
body += `
|
||||
<div class="col-md-4 pb-1 pb-md-0">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">`+response.data[i+j].name[language]+`</h5>
|
||||
<p class="card-subtitle"><span class="badge badge-success">`+response.data[i+j].category[language]+`</span></p>
|
||||
<p class="card-text mr-auto">`+response.data[i+j].description[language]+`</p>
|
||||
<a href="`+response.data[i+j].path+`/`+language+`.html" class="btn btn-primary" target="_blank">Go</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
body += `</div><br>`;
|
||||
}
|
||||
me.body = body;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
229
hash/en_US.html
Normal file
229
hash/en_US.html
Normal file
@ -0,0 +1,229 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Compute Hash</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Compute Hash</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Please enter the content:</b> </label>
|
||||
<input type="text" class="form-control" v-model="input" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="word-break:break-all; word-wrap:break-all;">
|
||||
<div class="col-md-12">
|
||||
<div><b>Calculation results:</b></div>
|
||||
<div><b>MD5 32 Uppercase: {{md5_32_u}}</b></div>
|
||||
<div><b>MD5 32 Lowercase: {{md5_32_l}}</b></div>
|
||||
<div><b>MD5 16 Uppercase: {{md5_16_u}}</b></div>
|
||||
<div><b>MD5 16 Lowercase: {{md5_16_l}}</b></div>
|
||||
<div><b>SHA1 Uppercase: {{sha1_u}}</b></div>
|
||||
<div><b>SHA1 Lowercase: {{sha1_l}}</b></div>
|
||||
<div><b>SHA3 Uppercase: {{sha3_u}}</b></div>
|
||||
<div><b>SHA3 Lowercase: {{sha3_l}}</b></div>
|
||||
<div><b>SHA224 Uppercase: {{sha224_u}}</b></div>
|
||||
<div><b>SHA224 Lowercase: {{sha224_l}}</b></div>
|
||||
<div><b>SHA256 Uppercase: {{sha256_u}}</b></div>
|
||||
<div><b>SHA256 Lowercase: {{sha256_l}}</b></div>
|
||||
<div><b>SHA384 Uppercase: {{sha384_u}}</b></div>
|
||||
<div><b>SHA384 Lowercase: {{sha384_l}}</b></div>
|
||||
<div><b>SHA512 Uppercase: {{sha512_u}}</b></div>
|
||||
<div><b>SHA512 Lowercase: {{sha512_l}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>Library used: <a href="https://github.com/brix/crypto-js">Crypto.js</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script src="https://cdn.ghink.net/js/crypto/crypto-js.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
input: "Please enter the content"
|
||||
},
|
||||
computed: {
|
||||
md5_32_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
md5_32_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input) : "Please enter the content!";
|
||||
},
|
||||
md5_16_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().toUpperCase().slice(8, 24) : "Please enter the content!";
|
||||
},
|
||||
md5_16_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().slice(8, 24) : "Please enter the content!";
|
||||
},
|
||||
sha1_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA1(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha1_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA1(this.input).toString() : "Please enter the content!";
|
||||
},
|
||||
sha3_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA3(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha3_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA3(this.input).toString() : "Please enter the content!";
|
||||
},
|
||||
sha224_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA224(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha224_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA224(this.input).toString() : "Please enter the content!";
|
||||
},
|
||||
sha256_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA256(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha256_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA256(this.input).toString() : "Please enter the content!";
|
||||
},
|
||||
sha384_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA384(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha384_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA384(this.input).toString() : "Please enter the content!";
|
||||
},
|
||||
sha512_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA512(this.input).toString().toUpperCase() : "Please enter the content!";
|
||||
},
|
||||
sha512_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA512(this.input).toString() : "Please enter the content!";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
hash/index.html
Normal file
7
hash/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
229
hash/zh_CN.html
Normal file
229
hash/zh_CN.html
Normal file
@ -0,0 +1,229 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>计算哈希值</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>计算哈希值</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>请输入内容:</b> </label>
|
||||
<input type="text" class="form-control" v-model="input" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="word-break:break-all; word-wrap:break-all;">
|
||||
<div class="col-md-12">
|
||||
<div><b>计算结果:</b></div>
|
||||
<div><b>MD5 32 大写: {{md5_32_u}}</b></div>
|
||||
<div><b>MD5 32 小写: {{md5_32_l}}</b></div>
|
||||
<div><b>MD5 16 大写: {{md5_16_u}}</b></div>
|
||||
<div><b>MD5 16 小写: {{md5_16_l}}</b></div>
|
||||
<div><b>SHA1 大写: {{sha1_u}}</b></div>
|
||||
<div><b>SHA1 小写: {{sha1_l}}</b></div>
|
||||
<div><b>SHA3 大写: {{sha3_u}}</b></div>
|
||||
<div><b>SHA3 小写: {{sha3_l}}</b></div>
|
||||
<div><b>SHA224 大写: {{sha224_u}}</b></div>
|
||||
<div><b>SHA224 小写: {{sha224_l}}</b></div>
|
||||
<div><b>SHA256 大写: {{sha256_u}}</b></div>
|
||||
<div><b>SHA256 小写: {{sha256_l}}</b></div>
|
||||
<div><b>SHA384 大写: {{sha384_u}}</b></div>
|
||||
<div><b>SHA384 小写: {{sha384_l}}</b></div>
|
||||
<div><b>SHA512 大写: {{sha512_u}}</b></div>
|
||||
<div><b>SHA512 小写: {{sha512_l}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>使用类库:<a href="https://github.com/brix/crypto-js">Crypto.js</a></h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script src="https://cdn.ghink.net/js/crypto/crypto-js.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
input: "请输入内容"
|
||||
},
|
||||
computed: {
|
||||
md5_32_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
md5_32_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input) : "请输入内容!";
|
||||
},
|
||||
md5_16_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().toUpperCase().slice(8, 24) : "请输入内容!";
|
||||
},
|
||||
md5_16_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.MD5(this.input).toString().slice(8, 24) : "请输入内容!";
|
||||
},
|
||||
sha1_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA1(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha1_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA1(this.input).toString() : "请输入内容!";
|
||||
},
|
||||
sha3_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA3(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha3_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA3(this.input).toString() : "请输入内容!";
|
||||
},
|
||||
sha224_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA224(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha224_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA224(this.input).toString() : "请输入内容!";
|
||||
},
|
||||
sha256_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA256(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha256_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA256(this.input).toString() : "请输入内容!";
|
||||
},
|
||||
sha384_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA384(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha384_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA384(this.input).toString() : "请输入内容!";
|
||||
},
|
||||
sha512_u: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA512(this.input).toString().toUpperCase() : "请输入内容!";
|
||||
},
|
||||
sha512_l: function() {
|
||||
return this.input.toString().length != 0 ? CryptoJS.SHA512(this.input).toString() : "请输入内容!";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
index.html
Normal file
7
index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
115
list.json
Normal file
115
list.json
Normal file
@ -0,0 +1,115 @@
|
||||
[
|
||||
{
|
||||
"name": {
|
||||
"zh_CN": "计算通信方位角和大圆距离",
|
||||
"en_US": "Calculate communication azimuth and great-circle distance"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线实时计算通信方位角和大圆距",
|
||||
"en_US": "Calculate communication azimuth and great-circle distance online"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "业余无线电",
|
||||
"en_US": "Amateur Radio"
|
||||
},
|
||||
"path": "commu_a_c"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "小环天线计算器",
|
||||
"en_US": "Magnetic loop antenna calculator for round copper construction"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线计算小环天线相关参数",
|
||||
"en_US": "Magnetic loop antenna calculator for round copper construction"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "业余无线电",
|
||||
"en_US": "Amateur Radio"
|
||||
},
|
||||
"path": "loopflat"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "计算哈希值",
|
||||
"en_US": "Compute Hash"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线同步快速计算各种哈希值",
|
||||
"en_US": "Online synchronous fast calculation of various hash values"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "计算机科学",
|
||||
"en_US": "Computer Science"
|
||||
},
|
||||
"path": "hash"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "生成二维码",
|
||||
"en_US": "Generate QR code"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线同步快速生成二维码",
|
||||
"en_US": "Online fast real-time generation of QR code"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "计算机科学",
|
||||
"en_US": "Computer Science"
|
||||
},
|
||||
"path": "qrcode"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "编解码URI",
|
||||
"en_US": "Encode / Decode URI"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线同步快速编解码您的URI",
|
||||
"en_US": "Online fast real-time encode or decode your URI"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "计算机科学",
|
||||
"en_US": "Computer Science"
|
||||
},
|
||||
"path": "url_en_decode"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "Base64编解码",
|
||||
"en_US": "Encode / Decode Base64"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线同步快速编解码您的Base64",
|
||||
"en_US": "Online fast real-time encode or decode your Base64"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "计算机科学",
|
||||
"en_US": "Computer Science"
|
||||
},
|
||||
"path": "base64"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "弧度 / 角度换算",
|
||||
"en_US": "Radian / Degree Converter"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线同步快速换算角度与弧度",
|
||||
"en_US": "Online synchronous fast conversion of degree and radian"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "数学",
|
||||
"en_US": "Mathematics"
|
||||
},
|
||||
"path": "d_r_trans"
|
||||
},{
|
||||
"name": {
|
||||
"zh_CN": "椭球模型地球上点之间的距离",
|
||||
"en_US": "Distances between points on an ellipsoidal-model earth"
|
||||
},
|
||||
"description": {
|
||||
"zh_CN": "在线快速计算椭球模型地球上点之间的距离",
|
||||
"en_US": "Online synchronous fast calculation of distance between points on the earth of ellipsoidal model"
|
||||
},
|
||||
"category": {
|
||||
"zh_CN": "地理学",
|
||||
"en_US": "Geography"
|
||||
},
|
||||
"path": "vincenty"
|
||||
}
|
||||
]
|
239
loopflat/en_US.html
Normal file
239
loopflat/en_US.html
Normal file
@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Magnetic loop antenna calculator for round copper construction</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Magnetic loop antenna calculator for round copper construction</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>Frequency (MHz)</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" v-model="frequency" placeholder="Frequency (MHz)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>Loop conductor length (m)</b> </label>
|
||||
<input type="number" class="form-control" v-model="leng" placeholder="Loop conductor length (m)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>Conductor diameter (mm)</b> </label>
|
||||
<input type="number" class="form-control" v-model="diameter" placeholder="Conductor diameter (mm)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>RF power (W)</b> </label>
|
||||
<input type="number" class="form-control" v-model="power" placeholder="RF power (W)">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>Calculation results: </h5>
|
||||
<h5>Inductance (uH) {{inductance}}</h5>
|
||||
<h5>Capacitance (pF) {{capacitance}}</h5>
|
||||
<h5>XL = XC (ohms) {{lxlc}}</h5>
|
||||
<h5>Distributed C (pF) {{distributed}}</h5>
|
||||
<h5>Tuning capacitance (pF) {{tuning_capacitance}}</h5>
|
||||
<h5>Main loop diameter (m) {{main_loop_diameter}}</h5>
|
||||
<h5>Feeding loop diameter (m) {{feeding_loop_diameter}}</h5>
|
||||
<h5>Radiation resistance (ohms) {{radiation_resistance}}</h5>
|
||||
<h5>Loss resistance (ohms) {{loss_resistance}}</h5>
|
||||
<h5>Parallel resistance (kohms) {{parallel_resistance}}</h5>
|
||||
<h5>Efficiency (%) {{efficiency}}</h5>
|
||||
<h5>Compared to ideal loop (dB) {{ctil}}</h5>
|
||||
<h5>Loaded Q {{lq}}</h5>
|
||||
<h5>Bandwidth -3dB (kHz) {{bandwidth}}</h5>
|
||||
<h5>Capcitor rms voltage (V) {{crv}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>Algorithm source: I6IBE / OH7SV (<a href="http://www.radioamatoripeligni.it/i6ibe/loopflat/loopcalculator.xls">Source</a>)</h5>
|
||||
<h5>Language translation: Bigsk</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
frequency: 3.7,
|
||||
leng: 8,
|
||||
diameter: 22,
|
||||
power: 100
|
||||
},
|
||||
computed: {
|
||||
inductance: function() {
|
||||
return 0.0000000623 * parseInt(this.leng) * (7.353 * Math.log10((8 * parseInt(this.leng)) / (Math.PI * parseInt(this.diameter) / 1000)) - 6.386) * 1000000
|
||||
},
|
||||
capacitance: function() {
|
||||
return 1 / (Math.pow((2 * Math.PI * this.frequency * 1000000), 2) * this.inductance / 1000000) * 1000000000000
|
||||
},
|
||||
lxlc: function() {
|
||||
return 1 / (2 * Math.PI * this.frequency * 1000000 * this.capacitance * 0.000000000001)
|
||||
},
|
||||
distributed: function() {
|
||||
return 2.69 * this.leng
|
||||
},
|
||||
tuning_capacitance: function() {
|
||||
return this.capacitance - this.distributed
|
||||
},
|
||||
main_loop_diameter: function() {
|
||||
return this.leng / Math.PI
|
||||
},
|
||||
feeding_loop_diameter: function() {
|
||||
return this.main_loop_diameter / 5
|
||||
},
|
||||
radiation_resistance: function() {
|
||||
return 0.0000000338 * Math.pow((Math.pow(this.frequency, 2) * 10.76 * Math.PI * Math.pow(this.main_loop_diameter, 2) / 4), 2)
|
||||
},
|
||||
loss_resistance: function() {
|
||||
return 0.08298 * Math.sqrt(this.frequency) * this.leng / this.diameter
|
||||
},
|
||||
parallel_resistance: function() {
|
||||
return 0.001 * this.lxlc * this.lq
|
||||
},
|
||||
efficiency: function() {
|
||||
return 100 * this.radiation_resistance / (this.radiation_resistance + this.loss_resistance)
|
||||
},
|
||||
ctil: function() {
|
||||
return 10 * Math.log10(this.efficiency / 100)
|
||||
},
|
||||
lq: function() {
|
||||
return this.lxlc / (2 * (this.radiation_resistance + this.loss_resistance))
|
||||
},
|
||||
bandwidth: function() {
|
||||
return 1000 * this.frequency / this.lq
|
||||
},
|
||||
crv: function() {
|
||||
return Math.sqrt(this.power * this.lxlc * this.lq)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
loopflat/index.html
Normal file
7
loopflat/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
239
loopflat/zh_CN.html
Normal file
239
loopflat/zh_CN.html
Normal file
@ -0,0 +1,239 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>小环天线计算器</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>小环天线计算器</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>频率 (MHz)</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" v-model="frequency" placeholder="Frequency (MHz)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>主环周长 (m)</b> </label>
|
||||
<input type="number" class="form-control" v-model="leng" placeholder="Loop conductor length (m)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>主环材料直径 (mm)</b> </label>
|
||||
<input type="number" class="form-control" v-model="diameter" placeholder="Conductor diameter (mm)">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>射频功率 (W)</b> </label>
|
||||
<input type="number" class="form-control" v-model="power" placeholder="RF power (W)">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>计算结果:</h5>
|
||||
<h5>电感量 (uH) {{inductance}}</h5>
|
||||
<h5>电容量 (pF) {{capacitance}}</h5>
|
||||
<h5>XL = XC (ohms) {{lxlc}}</h5>
|
||||
<h5>分布电容 (pF) {{distributed}}</h5>
|
||||
<h5>调节电容量 (pF) {{tuning_capacitance}}</h5>
|
||||
<h5>主环直径 (m) {{main_loop_diameter}}</h5>
|
||||
<h5>激励环直径 (m) {{feeding_loop_diameter}}</h5>
|
||||
<h5>辐射电阻 (ohms) {{radiation_resistance}}</h5>
|
||||
<h5>损耗电阻 (ohms) {{loss_resistance}}</h5>
|
||||
<h5>并联电阻 (kohms) {{parallel_resistance}}</h5>
|
||||
<h5>效率 (%) {{efficiency}}</h5>
|
||||
<h5>与理想环之比 (dB) {{ctil}}</h5>
|
||||
<h5>Q值 {{lq}}</h5>
|
||||
<h5>带宽 -3dB (kHz) {{bandwidth}}</h5>
|
||||
<h5>调谐电容耐压值 (V) {{crv}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>算法来源:I6IBE / OH7SV (<a href="http://www.radioamatoripeligni.it/i6ibe/loopflat/loopcalculator.xls">来源</a>)</h5>
|
||||
<h5>语言翻译:Bigsk</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
frequency: 3.7,
|
||||
leng: 8,
|
||||
diameter: 22,
|
||||
power: 100
|
||||
},
|
||||
computed: {
|
||||
inductance: function() {
|
||||
return 0.0000000623 * parseInt(this.leng) * (7.353 * Math.log10((8 * parseInt(this.leng)) / (Math.PI * parseInt(this.diameter) / 1000)) - 6.386) * 1000000
|
||||
},
|
||||
capacitance: function() {
|
||||
return 1 / (Math.pow((2 * Math.PI * this.frequency * 1000000), 2) * this.inductance / 1000000) * 1000000000000
|
||||
},
|
||||
lxlc: function() {
|
||||
return 1 / (2 * Math.PI * this.frequency * 1000000 * this.capacitance * 0.000000000001)
|
||||
},
|
||||
distributed: function() {
|
||||
return 2.69 * this.leng
|
||||
},
|
||||
tuning_capacitance: function() {
|
||||
return this.capacitance - this.distributed
|
||||
},
|
||||
main_loop_diameter: function() {
|
||||
return this.leng / Math.PI
|
||||
},
|
||||
feeding_loop_diameter: function() {
|
||||
return this.main_loop_diameter / 5
|
||||
},
|
||||
radiation_resistance: function() {
|
||||
return 0.0000000338 * Math.pow((Math.pow(this.frequency, 2) * 10.76 * Math.PI * Math.pow(this.main_loop_diameter, 2) / 4), 2)
|
||||
},
|
||||
loss_resistance: function() {
|
||||
return 0.08298 * Math.sqrt(this.frequency) * this.leng / this.diameter
|
||||
},
|
||||
parallel_resistance: function() {
|
||||
return 0.001 * this.lxlc * this.lq
|
||||
},
|
||||
efficiency: function() {
|
||||
return 100 * this.radiation_resistance / (this.radiation_resistance + this.loss_resistance)
|
||||
},
|
||||
ctil: function() {
|
||||
return 10 * Math.log10(this.efficiency / 100)
|
||||
},
|
||||
lq: function() {
|
||||
return this.lxlc / (2 * (this.radiation_resistance + this.loss_resistance))
|
||||
},
|
||||
bandwidth: function() {
|
||||
return 1000 * this.frequency / this.lq
|
||||
},
|
||||
crv: function() {
|
||||
return Math.sqrt(this.power * this.lxlc * this.lq)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
239
qrcode/en_US.html
Normal file
239
qrcode/en_US.html
Normal file
File diff suppressed because one or more lines are too long
7
qrcode/index.html
Normal file
7
qrcode/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
239
qrcode/zh_CN.html
Normal file
239
qrcode/zh_CN.html
Normal file
File diff suppressed because one or more lines are too long
176
url_en_decode/en_US.html
Normal file
176
url_en_decode/en_US.html
Normal file
@ -0,0 +1,176 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Encode / Decode URI</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Encode / Decode URI</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>Please enter the content:</b> </label>
|
||||
<input type="text" class="form-control" v-model="input" placeholder="Please enter the content"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="word-break:break-all; word-wrap:break-all;">
|
||||
<div class="col-md-12">
|
||||
<div><b>Encoding and decoding results: </b></div>
|
||||
<div><b>Decode entire URI: {{decoded_uri}}</b></div>
|
||||
<div><b>Encode the entire URI: {{encoded_uri}}</b></div>
|
||||
<div><b>Decode partial URI: {{decoded_uri_com}}</b></div>
|
||||
<div><b>Encoding part URI: {{encoded_uri_com}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
input: "Please enter the content"
|
||||
},
|
||||
computed: {
|
||||
decoded_uri: function() {
|
||||
return this.input.toString().length != 0 ? decodeURI(this.input) : "Please enter the content!";
|
||||
},
|
||||
encoded_uri: function() {
|
||||
return this.input.toString().length != 0 ? encodeURI(this.input) : "Please enter the content!";
|
||||
},
|
||||
decoded_uri_com: function() {
|
||||
return this.input.toString().length != 0 ? decodeURIComponent(this.input) : "Please enter the content!";
|
||||
},
|
||||
encoded_uri_com: function() {
|
||||
return this.input.toString().length != 0 ? encodeURIComponent(this.input) : "Please enter the content!";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
url_en_decode/index.html
Normal file
7
url_en_decode/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
176
url_en_decode/zh_CN.html
Normal file
176
url_en_decode/zh_CN.html
Normal file
@ -0,0 +1,176 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>URI编解码</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>URI编解码</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container" id="app">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<form role="form">
|
||||
<div>
|
||||
<label><b>请输入内容:</b> </label>
|
||||
<input type="text" class="form-control" v-model="input" placeholder="请输入内容"><br>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="word-break:break-all; word-wrap:break-all;">
|
||||
<div class="col-md-12">
|
||||
<div><b>编解码结果:</b></div>
|
||||
<div><b>解码整个URI: {{decoded_uri}}</b></div>
|
||||
<div><b>编码整个URI: {{encoded_uri}}</b></div>
|
||||
<div><b>解码部分URI: {{decoded_uri_com}}</b></div>
|
||||
<div><b>编码部分URI: {{encoded_uri_com}}</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
input: "请输入内容"
|
||||
},
|
||||
computed: {
|
||||
decoded_uri: function() {
|
||||
return this.input.toString().length != 0 ? decodeURI(this.input) : "请输入内容!";
|
||||
},
|
||||
encoded_uri: function() {
|
||||
return this.input.toString().length != 0 ? encodeURI(this.input) : "请输入内容!";
|
||||
},
|
||||
decoded_uri_com: function() {
|
||||
return this.input.toString().length != 0 ? decodeURIComponent(this.input) : "请输入内容!";
|
||||
},
|
||||
encoded_uri_com: function() {
|
||||
return this.input.toString().length != 0 ? encodeURIComponent(this.input) : "请输入内容!";
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
234
vincenty/en_US.html
Normal file
234
vincenty/en_US.html
Normal file
@ -0,0 +1,234 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en_US">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Distances between points on an ellipsoidal-model earth</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Language
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="zh_CN.html"><b>简体中文</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">Blog (In Chinese)</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../en_US.html">Tools</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>Distances between points on an ellipsoidal-model earth</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>Longitude of Point A</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="180" min="-180" v-model="lopa" placeholder="Longitude of Point A">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>Latitude of Point A</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="90" min="-90" v-model="lapa" placeholder="Latitude of Point A">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>Longitude of Point B</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="180" min="-180" v-model="lopb" placeholder="Longitude of Point B">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>Latitude of Point B</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="90" min="-90" v-model="lapb" placeholder="Latitude of Point B">
|
||||
</div><br>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>Calculation results: </h5>
|
||||
<h5>Distance: {{distance}} km</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>Algorithm source: <a href="http://www.movable-type.co.uk/scripts/latlong-vincenty.html">Vincenty solutions of geodesics on the ellipsoid</a></h5>
|
||||
<h5>Language translation: Bigsk</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
let a = 6378137;
|
||||
let b = 6356752.314245;
|
||||
let f = 1 / 298.257223563;
|
||||
|
||||
function getDistance(lat_one, lon_one, lat_two, lon_two) {
|
||||
let L = toRadians(lon_one - lon_two);
|
||||
let U1 = Math.atan((1 - f) * Math.tan(toRadians(lat_one)));
|
||||
let U2 = Math.atan((1 - f) * Math.tan(toRadians(lat_two)));
|
||||
let sinU1 = Math.sin(U1), cosU1 = Math.cos(U1),
|
||||
sinU2 = Math.sin(U2), cosU2 = Math.cos(U2);
|
||||
let lambda = L, lambdaP = Math.PI;
|
||||
let cosSqAlpha = 0, sinSigma = 0, cos2SigmaM = 0, cosSigma = 0, sigma = 0;
|
||||
let circleCount = 40;
|
||||
while (Math.abs(lambda - lambdaP) > 1e-12 && --circleCount > 0) {
|
||||
let sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda);
|
||||
sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda) +
|
||||
(cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));
|
||||
if (sinSigma == 0) {
|
||||
return 0;
|
||||
}
|
||||
cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;
|
||||
sigma = Math.atan2(sinSigma, cosSigma);
|
||||
let alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma);
|
||||
cosSqAlpha = Math.cos(alpha) * Math.cos(alpha);
|
||||
cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;
|
||||
let C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));
|
||||
lambdaP = lambda;
|
||||
lambda = L + (1 - C) * f * Math.sin(alpha) *
|
||||
(sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
|
||||
}
|
||||
if (circleCount == 0) {
|
||||
return NaN;
|
||||
}
|
||||
let uSq = cosSqAlpha * (a * a - b * b) / (b * b);
|
||||
let A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
||||
let B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
||||
let deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) -
|
||||
B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
|
||||
|
||||
let result = b * A * (sigma - deltaSigma) / 1000;
|
||||
return result;
|
||||
}
|
||||
|
||||
function toRadians(angle) {
|
||||
let result = 0;
|
||||
if (angle != null) {
|
||||
result = angle * Math.PI / 180;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
lopa: 120,
|
||||
lapa: 30,
|
||||
lopb: 79,
|
||||
lapb: 44
|
||||
},
|
||||
computed: {
|
||||
distance: function() {
|
||||
return getDistance(this.lapa, this.lopa, this.lapb, this.lopb);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>Copyright © Ian Xia <script>document.write(date.getFullYear().toString());</script> All rights reserved</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
7
vincenty/index.html
Normal file
7
vincenty/index.html
Normal file
@ -0,0 +1,7 @@
|
||||
<script>
|
||||
if(navigator.language=="zh-CN"){
|
||||
window.location.href="./zh_CN.html";
|
||||
}else{
|
||||
window.location.href="./en_US.html";
|
||||
}
|
||||
</script>
|
234
vincenty/zh_CN.html
Normal file
234
vincenty/zh_CN.html
Normal file
@ -0,0 +1,234 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>椭球模型地球上点之间的距离</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="../zh_CN.html">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>椭球模型地球上点之间的距离</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div class="container">
|
||||
<div class="row" id="app">
|
||||
<div class="col-md-1"></div>
|
||||
<div class="col-md-5">
|
||||
<form class="form-horizontal" role="form">
|
||||
<div class="form-inline">
|
||||
<label><b>A点经度</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="180" min="-180" v-model="lopa" placeholder="A点经度">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>A点纬度</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="90" min="-90" v-model="lapa" placeholder="A点纬度">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>B点经度</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="180" min="-180" v-model="lopb" placeholder="B点经度">
|
||||
</div><br>
|
||||
<div class="form-inline">
|
||||
<label><b>B点纬度</b> </label>
|
||||
<input type="number" step="0.01" class="form-control" max="90" min="-90" v-model="lapb" placeholder="B点纬度">
|
||||
</div><br>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<h5>计算结果:</h5>
|
||||
<h5>距离:{{distance}} km</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
<hr>
|
||||
<h5>算法来源:<a href="http://www.movable-type.co.uk/scripts/latlong-vincenty.html">Vincenty solutions of geodesics on the ellipsoid</a></h5>
|
||||
<h5>语言翻译:Bigsk</h5>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<hr>
|
||||
<script>
|
||||
let a = 6378137;
|
||||
let b = 6356752.314245;
|
||||
let f = 1 / 298.257223563;
|
||||
|
||||
function getDistance(lat_one, lon_one, lat_two, lon_two) {
|
||||
let L = toRadians(lon_one - lon_two);
|
||||
let U1 = Math.atan((1 - f) * Math.tan(toRadians(lat_one)));
|
||||
let U2 = Math.atan((1 - f) * Math.tan(toRadians(lat_two)));
|
||||
let sinU1 = Math.sin(U1), cosU1 = Math.cos(U1),
|
||||
sinU2 = Math.sin(U2), cosU2 = Math.cos(U2);
|
||||
let lambda = L, lambdaP = Math.PI;
|
||||
let cosSqAlpha = 0, sinSigma = 0, cos2SigmaM = 0, cosSigma = 0, sigma = 0;
|
||||
let circleCount = 40;
|
||||
while (Math.abs(lambda - lambdaP) > 1e-12 && --circleCount > 0) {
|
||||
let sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda);
|
||||
sinSigma = Math.sqrt((cosU2 * sinLambda) * (cosU2 * sinLambda) +
|
||||
(cosU1 * sinU2 - sinU1 * cosU2 * cosLambda) * (cosU1 * sinU2 - sinU1 * cosU2 * cosLambda));
|
||||
if (sinSigma == 0) {
|
||||
return 0;
|
||||
}
|
||||
cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * cosLambda;
|
||||
sigma = Math.atan2(sinSigma, cosSigma);
|
||||
let alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma);
|
||||
cosSqAlpha = Math.cos(alpha) * Math.cos(alpha);
|
||||
cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSqAlpha;
|
||||
let C = f / 16 * cosSqAlpha * (4 + f * (4 - 3 * cosSqAlpha));
|
||||
lambdaP = lambda;
|
||||
lambda = L + (1 - C) * f * Math.sin(alpha) *
|
||||
(sigma + C * sinSigma * (cos2SigmaM + C * cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM)));
|
||||
}
|
||||
if (circleCount == 0) {
|
||||
return NaN;
|
||||
}
|
||||
let uSq = cosSqAlpha * (a * a - b * b) / (b * b);
|
||||
let A = 1 + uSq / 16384 * (4096 + uSq * (-768 + uSq * (320 - 175 * uSq)));
|
||||
let B = uSq / 1024 * (256 + uSq * (-128 + uSq * (74 - 47 * uSq)));
|
||||
let deltaSigma = B * sinSigma * (cos2SigmaM + B / 4 * (cosSigma * (-1 + 2 * cos2SigmaM * cos2SigmaM) -
|
||||
B / 6 * cos2SigmaM * (-3 + 4 * sinSigma * sinSigma) * (-3 + 4 * cos2SigmaM * cos2SigmaM)));
|
||||
|
||||
let result = b * A * (sigma - deltaSigma) / 1000;
|
||||
return result;
|
||||
}
|
||||
|
||||
function toRadians(angle) {
|
||||
let result = 0;
|
||||
if (angle != null) {
|
||||
result = angle * Math.PI / 180;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
lopa: 120,
|
||||
lapa: 30,
|
||||
lopb: 79,
|
||||
lapb: 44
|
||||
},
|
||||
computed: {
|
||||
distance: function() {
|
||||
return getDistance(this.lapa, this.lopa, this.lapb, this.lopb);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
175
zh_CN.html
Normal file
175
zh_CN.html
Normal file
@ -0,0 +1,175 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh_CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>IanTools</title>
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.ghink.net/assembly/bootstrap/4.6.1/css/bootstrap.min.css" rel="stylesheet">
|
||||
<!-- Favicon -->
|
||||
<link rel="icon" href="https://cdn.ghink.net/image/avatar/Bigsk.png" type="image/png">
|
||||
<script src="https://cdn.ghink.net/js/vue/2.6.14/vue.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/js/axios/1.1.3/axios.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
|
||||
<a class="navbar-brand" href="https://tools.ianxia.com"><b>Ian</b>Tools</a>
|
||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
语言
|
||||
</a>
|
||||
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
|
||||
<a class="dropdown-item" href="en_US.html"><b>English</b></a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://www.ianxia.com">首页</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://blog.ianxia.com">博客</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://demo.ianxia.com">DEMO</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="https://adsb.ianxia.com">ADS-B</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://tools.ianxia.com">小工具</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
<section>
|
||||
<div class="jumbotron text-center mt-2">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h1>小工具</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="container" id="app">
|
||||
<span v-html="body"></span>
|
||||
</div>
|
||||
<br>
|
||||
<hr>
|
||||
<script>
|
||||
let language = "zh_CN";
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
body: "<center><h1>加载中…</h1></center>"
|
||||
},
|
||||
mounted () {
|
||||
let me = this;
|
||||
axios
|
||||
.get('list.json')
|
||||
.then(function (response) {
|
||||
let body = '';
|
||||
for (let i=0;i<response.data.length;i+=3) {
|
||||
body += `<div class="row text-center">`;
|
||||
for (let j=0;i+j<response.data.length && j<3;j++) {
|
||||
body += `
|
||||
<div class="col-md-4 pb-1 pb-md-0">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">`+response.data[i+j].name[language]+`</h5>
|
||||
<p class="card-subtitle"><span class="badge badge-success">`+response.data[i+j].category[language]+`</span></p>
|
||||
<p class="card-text mr-auto">`+response.data[i+j].description[language]+`</p>
|
||||
<a href="`+response.data[i+j].path+`/`+language+`.html" class="btn btn-primary" target="_blank">前往</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
body += `</div><br>`;
|
||||
}
|
||||
me.body = body;
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
||||
let date = new Date();
|
||||
</script>
|
||||
<footer class="text-center">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<p style="color: #516069"><strong>版权所有 © Ian Xia <script>document.write(date.getFullYear().toString());</script> 保留所有权利</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
|
||||
<script src="https://cdn.ghink.net/js/jquery/jquery-3.6.0.min.js"></script>
|
||||
<!-- Grey Filter Detector -->
|
||||
<script>
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "https://open.geh.ink/gray_filter",
|
||||
dataType: "json",
|
||||
success: function(data, textStatus){
|
||||
for (let i=0;i<data["accurate_slot"].length;i++) {
|
||||
// Accurate Slot
|
||||
if (Date.now()/1000 >= data["accurate_slot"][i][0] && Date.now()/1000 <= data["accurate_slot"][i][1]) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (let i=0;i<data["day_slot"].length;i++) {
|
||||
// Day Slot
|
||||
let begin = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][0][0].toString() + "-" +
|
||||
data["day_slot"][i][0][1].toString() + " " +
|
||||
data["day_slot"][i][0][2].toString() + ":" +
|
||||
data["day_slot"][i][0][3].toString() + ":" +
|
||||
data["day_slot"][i][0][4].toString()
|
||||
)
|
||||
let end = new Date(
|
||||
date.getFullYear().toString() + "-" +
|
||||
data["day_slot"][i][1][0].toString() + "-" +
|
||||
data["day_slot"][i][1][1].toString() + " " +
|
||||
data["day_slot"][i][1][2].toString() + ":" +
|
||||
data["day_slot"][i][1][3].toString() + ":" +
|
||||
data["day_slot"][i][1][4].toString()
|
||||
)
|
||||
if (Date.now() >= begin.getTime() && Date.now() <= end.getTime()) {
|
||||
$("html").css({
|
||||
'-webkit-filter': 'grayscale(100%)',
|
||||
'-moz-filter': 'grayscale(100%)',
|
||||
'-ms-filter': 'grayscale(100%)',
|
||||
'-o-filter': 'grayscale(100%)',
|
||||
'filter': 'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
|
||||
'_filter': 'none'
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- Include all compiled plugins (below), or include individual files as needed -->
|
||||
<script src="https://cdn.ghink.net/js/popper/1.16.1/popper.min.js"></script>
|
||||
<script src="https://cdn.ghink.net/assembly/bootstrap/4.6.1/js/bootstrap.min.js"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user