Ë
    oj\t  ã                  ó@  — d Z ddlmZ ddlmZ ddlmZ ddlmZm	Z	 ddl
mZ ddlmZ  G d„ d	e«      Z G d
„ de«      Z G d„ de«      Zdd„Zdd„Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy) z(
Test cases for positioning primitives.
é    )Úannotations)Úverify)Úbase)ÚAnglesÚ
Directions)ÚIPositioningBeacon)ÚTestCasec                  ó0   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zy)Ú
AngleTestsz@
    Tests for the L{twisted.positioning.base.Angle} class.
    c                ób   — t        j                  «       }| j                  dt        |«      «       y)zd
        The repr of an empty angle says that is of unknown type and unknown
        value.
        z'<Angle of unknown type (unknown value)>N©r   ÚAngleÚassertEqualÚrepr©ÚselfÚas     úD/usr/lib/python3/dist-packages/twisted/positioning/test/test_base.pyÚ
test_emptyzAngleTests.test_empty   s$   € ô
 �J‰J‹LˆØ×ÑÐBÄDÈÃGÕLó    c                ó‚   — t        j                  t        j                  ¬«      }| j	                  dt        |«      «       y)zf
        The repr of an empty variation says that it is a variation of unknown
        value.
        ©Ú	angleTypez<Variation (unknown value)>N)r   r   r   Ú	VARIATIONr   r   r   s     r   Útest_variationzAngleTests.test_variation   s-   € ô
 �J‰J¤×!1Ñ!1Ô2ˆØ×ÑÐ6¼¸Q»Õ@r   c                ód   — t        j                  d«      }| j                  dt        |«      «       y)zz
        The repr of an angle of unknown type but a given value displays that
        type and value in its repr.
        ç      ð?z%<Angle of unknown type (1.0 degrees)>Nr   r   s     r   Útest_unknownTypezAngleTests.test_unknownType%   s&   € ô
 �J‰J�s‹OˆØ×ÑÐ@Ä$ÀqÃ'ÕJr   c                óP   — | j                  t        t        j                  d¬«       y)zS
        Trying to create an angle with a bogus type raises C{ValueError}.
        ÚBOGUSr   N)ÚassertRaisesÚ
ValueErrorr   r   ©r   s    r   Útest_bogusTypezAngleTests.test_bogusType-   s   € ð 	×Ñœ*¤d§j¡j¸GÐÕDr   N©ÚreturnÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r$   © r   r   r   r      s   „ ñóMóAóKôEr   r   c                  óÀ   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zy)ÚHeadingTestszB
    Tests for the L{twisted.positioning.base.Heading} class.
    c                ó  — t        j                  d«      }| j                  |j                  d«       | j                  t	        |«      d«       | j                  |j                  «       | j                  |j                  «       y)zÕ
        Tests that a simple heading has a value in decimal degrees, which is
        also its value when converted to a float. Its variation, and by
        consequence its corrected heading, is L{None}.
        r   N)r   ÚHeadingr   ÚinDecimalDegreesÚfloatÚassertIsNoneÚ	variationÚcorrectedHeading©r   Úhs     r   Útest_simplezHeadingTests.test_simple9   sb   € ô �L‰L˜ÓˆØ×Ñ˜×+Ñ+¨SÔ1Ø×Ñœ˜q› 3Ô'Ø×Ñ˜!Ÿ+™+Ô&Ø×Ñ˜!×,Ñ,Õ-r   c                óh   — t        j                  d«      }d}| j                  t        |«      |«       y)zt
        A repr of a heading with no variation reports its value and that the
        variation is unknown.
        r   z*<Heading (1.0 degrees, unknown variation)>N)r   r0   r   r   )r   ÚheadingÚexpectedReprs      r   Ú test_headingWithoutVariationReprz-HeadingTests.test_headingWithoutVariationReprE   s+   € ô
 —,‘,˜sÓ#ˆØCˆØ×Ñœ˜g›¨Õ5r   c                óª   — d\  }}t         j                  j                  ||¬«      }d}| j                  t	        |«      |j                  ||«      «       y)zu
        A repr of a heading with known variation reports its value and the
        value of that variation.
        )r   ç      $À©ÚvariationValuez2<Heading ({0} degrees, <Variation ({1} degrees)>)>N)r   r0   Ú
fromFloatsr   r   Úformat)r   Úangler4   r:   ÚreprTemplates        r   Útest_headingWithVariationReprz*HeadingTests.test_headingWithVariationReprN   sM   € ð
 &ÑˆˆyÜ—,‘,×)Ñ)¨%À	Ð)ÓJˆØKˆØ×Ñœ˜g›¨×(;Ñ(;¸EÀ9Ó(MÕNr   c                ót   — | j                  t        j                  d«      t        j                  d«      «       y)z>
        Headings with the same values compare equal.
        r   N)r   r   r0   r#   s    r   Útest_valueEqualityzHeadingTests.test_valueEqualityX   s&   € ð 	×ÑœŸ™ cÓ*¬D¯L©L¸Ó,=Õ>r   c                ót   — | j                  t        j                  d«      t        j                  d«      «       y)zA
        Headings with different values compare unequal.
        r   ç       @N)ÚassertNotEqualr   r0   r#   s    r   Útest_valueInequalityz!HeadingTests.test_valueInequality^   s&   € ð 	×ÑœDŸL™L¨Ó-¬t¯|©|¸CÓ/@ÕAr   c                ó.   — t        j                  d«       y)zR
        Headings can be instantiated with a value of 0 and no variation.
        r   N©r   r0   r#   s    r   Útest_zeroHeadingEdgeCasez%HeadingTests.test_zeroHeadingEdgeCased   s   € ô 	�‰�Q�r   c                ó0   — t        j                  dd«       y)zh
        Headings can be instantiated with a value of 0 and a variation of 180
        degrees.
        r   é´   NrM   r#   s    r   Ú*test_zeroHeading180DegreeVariationEdgeCasez7HeadingTests.test_zeroHeading180DegreeVariationEdgeCasej   s   € ô
 	�‰�Q˜Õr   c                ód   —  | j                   t        t        j                  j                  fi |¤Ž y)z¤
        Helper function for verifying that bad values raise C{ValueError}.

        @param kw: The keyword arguments passed to L{base.Heading.fromFloats}.
        N)r!   r"   r   r0   rA   )r   Úkws     r   Ú_badValueTestzHeadingTests._badValueTestq   s%   € ð 	ˆ×Ñœ*¤d§l¡l×&=Ñ&=ÑDÀÓDr   c                ó(   — | j                  d¬«       y)zO
        Headings can not be instantiated with a value of 360 degrees.
        g     €v@©Ú
