SIM001 › Beyond the cockpit › Flying by plan
Sending your first plan
You send a go-to plan from the console of the runner. The plane refuses it in FBWA, and it takes it in AGENT mode. Then you send a plan with an error, and a new plan. The reply and the status of the plane tell you what the plane does with each one.
Type
plan goto 80 10 40 0 600in the console. This plan tells the plane to fly to the point 80 m north and 10 m east of home, at 40 m.The plane replies with COMMAND_ACK, result 2 (DENIED) and the reason 1. The console shows
ackwithresult=2 reason=1.Switch the plane to AGENT: type
mode AGENTin the console.AG_PLAN is 0, and the console shows
plan=0.Type
plan goto 80 10 40 0 600in the console. This plan tells the plane to fly to the point 80 m north and 10 m east of home, at 40 m.The plane replies with COMMAND_ACK, result 0 (ACCEPTED). The console shows
ackwithresult=0. AG_PLAN is 1, and the console showsplan=1. AG_PRIM is 3, go to (prim=3).Type
plan 9 80 10 40 0 600in the console. There is no primitive 9.The plane replies with COMMAND_ACK, result 2 (DENIED) and the reason 2. The console shows
ackwithresult=2 reason=2. AG_PLAN is 1, and the console showsplan=1.Type
plan orbit 70 0 45 45 600in the console. This plan tells the plane to circle the arena centre at 45 m from it, at 45 m.AG_PLAN is 2, and the console shows
plan=2. AG_PRIM is 4, orbit (prim=4).
Learn more
How this is tested passed
This tutorial is also an acceptance test. Its report has every step, check and screenshot from the last run.
The user story: As an operator of a plane in AGENT mode, I want to send a plan and read the reply, so that I know that the plane flies my plan.
Given the flight mode of the plane is FBWA When the ground sends a go-to plan Then the reply to the plan is refused for the mode When the flight mode of the plane is AGENT Then the reported plan is 0 When the ground sends a go-to plan Then the reply to the plan is accepted And the reported plan is 1 And the reported primitive is go to When the ground sends a malformed plan Then the reply to the plan is refused as malformed And the reported plan is 1 When the ground sends an orbit plan Then the reported plan is 2 And the reported primitive is orbit