If you have any formula or a technique to find target heading angle according to north direction please let me know.

Tags
Question

15 Comments

  • Log in to leave a comment
  • Profile image
    1,159 YaMomzBox420

    @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

    2.0 years ago
  • Profile image
    1,159 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

    2.0 years ago
  • Profile image

    @TritonAerospace change them both to target position

    +3 2.0 years ago
  • Profile image

    @plane918273645 cool thanks the pic shows poth PCI positions are Nav current position should i change one of them to target position?

    2.0 years ago
  • Profile image

    @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

    2.0 years ago
  • Profile image

    @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?

    2.0 years ago
  • Profile image

    @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.

    2.0 years ago
  • Profile image

    @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.

    2.0 years ago
  • Profile image

    @SamTheFox nice

    2.0 years ago
  • Profile image

    if the wait block is 0 seconds, then it will make the program wait until the next frame, saving resources

    +1 2.0 years ago
  • Profile image

    @YaMomzBox420 cool thanks alot

    2.0 years ago
  • Profile image
    1,159 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.

    +1 2.0 years ago
  • Profile image

    @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?

    2.0 years ago
  • Profile image
    1,159 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

    2.0 years ago

No Upvotes

Log in in to upvote this post.