angleValueN©rT   r#   s    r   Útest_badAngleValueEdgeCasez'HeadingTests.test_badAngleValueEdgeCasey   ó   € ð 	×Ñ eÐÕ,r   c                ó(   — | j                  d¬«       y)zT
        Headings can not be instantiated with a variation of -180 degrees.
        ç     €fÀr?   NrX   r#   s    r   Útest_badVariationEdgeCasez&HeadingTests.test_badVariationEdgeCase   ó   € ð 	×Ñ¨&ÐÕ1r   c                ó(   — | j                  d¬«       y)z>
        Negative heading values raise C{ValueError}.
        r>   rV   NrX   r#   s    r   Útest_negativeHeadingz!HeadingTests.test_negativeHeading…   rZ   r   c                ó(   — | j                  d¬«       y)zK
        Heading values greater than C{360.0} raise C{ValueError}.
        g      w@rV   NrX   r#   s    r   Útest_headingTooLargez!HeadingTests.test_headingTooLarge‹   rZ   r   c                ó(   — | j                  d¬«       y)zK
        Variation values less than C{-180.0} raise C{ValueError}.
        g     ÀgÀr?   NrX   r#   s    r   Útest_variationTooNegativez&HeadingTests.test_variationTooNegative‘   r^   r   c                ó(   — | j                  d¬«       y)zM
        Variation values greater than C{180.0} raise C{ValueError}.
        g     Àg@r?   NrX   r#   s    r   Útest_variationTooPositivez&HeadingTests.test_variationTooPositive—   s   € ð 	×Ñ¨%ÐÕ0r   c                óÂ   — t         j                  j                  dd¬«      }| j                  |j                  t        j
                  dt        j                  «      «       y)zQ
        A heading with a value and a variation has a corrected heading.
        r   r>   r?   g      &@N©r   r0   rA   r   r5   r   r   ÚHEADINGr6   s     r   Útest_correctedHeadingz"HeadingTests.test_correctedHeading�   sB   € ô �L‰L×#Ñ# C¸Ð#Ó>ˆØ×Ñ˜×+Ñ+¬T¯Z©Z¸¼f¿n¹nÓ-MÕNr   c                óÂ   — t         j                  j                  dd¬«      }| j                  |j                  t        j
                  dt        j                  «      «       y)zµ
        A heading with a value and a variation has the appropriate corrected
        heading value, even when the variation puts it across the 360 degree
        boundary.
        ç     pv@g       Àr?   r   Nrh   r6   s     r   Útest_correctedHeadingOverflowz*HeadingTests.test_correctedHeadingOverflow¤   óB   € ô �L‰L×#Ñ# E¸$Ð#Ó?ˆØ×Ñ˜×+Ñ+¬T¯Z©Z¸¼V¿^¹^Ó-LÕMr   c                óÂ   — t         j                  j                  dd¬«      }| j                  |j                  t        j
                  dt        j                  «      «       y)z¹
        A heading with a value and a variation has the appropriate corrected
        heading value, even when the variation puts it exactly at the 360
        degree boundary.
        rl   ç      ð¿r?   ç        Nrh   r6   s     r   Ú%test_correctedHeadingOverflowEdgeCasez2HeadingTests.test_correctedHeadingOverflowEdgeCase­   rn   r   c                óÂ   — t         j                  j                  dd¬«      }| j                  |j                  t        j
                  dt        j                  «      «       y)z²
        A heading with a value and a variation has the appropriate corrected
        heading value, even when the variation puts it under the 0 degree
        boundary.
        r   rI   r?   rl   Nrh   r6   s     r   Útest_correctedHeadingUnderflowz+HeadingTests.test_correctedHeadingUnderflow¶   sB   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ×Ñ˜×+Ñ+¬T¯Z©Z¸¼v¿~¹~Ó-NÕOr   c                óÂ   — t         j                  j                  dd¬«      }| j                  |j                  t        j
                  dt        j                  «      «       y)z·
        A heading with a value and a variation has the appropriate corrected
        heading value, even when the variation puts it exactly at the 0
        degree boundary.
        r   r?   rq   Nrh   r6   s     r   Ú&test_correctedHeadingUnderflowEdgeCasez3HeadingTests.test_correctedHeadingUnderflowEdgeCase¿   sB   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ×Ñ˜×+Ñ+¬T¯Z©Z¸¼V¿^¹^Ó-LÕMr   c                ó"  — t         j                  j                  dd¬«      }|j                  d«       | j	                  |j
                  j                  d«       |j                  d«       | j	                  |j
                  j                  d«       y)zK
        Setting the sign of a heading changes the variation sign.
        r   r?   é   éÿÿÿÿrp   N)r   r0   rA   ÚsetSignr   r4   r1   r6   s     r   Útest_setVariationSignz"HeadingTests.test_setVariationSignÈ   sg   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ	�	‰	�!ŒØ×Ñ˜Ÿ™×5Ñ5°sÔ;Ø	�	‰	�"ŒØ×Ñ˜Ÿ™×5Ñ5°tÕ<r   c                óð  — t         j                  j                  dd¬«      }| j                  t        |j
                  d«       | j                  |j                  j                  d«       | j                  t        |j
                  d«       | j                  |j                  j                  d«       | j                  t        |j
                  d«       | j                  |j                  j                  d«       y)z‘
        Setting the sign of a heading to values that aren't C{-1} or C{1}
        raises C{ValueError} and does not affect the heading.
        r   r?   éÎÿÿÿr   é2   N)	r   r0   rA   r!   r"   rz   r   r4   r1   r6   s     r   Útest_setBadVariationSignz%HeadingTests.test_setBadVariationSignÒ   s­   € ô
 �L‰L×#Ñ# C¸Ð#Ó<ˆØ×Ñœ* a§i¡i°Ô5Ø×Ñ˜Ÿ™×5Ñ5°sÔ;à×Ñœ* a§i¡i°Ô3Ø×Ñ˜Ÿ™×5Ñ5°sÔ;à×Ñœ* a§i¡i°Ô4Ø×Ñ˜Ÿ™×5Ñ5°sÕ;r   c                óÎ   — t         j                  j                  d«      }| j                  |j                  j
                  «       | j                  t        |j                  d«       y)zd
        Setting the sign on a heading with unknown variation raises
        C{ValueError}.
        r   rx   N)	r   r0   rA   r3   r4   r1   r!   r"   rz   r6   s     r   Útest_setUnknownVariationSignz)HeadingTests.test_setUnknownVariationSigná   sF   € ô
 �L‰L×#Ñ# CÓ(ˆØ×Ñ˜!Ÿ+™+×6Ñ6Ô7Ø×Ñœ* a§i¡i°Õ3r   Nr%   )rS   r2   r&   r'   )r(   r)   r*   r+   r8   r<   rE   rG   rK   rN   rQ   rT   rY   r]   r`   rb   rd   rf   rj   rm   rr   rt   rv   r{   r   r�   r,   r   r   r.   r.   4   s}   „ ñó
