Running simulations, but with physical components

Good day!

I have a question while working with the mission planner.
Is it possible to simulate a program flight to a certain point on the map and physically use the pihawk controller to turn in a certain direction with a servo?
That is, there are two tasks:

  1. In the simulation, it is conditional to fly from the USA to Canada
  2. When the plane arrives in Canada, not conventionally, but in reality, physically turn the servo