Missions (Scenarios) for P3D

Introduction | Why | Missions | Tutorial | FIP

Introduction | FlightCreate | MissionCreate | MissionExpand | MissionComplete ||||| MissionExpand 1 | 2 | 3 | 4 | 5 | 6
Example flight expand (Part4)

You have tested the flight and found out that according to the flight plan you have to turn 180 degrees right after takeoff?
That must be so, because the takeoff direction is given by the wind and not the desired flight direction. We will take care of that later.

Start the SimDirector and load the "ExampleFlight".

POI (Point Of Interest) are now created for the flight plan created earlier. These POI show the next waypoint in the mission compass.

Search in the catalog under Scenario the object "PointOfInterest" and drag it with pressed mouse button into the Prepar3D window.

- Enter "WP1" in the right window under Object Name.
- Under Activated switch to NO.
- At CycleOrder enter "1" (this specifies the order if you want to advance the single waypoints manually).
- At TargetName enter "WP1", this name will be displayed under the mission compass.
- Click on "Edit" under AttachedWorldPosition (the right window switches to the position display).

Now copy the values for Latitude and Longitude, which you have determined in the Flight Planner and saved in the Windows Editor (Latitude 46.1060864348739 / Longitude 7.07606869358841). Don't be surprised, the last few numbers after the decimal point will be shortened, but the positioning is still accurate enough.

At AltitudeAGL switch to "NO", so that the altitude is given "above sea level" (at YES "above ground level").

At Altitude you now enter 8000, because the maw will rise to 8000 feet above sea level.

By clicking on "PointOfInterest" (green rectangle) the right window returns to the "normal" settings of the POI.

If everything has been done correctly, the POI has placed itself exactly in the valley bend.

Switch to Visualization in the main window, select the PointOfInterest named WP1 and duplicate it.

Name the duplicate "WP2", enter "2" for CycleOrder, enter "WP2" for TargetName, click on "Edit" for AttachedWorldPosition and enter the corresponding values of WP2 for Latitude and Longitude (46.4039793036219 / 6.89994440866826).

Select the PointOfInterest named WP2 and duplicate it.

Name the duplicate "WP3", enter "3" for CycleOrder, enter "WP3" for TargetName, click on "Edit" for AttachedWorldPosition and enter the corresponding values of WP3 for Latitude and Longitude (46.4256205164096 / 6.3919741268829).

If you have done everything correctly, you will see in the main window, under the tab "Prepar3D" the 3 POI as in the picture.

Another POI is still missing, the runway at Geneva airport.
Switch to Visualization in the main window, duplicate WP3, name the duplicate "Geneva", enter "4" for CycleOrder and "Geneva" for TargetName.

Switch to Prepar3D in the main window. You will see 2 POI at exact same position (WP3 and Geneva), to separate them click in the right window at AttachedWorldPosition on Edit and change at Altitude the altitude to 1000.

Now you can grab the POI "Geneva" with the mouse and move it to Geneva Airport.

The airport is located at the end of Lake Geneva, easy to find.

Once the POI is at the airport, set AltitudeAGL to YES in the right window and enter "0" for Altitude so that the POI is at ground level. Place the POI in the middle of the runway.

In the main area, switch to Visualization and select the 4 POIs:

Draw a frame around the 4 objects, or click on the individual objects by holding down the control key (Ctrl or Ctrl, depending on the language of the country this key is called differently).

Then right-click on Group (4) / New Group to create a new group and name the new group "POI".

The waypoints must now be activated at the right moment. I activate WP1 with a PropertyTrigger. Search for it in the Catalog under Triggers and drag it into the visualization window. Name the trigger "WP1 on" and click on "EDIT LOGIC" under Condition. In the main area click on "Create Logical Expression Tree".

Click the newly created object on the right, select Change Type, Greather Than in the menu.

In the left newly created object, under Change Type, select Property.

WP1 should be activated as soon as the plane takes off. Because the property list is long, first write "alt" in the input field for Property Filter. Search and select "PLANE ALT ABOVE GROUND". ("PLANE ALTITUDE" would not work here, because that evaluates the altitude above sea level and the airport is 1585 feet above sea level, the trigger would fire immediately).

For "Units:" you can leave "default units", because default is feet.
(Alternatively you can set "feet" or "ft", makes no difference. All other values make no sense).

Click the right object and write "20" at Value.

Switch the main window to Visualization and drag an ObjectActivationAction from the Catalog, Category Actions into the Visualization window. Name the action "WP1 on" and under ObjectReferenceList, get the PointOfInterest named "WP1" in the Referenced field.

In the Visualization window, select the PropertyTrigger named "WP1 on" and under Actions, get the ObjectActivationAction named "WP1 on", in the Referenced field.

If everything is done correctly, it will look like in the image below.

If you feel like it, you can test the PropertyTrigger function in SimDirector. Be sure to save before doing so. Switch to Mode in the upper ribbon and select Preview Scenario. A small "flight window" is sufficient, select the PropertyTrigger in the visualization window and click on INSPECT LOGIC in the right window. Click on the Prepar3D window, deactivate the pause with "P" and start. The mission compass will be displayed as soon as the aircraft is 20 feet above the ground.