.ó6óOó?óBóóóEó-ó2ó-ó-ó2ó1óOóNóNóPóNó=ó<ô4r   r.   c                  óÌ   — e Zd Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zy)ÚCoordinateTestsc                ód   — t        j                  d«      }| j                  t        |«      d«       y)z9
        Coordinates can be converted to floats.
        ç      $@N)r   Ú
Coordinater   r2   ©r   Ú
coordinates     r   Ú
test_floatzCoordinateTests.test_floatì   s'   € ô —_‘_ TÓ*ˆ
Ø×Ñœ˜zÓ*¨DÕ1r   c                óp   — t        j                  d«      }dd› d�}| j                  t        |«      |«       y)zn
        Coordinates that aren't explicitly latitudes or longitudes have an
        appropriate repr.
        r…   z<Angle of unknown type (ú
 degrees)>N)r   r†   r   r   ©r   rˆ   r;   s      r   Ú	test_reprzCoordinateTests.test_repró   s5   € ô
 —_‘_ TÓ*ˆ
Ø1°$°°zÐBˆØ×Ñœ˜jÓ)¨<Õ8r   c                óŽ   — t        j                  dt        j                  «      }dd› d�}| j	                  t        |«      |«       y)zU
        Positive latitudes have a repr that specifies their type and value.
        r…   ú<Latitude (r‹   N©r   r†   r   ÚLATITUDEr   r   rŒ   s      r   Útest_positiveLatitudez%CoordinateTests.test_positiveLatitudeü   s;   € ô —_‘_ T¬6¯?©?Ó;ˆ
Ø$ T F¨*Ð5ˆØ×Ñœ˜jÓ)¨<Õ8r   c                óŽ   — t        j                  dt        j                  «      }dd› d�}| j	                  t        |«      |«       y)zU
        Negative latitudes have a repr that specifies their type and value.
        ç      IÀr�   r‹   Nr�   rŒ   s      r   Útest_negativeLatitudez%CoordinateTests.test_negativeLatitude  s;   € ô —_‘_ U¬F¯O©OÓ<ˆ
Ø$ U G¨:Ð6ˆØ×Ñœ˜jÓ)¨<Õ8r   c                óŽ   — t        j                  dt        j                  «      }dd› d�}| j	                  t        |«      |«       y)zV
        Positive longitudes have a repr that specifies their type and value.
        ç      I@ú<Longitude (r‹   N©r   r†   r   Ú	LONGITUDEr   r   ©r   Ú	longituder;   s      r   Útest_positiveLongitudez&CoordinateTests.test_positiveLongitude  s<   € ô —O‘O D¬&×*:Ñ*:Ó;ˆ	Ø% d V¨:Ð6ˆØ×Ñœ˜i›¨,Õ7r   c                óŽ   — t        j                  dt        j                  «      }dd› d�}| j	                  t        |«      |«       y)zV
        Negative longitudes have a repr that specifies their type and value.
        r”   r˜   r‹   Nr™   r›   s      r   Útest_negativeLongitudez&CoordinateTests.test_negativeLongitude  s<   € ô —O‘O E¬6×+;Ñ+;Ó<ˆ	Ø% e W¨JÐ7ˆØ×Ñœ˜i›¨,Õ7r   c                óP   — | j                  t        t        j                  dd«       y)zM
        Creating coordinates with bogus types rasies C{ValueError}.
        ç     Àb@r    N)r!   r"   r   r†   r#   s    r   Útest_bogusCoordinateTypez(CoordinateTests.test_bogusCoordinateType  s   € ð 	×Ñœ*¤d§o¡o°u¸gÕFr   c                ól   — | j                  t        t        j                  dt        j
                  «       y)zm
        Creating coordinates with angle types that aren't coordinates raises
        C{ValueError}.
        r¡   N)r!   r"   r   r†   r   ri   r#   s    r   Útest_angleTypeNotCoordinatez+CoordinateTests.test_angleTypeNotCoordinate"  s    € ð
 	×Ñœ*¤d§o¡o°u¼f¿n¹nÕMr   c                óD   — dd„}| j                   |«        |«       «       y)zE
        Coordinates with the same value and type are equal.
        c                 óJ   — t        j                  dt        j                  «      S )Nr   ©r   r†   r   rš   r,   r   r   ÚmakeCoordinatez5CoordinateTests.test_equality.<locals>.makeCoordinate.  s   € Ü—?‘? 3¬×(8Ñ(8Ó9Ð9r   N)r&   úbase.Coordinate)r   )r   r¨   s     r   Útest_equalityzCoordinateTests.test_equality)  s   € ó
	:ð 	×Ñ™Ó)©>Ó+;Õ<r   c                ó|   — t        j                  d«      }t        j                  d«      }| j                  ||«       y)zA
        Coordinates with different values aren't equal.
        r   rp   N)r   r†   rJ   ©r   Úc1Úc2s      r   Útest_differentAnglesInequalityz.CoordinateTests.test_differentAnglesInequality3  s0   € ô �_‰_˜SÓ!ˆÜ�_‰_˜TÓ"ˆØ×Ñ˜B Õ#r   c                ó¸   — t        j                  dt        j                  «      }t        j                  dt        j                  «      }| j                  ||«       y)zT
        Coordinates with the same values but different types aren't equal.
        r   N)r   r†   r   r‘   rš   rJ   r¬   s      r   Útest_differentTypesInequalityz-CoordinateTests.test_differentTypesInequality;  s>   € ô �_‰_˜S¤&§/¡/Ó2ˆÜ�_‰_˜S¤&×"2Ñ"2Ó3ˆØ×Ñ˜B Õ#r   c                ó   — t        j                  dt        j                  «      }|j	                  d«       | j                  |j                  d«       |j	                  d«       | j                  |j                  d«       y)zh
        Setting the sign on a coordinate sets the sign of the value of the
        coordinate.
        r—   rx   ry   r”   N)r   r†   r   r‘   rz   r   r1   ©r   Úcs     r   Ú	test_signzCoordinateTests.test_signC  sZ   € ô
 �O‰O˜D¤&§/¡/Ó2ˆØ	�	‰	�!ŒØ×Ñ˜×+Ñ+¨TÔ2Ø	�	‰	�"ŒØ×Ñ˜×+Ñ+¨UÕ3r   c                ó¾  — d}t        j                  |t        j                  «      }| j	                  t
        |j                  d«       | j                  |j                  d«       | j	                  t
        |j                  d«       | j                  |j                  d«       | j	                  t
        |j                  d«       | j                  |j                  d«       y)zŠ
        Setting a bogus sign value (not -1 or 1) on a coordinate raises
        C{ValueError} and doesn't affect the coordinate.
        r—   r}   r   r~   N)	r   r†   r   r‘   r!   r"   rz   r   r1   )r   Úvaluer´   s      r   Útest_badVariationSignz%CoordinateTests.test_badVariationSignN  s¡   € ð
 ˆÜ�O‰O˜E¤6§?¡?Ó3ˆà×Ñœ* a§i¡i°Ô5Ø×Ñ˜×+Ñ+¨TÔ2à×Ñœ* a§i¡i°Ô3Ø×Ñ˜×+Ñ+¨TÔ2à×Ñœ* a§i¡i°Ô4Ø×Ñ˜×+Ñ+¨TÕ2r   c                ó    — t        j                  dt        j                  «      }| j	                  |j
                  t        j                  «       y)zD
        Positive latitudes are in the northern hemisphere.
        r   N)r   r†   r   r‘   r   Ú
