This will be the next in my series of navigation vizzy programs. The previous version would just hop short distance. Now it is capable of going back home, or any target from space via a ballistic trajectory. The engine only fires at the start and end. No mid way corrections required.
I programmed a rocket to land on the launchpad directly from a ballistic reentry.
Tags
Announcement13 Comments
- Log in to leave a comment
-
-
-
-
22.7k Rizkyman
Your suicide burn is amazing, how you can fund the best tune for the PID?
-
43.4k goz
@GoldenShadowGS
Great explanation. I’d love to take a look at your control algorithms when you’re ready to post them. I’m really interested in this stuff. I had a very unsuccessful drone ship lander that attempted to do something like this. -
18.9k GoldenShadowGS
@Gozinya Drag would be a big factor for reentry if I were not in control. But I can change the rocket's angle of attack to steer. Even though there are no fins, the rocket body itself creates some lift forces. So heading and pitch angle will still have an effect in changing the trajectory in the atmosphere. I do a 0 degree pitch (flat horizontal) to go further, and pull up (vertical) to pump the brakes to slow down faster. There is also very slight amount of steering control by angling the rocket left and right. You can see near the end of the video how the rocket is changing attitudes to steer the prograde vector onto the pad. I am still improving that control algorithm.
-
43.4k goz
Fantastic. This is a really helpful description of your process. Is there no need to account for drag? If not, then why not? I would have thought drag would be a significant variable to deal with. It seems like you don’t have any control points prior to the final engine fire.
-
-
-
-
18.9k GoldenShadowGS
@Chtite451SR2 It will be part of my next navigation program release. But its not quite ready yet.
-
Explanation
Eccentricity Vector
The Eccentricity vector points from the focus of the orbit to the periapsis. In a suborbital flight, you can imagine most of the orbit as being underground. The periapsis will have a small radius, deep inside of the planet.
True Anomaly
Since the Eccentricity vector and a PCI positon vector share the same origin at the center of the planet, we can find the angle between them to obtain the true anomaly.
The angle between the eccentricity vector and our current position is the true anomaly.
The angle between the eccentricity vector and the target is the target anomaly.
Radius
We can calculate the radius at a specific position in a orbit just by knowing the basic Keplerian orbital elements such as the true anomaly, semi-latus rectum and eccentricity vector. Plug those into the trajectory equation to find the radius of the orbit from the center of the planet at a specific true anomaly.
Interception
This means we can plug in the target anomaly into the equation to calculate the radius at that position. Since the orbit is probably not intercepting the target position yet, the radius will likely be smaller than the radius of the planet.
Finding the intercept
What we want to do is make the orbit's radius at the target anomaly equal to the planet's radius. So what my program does is burn towards the target location until the radius of the orbit at the target anomaly is equal to the planet's radius. When the radius is below the planet's surface, it has to make the orbit bigger. If the radius is above the planet's surface, it has to make the orbit smaller. When it is right on ground level, the orbit will be intercepting the target.
Planet Rotation
But there is a problem we have not accounted for yet, planet rotation. Droo takes 50,400 seconds to do one rotation. So we just have to rotate the target's position vector around the planet's axis of rotation by the amount of time it will take us to get there. The number degrees to rotate the target position vector is calculated by finding time to impact multiplied by 360 divided by 50,400.
Time to Impact
The time to impact is calculated by finding the time between 2 positions of an orbit. Its very easy to calculate, but requires converting the true anomaly into a mean anomaly first. Convert the true anomaly and ground anomaly to the mean anomaly and subtract the first from the second.
Ground anomaly
The ground anomaly is derived by rearranging the trajectory equation to find the true anomaly given the radius, which will be set to the planet's radius. The ground anomaly is the angle where my current orbit will intersect the ground. It is only needed to calculate the time to impact.