281 lines
10 KiB
Plaintext
281 lines
10 KiB
Plaintext
# Copyright (C) 2019 Free Software Foundation, Inc.
|
|
# This file is distributed under the same license as the PACKAGE package.
|
|
# BCE <.>, 2019.
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: \n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"POT-Creation-Date: DATE\n"
|
|
"PO-Revision-Date: 2019-06-15 18:30+0200\n"
|
|
"Last-Translator: BCE <.>\n"
|
|
"Language-Team: French <>\n"
|
|
"Language: fr\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
|
"X-Generator: Lokalize 18.12.3\n"
|
|
|
|
#. type: Title-text, ScriptName-text
|
|
#: ../scene.txt:1 ../scene.txt:3
|
|
#, no-wrap
|
|
msgid "Dragster"
|
|
msgstr "Dragster"
|
|
|
|
#. type: Resume-text
|
|
#: ../scene.txt:2
|
|
#, no-wrap
|
|
msgid "Program a progressive deceleration in order to avoid the mines right behind the goal."
|
|
msgstr "Décélération avec commande directe des moteurs."
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:1
|
|
#, no-wrap
|
|
msgid "Exercise"
|
|
msgstr "Exercice"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:2
|
|
#, no-wrap
|
|
msgid "Reach the finishing pad (25m in front of you) as fast as possible, using the instruction <code>motor( , )</code>. You will have to slow down progressively at the end of the move, otherwise the bot will get blown up on the <a object|mine>mines</a>."
|
|
msgstr "Déplacez le <a object|bottr>robot</a> le plus rapidement possible, à l'aide de l'instruction <code>motor( )</code>. Il faudra programmer une décélération en bout de piste, pour ne pas percuter les <a object|mine>mines</a>."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:4
|
|
#, no-wrap
|
|
msgid "You could very well write no more than <c/><a cbot|move>move</a>(25);<n/>, this would work perfectly well. However, the aim of this exercise is to learn how to use the instruction <code><a cbot|motor>motor</a></code>."
|
|
msgstr "Un programme avec <c/><a cbot|move>move</a>(25);<n/> fonctionnerait parfaitement, mais le but est d'apprendre le fonctionnement de l'instruction <code><a cbot|motor>motor</a></code>."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:6
|
|
#, no-wrap
|
|
msgid "This instruction asks for two values:"
|
|
msgstr "Cette instruction demande deux valeurs:"
|
|
|
|
#. type: Bullet: '1)'
|
|
#: ../help/help.E.txt:7
|
|
#, no-wrap
|
|
msgid "The speed of the left-hand motor."
|
|
msgstr "La consigne pour le moteur gauche."
|
|
|
|
#. type: Bullet: '2)'
|
|
#: ../help/help.E.txt:8
|
|
#, no-wrap
|
|
msgid "The speed of the right-hand motor."
|
|
msgstr "La consigne pour le moteur droite."
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:10
|
|
#, no-wrap
|
|
msgid "<c/>\tmotor( left, right );"
|
|
msgstr "<c/>\tmotor( left, right );"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:12
|
|
#, no-wrap
|
|
msgid "The values must range between -1 and 1:"
|
|
msgstr "Il s'agit de deux valeurs comprises entre -1 et 1:"
|
|
|
|
#. type: Bullet: '-'
|
|
#: ../help/help.E.txt:13
|
|
#, no-wrap
|
|
msgid "1 = full throttle backward"
|
|
msgstr "1 = marche arrière"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:14
|
|
#, no-wrap
|
|
msgid ""
|
|
" 0 = stop\n"
|
|
" 1 = full throttle forward"
|
|
msgstr ""
|
|
" 0 = arrêt\n"
|
|
" 1 = marche avant"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:17
|
|
#, no-wrap
|
|
msgid "For example, <c/>motor(0.5, 0.5);<n/> will move the motor forward with half-speed, until new instructions are given to the motors."
|
|
msgstr "Par exemple, <c/>motor(0.5, 0.5);<n/> fait avancer le <a object|bottr>robot</a> à mi-vitesse, jusqu'à ce qu'une autre consigne soit donnée."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:19
|
|
#, no-wrap
|
|
msgid "With the instruction <c/>motor(0.5, 0.6);<n/>, the bot will move forward with half-speed, turning at the same time slightly to the left: the right-hand motor moves a little faster (<code>0.6</code>) than the left-hand motor (<code>0.5</code>)."
|
|
msgstr "Avec l'instruction <c/>motor(0.5, 0.6);<n/>, le <a object|bottr>robot</a> avance à mi-vitesse en tournant légèrement à gauche, puisque le moteur de droite va un peu plus vite (<code>0.6</code>) que le moteur de gauche (<code>0.5</code>)."
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:21
|
|
#, no-wrap
|
|
msgid "General principle"
|
|
msgstr "Idée générale"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:22
|
|
#, no-wrap
|
|
msgid ""
|
|
"In order to move forward for exactly 25 meters and not more, you must move full speed during the first 23 meters, then reduce the speed of the motors progressively during the last two meters.\n"
|
|
"The <a cbot|var>variable</a> <a cbot|object>position</a> gives you at any moment the current position of the bot, and the instruction <c/><a cbot|dist>distance</a>( , );<n/> returns the distance between two points. The best way to know where you are consists in saving the current position before the start into a <a cbot|var>variable</a>, for example a variable called <code>start</code>. Then you can calculate the distance between the starting position and your current position with <code>distance(position, start)</code>."
|
|
msgstr ""
|
|
"L'idée consiste à avancer à fond les 23 premiers mètres, puis à diminuer progressivement la vitesse les 2 derniers mètres.\n"
|
|
"L'instruction <c/><a cbot|dist>distance</a>(p1, p2);<n/> retourne la distance entre deux points. Il suffit donc de mémoriser la position de départ, puis de calculer la distance parcourue avec <code>distance(position, start)</code>.\n"
|
|
"La <a cbot|object>variable</a> <code>position</code> donne la position actuelle du <a object|bottr>robot</a>. Donc, <c/>distance(position, start);<n/> retourne la distance parcourue."
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:25
|
|
#, no-wrap
|
|
msgid "The program"
|
|
msgstr "Marche à suivre"
|
|
|
|
#. type: Bullet: '1)'
|
|
#: ../help/help.E.txt:26
|
|
#, no-wrap
|
|
msgid "declare the variables"
|
|
msgstr "déclarez les variables"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:27
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\tpoint start;\n"
|
|
"\tfloat len;"
|
|
msgstr ""
|
|
"<c/>\tpoint start;\n"
|
|
"\tfloat len;"
|
|
|
|
#. type: Bullet: '2)'
|
|
#: ../help/help.E.txt:30
|
|
#, no-wrap
|
|
msgid "save the starting position"
|
|
msgstr "Mémoriser la position de départ:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:31
|
|
#, no-wrap
|
|
msgid "<c/>\tstart = position;"
|
|
msgstr "<c/>\tstart = position;"
|
|
|
|
#. type: Bullet: '3)'
|
|
#: ../help/help.E.txt:33
|
|
#, no-wrap
|
|
msgid "start full throttle :"
|
|
msgstr "Démarrer à fond:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:34
|
|
#, no-wrap
|
|
msgid "<c/>\tmotor(1, 1);"
|
|
msgstr "<c/>\tmotor(1, 1);"
|
|
|
|
#. type: Bullet: '4)'
|
|
#: ../help/help.E.txt:36
|
|
#, no-wrap
|
|
msgid "Perform an infinite <code><a cbot|while>while</a></code> loop:"
|
|
msgstr "Faire une boucle infinie <code><a cbot|while>while</a></code>:"
|
|
|
|
#. type: Source code
|
|
#: ../help/help.E.txt:37
|
|
#, no-wrap
|
|
msgid ""
|
|
"<c/>\twhile ( true )\n"
|
|
"\t{\n"
|
|
"\t\tlen = distance(position, start);\n"
|
|
"\t\tif ( len > 25-2 )\n"
|
|
"\t\t{\n"
|
|
"\t\t\tmotor( less than before ! );\n"
|
|
"\t\t}\n"
|
|
"\t}"
|
|
msgstr ""
|
|
"<c/>\twhile ( true )\n"
|
|
"\t{\n"
|
|
"\t\tfloat len = distance(position, start);\n"
|
|
"\t\tif ( len > 25-2 )\n"
|
|
"\t\t{\n"
|
|
"\t\t\tmotor( moins qu'avant! );\n"
|
|
"\t\t}\n"
|
|
"\t}"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:46
|
|
#, no-wrap
|
|
msgid "As long as the distance between the start and the current position is smaller than 23m, the instruction in braces after the <code><a cbot|if>if</a></code> instruction will not be executed, so the motors keep their maximum speed as they were told by the <c/><a cbot|motor>motor</a>(1,1);<n/> instruction."
|
|
msgstr "Tant que la longueur est plus petite que 23 mètres, on n'effectue pas les instructions après le <code><a cbot|if>if</a></code>. Les moteurs conservent donc les consignes initiales <c/><a cbot|motor>motor</a>(1,1);<n/>, vitesse maximale."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:48
|
|
#, no-wrap
|
|
msgid "In order to slow down progressively, the speed of the motors must be proportional to the remaining distance:"
|
|
msgstr "Pour ralentir progressivement, il faut donner une consigne de vitesse proportionnelle au reste de la distance à parcourir:"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../help/help.E.txt:49
|
|
#, no-wrap
|
|
msgid "<code>2.0</code> meters left -> speed = <code>1.00</code> (maximum)"
|
|
msgstr "S'il reste <code>2.0</code> mètres -> consigne = <code>1.00</code> (maximum)"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../help/help.E.txt:50
|
|
#, no-wrap
|
|
msgid "<code>1.5</code> meters left -> speed = <code>0.75</code>"
|
|
msgstr "S'il reste <code>1.5</code> mètres -> consigne = <code>0.75</code>"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../help/help.E.txt:51
|
|
#, no-wrap
|
|
msgid "<code>1.0</code> meter left -> speed = <code>0.50</code>"
|
|
msgstr "S'il reste <code>1.0</code> mètre -> consigne = <code>0.50</code>"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../help/help.E.txt:52
|
|
#, no-wrap
|
|
msgid "<code>0.5</code> meter left -> speed = <code>0.25</code>"
|
|
msgstr "S'il reste <code>0.5</code> mètre -> consigne = <code>0.25</code>"
|
|
|
|
#. type: Bullet: 'o'
|
|
#: ../help/help.E.txt:53
|
|
#, no-wrap
|
|
msgid "<code>0.0</code> meter left -> speed = <code>0.00</code> (stop)"
|
|
msgstr "S'il reste <code>0.0</code> mètre -> consigne = <code>0.00</code> (arrêt)"
|
|
|
|
#. type: Image filename
|
|
#: ../help/help.E.txt:55
|
|
#, no-wrap
|
|
msgid "tdragst1"
|
|
msgstr "tdragst1"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:56
|
|
#, no-wrap
|
|
msgid "You can use the following <a cbot|expr>expression</a> <code>(25-len)/2</code> in order to calculate the value for the speed instruction that must be given to the motors."
|
|
msgstr "L'<a cbot|expr>expression</a> <code>(25-len)/2</code> est donc parfaite pour cela."
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:58
|
|
#, no-wrap
|
|
msgid "It is now up to you to put everything together and to test the program."
|
|
msgstr "A vous de terminer le programme ..."
|
|
|
|
#. type: \b; header
|
|
#: ../help/help.E.txt:60
|
|
#, no-wrap
|
|
msgid "Remark"
|
|
msgstr "Remarque"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:61
|
|
#, no-wrap
|
|
msgid "You can use values greater than 1 for the instruction <c/><a cbot|motor>motor</a>();<n/>, but the bot will not move any faster."
|
|
msgstr "Si les consignes données sont des valeurs plus grandes que 1, le <a object|bottr>robot</a> n'avance pas plus vite."
|
|
|
|
#. type: \t; header
|
|
#: ../help/help.E.txt:63
|
|
#, no-wrap
|
|
msgid "See also"
|
|
msgstr "Voir aussi"
|
|
|
|
#. type: Plain text
|
|
#: ../help/help.E.txt:64
|
|
#, no-wrap
|
|
msgid "<a cbot>Programming</a>, <a cbot|type>types</a> and <a cbot|category>categories</a>."
|
|
msgstr "<a tremote1>Exercice précédent</a>, <a cbot>programmation</a>, <a cbot|type>types</a> et <a cbot|category>catégories</a>."
|