-
Notifications
You must be signed in to change notification settings - Fork 0
Add files via upload #13
base: master
Are you sure you want to change the base?
Conversation
Code by Walter and Kashvi I estimated the values using Keith Lawndart data and general understanding of rocket physics but please give feedback/adjustments.
|
|
||
| // deriv_pressure[i] = (packet_memory[i].pressure - packet_memory[i - 1].pressure) * ((packet_memory[i].delta_time)/1000000); | ||
| deriv_altitude[i] = (packet_memory[i].altitude - packet_memory[i - 1].altitude) * (delta_time); | ||
| deriv_accz[i] = (packet_memory[i].accz - packet_memory[i - 1].accz) * (delta_time); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jerk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you elaborate more your utilization of jerk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I primarily used the keith lawndart data set and and looked at the changes in acceleration to see if there was any pattern. For example, at apogee, acceleration fluctuated slightly and stayed within the ranges of -9.7 to -9.8 (which is consistent with the physics I've learned to date). I used the change in acceleration because at certain points when the acceleration jumped or dropped, it showed a change in stage (ex: when the engine first fired there was a massive spike in acceleration).
Plus, it lets me be more flexible in my ranges. By having change in acceleration instead of just pure acceleration, the staging will still apply to a variety of launches.
I can still also use velocity because I did notice patterns in the velocity as well but I wanted your feedback on what was already laid down.
| { | ||
| case READY: | ||
| { | ||
| if(deriv_altitude[memory_index] > 1) //value isn't perfect. BUt 1 is significant enough to indicate the enigine fired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good but this could easily be set off by sensor drift. considering adding an acceleration check?
|
|
||
| int current_stage = READY; | ||
| for (int tick = packet_mem_size; tick < num_packets; tick++) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please indent properly makes it hard to see the scope of variables.
Code by Walter and Kashvi
I estimated the values using Keith Lawndart data and general understanding of rocket physics but please give feedback/adjustments.