Jump to content
Korean Random
Sign in to follow this  
ahwa

Self-propelled artillery fired shells arrival time calculating position

Recommended Posts

Time to figure out, why should offset

            DistPos = BigWorld.player().getOwnVehiclePosition() - TargetPosition
            Term1 = math.pow(ShotSpeed, 4) - (ShotGravity * ((ShotGravity * DistPos[2] * DistPos[2]) + (2 * Dist * ShotSpeed * ShotSpeed)))
            if Term1 >= 0.0:
                Term2 = math.sqrt(Term1)
                Divisor = ShotGravity * DistPos[2]
                AimAngle1 = math.atan2(ShotSpeed * ShotSpeed + Term2, Divisor)
                AimAngle2 = math.atan2(ShotSpeed * ShotSpeed - Term2, Divisor)
                if AimAngle1 > AimAngle2:
                    AimAngle1 = AimAngle2
            else:
                AimAngle1 = 0.7853981633974483
            Angle = AimAngle1 / (math.pi * math.degrees(math.pi))
            ShotTime = Dist / (ShotSpeed * math.cos(Angle))

Inaccurate after firing shells

 

  • Upvote 1
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

DistPos[2] * DistPos[2]

DistPos[2]**2

ShotSpeed * ShotSpeed

ShotSpeed**2

math.degrees(math.pi)

180

Angle = AimAngle1 / (math.pi * math.degrees(math.pi))

Angle = AimAngle1? Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites


Fix your above it

我看不懂你要对我表达的意思

是要叫我修正吗?

 

DistPos[2]**2 不就等于是这个了吗 DistPos[2] * DistPos[2]

math.degrees(math.pi) 不就等于180吗

真是来乱的

Edited by ahwa

Share this post


Link to post

Short link
Share on other sites

Fix your above it

I do not understand you I want to express the meaning of

That I should amend it?

 

DistPos[2] ** 2 is not tantamount this yet DistPos[2] * DistPos[2]

math.degrees (math.pi) it does not mean that 180

Really come to chaos

 

DistPos[2] * DistPos[2] == DistPos[2] ** 2

math.degrees(math.pi) == 180

>>> import math
>>> a=12
>>> a*a == a**2
True
>>> math.degrees(math.pi) == 180
True

我不明白你

 

AimAngle1 measured in radians.

One radian = 180/math.pi

>>> AimAngle1 = 0.7853981633974483
>>> Angle = AimAngle1*180/(math.pi)
>>> Angle
45.0
Edited by ShadowHunterRUS

Share this post


Link to post

Short link
Share on other sites

http://4cheat.ru/showthread.php?p=340232#post340232 for StranikS

 

 

AimAngle1 measured in radians.

One radian = 180/math.pi

 

这是应为有些自走炮射击里程不够远所以已最大45度角丢给它

 

adri1的作品Прогнозирование движение противника 它是我们国人

它所做的里面也适用抛物线弹丸到达时间计算的


i am noob

You can ask my network teacher for KACTET

  • Upvote 1
  • Downvote 1

Share this post


Link to post

Short link
Share on other sites

You can ask my network teacher for KACTET

не того ты в учителя взял :) //если я правильно понял последнюю строку

Edited by Kastiil

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...