Files
global-navigation-satellite…/src/render/components/CustomSatelliteSystem/CustomSatellite/SatelliteModifyPanel.vue

632 lines
27 KiB
Vue
Raw Normal View History

2025-12-31 15:17:05 +08:00
<template>
<div
v-if="show"
class="text-left p-10"
style="
color: #ffffff;
background-color: rgb(55 55 55 / 0.9);
border-radius: 2rem;
box-shadow: 0 0px 1rem 0px rgb(165 243 252 / 1);
position: fixed;
top: 10vh;
left: 20vw;
width: 60vw;
height: 80vh;
font-size: 1rem;
"
>
<div
@click="close"
class="bg-gray-600 hover:bg-red-600 text-3xl absolute top-0 right-0 cursor-pointer flex justify-center items-center"
style="
width: 2rem;
height: 2rem;
border-top-right-radius: 1rem;
border-bottom-left-radius: 1rem;
"
>
<el-icon style="width: 2rem; height: 2rem">
<CloseBold color="#ffffff" />
</el-icon>
</div>
<div class="w-full text-center" style="font-size: 2rem; height: 4rem; line-height: 4rem;">修改轨道数据</div>
2026-03-18 16:38:50 +08:00
<div class="text-white text-center flex flex-wrap justify-center items-center" style="height: 80%; font-size: 1rem;">
2025-12-31 15:17:05 +08:00
<div class="option">
<label :style="satelliteNameCheck ? '' : 'color: red;'">轨道名称:</label>
<input
type="text"
v-model="satelliteNameModify"
placeholder="请输入卫星名称"
class="dataInput"
:style="satelliteNameCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
</div>
<div class="option">
<label :style="nearPointLengthCheck ? '' : 'color: red;'">卫星近地点高度</label>
<label :style="nearPointLengthCheck ? 'color: #00efff;' : 'color: red;'">(单位:㎞)</label>
<label :style="nearPointLengthCheck ? '' : 'color: red;'">:</label>
<input
type="number"
maxlength="6"
v-model="nearPointLengthModify"
placeholder="请输入数据(单位:㎞)"
class="dataInput"
:style="nearPointLengthCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点高度就是卫星运行时,离地球最近的那个点,到地球表面的垂直距离。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星的运行轨道不是正圆形,而是有点 “扁” 的椭圆。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星绕着地球转时,会有一个离地球最近的位置,这个位置就是 “近地点”。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点高度,就是从这个最近的点,垂直往下量到地心的距离。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="farPointLengthCheck ? '' : 'color: red;'">卫星远地点高度</label>
<label :style="farPointLengthCheck ? 'color: #00efff;' : 'color: red;'">(单位:㎞)</label>
<label :style="farPointLengthCheck ? '' : 'color: red;'">:</label>
<input
type="number"
maxlength="6"
v-model="farPointLengthModify"
placeholder="请输入数据(单位:㎞)"
class="dataInput"
:style="farPointLengthCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
远地点高度就是卫星运行时,离地球最远的那个点,到地球表面的垂直距离。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星的运行轨道不是正圆形,而是有点 “扁” 的椭圆。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星绕着地球转时,会有一个离地球最远的位置,这个位置就是 “远地点”。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
远地点高度,就是从这个最远的点,垂直往下量到地心的距离。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="semiMajorAxisCheck ? '' : 'color: red;'">轨道半长轴</label>
<label :style="semiMajorAxisCheck ? 'color: #00efff;' : 'color: red;'">(介于200㎞~120000㎞之间)</label>
<label :style="semiMajorAxisCheck ? '' : 'color: red;'">:</label>
<label :style="semiMajorAxisCheck ? 'color: rgb(250, 230, 164);' : 'color: red;'">{{ semiMajorAxisModify === '' ? '' :Number(semiMajorAxisModify).toFixed(3) }}</label>
<label :style="semiMajorAxisCheck ? 'color: #00efff;' : 'color: red;'">(单位:㎞)</label>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星轨道为椭圆形,轨道半长轴就是 “长轴的一半长度”,也就是从椭圆(轨道)中心到椭圆最长端(远地点)的距离。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
它不是到地球表面的距离,而是从椭圆中心(不是地球球心)到轨道边缘的最长半径。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
简单说:椭圆轨道像个 “拉长的圆”,半长轴就相当于这个 “拉长圆” 的 “平均半径”—— 能反映轨道的整体大小。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道半长轴决定了轨道的大小,决定卫星离地球的平均距离,决定卫星飞得高还是低。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星飞得越高,速度越慢,周期越长,半径越大,轨道越大,卫星离地球越远。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
b为半短轴,半短轴 b 越接近半长轴 a;当偏心率=0(正圆轨道)时,b=a,此时半短轴就是圆的半径。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="eccentricityCheck ? '' : 'color: red;'">轨道偏心率</label>
<label style="color: #00efff;">(不超过0.9)</label>
<label :style="eccentricityCheck ? '' : 'color: red;'">:</label>
<label :style="eccentricityCheck ? 'color: rgb(250, 230, 164);' : 'color: red;'">{{ eccentricityModify === '' ? '' : Number(eccentricityModify).toFixed(6) }}</label>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道偏心率决定了轨道的形状,是用来描述天体轨道形状偏离圆形程度的一个数值。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道偏心率是椭圆两焦点之间的距离(焦距)与长轴的比值,也可以换算为半焦距与半长轴的比值,描述椭圆扁平程度。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
用 0 到 1 之间的数字表示,偏心率越接近 0,轨道越圆;偏心率越接近 1,轨道越扁(但不会等于 1,等于 1 就不是椭圆了)。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点和远地点距离差不多(轨道圆),偏心率就小。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点离地球很近、远地点离地球很远(轨道扁),偏心率就大。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
用于描述轨道的形状,表征轨道椭圆的扁平程度。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
假设轨道半长轴为b,轨道焦点到轨道中心距离为a,轨道离心率为e,则:e = a ÷ b。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label>轨道周期</label>
<label style="color: #00efff;">(秒)</label>
<label>:</label>
<label style="color: rgb(250, 230, 164);">{{ orbitalPeriodModify === '' ? '' : Number(orbitalPeriodModify).toFixed(3) }}</label>
<label style="color: #00efff;">(单位:s)</label>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道周期就是卫星绕中心天体(比如地球)完整转一圈的时间。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
简单说,轨道周期就是从卫星某个位置(比如近地点)出发,绕轨道飞一圈后,再回到这个位置的总时间。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
万有引力常数 G = 6.67430 × 10^⁻¹¹ 米³ / (千克 × 秒²),地球质量 M = 5.965 × 10²⁴ 千克。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
人造地球卫星运转周期T(秒)与圆轨道半径或椭圆轨道半长轴R(米)之间的关系可用下列公式计算:T = 2π × (R³ ÷ GM)½ 。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label>平均角速度</label>
<label style="color: #00efff;">(度/秒)</label>
<label>:</label>
<label style="color: rgb(250, 230, 164);">{{ angularVelocityDegModify === '' ? '' : Number(angularVelocityDegModify).toFixed(6) }}</label>
<label style="color: #00efff;">(单位:°/s)</label>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
平均角速度就是卫星绕中心天体转的时候,单位时间内转过的角度,简单说就是 “转得快不快” 的 “角度版” 描述。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
周期越短(转一圈时间少),角速度越大(转得快)。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
通俗理解:比如卫星 1 小时转了 45°,它的平均角速度就是 45°/ 小时;转得越快,单位时间内转过的角度越大,角速度就越大。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星飞得越高,速度越慢,卫星飞得越低,速度越快,平均角速度是卫星在轨道上的平均运行速度。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="inclinationCheck ? '' : 'color: red;'">轨道倾角</label>
<label :style="inclinationCheck ? 'color: #00efff;' : 'color: red;'">(0°~180°)</label>
<label :style="inclinationCheck ? '' : 'color: red;'">:</label>
<input
type="number"
maxlength="3"
v-model="inclinationModify"
placeholder="请输入数据(0°~180°)"
class="dataInput"
:style="inclinationCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道倾角就是轨道相对于地球赤道的倾斜程度,是卫星绕地球转的轨道平面,和地球赤道平面之间的 “夹角”,用 0° 到 180° 的数字表示,核心是描述轨道 “歪不歪”,“往哪个方向歪”。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
地球赤道平面:想象过地球赤道画一个无限大的 “隐形圆盘”,这就是赤道平面。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
卫星轨道平面:卫星绕地球转的轨迹所在的 “隐形圆盘”,就是轨道平面。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道倾角,就是这两个 “隐形圆盘” 之间夹着的角度,就像两本书打开时书页之间的夹角一样。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
也可以类比滑滑梯的角度,把地面比作赤道,卫星轨道是倾斜的滑梯,倾角就是地面和滑梯的夹角。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="ascendantRightAscensionCheck ? '' : 'color: red;'">升交点赤经</label>
<label :style="ascendantRightAscensionCheck ? 'color: #00efff;' : 'color: red;'">(0°~360°)</label>
<label :style="ascendantRightAscensionCheck ? '' : 'color: red;'">:</label>
<input
type="number"
maxlength="3"
v-model="ascendantRightAscensionModify"
placeholder="请输入数据(0°~360°)"
class="dataInput"
:style="ascendantRightAscensionCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道在空间中的方向,轨道平面在太空中的旋转角度,轨道在赤道上的起点,共同确定了轨道平面和赤道平面交点的位置,相当于给倾斜的轨道找一个基准起点。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
升交点赤经就是给卫星轨道在宇宙中 “定方向” 的参数,核心是描述轨道与地球赤道交点的 “东向位置”。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
升交点:卫星从地球南半球飞到北半球时,会穿过赤道平面,这个穿过的点就是升交点。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
春分点:太阳从地球的南半球向北半球运动穿过地球赤道平面的那个点,可以理解为太阳的升交点,每年春分(3月21日左右)的时候,太阳经过该点。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
赤经:与经度定义类似,但其参考点为春分点,且不随地球转自转运动。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
升交点赤经描述的是一个角度,这个角度就是“春分点到地心连线”与“升交点到地心连线”的夹角,表征了轨道平面相对春分点的方位。结合上一节的轨道倾角,就完全确定了轨道平面在三维空间中的方位。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<label :style="argumentOfPeriapsisCheck ? '' : 'color: red;'">近地点角距</label>
<label :style="argumentOfPeriapsisCheck ? 'color: #00efff;' : 'color: red;'">(0°~360°)</label>
<label :style="argumentOfPeriapsisCheck ? '' : 'color: red;'">:</label>
<input
type="number"
maxlength="3"
v-model="argumentOfPeriapsisModify"
placeholder="请输入数据(0°~360°)"
class="dataInput"
:style="argumentOfPeriapsisCheck ? 'border: 2px solid black; color: black;' : 'border: 2px solid red; color: red;'"
/>
<el-tooltip
class="box-item"
effect="dark"
content="
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点角距(近地点幅角)就是从升交点开始,沿着卫星轨道往飞行方向量,到近地点的角度,核心是给近地点 “定具体位置”。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
近地点角距(近地点幅角),就是以地球球心为中心,在卫星轨道平面上,从升交点出发,顺着卫星飞行的方向,画一条线到近地点,这条线和 “升交点到地心连线” 之间的夹角(范围 0°-360°)。
</div>
<div style='font-size: 1rem; color: rgb(165 243 252 / 1); line-height: 1.5rem;'>
轨道在平面内的朝向,轨道椭圆在轨道平面内的旋转角度,就像钟表指针指向的方向,确定近地点在轨道上的位置,近地点相对于升交点的位置,近地点角距(近地点幅角)决定了卫星离地球最近时,指向哪个方向。
</div>
"
raw-content
placement="top"
>
<el-icon style="margin-left: 0.5rem;"><QuestionFilled /></el-icon>
</el-tooltip>
</div>
<div class="option">
<input
type="button"
class="buttonClass"
id="fly-btn"
@click="modifySatellite"
value="修改数据"
/>
</div>
</div>
</div>
</template>
<script setup>
import { ref, watch } from "vue";
import { CloseBold, QuestionFilled } from "@element-plus/icons-vue";
const props = defineProps({
satelliteArr: Array,
satelliteId: Number,
});
const emit = defineEmits([
"closeSatelliteModifyPanel",
"selectSatelliteModel",
"modifySatellite"
]);
// 地球赤道半径 6378137 米
const equatorRadius = 6378.137;
const show = ref(false);
const satelliteNameModify = ref();
const nearPointLengthModify = ref();
const farPointLengthModify = ref();
const semiMajorAxisModify = ref();
const eccentricityModify = ref();
const orbitalPeriodModify = ref();
const angularVelocityRadModify = ref();
const angularVelocityDegModify = ref();
const inclinationModify = ref();
const ascendantRightAscensionModify = ref();
const argumentOfPeriapsisModify = ref();
const satelliteNameCheck = ref(true);
const nearPointLengthCheck = ref(true);
const farPointLengthCheck = ref(true);
const semiMajorAxisCheck = ref(true);
const eccentricityCheck = ref(true);
const inclinationCheck = ref(true);
const ascendantRightAscensionCheck = ref(true);
const argumentOfPeriapsisCheck = ref(true);
const data = {
satelliteNameModify,
nearPointLengthModify,
farPointLengthModify,
semiMajorAxisModify,
eccentricityModify,
orbitalPeriodModify,
angularVelocityRadModify,
angularVelocityDegModify,
inclinationModify,
ascendantRightAscensionModify,
argumentOfPeriapsisModify,
};
const close = () => {
show.value = false;
emit("closeSatelliteModifyPanel");
};
const booleanCheck = (checkArr) => {
let check = true;
checkArr.forEach((item) => {
if (item == false) {
check = false;
}
});
return check;
};
const satelliteNameModifyCheck = () => {
if (satelliteNameModify.value === "" || satelliteNameModify.value === undefined) {
satelliteNameCheck.value = false;
} else {
satelliteNameCheck.value = true;
}
props.satelliteArr.forEach((entity, index) => {
for (const element in entity) {
if (entity[element].name !== undefined) {
let name = entity[element].name;
if (satelliteNameModify.value == name && index !== props.satelliteId - 1) {
satelliteNameCheck.value = false;
}
}
}
});
};
const nearPointLengthModifyCheck = () => {
if (nearPointLengthModify.value === "" || nearPointLengthModify.value === undefined || nearPointLengthModify.value < 200 || nearPointLengthModify.value > 120000) {
nearPointLengthCheck.value = false;
} else {
nearPointLengthCheck.value = true;
}
2026-03-18 16:38:50 +08:00
if (nearPointLengthCheck.value == 1 && farPointLengthModify.value !== "" && farPointLengthModify.value !== undefined && nearPointLengthModify.value > farPointLengthModify.value) {
2025-12-31 15:17:05 +08:00
nearPointLengthCheck.value = false;
farPointLengthCheck.value = false;
2026-03-18 16:38:50 +08:00
} else {
farPointLengthCheck.value = true;
2025-12-31 15:17:05 +08:00
}
};
const farPointLengthModifyCheck = () => {
if (farPointLengthModify.value === "" || farPointLengthModify.value === undefined || farPointLengthModify.value < 200 || farPointLengthModify.value > 120000) {
farPointLengthCheck.value = false;
} else {
farPointLengthCheck.value = true;
}
2026-03-18 16:38:50 +08:00
if (farPointLengthCheck.value == 1 && nearPointLengthModify.value !== "" && nearPointLengthModify.value !== undefined && nearPointLengthModify.value > farPointLengthModify.value) {
2025-12-31 15:17:05 +08:00
nearPointLengthCheck.value = false;
farPointLengthCheck.value = false;
2026-03-18 16:38:50 +08:00
} else {
nearPointLengthCheck.value = true;
2025-12-31 15:17:05 +08:00
}
};
const semiMajorAxisModifyCheck = () => {
if (semiMajorAxisModify.value === '' || semiMajorAxisModify.value === undefined || semiMajorAxisModify.value < 200 || semiMajorAxisModify.value > 120000) {
semiMajorAxisCheck.value = false;
} else {
semiMajorAxisCheck.value = true;
}
};
const eccentricityModifyCheck = () => {
if (eccentricityModify.value === "" || eccentricityModify.value === undefined || eccentricityModify.value < 0 || eccentricityModify.value > 0.9) {
eccentricityCheck.value = false;
} else {
eccentricityCheck.value = true;
}
};
const inclinationModifyCheck = () => {
if (inclinationModify.value === "" || inclinationModify.value === undefined || inclinationModify.value < 0 || inclinationModify.value > 180) {
inclinationCheck.value = false;
} else {
inclinationCheck.value = true;
}
};
const ascendantRightAscensionModifyCheck = () => {
if (ascendantRightAscensionModify.value === "" || ascendantRightAscensionModify.value === undefined || ascendantRightAscensionModify.value < 0 || ascendantRightAscensionModify.value > 360) {
ascendantRightAscensionCheck.value = false;
} else {
ascendantRightAscensionCheck.value = true;
}
};
const argumentOfPeriapsisModifyCheck = () => {
if (argumentOfPeriapsisModify.value === "" || argumentOfPeriapsisModify.value === undefined || argumentOfPeriapsisModify.value < 0 || argumentOfPeriapsisModify.value > 360) {
argumentOfPeriapsisCheck.value = false;
} else {
argumentOfPeriapsisCheck.value = true;
}
};
watch(satelliteNameModify, (value) => {
satelliteNameModifyCheck();
});
watch(nearPointLengthModify, (value) => {
nearPointLengthModifyCheck();
});
watch(farPointLengthModify, (value) => {
farPointLengthModifyCheck();
});
watch(semiMajorAxisModify, (value) => {
semiMajorAxisModifyCheck();
});
watch(eccentricityModify, (value) => {
eccentricityModifyCheck();
});
watch(inclinationModify, (value) => {
inclinationModifyCheck();
});
watch(ascendantRightAscensionModify, (value) => {
ascendantRightAscensionModifyCheck();
});
watch(argumentOfPeriapsisModify, (value) => {
argumentOfPeriapsisModifyCheck();
});
const generateCheck = () => {
let checkArr = [];
satelliteNameModifyCheck();
checkArr.push(satelliteNameCheck.value);
nearPointLengthModifyCheck();
farPointLengthModifyCheck();
checkArr.push(nearPointLengthCheck.value);
checkArr.push(farPointLengthCheck.value);
if (nearPointLengthModify.value != "" && nearPointLengthModify.value != undefined && farPointLengthModify.value != "" && farPointLengthModify.value != undefined) {
semiMajorAxisModify.value = (nearPointLengthModify.value + equatorRadius + (farPointLengthModify.value + equatorRadius)) / 2;
eccentricityModify.value = (semiMajorAxisModify.value - (nearPointLengthModify.value + equatorRadius)) / semiMajorAxisModify.value;
orbitalPeriodModify.value = ((semiMajorAxisModify.value * 1000) / 21613.546) ** 1.5;
angularVelocityRadModify.value = (2 * Math.PI) / orbitalPeriodModify.value;
angularVelocityDegModify.value = angularVelocityRadModify.value * (180 / Math.PI);
}
semiMajorAxisModifyCheck();
checkArr.push(semiMajorAxisCheck.value);
eccentricityModifyCheck();
checkArr.push(eccentricityCheck.value);
inclinationModifyCheck();
checkArr.push(inclinationCheck.value);
ascendantRightAscensionModifyCheck();
checkArr.push(ascendantRightAscensionCheck.value);
argumentOfPeriapsisModifyCheck();
checkArr.push(argumentOfPeriapsisCheck.value);
return booleanCheck(checkArr);
};
const modifySatellite = () => {
if (generateCheck()) {
emit("modifySatellite");
}
};
defineExpose({ show, data });
</script>
<style scoped>
.option {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
.dataInput {
padding-left: 0.5rem;
padding-right: 0.5rem;
height: 2rem;
background: #ffffff;
border-radius: 1rem;
}
.buttonClass {
padding-left: 0.5rem;
padding-right: 0.5rem;
font-size: 1rem;
width: 12rem;
height: 2rem;
line-height: 2rem;
color: #000000;
background-color: rgb(165 243 252 / 1);
overflow: hidden;
cursor: pointer;
box-shadow: 0 0px 1rem 0px rgb(165 243 252 / 1);
border-radius: 2rem;
}
</style>