<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="stack">
    <name>
      <text>PT.5.7 (Find distance bearing)</text>
    </name>
    <questiontext format="html">
      <text><![CDATA[<p>Suppose that village B is {@AB@}km due east of village A. Suppose the bearing of village C is \({@bearac@}^\circ\) from village A and the bearing of C from B is \({@bearbc@}^\circ\). What is the distance between village C and B? Give your answer to the nearest km.</p>
<p> </p>
<p><img style="display: block; margin-left: auto; margin-right: auto;" src="@@PLUGINFILE@@/Bearing%20triangle.png?time=1603891231036" alt="diagram showing bearings" width="615" height="328" /></p>
<p> </p>
<ul style="list-style: none;">
<li>BC=[[input:ans1]] [[validation:ans1]]km</li>
</ul>]]></text>
<file name="Bearing triangle.png" path="/" encoding="base64">[encoded data, 42256 characters]</file>
    </questiontext>
    <generalfeedback format="html">
      <text><![CDATA[<p>Recall that bearings are measured clockwise from true north. Hence angle x = \({@bearac@}^\circ\). Since village B is due east of village A we know that angle \(x\) plus angle A must add to \(90^\circ\). Hence angle \(A = 90^\circ - {@bearac@} = {@anga@}^\circ\).</p>
<p>Similarly, angle \(y\) must be \(360^\circ - {@bearbc@}^\circ = {@angy@}^\circ\) as the bearing from B to C is \({@bearbc@}^\circ\). Hence angle B is \(90^\circ-{@angy@}^\circ = {@angb@}^\circ\) (since we know village A is due west of village B). Finally, \[ \mbox{angle } C = 180^\circ -({@anga@}^\circ + {@angb@}^\circ) = {@angc@}^\circ. \]</p>
<p>In order to find the distance from village C to B we need to find the length of side CB. Therefore, we can use the sine rule to obtain \[ \frac{BC}{\sin {@anga@}^\circ} = \frac{{@AB@}}{\sin {@angc@}^\circ} \implies BC = \sin {@anga@}^\circ \left(\frac{{@AB@}}{\sin {@angc@}^\circ}\right) = {@ta1@} \mbox{ to the nearest km}. \]</p>]]></text>
    </generalfeedback>
    <defaultgrade>1</defaultgrade>
    <penalty>0.1</penalty>
    <hidden>0</hidden>
    <idnumber/>
    <stackversion>
      <text>2020081700</text>
    </stackversion>
    <questionvariables>
      <text>sind(d):=sin(d*%pi/180);
asind(x):=asin(x)*180/%pi;

AB : 60 + rand(10);
bearac: 15+rand(10);
bearbc: 280+rand(10);
angy: 360-bearbc;

anga: 90-bearac;
angb: 90-angy;
angc: 180 - anga-angb;

