If you have any formula or a technique to find target heading angle according to north direction please let me know.
Tags
Question15 Comments
- Log in to leave a comment
-
1,176 YaMomzBox420
@plane918273645 I meant to add that it needs to be flattened, but I'm too busy with work and stuff to even notice stuff like that lol. Really I was just trying to give ideas. Besides, it's not that inaccurate. I have a ballistic missile launch code that uses the same idea for heading guidance
-
-
10.7k TritonAerospace
@plane918273645 cool thanks the pic shows poth PCI positions are Nav current position should i change one of them to target position?
-
18.1k plane918273645
@TritonAerospace its just a way of making a function that can be easily asked for, its a custom block. its has inputs and it will give an output value
-
10.7k TritonAerospace
@plane918273645 nice, thanks alot my friend btw now i know mostly every component about vizzy including Instruction blocks just not Expressions can you explain to me how they work?
-
18.1k plane918273645
@TritonAerospace https://cdn.discordapp.com/attachments/686341599277350916/775821950525636628/20201110143900_1.jpg heres an image of it
-
10.7k TritonAerospace
@plane918273645 how can I flatten PCI of target position to the horizon?
Edit: i mean the target crafts actual heading angle (where it is currently pointing) from North not the bearing from you the target. -
18.1k plane918273645
@YaMomzBox420 angle of position minus previous position is an hilariously inaccurate way to go about this, the target vector will get you the direction in PCI, but if you want bearing you will need to flatten to the horizon then use like a atan2 dot nav east and dot nav north.
-
-
9,400 RudimentaryCheezit
if the wait block is 0 seconds, then it will make the program wait until the next frame, saving resources
-
-
1,176 YaMomzBox420
@TritonAerospace variables. Use the [set variable() to ()] block to set previous position to current position. Then wait 1 second. Now the current position from 1 second ago is the previous position. Rinse, cycle, repeat. The timestep can be any amount you want, not just 1 second, but it illustrates the point easily. Something like .1 seconds is more accurate for any practical uses.
-
10.7k TritonAerospace
@YaMomzBox420 thanks what i am struggling with is how do i get the previous target position i always have current do i use a wait block?
-
1,176 YaMomzBox420
Not sure exactly what you mean there. In vizzy there's a block that gives target info like it's position and velocity vectors, and use that to find the direction the target is moving(current target position - previous target position will give you a vector along the path of the target's flight. Then use [(nav north) angle (target path vector)] to find the angle
@plane918273645 also, you could just project the vector onto North and East, then add those vectors to get a vector that's tangential to the ground and still pointing the right direction