hemispherer   ÚNORTHr‡   s     r   Útest_northernHemispherez'CoordinateTests.test_northernHemisphere_  s4   € ô —_‘_ S¬&¯/©/Ó:ˆ
Ø×Ñ˜×.Ñ.´
×0@Ñ0@ÕAr   c                ó    — t        j                  dt        j                  «      }| j	                  |j
                  t        j                  «       y)zD
        Positive longitudes are in the eastern hemisphere.
        r   N)r   r†   r   rš   r   rº   r   ÚEASTr‡   s     r   Útest_easternHemispherez&CoordinateTests.test_easternHemispheref  s4   € ô —_‘_ S¬&×*:Ñ*:Ó;ˆ
Ø×Ñ˜×.Ñ.´
·±Õ@r   c                ó    — t        j                  dt        j                  «      }| j	                  |j
                  t        j                  «       y)zD
        Negative latitudes are in the southern hemisphere.
        rp   N)r   r†   r   r‘   r   rº   r   ÚSOUTHr‡   s     r   Útest_southernHemispherez'CoordinateTests.test_southernHemispherem  s4   € ô —_‘_ T¬6¯?©?Ó;ˆ
Ø×Ñ˜×.Ñ.´
×0@Ñ0@ÕAr   c                ó    — t        j                  dt        j                  «      }| j	                  |j
                  t        j                  «       y)zD
        Negative longitudes are in the western hemisphere.
        rp   N)r   r†   r   rš   r   rº   r   ÚWESTr‡   s     r   Útest_westernHemispherez&CoordinateTests.test_westernHemispheret  s4   € ô —_‘_ T¬6×+;Ñ+;Ó<ˆ