ta1: round(sind(anga)*(AB/sind(angc)));</text>
    </questionvariables>
    <specificfeedback format="html">
      <text><![CDATA[<p>[[feedback:prt1]]</p>]]></text>
    </specificfeedback>
    <questionnote format="moodle_auto_format">
      <text>{@anga@},{@angb@}, {@angc@}, {@ta1@}</text>
    </questionnote>
    <questiondescription format="moodle_auto_format">
      <text/>
    </questiondescription>
    <questionsimplify>1</questionsimplify>
    <assumepositive>0</assumepositive>
    <assumereal>0</assumereal>
    <prtcorrect format="html">
      <text><![CDATA[<p>Correct answer, well done.</p>]]></text>
    </prtcorrect>
    <prtpartiallycorrect format="html">
      <text><![CDATA[<p>Your answer is partially correct.</p>]]></text>
    </prtpartiallycorrect>
    <prtincorrect format="html">
      <text><![CDATA[<p>Incorrect answer.</p>]]></text>
    </prtincorrect>
    <decimals>.</decimals>
    <scientificnotation>*10</scientificnotation>
    <multiplicationsign>dot</multiplicationsign>
    <sqrtsign>1</sqrtsign>
    <complexno>i</complexno>
    <inversetrig>cos-1</inversetrig>
    <logicsymbol>lang</logicsymbol>
    <matrixparens>[</matrixparens>
    <isbroken>0</isbroken>
    <variantsselectionseed/>
    <input>
      <name>ans1</name>
      <type>algebraic</type>
      <tans>ta1</tans>
      <boxsize>15</boxsize>
      <strictsyntax>1</strictsyntax>
      <insertstars>0</insertstars>
      <syntaxhint/>
      <syntaxattribute>0</syntaxattribute>
      <forbidwords/>
      <allowwords/>
      <forbidfloat>1</forbidfloat>
      <requirelowestterms>0</requirelowestterms>
      <checkanswertype>0</checkanswertype>
      <mustverify>1</mustverify>
      <showvalidation>1</showvalidation>
      <options/>
    </input>
    <prt>
      <name>prt1</name>
      <value>1.0000000</value>
      <autosimplify>1</autosimplify>
      <feedbackstyle>1</feedbackstyle>
      <feedbackvariables>
        <text/>
      </feedbackvariables>
      <node>
        <name>0</name>
        <description/>
        <answertest>AlgEquiv</answertest>
        <sans>ans1</sans>
        <tans>ta1</tans>
        <testoptions/>
        <quiet>0</quiet>
        <truescoremode>=</truescoremode>
        <truescore>1.0000000</truescore>
        <truepenalty/>
        <truenextnode>-1</truenextnode>
        <trueanswernote>prt1-1-T</trueanswernote>
        <truefeedback format="html">
          <text/>
        </truefeedback>
        <falsescoremode>=</falsescoremode>
        <falsescore>0.0000000</falsescore>
        <falsepenalty/>
        <falsenextnode>-1</falsenextnode>
        <falseanswernote>prt1-1-F</falseanswernote>
        <falsefeedback format="html">
          <text/>
        </falsefeedback>
      </node>
    </prt>
    <deployedseed>994027312</deployedseed>
    <deployedseed>594996622</deployedseed>
    <deployedseed>1940465170</deployedseed>
    <deployedseed>56029582</deployedseed>
    <deployedseed>7369114</deployedseed>
    <deployedseed>1257567538</deployedseed>
    <deployedseed>504222569</deployedseed>
    <deployedseed>1670553772</deployedseed>
    <deployedseed>922581319</deployedseed>
    <deployedseed>134501315</deployedseed>
    <deployedseed>1202005578</deployedseed>
    <deployedseed>1511957763</deployedseed>
    <deployedseed>411745403</deployedseed>
    <deployedseed>267249883</deployedseed>
    <deployedseed>321597282</deployedseed>
    <deployedseed>2036033007</deployedseed>
    <deployedseed>1848257617</deployedseed>
    <deployedseed>773337875</deployedseed>
    <deployedseed>52664380</deployedseed>
    <deployedseed>790260571</deployedseed>
    <deployedseed>1112630491</deployedseed>
    <deployedseed>1707507545</deployedseed>
    <deployedseed>649226460</deployedseed>
    <deployedseed>599405684</deployedseed>
    <deployedseed>1346968694</deployedseed>
    <deployedseed>1074852893</deployedseed>
    <deployedseed>1267081190</deployedseed>
    <deployedseed>1958370223</deployedseed>
    <deployedseed>1233940337</deployedseed>
    <deployedseed>1615685585</deployedseed>
    <deployedseed>1323170457</deployedseed>
    <deployedseed>1708425961</deployedseed>
    <deployedseed>1668071861</deployedseed>
    <deployedseed>1403304875</deployedseed>
    <deployedseed>710964647</deployedseed>
    <deployedseed>1767116879</deployedseed>
    <deployedseed>998666913</deployedseed>
    <deployedseed>1272712465</deployedseed>
    <deployedseed>611109333</deployedseed>
    <deployedseed>1261106597</deployedseed>
    <deployedseed>2119485179</deployedseed>
    <deployedseed>667456401</deployedseed>
    <deployedseed>1177140239</deployedseed>
    <deployedseed>1626770562</deployedseed>
    <deployedseed>612712771</deployedseed>
    <deployedseed>1024456161</deployedseed>
    <deployedseed>1034055769</deployedseed>
    <qtest>
      <testcase>1</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>1.0000000</expectedscore>
        <expectedpenalty>0.0000000</expectedpenalty>
        <expectedanswernote>prt1-1-T</expectedanswernote>
      </expected>
    </qtest>
    <qtest>
      <testcase>2</testcase>
      <description/>
      <testinput>
        <name>ans1</name>
        <value>ta1-1</value>
      </testinput>
      <expected>
        <name>prt1</name>
        <expectedscore>0.0000000</expectedscore>
        <expectedpenalty>0.1000000</expectedpenalty>
        <expectedanswernote>prt1-1-F</expectedanswernote>
      </expected>
    </qtest>
  </question>
</quiz>
