A provocative, but true, title. We actually have all we need to properly lead, or "future", a moving target without necessarily knowing its speed.
Knowing a target's velocity is next to useless when used in an auto turret
Yes, you read that right, and you probably want an explanation. Simply put, using the target's velocity complicates the problem. If we were to use a target's velocity in an auto-turret's FT code, then we would need to ask the following questions:
- What direction is the target moving in?
- What is the target's velocity relative to? Our vehicle's turret, or the ground?
- How do we account for our vehicle's velocity?
- How do we account for our vehicle's orientation?
- How do we translate the results of our calculations into an angle lead?
These questions are incredibly difficult to answer. In fact, a method using TargetVelocity
would require us to solve a university-level rigid-body dynamics problem that would take hours to complete.
Therefore, knowing the target's velocity is next to useless if it were to actually be added into FT. Thankfully, there is another way.
Heading and elevation rates are the key to a leading auto-turret
If we were to do all of the proper calculations, our results would come in the form of a rate of change of heading and elevation. Let me repeat that:
The target's motion is best described by using rates of change of heading and elevation.
Thankfully, we have this information. We can use rate(TargetHeading)
and rate(TargetElevation)
to lead the target. This approach should account for reference frames, too! Now all we need is the speed of our bullets (which we can find through overload), and the distance to our target, TargetDistance
.
Therefore, you need the following information to properly lead or "future" your target:
rate(TargetHeading)
rate(TargetElevation)
TargetDistance
bulletSpeed
of your guns
General methodology
Here's an overview of how to use this information. We will use a step-by-step description here.
- Calculate the time it will take your bullet to reach the target. You can do so by using your bullet's speed and your target's distance.
- Use
rate(TargetElevation)
andrate(TargetHeading)
to get angular rates of the target, relative to your vehicle- Use the aforementioned angular rates and the time to calculate an angle offset for the turret
- Combine this angle offset with
TargetHeading
andTargetElevation
to properly lead the target
In my opinion, this is the best way to lead a target. I would do it myself, but I'm busy. I am certain that it is possible to lead your target properly by using this information. I am leaving you, the reader, to actually do it yourself. Feel free to ask me questions!
Note that I have not tried out the beta. I have heard some descriptions of the
TargetElevation
andTargetHeading
parameters that would require some extra steps to this basic method.here is an example (not by me), thought it was interesting
Ryan for the information
@Tristanmusic It should, but it requires some complicated geometry that I don’t have time to do at the moment. Sorry about that
@spefyjerbf yea but like, what direction the target is moving in...
@Tristanmusic It should output degrees by default then
@spefyjerbf rather degrees
@Tristanmusic It should be. Does the variable default to radians?
hey @spefyjerbf is it possible to output the targets heading direction to degrees?
@FuriousChicken Not sure yet. Feel free to make some recommendations!
When will your next build be @spefyjerbf ?
Edit: scratch that, found the announcement. Took a while.
There are going to be so many B-17's in the next few months... I just hope the Brit bombers get some love, especially the Lancaster and the Sunderland.
@Dad Depends on the sort of turn. Something sudden cannot be predicted.
Here’s a question: can you make the turret predict the location that an aircraft will be in if it’s turning?
Great
@NumbersNumbersTheMan Looks like they beat me to it. I can't look at the code, but I've heard that it works pretty well!