Next, WP1 must be turned off as the aircraft approaches waypoint 1 and WP2 turned on instead. Clearly, WP2 needs to have WP3 turned on, and WP3 needs to have the Geneva destination turned on.

For this we use Areas. Since the areas should have exactly the same position as the waypoints (PointOfInterest), we save ourselves the trouble of placing these areas manually in the Prepar3D view.

Switch to "Visualization" in the main area and go to the "POI" group. Search for "RectangleArea" in the "Areas" category on the left side of the catalog and drag it into the visualization window.

- Name the area "WP1".
- Enter "30000" for Length, "500" for Width and "3000" for Height (3000 meters is 9842 feet, high enough).
- Check that Orientation "Pitch" and "Bank" are both set to "0" so that the area does not hang crooked in the air.
- We will deal with the "Heading", i.e. the correct rotation of the area, later.
- Change the DrawStyle from "Filled" to "Outlined" (very helpful for testing, will be set to "None" when the mission is completed).
- Get the exact values for Latitude and Longitude from PointOfInterest "WP1" under AttachedWorldPosition "EDIT" (you know how to copy/paste, otherwise write the values on a notepad) and enter the values for RectangleArea "WP1" under AttachedWorldPosition "EDIT".
- Check that AltitudeAGL is set to "YES" for the Area and "0" for Altitude.
If everything was done correctly, the new area is placed in the main area under "Prepar3D" exactly like the PointOfInterest "WP1" in the valley bend.

This area is used as a pattern for WP2, WP3 and Geneva:

Switch the main area to Visualization and duplicate the area "WP1".
- Name the duplicate "WP2".
- Get the exact values for Latitude and Longitude from the PointOfInterest "WP2" under AttachedWorldPosition "EDIT" and enter the values for the RectangleArea "WP2" under AttachedWorldPosition "EDIT".

- Duplicate "WP2" and follow the pattern above: Rename to "WP3", adjust Latitude and Longitude to "WP3".

- Duplicate "WP3" and proceed according to the above pattern: Rename to "Geneva", adjust Latitude and Longitude to "Geneva".

The result should look like this:
Pay attention to the orange areas and ignore the guides, I'll come to that in a moment.

Aside:
- Even if it looks like all areas have a different alignment, they are all aligned exactly the same. An optical illusion, which should not disturb here further.
- I didn't use CylinderPhathArea, because this area has to be very large (orange dashed), so that the flight also works when the user flies without autopilot and shortens the turn (blue curve). This would cause the POI to switch much too early.

The areas must now be "rotated" so that they are each the "angle bisector" (green in the picture above) of the flight plan (red in the picture above).

Because an area and a POI are close to each other, you cannot select the area separately from the bird's eye view. Therefore switch the left pane to the "Objects" tab (1), there you can select the area "Wp1" (2). Click on Rotate (3) in the menu bar and rotate the area in the desired direction (green ring).

Rotate also the areas "Wp2" and "WP3" accordingly.

For the area "Geneva" zoom in close and align the area to the runway.

In the right window change the value at Lengt to "4000" and Height to "500".


At this point a few remarks:

1) The further this tutorial progresses, the more concise the instructions become.

2) Not every step is shown with pictures, because by now you should be able to do many things.

3) Some objects can have the same name, e.g. "WP1 on", but one object is a trigger, the other an ObjectActivationAction. You can distinguish them by their color.

So if the trigger "WP1 on" is to be used, it is red, in contrast to an ObjectActivationAction, which is purple.
If you know the colors, a confusion between trigger (red) and PointOfInterest (blue) is not possible.

You can also look up the colors in the catalog at any time:
Purple=Action
Orange=Areas
Red=Trigger
Blue=Scenario objects: PointOfInterest, Texts, etc.


To make the Areas switch the waypoints, ObjectActivationAction and ProximityTrigger are needed.

First the ProximityTrigger:
- Switch the main area to Visualization and go to the POI group.
- In the left pane switch to Catalog / Triggers and drag a ProximityTrigger into the visualization window.
- Name the trigger "WP2 on".
- At OnEnterFilter bring "UserOwnship" into the field Referenced (if UserOwnship is not in the list Avaiable, you have to switch "Filter by Group", see red rectangle).
- Further down at "Activated" you have to switch to "NO", so that the trigger has a red dot (red circle).
- Under Areas you bring the area "WP1" into the field Referenced.

Next the 2 ObjectActivationAction:
1st Action: Duplicate the ObjectActivationAction named "WP1 on".
- Name the duplicate "WP2 on".
- NewObjectState you leave on ACTIVATE.
- Under ObjectReferenceList bring the PointOfInterest named "WP2" into the Referenced field.

2nd Action: Duplicate the ObjectActivationAction named "WP1 on" again.
- Name the copy "WP1 off".
- Change the NewObjectState to DEACTIVATE.
- Under ObjectReferenceList find the PointOfInterest named "WP1" and bring it into the Referenced field.
- Under OnCompleteAction bring the action "WP2 on" into the field Referenced.

