I am try to return the angle between my craft and my target (i.e droo base) while flying at altitudes of anywhere between 0 and 20000 m . Any ideas?

Tags
Question

14 Comments

  • Log in to leave a comment
  • Profile image
    1,467 RikHar

    @AverageJoe Thanks for all your help. It is much appreciated. I have been tinkering with some variables tied to pitch and throttle. Some minor positive adjustments. I'm pretty sure I'm am on to something here. If I figure it out i will send you a link to the craft the program is being written for with the adjusted program. The craft is pretty cool. I cant take credit for the craft. My brother built it and sent me a beta version. He doesnt do the "online thing". lol. Thanks again for your help.

    +1 2.5 years ago
  • Profile image

    @RikHar, I think you've got it. I was wrong about a few comments ago. You're already constrained by the right angle and the asl. Asl is going to be a continuouly moving constraint, so maybe stick on what you have and maybe adjust some other variables with the craft to get it closer to where you need it. Forward looking radar and calculation from the ground will turn out the same too so I'd check some other things. Sorry, mind has been on my latest I just finished. It was supposed to be simple 🙄 😂

    2.5 years ago
  • Profile image

    @RikHar 🙈 I've been looking at rockets and the universe and you're talking about something in the atmosphere. In that case I may have come across the correct thing and past it all the things I tried. Gave me a headche because I ace Geo and trig, and I went through all I could think of 😂

    2.5 years ago
  • Profile image

    I can get the angle off the nose but for some reason my roll axis is 32 degrees off. Don't know how but two different ways it's definitely 32 degrees off. One of the frustrating things about Vizzy. It should work but doesn't. Do it another way and it does. Like for example floor function and modulus. Do floor more than 2 times in a row it makes none stop garbage. Do modulus 100 times in a row and carry the remaining through with a temp variable works fine. Same thing but one works the other doesn't and there is no explainable reason why. I'm not done poking yet though I'll figure it out.

    2.5 years ago
  • Profile image

    @RikHar, that's pretty solid, and I think I know where the inaccuracy is....

    Triangles are flat/straight, astronomical bodies and orbits are not. To be dead on, and not change what you have, just disregard the first one that becomes true and wait for the second one. I can picture the geometry from my head but can't really explain it, it involves radius and constraints 🙈. Kinda like moving to (1,0,0) to (0,1,0) on a graph but pass through (0,0,0) first, But to simplify, literally ignore the first time the angle matches. You stay on prograde and keep going forward in orbit, that same angle should reappear again, very soon after it first appears. Locking prograde the craft will keep pitching forward to match orbit, so it will be on the opposite side of the graph (0,1,0) position but the angle should be there again.
    Visually, the target angle will be greater, hit the angle, then less, then start to grow, hit the angle you want again, then rush up really high and fast as you fly by the target.
    I was thinking the other way around for the new idea. Create a cone in front of the craft and when the target comes into the cone, then it's time. Relies on the altitude being assumed correct, but is not critical, as the radians will always be the same no matter the distance. Then if you have a flat spot on the planet it won't matter about altitude since the orbit us set from about asl.

    2.5 years ago
  • Profile image
    1,467 RikHar

    @AverageJoe I may be on to something here. .....not as accurate as i like but maybe a start. this programs has a little more to it than needed as it does other things on the original craft it is on. but this one is supposed to (when the calculated angle is reached) lock on retro, slow down to a 200 m hover and wait until you want to land. It is very early in the brain scratching vizzy, but does sorta work. let me know if it helps.

    https://www.simplerockets.com/c/2uo248/Angletest

    2.5 years ago
  • Profile image

    @RikHar if you haven't had success yet, I think I may know how to solve this. Let me make sure I can access the right information about it first, because I'm at a point I have to start involving targets myself so I'm thinking on it 😂

    More I think on it, the more I'm certain I kind of need the same solution you're after, so one way or another, one of us will figure it out 🐒

    2.5 years ago
  • Profile image
    1,467 RikHar

    @AverageJoe thanks. I will try some of these suggestions. I will let you know how or if it works out. Thanks for the response.

    +1 2.5 years ago
  • Profile image

    Got the variable thing didn't see the button 🤦🏼‍♂️ but another idea I have but not too sure how exactly to put it together but it would involve using planet information with solar position and your own craft position relative to the planet, but I don't see any way to target the base specifically that way. One other thought is if the base had a specific part ID you can use maybe plug that into the craft (0) position and replace the (0) with the ID of the base or of a base part? But if that would work then you could also replace that (0) with a nav (target) piece and that may be all you need? That's about all I've got idea wise for now, definitely like to see this solved 😂

    2.5 years ago
  • Profile image

    Like forward facing radar?

    One idea and, it's very possible you've tried it, "craft information>nav(target position)" - "craft information>nav(craft pitch axis)" then convert PCI vector to local with "craft information>(part(0)(PCI to local)" of that (part 0 replace with part id of the part id of the command pod) and have an x y & z of it? It would all be one block of Vizzy, take target position and craft pitch in 0-0 block, get a part of "partName" and change that to command pod or whatever the command pod is called, then get the part 0 PCI to local (0,0,0) bit. Drop the math block into the (0,0,0) and the part ID of bit drop on the part 0, and then put that into the rest of the calculation you have to use that information. I'm interested in this if it works for you because I have a need for a similar use solution I'm planning for a future project... Trying to figure out this custom variables thing myself

    2.5 years ago
  • Profile image
    1,467 RikHar

    @NotAGopnik all good. Trying some trigonometry equations. with signs of some success. If I figure it out I'll let you know.

    2.6 years ago
  • Profile image
    1,467 RikHar

    @NotAGopnik thank you. much appreciated.

    2.6 years ago
  • Profile image
    1,467 RikHar

    @plane918273645 Angle from my craft down to the target.

    2.6 years ago
  • Profile image

    Like bearing angle? Or angle from flight direction

    2.6 years ago

No Upvotes

Log in in to upvote this post.