Revert "awa"

This reverts commit f9aa5552
This commit is contained in:
沈瑗杰 2021-02-20 00:34:54 +08:00
parent f9aa5552d3
commit 9cee725e43
2 changed files with 12 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -1,7 +1,5 @@
from decimal import Decimal as De from decimal import Decimal as De
a = False
if a:
tick_time, velocity, height = De('0'), De('0'), De('0') tick_time, velocity, height = De('0'), De('0'), De('0')
m = De('4610025') m = De('4610025')
gravity = De('9.798') gravity = De('9.798')
@ -9,26 +7,18 @@ if a:
n = De('0.5943466') n = De('0.5943466')
H = De('70000') H = De('70000')
F = De('208201000') F = De('208201000')
else:
tick_time, velocity, height = 0, 0, 0
m = 4610025
gravity = 9.798
R = 637100
n = 0.5943466
H = 70000
F = 208201000
TPS = 20 TPS = 20
MSPT = 1 / TPS MSPT = 1 / TPS
while True: # 主tick循环 while True: # 主tick循环
# 基础加速度运算 # 基础加速度运算
add_speed = (F / m) - ((gravity * (R ** 2)) / ((R + height) ** 2)) add_speed = (F / m) - ((gravity * (R ** 2)) / ((R * tick_time * height) ** 2))
# 出大气层判定 # 出大气层判定
if height < 70000: # 没出大气 加速度需要减去大气阻力 if height < 70000: # 没出大气 加速度需要减去大气阻力
add_speed -= (n * (velocity ** 2) * (10 * (-6 * height) / H)) / m add_speed -= (n * (velocity ** 2) * (10 * (-6 * height) / H)) / m
height += (MSPT * velocity) # 高度 加 速度除以TPStick per second每tick加速 height += MSPT * velocity # 高度 加 速度除以TPStick per second每tick加速
velocity += (add_speed * MSPT) # 速度 加 加速度除以TPS velocity += MSPT * add_speed # 速度 加 加速度除以TPS
if tick_time < 192: # 一些我也不知道是什么意思的tick判定 if tick_time < 192: # 一些我也不知道是什么意思的tick判定
m -= (F * MSPT) / 3399.2 # 3399.2是个啥? m -= (MSPT * F) / 3399.2 # 3399.2是个啥?
elif tick_time < 240: elif tick_time < 240:
m -= 129 * MSPT # ??? 129? m -= 129 * MSPT # ??? 129?
else: else:
@ -56,4 +46,4 @@ while True: # 主tick循环
tick_time += ((12308300 - height) / velocity) tick_time += ((12308300 - height) / velocity)
break break
print('t: %s' % tick_time) print('t: ' + tick_time)