Final links:
- In the Visualization window, select the ObjectActivationAction "WP1 on".
- Under ObjectReferenceList, bring the trigger "WP2 on" into the Referenced field.
- Select the ProximityTrigger "WP2 on" in the visualization window.
- Under OnEnterActions bring the ObjectActivationAction named "WP1 off" into the Referenced field.

This is how it should look in the end.

What happens here:
1) The trigger "WP1 on" watches if the aircraft takes off, more precisely if it is more than 20 feet above ground and starts the ObjectActivationAction "WP1 on".
2) The action switches on the POI "WP1" (mission compass) and the trigger "WP2 on".
3) This trigger watches if the aircraft enters the area "WP1" and activates the action "WP1 off".
4) The action first switches off the POI "WP1" and then activates the action "WP2 on" via OnCompleteAction.
5) The action "WP2 on" switches on the POI "WP2".

Now the whole thing has to be duplicated for "WP3".
Select the following 3 objects, duplicate them and rename them:
- ProximityTrigger "WP2 on" (becomes "WP3 on")
- ObjectActivationAction "WP1 off" (becomes "WP2 off")
- ObjectActivationAction "WP2 on" (becomes "WP3 on")

Other shortcuts:
- For ProximityTrigger "WP3 on", the Area "WP2" must be brought into the Referenced field under Areas.
- For ObjectActivationAction "WP2 off", the PointOfInterest "WP2" must be placed in the Referenced field under ObjectReferenceList.
- For ObjectActivationAction "WP3 on", the PointOfInterest "WP3" must be placed in the Referenced field under ObjectReferenceList.
- For ObjectActivationAction "WP2 on", under ObjectReferenceList, the ProximityTrigger "WP3 on" must be in the Referenced field.

If you did everything right, it looks like this now.

Now the whole thing must be duplicated for "Geneva".

Select the following 3 objects, duplicate them and rename them:
- ProximityTrigger "WP3 on" (becomes "Geneva on")
- ObjectActivationAction "WP2 off" (becomes "WP3 off")
- ObjectActivationAction "WP3 on" (becomes new "Geneva on").

Other shortcuts:
- For ProximityTrigger "Geneva on", the Area "WP3" must be brought into the Referenced field under Areas.
- For ObjectActivationAction "WP3 off", the PointOfInterest "WP3" must be placed in the Referenced field under ObjectReferenceList.
- For ObjectActivationAction "Geneva on", under ObjectReferenceList, the PointOfInterest "Geneva" must be placed in the Referenced field.
- For ObjectActivationAction "WP3 on", the ProximityTrigger "Geneva on" must be entered in the Referenced field under ObjectReferenceList.

The last thing to do is to duplicate 2 objects so that the POI "Geneva" is turned off when approaching the airport.

Select the following 2 objects, duplicate them and rename them:
- ProximityTrigger "Geneva on" (becomes new "Geneva off").
- ObjectActivationAction "WP3 off" (becomes "Geneva off")

Further links:
- For ProximityTrigger "Geneva off", under Areas, the Area "Geneva" must be brought into the Referenced field.
- For ObjectActivationAction "Geneva off", the PointOfInterest "Geneva" must be placed in the Referenced field under ObjectReferenceList.
- For ObjectActivationAction "Geneva on", the ProximityTrigger "Geneva off" must be placed in the Referenced field under ObjectReferenceList.

Leave the POI group by clicking on "Grouped Graph" in the upper left corner of the visualization window.

Edit the "StartText".

Replace the existing text:

"Starte, steige auf 8000 Fuss und folge dem Tal.
Launch, climb to 8000 feet and follow the valley."

With the following text:

"Starte, fliege nach dem Abheben eine 180 Grad Kurve nach rechts.
Steige auf 8000 Fuss und folge dem GPS, bzw. den Wegpunkten.
---
Take off, fly a 180 degree turn to the right after takeoff.
Climb to 8000 feet and follow the GPS or waypoints."

(Be sure to insert line breaks as shown above. The text has 5 lines).

Now you can save the mission, exit SimDirector and test the flight in Prepar3D. If everything was done correctly, the POI will switch to the next waypoint on the way and the POI "Geneva" will be switched off just before landing.

Of course there are still a few things missing, because the mission is not counted as accomplished, because originally a landing in Sion is planned because of the oil leak. This will be added in the next part.


Here you can download the zip with the current mission. Just copy the contained files into the save directory.

ExampleFlightExpand4.zip

Continue with part5: Example flight expand (Part5)
I hope you enjoy these flights, if so, please give feedback to p3d@andi20.ch.
Also send error messages (spelling mistakes, wrong information, etc.) to me, I appreciate any feedback.
Introduction | FlightCreate | MissionCreate | MissionExpand | MissionComplete ||||| MissionExpand 1 | 2 | 3 | 4 | 5 | 6

Introduction | Why | Missions | Tutorial | FIP