1# SOME DESCRIPTIVE TITLE
2# Copyright (C) YEAR Free Software Foundation, Inc.
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5msgid ""
6msgstr ""
7"Project-Id-Version: PACKAGE VERSION\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: DATE\n"
10"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
11"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Language-Team: LANGUAGE <LL@li.org>\n"
13"Language: de\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Generator: Translate Toolkit 1.11.0\n"
18
19#. type: Title-text
20#: ../scene.txt:1
21#, no-wrap
22msgid "Fighter Jet 2"
23msgstr "Düsenjäger 2"
24
25#. type: Resume-text
26#: ../scene.txt:2
27#, no-wrap
28msgid "Adapt the program to a mountainous terrain."
29msgstr "Passen Sie das Programm an unebenes Gelände an."
30
31#. type: ScriptName-text
32#: ../scene.txt:3
33#, no-wrap
34msgid "Move"
35msgstr "Jäger2"
36
37#. type: \b; header
38#: ../help/help.E.txt:1
39#, no-wrap
40msgid "Objective"
41msgstr ""
42
43#. type: Plain text
44#: ../help/help.E.txt:2
45#, no-wrap
46msgid "Adapt the flying height of the <a object|botfj>winged shooter</a> to the terrain."
47msgstr ""
48
49#. type: \t; header
50#: ../help/help.E.txt:4
51#, no-wrap
52msgid "Program"
53msgstr ""
54
55#. type: Plain text
56#: ../help/help.E.txt:5
57#, no-wrap
58msgid "Here is one more time the program of the previous exercise that hunts ants:"
59msgstr ""
60
61#. type: Source code
62#: ../help/help.E.txt:7
63#, no-wrap
64msgid ""
65"extern void object::JetFighter1()\n"
66"{\n"
67"\tobject    item;\n"
68"\t\n"
69"\taim(-20);\n"
70"\tjet(0.2);\n"
71"\twhile (position.z < 10)\n"
72"\t{\n"
73"\t\twait(0.2);\n"
74"\t}\n"
75"\tjet(0);\n"
76"\t\n"
77"\twhile (true)\n"
78"\t{\n"
79"\t\twhile (radar(AlienAnt, 0, 360, 0, 20) == null)\n"
80"\t\t{\n"
81"\t\t\titem = radar(AlienAnt);\n"
82"\t\t\tturn(direction(item.position));\n"
83"\t\t\tmotor(1,1);\n"
84"\t\t\twait(0.2);\n"
85"\t\t}\n"
86"\t\tfire(1);\n"
87"\t}\n"
88"}"
89msgstr ""
90
91#. type: Plain text
92#: ../help/help.E.txt:32
93#, no-wrap
94msgid "The bot always stays at an altitude of 10m above sea level. This is not adapted to the mountainous terrain of the present exercise, the bot has got to adapt to the terrain. The best way to do so is to insert just before the <c/>wait(0.2);<n/> a test to see if the height above ground is too low or too high, and to react accordingly."
95msgstr ""
96
97#. type: Plain text
98#: ../help/help.E.txt:34
99#, no-wrap
100msgid "We already saw that <code>position.z</code> gives the altitude above sea level. <code><a cbot|topo>topo</a>(position)</code> gives the altitude of the ground at the position of the bot. If we want the bot to stay at an altitude between 6 and 9m above ground, we must treat the following cases: if <code>position.z-topo(position)</code> is smaller than 6, the bot must climb with <c/>jet(1);<n/>. If <code>position.z-topo(position)</code> is greater than 9, the bot must go down with <c/>jet(-1);<n/>. In order to program these tests, use the instruction <code><a cbot|if>if</a></code>, that executes the instructions in braces only once if the condition is true:"
101msgstr ""
102
103#. type: Source code
104#: ../help/help.E.txt:36
105#, no-wrap
106msgid ""
107"\tjet(0);\n"
108"\tif (position.z-topo(position) < 6)\n"
109"\t{\n"
110"\t\tjet(1);\n"
111"\t}\n"
112"\t\n"
113"\tif (position.z-topo(position) > 9)\n"
114"\t{\n"
115"\t\tjet(-1);\n"
116"\t}"
117msgstr ""
118
119#. type: Plain text
120#: ../help/help.E.txt:47
121#, no-wrap
122msgid "Before starting the testing, stabilize the altitude with <c/>jet(0);<n/>: in case the height above ground lies between 6 and 9m, the bot must neither climb nor go down. If afterwards either <c/>jet(1);<n/> or <c/>jet(-1);<n/> is executed, it will cancel the previous <c/>jet(0);<n/>."
123msgstr ""
124
125#. type: Plain text
126#: ../help/help.E.txt:49
127#, no-wrap
128msgid "Just insert these lines before the <code>wait(0.2)</code>, and the bot will adapt to the terrain. You can then delete the first lines of the program that set the initial altitude at 10m."
129msgstr ""
130
131#. type: \t; header
132#: ../help/help.E.txt:51
133#, no-wrap
134msgid "See also"
135msgstr ""
136
137#. type: Plain text
138#: ../help/help.E.txt:52
139#, no-wrap
140msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
141msgstr ""
142