complete rocket flight controller code

The Rocketry Forum

Help Support The Rocketry Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Johann

Member
Joined
Feb 24, 2024
Messages
12
Reaction score
3
Location
germany
Hello, I've written a rocket flight controller code in the Arduino IDE and would appreciate suggestions to improve it and make it more realistic.


 
Last edited:
sure, but it's about 1100 line of code and it's too long to be in the post directly. if u have any other better way please suggest
 
I haven't looked at the code to see what kinds of things you're doing with it, but you should be aware that under U.S. law, making a rocket that can control itself to arrive at a particular location is extremely illegal. If that is within the scope of your code, it might affect the number of people here interested in being involved with your project.
 
No, the rocket cannot autonomously navigate to a specific location; it merely controls the actuators to maintain stability during the launch state.
 
There are a couple of corner cases you should test for….in particular, if your rocket transitions beyond Mach, there is a short pressure decrease. Depending on your apogee detection algorithm, you might prematurely trigger for apogee (at Mach!!) unless you account for this.

How sensitive is your algorithm to flutter in pressure (eg if bent holes are incorrect size).

Lots of things work well in the lab, but data is ugly for real field conditions.
 
There are a couple of corner cases you should test for….in particular, if your rocket transitions beyond Mach, there is a short pressure decrease. Depending on your apogee detection algorithm, you might prematurely trigger for apogee (at Mach!!) unless you account for this.

How sensitive is your algorithm to flutter in pressure (eg if bent holes are incorrect size).

Lots of things work well in the lab, but data is ugly for real field conditions.
There is a NACA paper on pressure sensor placement to mitigate Mach shockwave fluctuations. The rule they used was, placement of sensors at a 3 caliber distance behind any transitional or protrusion into the air stream flow. In the 25 years I've used the rule, I added an additional variation for my e-bays of an additional vent at 180° with 1- 1.5 caliber difference between the two vents. I also use larger vent holes to match the expected pressure change profile.
 
There is a NACA paper on pressure sensor placement to mitigate Mach shockwave fluctuations. The rule they used was, placement of sensors at a 3 caliber distance behind any transitional or protrusion into the air stream flow. In the 25 years I've used the rule, I added an additional variation for my e-bays of an additional vent at 180° with 1- 1.5 caliber difference between the two vents. I also use larger vent holes to match the expected pressure change profile.

Do you happen to know the number or have a link to that paper? I've searched and come up with a lot of interesting stuff, but not that.
 
Do you happen to know the number or have a link to that paper? I've searched and come up with a lot of interesting stuff, but not that.
I had a copy of the NACA paper, but I have not seen it since moving to Texas. I did locate a short NASA Tech Briefs article that also mentions placement of microphone openings 3 to 4 cylinder diameters downstream of a nosecone in subsonic vehicles for reduced noise. It does mention an alternative supersonic design in NASA ARC-12001, but no test data at Mach 1 is presented. I also have no supersonic data to validate the 3 caliber rule. I plan to correct that issue this summer.

During the 25 years I've flown barometric sensors, my data is extremely smooth. At subsonic velocities the 3 caliber rule appears to be valid. In CFD Mach 1+ simulations the pressure fluctuations at 3 calibers behind the nosecone appear to be stable.
 

Attachments

  • fddd0023-1639-4436-baa9-6d442ad529d5-0000.png
    fddd0023-1639-4436-baa9-6d442ad529d5-0000.png
    10 MB · Views: 0
  • fddd0023-1639-4436-baa9-6d442ad529d5-0001.png
    fddd0023-1639-4436-baa9-6d442ad529d5-0001.png
    8.9 MB · Views: 0
Back
Top