SIM001 › Beyond the cockpit › Flying by plan
Letting a plan run out › Let a plan run out passed
As an operator of a plane in AGENT mode, I want the plane to stay safe when the plans stop, so that a lost link does not send the plane away.
The test behind the tutorial Letting a plan run out: every step it takes, what it checks and what it saw.
Start
From the setup of Flying by plan.
Everything it starts with
Given the flight mode of the plane is AGENT And the reply to the plan is none And the time to live of the plan is 0 s And the reported plan is 0 And the reported primitive is none
- Every arranged state read back as arranged (5)
1 When the ground sends a short go-to plan
When the ground sends a short go-to plan Then the reply to the plan is accepted
Expected behaviour: AGENT mode takes a short plan.
- the reply to the plan is accepted · AGENT mode takes a short plan
- the time to live of the plan is 5 s · AGENT mode takes a short plan
- the reported plan is 1 · AGENT mode takes a short plan
- the reported primitive is go to · AGENT mode takes a short plan
2 When the plane flies on for 10 seconds
When the plane flies on for 10 seconds Then the reported fallback is plan expired
Expected behaviour: A plan that runs out makes the plane circle.
- the reported fallback is plan expired · A plan that runs out makes the plane circle
3 When the ground sends a go-to plan
When the ground sends a go-to plan Then the reported fallback is none or recovery And the reported plan is 2
Expected behaviour: AGENT mode takes a go-to plan, A new plan ends the circle.
- the reply to the plan is accepted · AGENT mode takes a go-to plan
- the time to live of the plan is 600 s · AGENT mode takes a go-to plan
- the reported plan is 2 · AGENT mode takes a go-to plan
- the reported primitive is go to · AGENT mode takes a go-to plan
- the reported fallback is none or recovery · A new plan ends the circle