Ø×Ñ˜×.Ñ.´
·±Õ@r   c                ód   ‡— t        j                  dd«      Š| j                  t        ˆfd„«       y)zo
        Accessing the hemisphere for a coordinate that can't compute it
        raises C{ValueError}.
        r   Nc                 ó   •— ‰ j                   S )N)rº   )rˆ   s   €r   ú<lambda>z4CoordinateTests.test_badHemisphere.<locals>.<lambda>�  s   ø€ ¨j×.CÑ.C€ r   )r   r†   r!   r"   r‡   s    @r   Útest_badHemispherez"CoordinateTests.test_badHemisphere{  s&   ø€ ô
 —_‘_ S¨$Ó/ˆ
Ø×Ñœ*Ó&CÕDr   c                óp   — | j                  t        t        d«       | j                  t        t        d«       y)zt
        Creating a latitude with a value greater than or equal to 90 degrees
        raises C{ValueError}.
        r¡   g     €V@N©r!   r"   Ú_makeLatituder#   s    r   Útest_latitudeTooLargez%CoordinateTests.test_latitudeTooLargeƒ  s(   € ð
 	×Ñœ*¤m°UÔ;Ø×Ñœ*¤m°TÕ:r   c                óp   — | j                  t        t        d«       | j                  t        t        d«       y)zr
        Creating a latitude with a value less than or equal to -90 degrees
        raises C{ValueError}.
        g     ÀbÀg     €VÀNrË   r#   s    r   Útest_latitudeTooSmallz%CoordinateTests.test_latitudeTooSmall‹  s(   € ð
 	×Ñœ*¤m°VÔ<Ø×Ñœ*¤m°UÕ;r   c                óp   — | j                  t        t        d«       | j                  t        t        d«       y)zv
        Creating a longitude with a value greater than or equal to 180 degrees
        raises C{ValueError}.
        g     @o@g     €f@N©r!   r"   Ú_makeLongituder#   s    r   Útest_longitudeTooLargez&CoordinateTests.test_longitudeTooLarge“  s(   € ð
 	×Ñœ*¤n°eÔ<Ø×Ñœ*¤n°eÕ<r   c                óp   — | j                  t        t        d«       | j                  t        t        d«       y)zt
        Creating a longitude with a value less than or equal to -180 degrees
        raises C{ValueError}.
        g     @oÀr\   NrÑ   r#   s    r   Útest_longitudeTooSmallz&CoordinateTests.test_longitudeTooSmall›  s(   € ð
 	×Ñœ*¤n°fÔ=Ø×Ñœ*¤n°fÕ=r   c                ó  — t        j                  dt        j                  «      }| j	                  |j
                  d«       t        j                  dt        j                  «      }| j	                  |j
                  d«       y)zQ
        Coordinate values can be accessed in degrees, minutes, seconds.
        g     @I@)r~   é   r   g%�•CI@)r~   é   é.   N)r   r†   r   r‘   r   ÚinDegreesMinutesSecondsr³   s     r   Útest_inDegreesMinutesSecondsz,CoordinateTests.test_inDegreesMinutesSeconds£  sX   € ô �O‰O˜D¤&§/¡/Ó2ˆØ×Ñ˜×2Ñ2°KÔ@ä�O‰O˜F¤F§O¡OÓ4ˆØ×Ñ˜×2Ñ2°LÕAr   c                óf   — t        j                  dd«      }| j                  |j                  «       y)zz
        If the vaue of a coordinate is L{None}, its values in degrees,
        minutes, seconds is also L{None}.
        N)r   r†   r3   rÚ   r³   s     r   Ú(test_unknownAngleInDegreesMinutesSecondsz8CoordinateTests.test_unknownAngleInDegreesMinutesSeconds­  s(   € ô
 �O‰O˜D $Ó'ˆØ×Ñ˜!×3Ñ3Õ4r   Nr%   )r(   r)   r*   r‰   r�   r’   r•   r�   rŸ   r¢   r¤   rª   r¯   r±   rµ   r¸   r¼   r¿   rÂ   rÅ   rÉ   rÍ   rÏ   rÓ   rÕ   rÛ   rÝ   r,   r   r   rƒ   rƒ   ë   s‚   „ ó2ó9ó9ó9ó8ó8óGóNó=ó$ó$ó	4ó3ó"BóAóBóAóEó;ó<ó=ó>óBô5r   rƒ   c                óJ   — t        j                  | t        j                  «      S )z7
    Builds and returns a latitude of given value.
    )r   r†   r   r‘   ©r·   s    r   rÌ   rÌ   ¶  s   € ô �?‰?˜5¤&§/¡/Ó2Ð2r   c                óJ   — t        j                  | t        j                  «      S )z8
    Builds and returns a longitude of given value.
    r§   rß   s    r   rÒ   rÒ   ½  s   € ô �?‰?˜5¤&×"2Ñ"2Ó3Ð3r   c                  ó0   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zy)ÚAltitudeTestszC
    Tests for the L{twisted.positioning.base.Altitude} class.
    c                óö   — t        j                  d«      }| j                  t        |«      d«       | j                  |j                  d«       | j                  |j
                  dt         j                  z  «       y)z�
        Altitudes can be instantiated and reports the correct value in
        meters and feet, as well as when converted to float.
        r   N)r   ÚAltituder   r2   ÚinMetersÚinFeetÚMETERS_PER_FOOT©r   Úaltitudes     r   Ú
test_valuezAltitudeTests.test_valueÉ  s[   € ô
 —=‘= Ó%ˆØ×Ñœ˜x›¨#Ô.Ø×Ñ˜×*Ñ*¨CÔ0Ø×Ñ˜Ÿ™¨#´×0DÑ0DÑ*DÕEr   c                ód   — t        j                  d«      }| j                  t        |«      d«       y)zF
        Altitudes report their type and value in their repr.
        r   z<Altitude (1.0 m)>N)r   rä   r   r   rè   s     r   r�   zAltitudeTests.test_reprÓ  s'   € ô —=‘= Ó%ˆØ×Ñœ˜h›Ð)=Õ>r   c                ó|   — t        j                  d«      }t        j                  d«      }| j                  ||«       y)z<
        Altitudes with equal values compare equal.
        r   N)r   rä   r   ©r   ÚfirstAltitudeÚsecondAltitudes      r   rª   zAltitudeTests.test_equalityÚ  s0   € ô Ÿ™ cÓ*ˆÜŸ™ sÓ+ˆØ×Ñ˜¨Õ7r   c                ó|   — t        j                  d«      }t        j                  d«      }| j                  ||«       y)zF
        Altitudes with different values don't compare equal.
        r   rp   N)r   rä   rJ   rí   s      r   Útest_inequalityzAltitudeTests.test_inequalityâ  s0   € ô Ÿ™ cÓ*ˆÜŸ™ tÓ,ˆØ×Ñ˜M¨>Õ:r   Nr%   )r(   r)   r*   r+   rê   r�   rª   rñ   r,   r   r   râ   râ   Ä  s   „ ñóFó?ó8ô;r   râ   c                  ó8   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zy)	Ú
SpeedTestsz@
    Tests for the L{twisted.positioning.base.Speed} class.
    c                óœ   — t        j                  d«      }| j                  |j                  d«       | j                  t	        |«      d«       y)ú‚
        Speeds can be instantiated, and report their value in meters
        per second, and can be converted to floats.
        r—   N)r   ÚSpeedr   ÚinMetersPerSecondr2   ©r   Úspeeds     r   rê   zSpeedTests.test_valueð  ó<   € ô
 —
‘
˜4Ó ˆØ×Ñ˜×0Ñ0°$Ô7Ø×Ñœ˜u› tÕ,r   c                ód   — t        j                  d«      }| j                  t        |«      d«       y)zC
        Speeds report their type and value in their repr.
        r—   z<Speed (50.0 m/s)>N)r   rö   r   r   rø   s     r   r�   zSpeedTests.test_reprù  ó'   € ô —
‘
˜4Ó ˆØ×Ñœ˜e›Ð&:Õ;r   c                óN   — | j                  t        t        j                  d«       y)zA
        Creating a negative speed raises C{ValueError}.
        rp   N)r!   r"   r   rö   r#   s    r   Útest_negativeSpeedszSpeedTests.test_negativeSpeeds   s   € ð 	×Ñœ*¤d§j¡j°$Õ7r   c                óˆ   — t        j                  d«      }| j                  dt         j                  z  |j                  «       y)zC
        A speed can be converted into its value in knots.
        r   rx   N)r   rö   r   ÚMPS_PER_KNOTÚinKnotsrø   s     r   Útest_inKnotszSpeedTests.test_inKnots  ó0   € ô —
‘
˜3“ˆØ×Ñ˜œT×.Ñ.Ñ.°·±Õ>r   c                ó`   — | j                  dt        t        j                  d«      «      «       y)z;
        A speed can be converted into a C{float}.
        r   N)r   r2   r   rö   r#   s    r   Útest_asFloatzSpeedTests.test_asFloat  ó!   € ð 	×Ñ˜œe¤D§J¡J¨s£OÓ4Õ5r   Nr%   )	r(   r)   r*   r+   rê   r�   rþ   r  r  r,   r   r   ró   ró   ë  s    „ ñó-ó<ó8ó?ô6r   ró   c                  ó8   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zy)	Ú
ClimbTestsz6
    Tests for L{twisted.positioning.base.Climb}.
    c                óœ   — t        j                  d«      }| j                  |j                  d«       | j                  t	        |«      d«       y)rõ   ç      E@N©r   ÚClimbr   r÷   r2   ©r   Úclimbs     r   r8   zClimbTests.test_simple  rú   r   c                ód   — t        j                  d«      }| j                  t        |«      d«       y)zC
        Climbs report their type and value in their repr.
        r
  z<Climb (42.0 m/s)>N)r   r  r   r   r  s     r   r�   zClimbTests.test_repr"  rü   r   c                óœ   — t        j                  d«      }| j                  |j                  d«       | j                  t	        |«      d«       y)z‰
        Climbs can have negative values, and still report that value
        in meters per second and when converted to floats.
        g      EÀNr  r  s     r   Útest_negativeClimbszClimbTests.test_negativeClimbs)  s<   € ô
 —
‘
˜5Ó!ˆØ×Ñ˜×0Ñ0°%Ô8Ø×Ñœ˜u› uÕ-r   c                óˆ   — t        j                  d«      }| j                  dt         j                  z  |j                  «       y)zC
        A climb can be converted into its value in knots.
        r   rx   N)r   r  r   r   r  r  s     r   Útest_speedInKnotszClimbTests.test_speedInKnots2  r  r   c                ó`   — | j                  dt        t        j                  d«      «      «       y)z;
        A climb can be converted into a C{float}.
        r   N)r   r2   r   r  r#   s    r   r  zClimbTests.test_asFloat9  r  r   Nr%   )	r(   r)   r*   r+   r8   r�   r  r  r  r,   r   r   r  r    s    „ ñó-ó<ó.ó?ô6r   r  c                  óˆ   — e Zd ZdZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	dd„Z
dd	„Zd
Z	 	 	 	 	 	 	 	 	 	 dd„Zdd„Zdd„Zdd„Zy)ÚPositionErrorTestsz>
    Tests for L{twisted.positioning.base.PositionError}.
    c                óÎ   — t        j                  «       }| j                  |j                  «       | j                  |j                  «       | j                  |j
                  «       y)z~
        In an empty L{base.PositionError} with no invariant testing, all
        dilutions of positions are L{None}.
        N©r   ÚPositionErrorr3   ÚpdopÚhdopÚvdop©r   ÚpositionErrors     r   Útest_allUnsetz PositionErrorTests.test_allUnsetE  sN   € ô
 ×*Ñ*Ó,ˆØ×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Õ-r   c                óÒ   — t        j                  d¬«      }| j                  |j                  «       | j                  |j                  «       | j                  |j
                  «       y)z{
        In an empty L{base.PositionError} with invariant testing, all
        dilutions of positions are L{None}.
        T)ÚtestInvariantNr  r  s     r   Útest_allUnsetWithInvariantz-PositionErrorTests.test_allUnsetWithInvariantO  sP   € ô
 ×*Ñ*¸Ô>ˆØ×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Õ-r   c                óh   — t        j                  d¬«      }| j                  |j                  d«       y)zN
        L{base.PositionError}s can be instantiated with just a HDOP.
        r   )r  N©r   r  r   r  r  s     r   Útest_withoutInvariantz(PositionErrorTests.test_withoutInvariantY  s*   € ô ×*Ñ*°Ô4ˆØ×Ñ˜×+Ñ+¨SÕ1r   c                ój   — t        j                  dd¬«      }| j                  |j                  d«       y)zv
        Creating a simple L{base.PositionError} with just a HDOP while
        checking the invariant works.
        r   T)r  r!  Nr$  r  s     r   Útest_withInvariantz%PositionErrorTests.test_withInvariant`  s,   € ô
 ×*Ñ*°À4ÔHˆØ×Ñ˜×+Ñ+¨SÕ1r   c                óÜ   — t        j                  ddd¬«      }| j                  |j                  d«       | j                  |j                  d«       | j                  |j
                  d«       y)zŽ
        Creating a L{base.PositionError} with values set to an impossible
        combination works if the invariant is not checked.
        r   )r  r  r  N)r   r  r   r  r  r  )r   Úerrors     r   Útest_invalidWithoutInvariantz/PositionErrorTests.test_invalidWithoutInvarianth  sT   € ô
 ×"Ñ"¨°#¸CÔ@ˆØ×Ñ˜Ÿ™ SÔ)Ø×Ñ˜Ÿ™ SÔ)Ø×Ñ˜Ÿ™ SÕ)r   c                óV   — | j                  t        t        j                  dddd¬«       y)zž
        Creating a L{base.PositionError} with values set to an impossible
        combination raises C{ValueError} if the invariant is being tested.
        r   T)r  r  r  r!  N)r!   r"   r   r  r#   s    r   Útest_invalidWithInvariantz,PositionErrorTests.test_invalidWithInvariantr  s/   € ð
 	×ÑÜÜ×ÑØØØØð 	õ 	
r   c                óx   — t        j                  dd¬«      }d|_        | j                  |j                  d«       y)z}
        You can set the PDOP value to value inconsisted with HDOP and VDOP
        when not checking the invariant.
        r   ©r  r  ç      Y@N)r   r  r  r   )r   Úpes     r   Útest_setDOPWithoutInvariantz.PositionErrorTests.test_setDOPWithoutInvariant€  s1   € ô
 ×Ñ S¨sÔ3ˆØˆŒØ×Ñ˜Ÿ™ %Õ(r   c                óº   — t        j                  ddd¬«      }|j                  }dd„}| j                  t        ||«       | j                  |j                  |«       y)z”
        Attempting to set the PDOP value to value inconsisted with HDOP and
        VDOP when checking the invariant raises C{ValueError}.
        r   T)r  r  r!  c                ó   — d| _         y )Nr/  )r  )r0  s    r   ÚsetPDOPz<PositionErrorTests.test_setDOPWithInvariant.<locals>.setPDOP‘  s	   € ØˆB�Gr   N)r0  úbase.PositionErrorr&   r'   )r   r  r  r!   r"   r   )r   r0  r  r4  s       r   Útest_setDOPWithInvariantz+PositionErrorTests.test_setDOPWithInvariant‰  sN   € ô
 ×Ñ S¨sÀ$ÔGˆØ�w‰wˆó	ð 	×Ñœ* g¨rÔ2Ø×Ñ˜Ÿ™ $Õ'r   z.<PositionError (pdop: %s, hdop: %s, vdop: %s)>c                ó  — | j                  |j                  |«       | j                  |j                  |«       | j                  |j                  |«       | j                  t	        |«      | j
                  |||fz  «       y)aþ  
        Tests the DOP values in a position error, and the repr of that
        position error.

        @param pe: The position error under test.
        @type pe: C{PositionError}
        @param pdop: The expected position dilution of precision.
        @type pdop: C{float} or L{None}
        @param hdop: The expected horizontal dilution of precision.
        @type hdop: C{float} or L{None}
        @param vdop: The expected vertical dilution of precision.
        @type vdop: C{float} or L{None}
        N)r   r  r  r  r   ÚREPR_TEMPLATE)r   r0  r  r  r  s        r   Ú_testDOPzPositionErrorTests._testDOP™  sf   € ð( 	×Ñ˜Ÿ™ $Ô'Ø×Ñ˜Ÿ™ $Ô'Ø×Ñ˜Ÿ™ $Ô'Ø×Ñœ˜b› 4×#5Ñ#5¸¸tÀTÐ8JÑ#JÕKr   c                ó€   — d\  }}|dz  |dz  z
  dz  }t        j                  ||¬«      }| j                  ||||«       y)zF
        The VDOP is correctly determined from PDOP and HDOP.
        ©rI   r   é   ç      à?)r  r  N©r   r  r9  )r   r  r  r  r0  s        r   Útest_positionAndHorizontalSetz0PositionErrorTests.test_positionAndHorizontalSet²  óH   € ð ‰
ˆˆdØ�a‘˜$ ™'Ñ! cÑ)ˆÜ×Ñ T°Ô5ˆØ�‰�b˜$  dÕ+r   c                ó€   — d\  }}|dz  |dz  z
  dz  }t        j                  ||¬«      }| j                  ||||«       y)zF
        The HDOP is correctly determined from PDOP and VDOP.
        r;  r<  r=  )r  r  Nr>  )r   r  r  r  r0  s        r   Útest_positionAndVerticalSetz.PositionErrorTests.test_positionAndVerticalSet»  r@  r   c                ó€   — d\  }}|dz  |dz  z   dz  }t        j                  ||¬«      }| j                  ||||«       y)zF
        The PDOP is correctly determined from HDOP and VDOP.
        )r   r   r<  r=  r.  Nr>  )r   r  r  r  r0  s        r   Útest_horizontalAndVerticalSetz0PositionErrorTests.test_horizontalAndVerticalSetÄ  r@  r   Nr%   )
r0  r5  r  úfloat | Noner  rE  r  rE  r&   r'   )r(   r)   r*   r+   r  r"  r%  r'  r*  r,  r1  r6  r8  r9  r?  rB  rD  r,   r   r   r  r  @  s�   „ ñó.ó.ó2ó2ó*ó
ó)ó(ð E€MðLàðLð ðLð ð	Lð
 ðLð 
óLó2,ó,ô,r   r  c                  ó4   — e Zd ZdZd	d„ZddddœZd	d„Zd	d„Zy)
ÚBeaconInformationTestszB
    Tests for L{twisted.positioning.base.BeaconInformation}.
    c                ó°   — t        j                  «       }| j                  t        |j                  «      d«       d}| j                  t        |«      |«       y)z»
        For an empty beacon information object, the number of used
        beacons is zero, the number of seen beacons is zero, and the
        repr of the object reflects that.
        r   z><BeaconInformation (used beacons (0): [], unused beacons: [])>N)r   ÚBeaconInformationr   ÚlenÚusedBeaconsr   )r   Úbir;   s      r   Útest_minimalz#BeaconInformationTests.test_minimalÓ  sI   € ô ×#Ñ#Ó%ˆØ×Ñœ˜RŸ^™^Ó,¨aÔ0àRð 	ð 	×Ñœ˜b› <Õ0r   rx   r   )ÚazimuthÚ	elevationÚsignalToNoiseRatioc                ól  ‡ — d	ˆ fd„}t        «       }t        dd«      D ]  }|j                   ||¬«      «       Œ t        j                  |«      }‰ j                  t        |j                  «      d«       ‰ j                  t        |j                  «      d«       ‰ j                  t        |«      d«       y)
zw
        Tests a beacon information with a bunch of satellites, none of
        which used in computing a fix.
        c                 óz   •— t        ‰j                  «      }|j                  | «       t        j                  di |¤ŽS )Nr,   )ÚdictÚsatelliteKwargsÚupdater   Ú	Satellite)rS   Úkwargsr   s     €r   Ú_buildSatellitez;BeaconInformationTests.test_simple.<locals>._buildSatelliteè  s1   ø€ Ü˜$×.Ñ.Ó/ˆFØ�M‰M˜"ÔÜ—>‘>Ñ+ FÑ+Ð+r   rx   é
   )Ú
identifieré	   r   a  <BeaconInformation (used beacons (0): [], unused beacons: [<Satellite (1), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (2), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (3), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (4), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (5), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (6), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (7), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (8), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (9), azimuth: 1, elevation: 1, snr: 1.0>])>N)rS   r2   r&   zbase.Satellite)
ÚsetÚrangeÚaddr   rI  r   rJ  ÚseenBeaconsrK  r   )r   rX  ÚbeaconsÚprnrL  s   `    r   r8   z"BeaconInformationTests.test_simpleâ  s•   ø€ õ	,ô
 “%ˆÜ˜˜B“<ò 	9ˆCØ�K‰K™°3Ô7Õ8ð	9ô ×#Ñ# GÓ,ˆà×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×ÑÜ�‹Hðõ	
r   c                óÒ  — t        j                  «       }t        dd«      D ]_  }t        j                  d	d|i| j                  ¤Ž}|j
                  j                  |«       |dz  sŒE|j                  j                  |«       Œa | j                  t        |j
                  «      d«       | j                  t        |j                  «      d«       | j                  t        |«      d«       y)
zv
        Tests a beacon information with a bunch of satellites, some of
        them used in computing a fix.
        rx   rY  rZ  r<  r[  é   a  <BeaconInformation (used beacons (5): [<Satellite (1), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (3), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (5), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (7), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (9), azimuth: 1, elevation: 1, snr: 1.0>], unused beacons: [<Satellite (2), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (4), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (6), azimuth: 1, elevation: 1, snr: 1.0>, <Satellite (8), azimuth: 1, elevation: 1, snr: 1.0>])>Nr,   )r   rI  r]  rV  rT  r_  r^  rK  r   rJ  r   )r   rL  ra  Ú	satellites       r   Útest_someSatellitesUsedz.BeaconInformationTests.test_someSatellitesUsed  s½   € ô
 ×#Ñ#Ó%ˆä˜˜B“<ò 	.ˆCÜŸ™ÑN°#ÐN¸×9MÑ9MÑNˆIØ�N‰N×Ñ˜yÔ)Ø�Q‹wØ—‘×"Ñ" 9Õ-ð		.ð 	×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×Ñœ˜RŸ^™^Ó,¨aÔ0à×ÑÜ�‹Hð
Eõ	
r   Nr%   )r(   r)   r*   r+   rM  rT  r8   re  r,   r   r   rG  rG  Î  s%   „ ñó1ð #$°!È3ÑO€Oó!
ôF
r   rG  c                  ó    — e Zd ZdZdd„Zdd„Zy)ÚPositioningBeaconTestsz.
    Tests for L{base.PositioningBeacon}.
    c                óÆ   — t        j                  t        j                  «      }| j	                  |«       t        j                  t         t        j                  d«      «       y)zX
        Tests that L{base.PositioningBeacon} implements L{IPositioningBeacon}.
        rx   N)r   ÚimplementedByr   ÚPositioningBeaconÚ
assertTruer   ÚverifyObject)r   Ú
implementss     r   Útest_interfacez%PositioningBeaconTests.test_interface*  sB   € ô (×5Ñ5´d×6LÑ6LÓMˆ
Ø�‰˜
Ô#Ü×ÑÔ.´×0FÑ0FÀqÓ0IÕJr   c                ó`   — | j                  t        t        j                  d«      «      d«       y)z9
        Tests the repr of a positioning beacon.
        ÚAz<Beacon (A)>N)r   r   r   rj  r#   s    r   r�   z PositioningBeaconTests.test_repr2  s$   € ð 	×Ñœœd×4Ñ4°SÓ9Ó:¸NÕKr   Nr%   )r(   r)   r*   r+   rn  r�   r,   r   r   rg  rg  %  s   „ ñóKôLr   rg  c                  ó    — e Zd ZdZdd„Zdd„Zy)ÚSatelliteTestsz:
    Tests for L{twisted.positioning.base.Satellite}.
    c                ó>  — t        j                  d«      }| j                  |j                  d«       | j	                  |j
                  «       | j	                  |j                  «       | j	                  |j                  «       | j                  t        |«      d«       y)z·
        Tests a minimal satellite that only has a known PRN.

        Tests that the azimuth, elevation and signal to noise ratios
        are L{None} and verifies the repr.
        rx   z:<Satellite (1), azimuth: None, elevation: None, snr: None>N)	r   rV  r   rZ  r3   rN  rO  rP  r   ©r   Úss     r   rM  zSatelliteTests.test_minimal>  sv   € ô �N‰N˜1ÓˆØ×Ñ˜Ÿ™ qÔ)Ø×Ñ˜!Ÿ)™)Ô$Ø×Ñ˜!Ÿ+™+Ô&Ø×Ñ˜!×.Ñ.Ô/Ø×ÑÜ�‹GÐTõ	
r   c                óL  — t        j                  dddd¬«      }| j                  |j                  d«       | j                  |j                  d«       | j                  |j
                  d«       | j                  |j                  d«       | j                  t        |«      d«       y)z·
        Tests a minimal satellite that only has a known PRN.

        Tests that the azimuth, elevation and signal to noise ratios
        are correct and verifies the repr.
        rx   g     àp@g      >@g      9@)rZ  rN  rO  rP  z;<Satellite (1), azimuth: 270.0, elevation: 30.0, snr: 25.0>N)r   rV  r   rZ  rN  rO  rP  r   rt  s     r   r8   zSatelliteTests.test_simpleN  s‡   € ô �N‰NØ %°4ÈDô
ˆð 	×Ñ˜Ÿ™ qÔ)Ø×Ñ˜Ÿ™ EÔ*Ø×Ñ˜Ÿ™ dÔ+Ø×Ñ˜×-Ñ-¨tÔ4Ø×ÑÜ�‹GÐUõ	
r   Nr%   )r(   r)   r*   r+   rM  r8   r,   r   r   rr  rr  9  s   „ ñó
ô 
r   rr  N)r·   r2   r&   r©   )r+   Ú
__future__r   Úzope.interfacer   Útwisted.positioningr   Útwisted.positioning.baser   r   Ú twisted.positioning.ipositioningr   Útwisted.trial.unittestr	   r   r.   rƒ   rÌ   rÒ   râ   ró   r  r  rG  rg  rr  r,   r   r   ú<module>r}     s´   ðñõ #å !å $ß 7Ý ?Ý +ô!E�ô !EôHt4�8ô t4ônH5�hô H5óV3ó4ô$;�Hô $;ôN&6�ô &6ôR)6�ô )6ôXK,˜ô K,ô\T
˜Xô T
ônL˜Xô Lô(&
�Xõ &
r   