robopup
Well-Known Member
- Joined
- Oct 7, 2021
- Messages
- 242
- Reaction score
- 558
Staging and Apogee Detection Logic:
I've been taking a closer look at both staging and apogee detection logic. I'm hoping to do a stacked test flight on small motors in a couple weeks so I want to have this nailed down (albeit with different absolute numbers on some of the constraints compared to the full up flight).
Here's my planned logic for the full flight. No surprises here, but to be complete the flight conditions I'm trying to handle are:
I haven't written a UI on the programming for my altimeter yet - I do it through command line atm so my equivalent of a programming snapshot is a text file. The input should be fairly self descriptive and I've also left comments and added units here, but please let me know if something is not clear. Here's my planned logic for:
//Second stage separation charge
*Event,Active=1,Channel=APOGEE,
Event=BURNOUT, //triggering event to begin testing constraints
DelayAfterEvent=1000(ms), //1 second to account for any tailoff in booster burn
DelayAfterConstraintsMet=0,
Constraints=
//Second stage ignition
*Event,Active=1,Channel=MAIN,
Event=BURNOUT, //triggering event to begin testing constraints
DelayAfterEvent=0,
DelayAfterConstraintsMet=0,
Constraints=
Recovery Altimeter (Primary - backup has 1 second time delays on all this logic)
//Both sets of apogee logic below are on same channel which functionally acts like an OR
//Apogee for nominal flight where second stage lights and rocket is high
*Event,Active=1,Channel=APOGEE,
Event=LIFTOFF, //triggering event to begin testing constraints
DelayAfterEvent=100000(ms), //100 seconds after liftoff. Rasaero sim to apogee is 97 seconds (with smooth paint).
DelayAfterConstraintsMet=0,
Constraints=None
//Apogee for flight where second stage did not light and rocket can still use baro+accelerometer based apogee
*Event,Active=1,Channel=APOGEE,
Event=APOGEE, //triggering event to begin testing constraints
DelayAfterEvent=0,
DelayAfterConstraintsMet=0,
Constraints=
I also still need to create Rasaero sims of all the non nominal situations (large tilt angle, second stage didn't light etc) so I can run the data through my firmware test setup with this programming logic.
I've been taking a closer look at both staging and apogee detection logic. I'm hoping to do a stacked test flight on small motors in a couple weeks so I want to have this nailed down (albeit with different absolute numbers on some of the constraints compared to the full up flight).
Here's my planned logic for the full flight. No surprises here, but to be complete the flight conditions I'm trying to handle are:
- Nominal two stage flight
- Flight where second stage doesn't light
- Something bad happens on first stage boost/coast (prohibit second stage from lighting)
I haven't written a UI on the programming for my altimeter yet - I do it through command line atm so my equivalent of a programming snapshot is a text file. The input should be fairly self descriptive and I've also left comments and added units here, but please let me know if something is not clear. Here's my planned logic for:
- second stage separation
- second stage ignition
- apogee (nominal flight)
- apogee (second stage didn't light)
//Second stage separation charge
*Event,Active=1,Channel=APOGEE,
Event=BURNOUT, //triggering event to begin testing constraints
DelayAfterEvent=1000(ms), //1 second to account for any tailoff in booster burn
DelayAfterConstraintsMet=0,
Constraints=
- THRUST_COUNTER>0 //make sure we've had a boost
//Second stage ignition
*Event,Active=1,Channel=MAIN,
Event=BURNOUT, //triggering event to begin testing constraints
DelayAfterEvent=0,
DelayAfterConstraintsMet=0,
Constraints=
- ALTITUDE>3000(m), //Something wrong if not above at least this altitude. Note staging is simmed to occur at ~6000 m.
- VELOCITY<272(m/s), //Less than mach=0.8. Still need to account for delay due to igniter/ignition via sims/static testing.
- VELOCITY>170(m/s), //Greater than mach=0.5. Something wrong if not at least this fast.
- THRUST_COUNTER>0, //Make sure we got booster motor burn
- TILT_ANGLE<20, //Current tilt angle less than 20 degrees
- MAX_TILT_ANGLE<35 //Max tilt angle over full flight from liftoff less than 35 degrees
Recovery Altimeter (Primary - backup has 1 second time delays on all this logic)
//Both sets of apogee logic below are on same channel which functionally acts like an OR
//Apogee for nominal flight where second stage lights and rocket is high
*Event,Active=1,Channel=APOGEE,
Event=LIFTOFF, //triggering event to begin testing constraints
DelayAfterEvent=100000(ms), //100 seconds after liftoff. Rasaero sim to apogee is 97 seconds (with smooth paint).
DelayAfterConstraintsMet=0,
Constraints=None
//Apogee for flight where second stage did not light and rocket can still use baro+accelerometer based apogee
*Event,Active=1,Channel=APOGEE,
Event=APOGEE, //triggering event to begin testing constraints
DelayAfterEvent=0,
DelayAfterConstraintsMet=0,
Constraints=
- ALTITUDE<15000(m) //make sure altitude is less than 15,000 m (50,000 ft). In theory, the apogee triggering event above should prevent any shenanigans I can think of, but I figure this can't hurt. EDIT: This one is still important, because of unreliable baro past 100k ft potentially causing false apogee detection. I knew there was some reason I wanted this...
I also still need to create Rasaero sims of all the non nominal situations (large tilt angle, second stage didn't light etc) so I can run the data through my firmware test setup with this programming logic.
Last edited: