+
    üÐj\t  ã                  óJ  € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHtH	t	 ^ RI
Ht ^ RIHt  ! R R]4      t ! R	 R
]4      t ! R R]4      tR R ltR R lt ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      tR# ) z(
Test cases for positioning primitives.
)Úannotations)Úverify)Úbase)ÚAnglesÚ
Directions)ÚIPositioningBeacon)ÚTestCasec                  óJ   € ] tR t^tRtR R ltR R ltR R ltR R	 ltR
t	R# )Ú
AngleTestsz8
Tests for the L{twisted.positioning.base.Angle} class.
c               ó   € V ^8„  d   QhRR/# ©é   ÚreturnÚNone© )Úformats   "ÚD/usr/lib/python3/dist-packages/twisted/positioning/test/test_base.pyÚ__annotate__ÚAngleTests.__annotate__   s   € ÷ Mñ M˜Dñ Mó    c                óf   € \         P                  ! 4       pV P                  R\        V4      4       R# )zL
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   & r   Ú
test_emptyÚAngleTests.test_empty   s$   € ô
 �JŠJ‹LˆØ×ÑÐBÄDÈÃGÖLr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r      s   € ÷ Añ A ñ Ar   c                ó†   € \         P                  ! \        P                  R7      pV P	                  R\        V4      4       R# )zN
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_variationÚAngleTests.test_variation   s-   € ô
 �JŠJ¤×!1Ñ!1Ô2ˆØ×ÑÐ6¼¸Q»Ö@r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   %   s   € ÷ Kñ K $ñ Kr   c                óh   € \         P                  ! R4      pV P                  R\        V4      4       R# )zb
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_unknownTypeÚAngleTests.test_unknownType%   s&   € ô
 �JŠJ�s‹OˆØ×ÑÐ@Ä$ÀqÃ'ÖJr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   -   s   € ÷ Eñ E ñ Er   c                óR   € V P                  \        \        P                  RR7       R# )zC
Trying to create an angle with a bogus type raises C{ValueError}.
ÚBOGUSr"   N)ÚassertRaisesÚ
ValueErrorr   r   ©r   s   &r   Útest_bogusTypeÚAngleTests.test_bogusType-   s   € ð 	×Ñœ*¤d§j¡j¸GÐÖDr   r   N)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r%   r*   r2   Ú__static_attributes__r   r   r   r
   r
      s%   † ñõMõAõK÷Eñ Er   r
   c                  ó"  € ] tR t^4tRtR R ltR R ltR R ltR R	 ltR
 R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltR.tR/# )0ÚHeadingTestsz:
Tests for the L{twisted.positioning.base.Heading} class.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚHeadingTests.__annotate__9   s   € ÷ 
.ñ 
.˜Tñ 
.r   c                ó  € \         P                  ! R4      pV P                  VP                  R4       V P                  \	        V4      R4       V P                  VP                  4       V P                  VP                  4       R# )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_simpleÚHeadingTests.test_simple9   sb   € ô �LŠL˜ÓˆØ×Ñ˜×+Ñ+¨SÔ1Ø×Ñœ˜q› 3Ô'Ø×Ñ˜!Ÿ+™+Ô&Ø×Ñ˜!×,Ñ,Ö-r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   E   s   € ÷ 6ñ 6°$ñ 6r   c                ól   € \         P                  ! R4      pRpV P                  \        V4      V4       R# )z\
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   r?   r   r   )r   ÚheadingÚexpectedReprs   &  r   Ú test_headingWithoutVariationReprÚ-HeadingTests.test_headingWithoutVariationReprE   s+   € ô
 —,’,˜sÓ#ˆØCˆØ×Ñœ˜g›¨Ö5r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   N   s   € ÷ Oñ O¨tñ Or   c                ó¤   € RRr!\         P                  P                  WR7      pRpV P                  \	        V4      VP                  W4      4       R# )z]
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   r?   Ú
fromFloatsr   r   r   )r   ÚanglerC   rK   ÚreprTemplates   &    r   Útest_headingWithVariationReprÚ*HeadingTests.test_headingWithVariationReprN   sF   € ð
  ˆyÜ—,‘,×)Ñ)¨%Ð)ÓJˆØKˆØ×Ñœ˜g›¨×(;Ñ(;¸EÓ(MÖNr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   X   s   € ÷ ?ñ ? Dñ ?r   c                óz   € V P                  \        P                  ! R4      \        P                  ! R4      4       R# )z.
Headings with the same values compare equal.
r)   N)r   r   r?   r1   s   &r   Útest_valueEqualityÚHeadingTests.test_valueEqualityX   s&   € ð 	×ÑœŸš cÓ*¬D¯LªL¸Ó,=Ö>r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ^   s   € ÷ Bñ B dñ Br   c                óz   € V P                  \        P                  ! R4      \        P                  ! R4      4       R# )z1
Headings with different values compare unequal.
r)   ç       @N)ÚassertNotEqualr   r?   r1   s   &r   Útest_valueInequalityÚ!HeadingTests.test_valueInequality^   s&   € ð 	×ÑœDŸLšL¨Ó-¬t¯|ª|¸CÓ/@ÖAr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   d   s   € ÷ ñ ¨$ñ r   c                ó2   € \         P                  ! ^ 4       R# )zB
Headings can be instantiated with a value of 0 and no variation.
N©r   r?   r1   s   &r   Útest_zeroHeadingEdgeCaseÚ%HeadingTests.test_zeroHeadingEdgeCased   s   € ô 	�Š�QŽr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   j   s   € ÷ ñ ¸Dñ r   c                ó4   € \         P                  ! ^ ^´4       R# )zP
Headings can be instantiated with a value of 0 and a variation of 180
degrees.
Nre   r1   s   &r   Ú*test_zeroHeading180DegreeVariationEdgeCaseÚ7HeadingTests.test_zeroHeading180DegreeVariationEdgeCasej   s   € ô
 	�Š�Q˜Ör   c               ó    € V ^8„  d   QhRRRR/# )r   ÚkwrA   r   r   r   )r   s   "r   r   r=   q   s   € ÷ Eñ E %ð E¨Dñ Er   c                óf   € V P                   ! \        \        P                  P                  3/ VB  R# )zŒ
Helper function for verifying that bad values raise C{ValueError}.

@param kw: The keyword arguments passed to L{base.Heading.fromFloats}.
N)r/   r0   r   r?   rT   )r   rm   s   &,r   Ú_badValueTestÚHeadingTests._badValueTestq   s#   € ð 	×Òœ*¤d§l¡l×&=Ñ&=ÑDÀÔDr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   y   s   € ÷ -ñ -¨Dñ -r   c                ó*   € V P                  RR7       R# )z?
Headings can not be instantiated with a value of 360 degrees.
g     €v@©Ú
angleValueN©ro   r1   s   &r   Útest_badAngleValueEdgeCaseÚ'HeadingTests.test_badAngleValueEdgeCasey   ó   € ð 	×Ñ eÐÖ,r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=      ó   € ÷ 2ñ 2¨4ñ 2r   c                ó*   € V P                  RR7       R# )zD
Headings can not be instantiated with a variation of -180 degrees.
rQ   Nç     €fÀru   r1   s   &r   Útest_badVariationEdgeCaseÚ&HeadingTests.test_badVariationEdgeCase   ó   € ð 	×Ñ¨&ÐÖ1r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   …   ó   € ÷ -ñ - dñ -r   c                ó*   € V P                  RR7       R# )z.
Negative heading values raise C{ValueError}.
rs   NrS   ru   r1   s   &r   Útest_negativeHeadingÚ!HeadingTests.test_negativeHeading…   rx   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ‹   r�   r   c                ó*   € V P                  RR7       R# )z;
Heading values greater than C{360.0} raise C{ValueError}.
g      w@rs   Nru   r1   s   &r   Útest_headingTooLargeÚ!HeadingTests.test_headingTooLarge‹   rx   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ‘   rz   r   c                ó*   € V P                  RR7       R# )z;
Variation values less than C{-180.0} raise C{ValueError}.
rQ   Ng     ÀgÀru   r1   s   &r   Útest_variationTooNegativeÚ&HeadingTests.test_variationTooNegative‘   r   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   —   s   € ÷ 1ñ 1¨4ñ 1r   c                ó*   € V P                  RR7       R# )z=
Variation values greater than C{180.0} raise C{ValueError}.
g     Àg@rQ   Nru   r1   s   &r   Útest_variationTooPositiveÚ&HeadingTests.test_variationTooPositive—   s   € ð 	×Ñ¨%ÐÖ0r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   �   s   € ÷ Oñ O tñ Or   c                óÆ   € \         P                  P                  RRR7      pV P                  VP                  \         P
                  ! R\        P                  4      4       R# )zA
A heading with a value and a variation has a corrected heading.
r)   rQ   g      &@NrS   ©r   r?   rT   r   rD   r   r   ÚHEADINGrE   s   & r   Útest_correctedHeadingÚ"HeadingTests.test_correctedHeading�   sB   € ô �L‰L×#Ñ# C¸Ð#Ó>ˆØ×Ñ˜×+Ñ+¬T¯ZªZ¸¼f¿n¹nÓ-MÖNr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ¤   s   € ÷ Nñ N¨tñ Nr   c                óÆ   € \         P                  P                  RRR7      pV P                  VP                  \         P
                  ! R\        P                  4      4       R# )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@rQ   r)   Ng       Àr“   rE   s   & r   Útest_correctedHeadingOverflowÚ*HeadingTests.test_correctedHeadingOverflow¤   óB   € ô �L‰L×#Ñ# E¸$Ð#Ó?ˆØ×Ñ˜×+Ñ+¬T¯ZªZ¸¼V¿^¹^Ó-LÖMr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ­   s   € ÷ Nñ N°tñ Nr   c                óÆ   € \         P                  P                  RRR7      pV P                  VP                  \         P
                  ! R\        P                  4      4       R# )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.
r™   rQ   ç        Nç      ð¿r“   rE   s   & r   Ú%test_correctedHeadingOverflowEdgeCaseÚ2HeadingTests.test_correctedHeadingOverflowEdgeCase­   rœ   r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ¶   s   € ÷ Pñ P°ñ Pr   c                óÆ   € \         P                  P                  RRR7      pV P                  VP                  \         P
                  ! R\        P                  4      4       R# )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)   r_   rQ   r™   Nr“   rE   s   & r   Útest_correctedHeadingUnderflowÚ+HeadingTests.test_correctedHeadingUnderflow¶   sB   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ×Ñ˜×+Ñ+¬T¯ZªZ¸¼v¿~¹~Ó-NÖOr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   ¿   s   € ÷ Nñ N¸ñ Nr   c                óÆ   € \         P                  P                  RRR7      pV P                  VP                  \         P
                  ! R\        P                  4      4       R# )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)   rQ   rŸ   Nr“   rE   s   & r   Ú&test_correctedHeadingUnderflowEdgeCaseÚ3HeadingTests.test_correctedHeadingUnderflowEdgeCase¿   sB   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ×Ñ˜×+Ñ+¬T¯ZªZ¸¼V¿^¹^Ó-LÖMr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   È   s   € ÷ =ñ = tñ =r   c                ó$  € \         P                  P                  RRR7      pVP                  ^4       V P	                  VP
                  P                  R4       VP                  R4       V P	                  VP
                  P                  R4       R# )z;
Setting the sign of a heading changes the variation sign.
r)   rQ   Néÿÿÿÿr    )r   r?   rT   ÚsetSignr   rC   r@   rE   s   & r   Útest_setVariationSignÚ"HeadingTests.test_setVariationSignÈ   sg   € ô �L‰L×#Ñ# C¸Ð#Ó<ˆØ	�	‰	�!ŒØ×Ñ˜Ÿ™×5Ñ5°sÔ;Ø	�	‰	�"ŒØ×Ñ˜Ÿ™×5Ñ5°tÖ<r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   Ò   s   € ÷ <ñ <¨$ñ <r   c                óò  € \         P                  P                  RRR7      pV P                  \        VP
                  R4       V P                  VP                  P                  R4       V P                  \        VP
                  ^ 4       V P                  VP                  P                  R4       V P                  \        VP
                  ^24       V P                  VP                  P                  R4       R# )zy
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)   rQ   NéÎÿÿÿ)	r   r?   rT   r/   r0   r®   r   rC   r@   rE   s   & r   Útest_setBadVariationSignÚ%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               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r=   á   s   € ÷ 4ñ 4¨dñ 4r   c                óÐ   € \         P                  P                  R4      pV P                  VP                  P
                  4       V P                  \        VP                  ^4       R# )zL
Setting the sign on a heading with unknown variation raises
C{ValueError}.
r)   N)	r   r?   rT   rB   rC   r@   r/   r0   r®   rE   s   & r   Útest_setUnknownVariationSignÚ)HeadingTests.test_setUnknownVariationSigná   sF   € ô
 �L‰L×#Ñ# CÓ(ˆØ×Ñ˜!Ÿ+™+×6Ñ6Ô7Ø×Ñœ* a§i¡i°Ö3r   r   N)r4   r5   r6   r7   r8   rG   rM   rW   r[   ra   rf   rj   ro   rv   r}   rƒ   r‡   r‹   r�   r•   rš   r¡   r¥   r©   r¯   r´   r¸   r9   r   r   r   r;   r;   4   s‚   † ñõ
.õ6õOõ?õBõõõEõ-õ2õ-õ-õ2õ1õOõNõNõPõNõ=õ<÷4ñ 4r   r;   c                  ó6  € ] tR t^ëtR R ltR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R  ltR! R" ltR# R$ ltR% R& ltR' R( ltR) R* ltR+ R, ltR- R. ltR/ R0 ltR1tR2# )3ÚCoordinateTestsc               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚCoordinateTests.__annotate__ì   s   € ÷ 2ñ 2˜Dñ 2r   c                óh   € \         P                  ! R4      pV P                  \        V4      R4       R# )z)
Coordinates can be converted to floats.
ç      $@N)r   Ú
Coordinater   rA   ©r   Ú
coordinates   & r   Ú
test_floatÚCoordinateTests.test_floatì   s'   € ô —_’_ TÓ*ˆ
Ø×Ñœ˜zÓ*¨DÖ1r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ó   s   € ÷ 9ñ 9˜4ñ 9r   c                ót   € \         P                  ! R4      pRR R2pV P                  \        V4      V4       R# )zV
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Â   rL   s   &  r   Ú	test_reprÚCoordinateTests.test_repró   s5   € ô
 —_’_ TÓ*ˆ
Ø1°$°°zÐBˆØ×Ñœ˜jÓ)¨<Ö8r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ü   ó   € ÷ 9ñ 9 tñ 9r   c                ó’   € \         P                  ! R\        P                  4      pRR R2pV P	                  \        V4      V4       R# )zE
Positive latitudes have a repr that specifies their type and value.
r¿   ú<Latitude (rÇ   N©r   rÀ   r   ÚLATITUDEr   r   rÈ   s   &  r   Útest_positiveLatitudeÚ%CoordinateTests.test_positiveLatitudeü   s;   € ô —_’_ T¬6¯?©?Ó;ˆ
Ø$ T F¨*Ð5ˆØ×Ñœ˜jÓ)¨<Ö8r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½     rÌ   r   c                ó’   € \         P                  ! R\        P                  4      pRR R2pV P	                  \        V4      V4       R# )zE
Negative latitudes have a repr that specifies their type and value.
rÎ   rÇ   Nç      IÀrÏ   rÈ   s   &  r   Útest_negativeLatitudeÚ%CoordinateTests.test_negativeLatitude  s;   € ô —_’_ U¬F¯O©OÓ<ˆ
Ø$ U G¨:Ð6ˆØ×Ñœ˜jÓ)¨<Ö8r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½     ó   € ÷ 8ñ 8¨ñ 8r   c                ó’   € \         P                  ! R\        P                  4      pRR R2pV P	                  \        V4      V4       R# )zF
Positive longitudes have a repr that specifies their type and value.
ç      I@ú<Longitude (rÇ   N©r   rÀ   r   Ú	LONGITUDEr   r   ©r   Ú	longituderL   s   &  r   Útest_positiveLongitudeÚ&CoordinateTests.test_positiveLongitude  s<   € ô —O’O D¬&×*:Ñ*:Ó;ˆ	Ø% d V¨:Ð6ˆØ×Ñœ˜i›¨,Ö7r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½     rÙ   r   c                ó’   € \         P                  ! R\        P                  4      pRR R2pV P	                  \        V4      V4       R# )zF
Negative longitudes have a repr that specifies their type and value.
rÜ   rÇ   NrÕ   rÝ   rß   s   &  r   Útest_negativeLongitudeÚ&CoordinateTests.test_negativeLongitude  s<   € ô —O’O E¬6×+;Ñ+;Ó<ˆ	Ø% e W¨JÐ7ˆØ×Ñœ˜i›¨,Ö7r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½     s   € ÷ Gñ G¨$ñ Gr   c                óR   € V P                  \        \        P                  RR4       R# )z=
Creating coordinates with bogus types rasies C{ValueError}.
ç     Àb@r.   N)r/   r0   r   rÀ   r1   s   &r   Útest_bogusCoordinateTypeÚ(CoordinateTests.test_bogusCoordinateType  s   € ð 	×Ñœ*¤d§o¡o°u¸gÖFr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   "  s   € ÷ Nñ N¨Tñ Nr   c                ón   € V P                  \        \        P                  R\        P
                  4       R# )zU
Creating coordinates with angle types that aren't coordinates raises
C{ValueError}.
ré   N)r/   r0   r   rÀ   r   r”   r1   s   &r   Útest_angleTypeNotCoordinateÚ+CoordinateTests.test_angleTypeNotCoordinate"  s    € ð
 	×Ñœ*¤d§o¡o°u¼f¿n¹nÖMr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   )  s   € ÷ =ñ =˜tñ =r   c                óJ   € R R lpV P                  V! 4       V! 4       4       R# )z5
Coordinates with the same value and type are equal.
c               ó   € V ^8„  d   QhRR/# )r   r   úbase.Coordinater   )r   s   "r   r   Ú3CoordinateTests.test_equality.<locals>.__annotate__.  s   € ÷ 	:ñ 	: ñ 	:r   c                 óL   € \         P                  ! R \        P                  4      # )r)   ©r   rÀ   r   rÞ   r   r   r   ÚmakeCoordinateÚ5CoordinateTests.test_equality.<locals>.makeCoordinate.  s   € Ü—?’? 3¬×(8Ñ(8Ó9Ð9r   N)r   )r   r÷   s   & r   Útest_equalityÚCoordinateTests.test_equality)  s   € õ
	:ð 	×Ñ™Ó)©>Ó+;Ö<r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   3  s   € ÷ $ñ $°ñ $r   c                ó€   € \         P                  ! R4      p\         P                  ! R4      pV P                  W4       R# )z1
Coordinates with different values aren't equal.
r)   Nr    )r   rÀ   r`   ©r   Úc1Úc2s   &  r   Útest_differentAnglesInequalityÚ.CoordinateTests.test_differentAnglesInequality3  s.   € ô �_Š_˜SÓ!ˆÜ�_Š_˜TÓ"ˆØ×Ñ˜BÖ#r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ;  s   € ÷ $ñ $¨tñ $r   c                ó¼   € \         P                  ! R\        P                  4      p\         P                  ! R\        P                  4      pV P                  W4       R# )zD
Coordinates with the same values but different types aren't equal.
r)   N)r   rÀ   r   rÐ   rÞ   r`   rý   s   &  r   Útest_differentTypesInequalityÚ-CoordinateTests.test_differentTypesInequality;  s<   € ô �_Š_˜S¤&§/¡/Ó2ˆÜ�_Š_˜S¤&×"2Ñ"2Ó3ˆØ×Ñ˜BÖ#r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   C  s   € ÷ 	4ñ 	4˜4ñ 	4r   c                ó  € \         P                  ! R\        P                  4      pVP	                  ^4       V P                  VP                  R4       VP	                  R4       V P                  VP                  R4       R# )zP
Setting the sign on a coordinate sets the sign of the value of the
coordinate.
rÛ   Nr­   rÕ   )r   rÀ   r   rÐ   r®   r   r@   ©r   Úcs   & r   Ú	test_signÚCoordinateTests.test_signC  sZ   € ô
 �OŠO˜D¤&§/¡/Ó2ˆØ	�	‰	�!ŒØ×Ñ˜×+Ñ+¨TÔ2Ø	�	‰	�"ŒØ×Ñ˜×+Ñ+¨UÖ3r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   N  s   € ÷ 3ñ 3 tñ 3r   c                óÂ  € Rp\         P                  ! V\        P                  4      pV P	                  \
        VP                  R4       V P                  VP                  R4       V P	                  \
        VP                  ^ 4       V P                  VP                  R4       V P	                  \
        VP                  ^24       V P                  VP                  R4       R# )zr
Setting a bogus sign value (not -1 or 1) on a coordinate raises
C{ValueError} and doesn't affect the coordinate.
rÛ   Nr³   )	r   rÀ   r   rÐ   r/   r0   r®   r   r@   )r   Úvaluer	  s   &  r   Útest_badVariationSignÚ%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               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   _  ó   € ÷ Bñ B¨ñ Br   c                ó¤   € \         P                  ! R\        P                  4      pV P	                  VP
                  \        P                  4       R# )z4
Positive latitudes are in the northern hemisphere.
r)   N)r   rÀ   r   rÐ   r   Ú
hemispherer   ÚNORTHrÁ   s   & r   Útest_northernHemisphereÚ'CoordinateTests.test_northernHemisphere_  s4   € ô —_’_ S¬&¯/©/Ó:ˆ
Ø×Ñ˜×.Ñ.´
×0@Ñ0@ÖAr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   f  ó   € ÷ Añ A¨ñ Ar   c                ó¤   € \         P                  ! R\        P                  4      pV P	                  VP
                  \        P                  4       R# )z4
Positive longitudes are in the eastern hemisphere.
r)   N)r   rÀ   r   rÞ   r   r  r   ÚEASTrÁ   s   & r   Útest_easternHemisphereÚ&CoordinateTests.test_easternHemispheref  s4   € ô —_’_ S¬&×*:Ñ*:Ó;ˆ
Ø×Ñ˜×.Ñ.´
·±Ö@r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   m  r  r   c                ó¤   € \         P                  ! R\        P                  4      pV P	                  VP
                  \        P                  4       R# )z4
Negative latitudes are in the southern hemisphere.
Nr    )r   rÀ   r   rÐ   r   r  r   ÚSOUTHrÁ   s   & r   Útest_southernHemisphereÚ'CoordinateTests.test_southernHemispherem  s4   € ô —_’_ T¬6¯?©?Ó;ˆ
Ø×Ñ˜×.Ñ.´
×0@Ñ0@ÖAr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   t  r  r   c                ó¤   € \         P                  ! R\        P                  4      pV P	                  VP
                  \        P                  4       R# )z4
Negative longitudes are in the western hemisphere.
Nr    )r   rÀ   r   rÞ   r   r  r   ÚWESTrÁ   s   & r   Útest_westernHemisphereÚ&CoordinateTests.test_westernHemispheret  s4   € ô —_’_ T¬6×+;Ñ+;Ó<ˆ
Ø×Ñ˜×.Ñ.´
·±Ö@r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   {  s   € ÷ Eñ E Dñ Er   c                ój   a€ \         P                  ! RR4      oV P                  \        V3R l4       R# )zW
Accessing the hemisphere for a coordinate that can't compute it
raises C{ValueError}.
r)   Nc                 ó   <€ S P                   # )N)r  )rÂ   s   €r   Ú<lambda>Ú4CoordinateTests.test_badHemisphere.<locals>.<lambda>�  s   ø€ ¨j×.CÒ.Cr   )r   rÀ   r/   r0   rÁ   s   &@r   Útest_badHemisphereÚ"CoordinateTests.test_badHemisphere{  s&   ø€ ô
 —_’_ S¨$Ó/ˆ
Ø×Ñœ*Ô&CÖDr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ƒ  s   € ÷ ;ñ ; tñ ;r   c                ór   € V P                  \        \        R4       V P                  \        \        R4       R# )z\
Creating a latitude with a value greater than or equal to 90 degrees
raises C{ValueError}.
ré   g     €V@N©r/   r0   Ú_makeLatituder1   s   &r   Útest_latitudeTooLargeÚ%CoordinateTests.test_latitudeTooLargeƒ  s(   € ð
 	×Ñœ*¤m°UÔ;Ø×Ñœ*¤m°TÖ:r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ‹  s   € ÷ <ñ < tñ <r   c                ór   € V P                  \        \        R4       V P                  \        \        R4       R# )zZ
Creating a latitude with a value less than or equal to -90 degrees
raises C{ValueError}.
Ng     ÀbÀg     €VÀr1  r1   s   &r   Útest_latitudeTooSmallÚ%CoordinateTests.test_latitudeTooSmall‹  s(   € ð
 	×Ñœ*¤m°VÔ<Ø×Ñœ*¤m°UÖ;r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   “  s   € ÷ =ñ =¨ñ =r   c                ór   € V P                  \        \        R4       V P                  \        \        R4       R# )z^
Creating a longitude with a value greater than or equal to 180 degrees
raises C{ValueError}.
g     @o@g     €f@N©r/   r0   Ú_makeLongituder1   s   &r   Útest_longitudeTooLargeÚ&CoordinateTests.test_longitudeTooLarge“  s(   € ð
 	×Ñœ*¤n°eÔ<Ø×Ñœ*¤n°eÖ<r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ›  s   € ÷ >ñ >¨ñ >r   c                ór   € V P                  \        \        R4       V P                  \        \        R4       R# )z\
Creating a longitude with a value less than or equal to -180 degrees
raises C{ValueError}.
Ng     @oÀr|   r;  r1   s   &r   Útest_longitudeTooSmallÚ&CoordinateTests.test_longitudeTooSmall›  s(   € ð
 	×Ñœ*¤n°fÔ=Ø×Ñœ*¤n°fÖ=r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   £  s   € ÷ Bñ B¨dñ Br   c                ó
  € \         P                  ! R\        P                  4      pV P	                  VP
                  R4       \         P                  ! R\        P                  4      pV P	                  VP
                  R4       R# )zA
Coordinate values can be accessed in degrees, minutes, seconds.
g     @I@g%�•CI@N)é2   é   é    )rE  é   é.   )r   rÀ   r   rÐ   r   ÚinDegreesMinutesSecondsr  s   & r   Útest_inDegreesMinutesSecondsÚ,CoordinateTests.test_inDegreesMinutesSeconds£  sX   € ô �OŠO˜D¤&§/¡/Ó2ˆØ×Ñ˜×2Ñ2°KÔ@ä�OŠO˜F¤F§O¡OÓ4ˆØ×Ñ˜×2Ñ2°LÖAr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r½   ­  s   € ÷ 5ñ 5¸$ñ 5r   c                ój   € \         P                  ! RR4      pV P                  VP                  4       R# )zb
If the vaue of a coordinate is L{None}, its values in degrees,
minutes, seconds is also L{None}.
N)r   rÀ   rB   rJ  r  s   & r   Ú(test_unknownAngleInDegreesMinutesSecondsÚ8CoordinateTests.test_unknownAngleInDegreesMinutesSeconds­  s(   € ô
 �OŠO˜D $Ó'ˆØ×Ñ˜!×3Ñ3Ö4r   r   N)r4   r5   r6   r7   rÃ   rÉ   rÑ   rÖ   rá   rå   rê   rî   rù   r   r  r
  r  r  r  r!  r&  r-  r3  r7  r=  rA  rK  rO  r9   r   r   r   r»   r»   ë   s‡   † õ2õ9õ9õ9õ8õ8õGõNõ=õ$õ$õ	4õ3õ"BõAõBõAõEõ;õ<õ=õ>õB÷5ñ 5r   r»   c               ó    € V ^8„  d   QhRRRR/# ©r   r  rA   r   ró   r   )r   s   "r   r   r   ¶  s   € ÷ 3ñ 3˜ð 3 ?ñ 3r   c                óL   € \         P                  ! V \        P                  4      # )z/
Builds and returns a latitude of given value.
)r   rÀ   r   rÐ   ©r  s   &r   r2  r2  ¶  s   € ô �?Š?˜5¤&§/¡/Ó2Ð2r   c               ó    € V ^8„  d   QhRRRR/# rR  r   )r   s   "r   r   r   ½  s   € ÷ 4ñ 4˜%ð 4 Oñ 4r   c                óL   € \         P                  ! V \        P                  4      # )z0
Builds and returns a longitude of given value.
rö   rT  s   &r   r<  r<  ½  s   € ô �?Š?˜5¤&×"2Ñ"2Ó3Ð3r   c                  óJ   € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltRt	R# )ÚAltitudeTestsiÄ  z;
Tests for the L{twisted.positioning.base.Altitude} class.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚAltitudeTests.__annotate__É  s   € ÷ Fñ F˜Dñ Fr   c                ó  € \         P                  ! R4      pV P                  \        V4      R4       V P                  VP                  R4       V P                  VP
                  R\         P                  ,          4       R# )zu
Altitudes can be instantiated and reports the correct value in
meters and feet, as well as when converted to float.
r)   N)r   ÚAltituder   rA   ÚinMetersÚinFeetÚMETERS_PER_FOOT©r   Úaltitudes   & r   Ú
test_valueÚAltitudeTests.test_valueÉ  s[   € ô
 —=’= Ó%ˆØ×Ñœ˜x›¨#Ô.Ø×Ñ˜×*Ñ*¨CÔ0Ø×Ñ˜Ÿ™¨#´×0DÑ0DÕ*DÖEr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rZ  Ó  s   € ÷ ?ñ ?˜4ñ ?r   c                óh   € \         P                  ! R4      pV P                  \        V4      R4       R# )z6
Altitudes report their type and value in their repr.
r)   z<Altitude (1.0 m)>N)r   r\  r   r   r`  s   & r   rÉ   ÚAltitudeTests.test_reprÓ  s'   € ô —=’= Ó%ˆØ×Ñœ˜h›Ð)=Ö>r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rZ  Ú  s   € ÷ 8ñ 8˜tñ 8r   c                ó€   € \         P                  ! R4      p\         P                  ! R4      pV P                  W4       R# )z,
Altitudes with equal values compare equal.
r)   N)r   r\  r   ©r   ÚfirstAltitudeÚsecondAltitudes   &  r   rù   ÚAltitudeTests.test_equalityÚ  s.   € ô Ÿš cÓ*ˆÜŸš sÓ+ˆØ×Ñ˜Ö7r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rZ  â  s   € ÷ ;ñ ; ñ ;r   c                ó€   € \         P                  ! R4      p\         P                  ! R4      pV P                  W4       R# )z6
Altitudes with different values don't compare equal.
r)   Nr    )r   r\  r`   ri  s   &  r   Útest_inequalityÚAltitudeTests.test_inequalityâ  s.   € ô Ÿš cÓ*ˆÜŸš tÓ,ˆØ×Ñ˜MÖ:r   r   N)
r4   r5   r6   r7   r8   rb  rÉ   rù   ro  r9   r   r   r   rX  rX  Ä  s!   † ñõFõ?õ8÷;ñ ;r   rX  c                  óV   € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	Rt
R# )Ú
SpeedTestsië  z8
Tests for the L{twisted.positioning.base.Speed} class.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚSpeedTests.__annotate__ð  s   € ÷ -ñ -˜Dñ -r   c                ó    € \         P                  ! R4      pV P                  VP                  R4       V P                  \	        V4      R4       R# )új
Speeds can be instantiated, and report their value in meters
per second, and can be converted to floats.
rÛ   N)r   ÚSpeedr   ÚinMetersPerSecondrA   ©r   Úspeeds   & r   rb  ÚSpeedTests.test_valueð  ó<   € ô
 —
’
˜4Ó ˆØ×Ñ˜×0Ñ0°$Ô7Ø×Ñœ˜u› tÖ,r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rt  ù  ó   € ÷ <ñ <˜4ñ <r   c                óh   € \         P                  ! R4      pV P                  \        V4      R4       R# )z3
Speeds report their type and value in their repr.
rÛ   z<Speed (50.0 m/s)>N)r   rw  r   r   ry  s   & r   rÉ   ÚSpeedTests.test_reprù  ó'   € ô —
’
˜4Ó ˆØ×Ñœ˜e›Ð&:Ö;r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rt     s   € ÷ 8ñ 8 Tñ 8r   c                óP   € V P                  \        \        P                  R4       R# )z1
Creating a negative speed raises C{ValueError}.
Nr    )r/   r0   r   rw  r1   s   &r   Útest_negativeSpeedsÚSpeedTests.test_negativeSpeeds   s   € ð 	×Ñœ*¤d§j¡j°$Ö7r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rt    s   € ÷ ?ñ ?˜dñ ?r   c                ó”   € \         P                  ! R4      pV P                  ^\         P                  ,          VP                  4       R# )z3
A speed can be converted into its value in knots.
r)   N)r   rw  r   ÚMPS_PER_KNOTÚinKnotsry  s   & r   Útest_inKnotsÚSpeedTests.test_inKnots  ó0   € ô —
’
˜3“ˆØ×Ñ˜œT×.Ñ.Õ.°·±Ö>r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rt    ó   € ÷ 6ñ 6˜dñ 6r   c                ód   € V P                  R\        \        P                  ! R4      4      4       R# )z+
A speed can be converted into a C{float}.
r)   N)r   rA   r   rw  r1   s   &r   Útest_asFloatÚSpeedTests.test_asFloat  ó!   € ð 	×Ñ˜œe¤D§J¢J¨s£OÓ4Ö5r   r   N)r4   r5   r6   r7   r8   rb  rÉ   r„  rŠ  r�  r9   r   r   r   rr  rr  ë  s%   † ñõ-õ<õ8õ?÷6ñ 6r   rr  c                  óV   € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	Rt
R# )Ú
ClimbTestsi  z.
Tests for L{twisted.positioning.base.Climb}.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚClimbTests.__annotate__  s   € ÷ -ñ -˜Tñ -r   c                ó    € \         P                  ! R4      pV P                  VP                  R4       V P                  \	        V4      R4       R# )rv  ç      E@N©r   ÚClimbr   rx  rA   ©r   Úclimbs   & r   rG   ÚClimbTests.test_simple  r|  r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r–  "  r~  r   c                óh   € \         P                  ! R4      pV P                  \        V4      R4       R# )z3
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É   ÚClimbTests.test_repr"  r�  r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r–  )  s   € ÷ .ñ . Tñ .r   c                ó    € \         P                  ! R4      pV P                  VP                  R4       V P                  \	        V4      R4       R# )zq
Climbs can have negative values, and still report that value
in meters per second and when converted to floats.
Ng      EÀr™  r›  s   & r   Útest_negativeClimbsÚClimbTests.test_negativeClimbs)  s<   € ô
 —
’
˜5Ó!ˆØ×Ñ˜×0Ñ0°%Ô8Ø×Ñœ˜u› uÖ-r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r–  2  s   € ÷ ?ñ ? 4ñ ?r   c                ó”   € \         P                  ! R4      pV P                  ^\         P                  ,          VP                  4       R# )z3
A climb can be converted into its value in knots.
r)   N)r   rš  r   rˆ  r‰  r›  s   & r   Útest_speedInKnotsÚClimbTests.test_speedInKnots2  rŒ  r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r–  9  rŽ  r   c                ód   € V P                  R\        \        P                  ! R4      4      4       R# )z+
A climb can be converted into a C{float}.
r)   N)r   rA   r   rš  r1   s   &r   r�  ÚClimbTests.test_asFloat9  r’  r   r   N)r4   r5   r6   r7   r8   rG   rÉ   r£  r§  r�  r9   r   r   r   r”  r”    s%   † ñõ-õ<õ.õ?÷6ñ 6r   r”  c                  ó®   € ] tR tRtRtR R ltR R ltR R ltR	 R
 ltR R lt	R R lt
R R ltR R ltRtR R ltR R ltR R ltR R ltRtR# )ÚPositionErrorTestsi@  z6
Tests for L{twisted.positioning.base.PositionError}.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚPositionErrorTests.__annotate__E  s   € ÷ .ñ .˜tñ .r   c                óÒ   € \         P                  ! 4       pV P                  VP                  4       V P                  VP                  4       V P                  VP
                  4       R# )zf
In an empty L{base.PositionError} with no invariant testing, all
dilutions of positions are L{None}.
N©r   ÚPositionErrorrB   ÚpdopÚhdopÚvdop©r   ÚpositionErrors   & r   Útest_allUnsetÚ PositionErrorTests.test_allUnsetE  sN   € ô
 ×*Ò*Ó,ˆØ×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ö-r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  O  s   € ÷ .ñ .¨Dñ .r   c                óÖ   € \         P                  ! RR7      pV P                  VP                  4       V P                  VP                  4       V P                  VP
                  4       R# )zc
In an empty L{base.PositionError} with invariant testing, all
dilutions of positions are L{None}.
T)ÚtestInvariantNr±  r¶  s   & r   Útest_allUnsetWithInvariantÚ-PositionErrorTests.test_allUnsetWithInvariantO  sP   € ô
 ×*Ò*¸Ô>ˆØ×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ô-Ø×Ñ˜-×,Ñ,Ö-r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  Y  s   € ÷ 2ñ 2 tñ 2r   c                ól   € \         P                  ! RR7      pV P                  VP                  R4       R# )z>
L{base.PositionError}s can be instantiated with just a HDOP.
r)   )r´  N©r   r²  r   r´  r¶  s   & r   Útest_withoutInvariantÚ(PositionErrorTests.test_withoutInvariantY  s*   € ô ×*Ò*°Ô4ˆØ×Ñ˜×+Ñ+¨SÖ1r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  `  s   € ÷ 2ñ 2 Dñ 2r   c                ón   € \         P                  ! RRR7      pV P                  VP                  R4       R# )z^
Creating a simple L{base.PositionError} with just a HDOP while
checking the invariant works.
r)   T)r´  r¼  NrÁ  r¶  s   & r   Útest_withInvariantÚ%PositionErrorTests.test_withInvariant`  s,   € ô
 ×*Ò*°À4ÔHˆØ×Ñ˜×+Ñ+¨SÖ1r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  h  s   € ÷ *ñ *¨dñ *r   c                óà   € \         P                  ! RRRR7      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP
                  R4       R# )zv
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_invalidWithoutInvariantÚ/PositionErrorTests.test_invalidWithoutInvarianth  sT   € ô
 ×"Ò"¨°#¸CÔ@ˆØ×Ñ˜Ÿ™ SÔ)Ø×Ñ˜Ÿ™ SÔ)Ø×Ñ˜Ÿ™ SÖ)r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  r  s   € ÷ 
ñ 
¨4ñ 
r   c           	     óX   € V P                  \        \        P                  RRRRR7       R# )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/   r0   r   r²  r1   s   &r   Útest_invalidWithInvariantÚ,PositionErrorTests.test_invalidWithInvariantr  s/   € ð
 	×ÑÜÜ×ÑØØØØð 	ö 	
r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  €  s   € ÷ )ñ )¨Tñ )r   c                ó|   € \         P                  ! RRR7      pRVn        V P                  VP                  R4       R# )ze
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_setDOPWithoutInvariantÚ.PositionErrorTests.test_setDOPWithoutInvariant€  s1   € ô
 ×Ò S¨sÔ3ˆØˆŒØ×Ñ˜Ÿ™ %Ö(r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  ‰  s   € ÷ (ñ (¨$ñ (r   c                óÀ   € \         P                  ! RRRR7      pVP                  pR R lpV P                  \        W14       V P                  VP                  V4       R# )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               ó    € V ^8„  d   QhRRRR/# )r   rÕ  úbase.PositionErrorr   r   r   )r   s   "r   r   ÚAPositionErrorTests.test_setDOPWithInvariant.<locals>.__annotate__‘  s   € ÷ 	ñ 	Ð*ð 	¨tñ 	r   c                ó   € R V n         R# )rÔ  N)r³  )rÕ  s   &r   ÚsetPDOPÚ<PositionErrorTests.test_setDOPWithInvariant.<locals>.setPDOP‘  s	   € ØˆBŽGr   N)r   r²  r³  r/   r0   r   )r   rÕ  r³  rÞ  s   &   r   Útest_setDOPWithInvariantÚ+PositionErrorTests.test_setDOPWithInvariant‰  sL   € ô
 ×Ò S¨sÀ$ÔGˆØ�w‰wˆõ	ð 	×Ñœ* gÔ2Ø×Ñ˜Ÿ™ $Ö'r   z.<PositionError (pdop: %s, hdop: %s, vdop: %s)>c          
     ó,   € V ^8„  d   QhRRRRRRRRRR/# )	r   rÕ  rÛ  r³  zfloat | Noner´  rµ  r   r   r   )r   s   "r   r   r¯  ™  sC   € ÷ Lñ LàðLð ðLð ð	Lð
 ðLð 
ñLr   c                ó
  € V P                  VP                  V4       V P                  VP                  V4       V P                  VP                  V4       V P                  \	        V4      V P
                  W#V3,          4       R# )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   rÕ  r³  r´  rµ  s   &&&&&r   Ú_testDOPÚPositionErrorTests._testDOP™  sd   € ð( 	×Ñ˜Ÿ™ $Ô'Ø×Ñ˜Ÿ™ $Ô'Ø×Ñ˜Ÿ™ $Ô'Ø×Ñœ˜b› 4×#5Ñ#5¸ÀTÐ8JÕ#JÖKr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  ²  ó   € ÷ ,ñ ,¨tñ ,r   c                óš   € RRr!V^,          V^,          ,
          R,          p\         P                  ! WR7      pV P                  WAW#4       R# )z6
The VDOP is correctly determined from PDOP and HDOP.
r_   r)   ç      à?)r³  r´  N©r   r²  rå  )r   r³  r´  rµ  rÕ  s   &    r   Útest_positionAndHorizontalSetÚ0PositionErrorTests.test_positionAndHorizontalSet²  ó@   € ð ˜#ˆdØ�a•˜$ �'Õ! cÕ)ˆÜ×Ò TÔ5ˆØ�‰�b Ö+r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  »  s   € ÷ ,ñ ,¨Tñ ,r   c                óš   € RRr!V^,          V^,          ,
          R,          p\         P                  ! WR7      pV P                  WAW24       R# )z6
The HDOP is correctly determined from PDOP and VDOP.
r_   r)   rê  )r³  rµ  Nrë  )r   r³  rµ  r´  rÕ  s   &    r   Útest_positionAndVerticalSetÚ.PositionErrorTests.test_positionAndVerticalSet»  rî  r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r¯  Ä  rè  r   c                óš   € RRr!V^,          V^,          ,           R,          p\         P                  ! WR7      pV P                  WCW4       R# )z6
The PDOP is correctly determined from HDOP and VDOP.
r)   rê  rÓ  Nrë  )r   r´  rµ  r³  rÕ  s   &    r   Útest_horizontalAndVerticalSetÚ0PositionErrorTests.test_horizontalAndVerticalSetÄ  rî  r   r   N)r4   r5   r6   r7   r8   r¸  r½  rÂ  rÆ  rË  rÏ  rÖ  rà  rä  rå  rì  rñ  rõ  r9   r   r   r   r­  r­  @  sQ   † ñõ.õ.õ2õ2õ*õ
õ)õ(ð E€MõLõ2,õ,÷,ñ ,r   r­  c                  óN   € ] tR tRtRtR R ltR^R^RR/tR	 R
 ltR R ltRt	R# )ÚBeaconInformationTestsiÎ  z:
Tests for L{twisted.positioning.base.BeaconInformation}.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   Ú#BeaconInformationTests.__annotate__Ó  s   € ÷ 1ñ 1˜dñ 1r   c                ó´   € \         P                  ! 4       pV P                  \        VP                  4      ^ 4       RpV P                  \        V4      V4       R# )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.
z><BeaconInformation (used beacons (0): [], unused beacons: [])>N)r   ÚBeaconInformationr   ÚlenÚusedBeaconsr   )r   ÚbirL   s   &  r   Útest_minimalÚ#BeaconInformationTests.test_minimalÓ  sI   € ô ×#Ò#Ó%ˆØ×Ñœ˜RŸ^™^Ó,¨aÔ0àRð 	ð 	×Ñœ˜b› <Ö0r   ÚazimuthÚ	elevationÚsignalToNoiseRatior)   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rú  â  s   € ÷ !
ñ !
˜Tñ !
r   c                óz  a € R V 3R llp\        4       p\        ^^
4       F  pVP                  V! VR7      4       K  	  \        P                  ! V4      pS P                  \        VP                  4      ^	4       S P                  \        VP                  4      ^ 4       S P                  \        V4      R4       R# )z_
Tests a beacon information with a bunch of satellites, none of
which used in computing a fix.
c               ó    € V ^8„  d   QhRRRR/# )r   rm   rA   r   zbase.Satelliter   )r   s   "r   r   Ú8BeaconInformationTests.test_simple.<locals>.__annotate__è  s   € ÷ 	,ñ 	, %ð 	,¨Nñ 	,r   c                 ó|   <€ \        SP                  4      pVP                  V 4       \        P                  ! R/ VB # )Nr   )ÚdictÚsatelliteKwargsÚupdater   Ú	Satellite)rm   Úkwargsr   s   , €r   Ú_buildSatelliteÚ;BeaconInformationTests.test_simple.<locals>._buildSatelliteè  s1   ø€ Ü˜$×.Ñ.Ó/ˆFØ�M‰M˜"ÔÜ—>’>Ñ+ FÑ+Ð+r   )Ú
identifiera  <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)
ÚsetÚrangeÚaddr   rü  r   rý  ÚseenBeaconsrþ  r   )r   r  ÚbeaconsÚprnrÿ  s   f    r   rG   Ú"BeaconInformationTests.test_simpleâ  s•   ø€ ÷	,ð 	,ô
 “%ˆÜ˜˜B–<ˆCØ�K‰K™°3Ô7Ö8ñ  ô ×#Ò# GÓ,ˆà×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×ÑÜ�‹Hðö	
r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   rú    s   € ÷ 
ñ 
¨ñ 
r   c                óò  € \         P                  ! 4       p\        ^^
4       Fl  p\         P                  ! RRV/V P                  B pVP
                  P                  V4       V^,          '       g   KQ  VP                  P                  V4       Kn  	  V P                  \        VP
                  4      ^	4       V P                  \        VP                  4      ^4       V P                  \        V4      R4       R# )z^
Tests a beacon information with a bunch of satellites, some of
them used in computing a fix.
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   rü  r  r  r  r  r  rþ  r   rý  r   )r   rÿ  r  Ú	satellites   &   r   Útest_someSatellitesUsedÚ.BeaconInformationTests.test_someSatellitesUsed  sº   € ô
 ×#Ò#Ó%ˆä˜˜B–<ˆCÜŸšÑN°#ÐN¸×9MÑ9MÑNˆIØ�N‰N×Ñ˜yÔ)Ø�Q�wŽwØ—‘×"Ñ" 9Ö-ñ	  ð 	×Ñœ˜RŸ^™^Ó,¨aÔ0Ø×Ñœ˜RŸ^™^Ó,¨aÔ0à×ÑÜ�‹Hð
Eö	
r   r   N)
r4   r5   r6   r7   r8   r   r  rG   r  r9   r   r   r   rø  rø  Î  s1   † ñõ1ð ! ! [°!Ð5IÈ3ÐO€Oõ!
÷F
ñ 
r   rø  c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	ÚPositioningBeaconTestsi%  z&
Tests for L{base.PositioningBeacon}.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   Ú#PositioningBeaconTests.__annotate__*  s   € ÷ Kñ K ñ Kr   c                óÎ   € \         P                  ! \        P                  4      pV P	                  V4       \
        P                  ! \         \        P                  ! ^4      4       R# )zH
Tests that L{base.PositioningBeacon} implements L{IPositioningBeacon}.
N)r   ÚimplementedByr   ÚPositioningBeaconÚ
assertTruer   ÚverifyObject)r   Ú
implementss   & r   Útest_interfaceÚ%PositioningBeaconTests.test_interface*  sB   € ô (×5Ò5´d×6LÑ6LÓMˆ
Ø�‰˜
Ô#Ü×ÒÔ.´×0FÒ0FÀqÓ0IÖJr   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r!  2  s   € ÷ Lñ L˜4ñ Lr   c                ód   € V P                  \        \        P                  ! R4      4      R4       R# )z)
Tests the repr of a positioning beacon.
ÚAz<Beacon (A)>N)r   r   r   r$  r1   s   &r   rÉ   Ú PositioningBeaconTests.test_repr2  s$   € ð 	×Ñœœd×4Ò4°SÓ9Ó:¸NÖKr   r   N)r4   r5   r6   r7   r8   r(  rÉ   r9   r   r   r   r  r  %  s   † ñõK÷Lñ Lr   r  c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	ÚSatelliteTestsi9  z2
Tests for L{twisted.positioning.base.Satellite}.
c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   ÚSatelliteTests.__annotate__>  s   € ÷ 
ñ 
˜dñ 
r   c                óB  € \         P                  ! ^4      pV P                  VP                  ^4       V P	                  VP
                  4       V P	                  VP                  4       V P	                  VP                  4       V P                  \        V4      R4       R# )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.
z:<Satellite (1), azimuth: None, elevation: None, snr: None>N)	r   r  r   r  rB   r  r  r  r   ©r   Úss   & r   r   ÚSatelliteTests.test_minimal>  sv   € ô �NŠN˜1ÓˆØ×Ñ˜Ÿ™ qÔ)Ø×Ñ˜!Ÿ)™)Ô$Ø×Ñ˜!Ÿ+™+Ô&Ø×Ñ˜!×.Ñ.Ô/Ø×ÑÜ�‹GÐTö	
r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r1  N  s   € ÷ 
ñ 
˜Tñ 
r   c                óP  € \         P                  ! ^RRRR7      pV P                  VP                  ^4       V P                  VP                  R4       V P                  VP
                  R4       V P                  VP                  R4       V P                  \        V4      R4       R# )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.
g     àp@g      >@g      9@)r  r  r  r  z;<Satellite (1), azimuth: 270.0, elevation: 30.0, snr: 25.0>N)r   r  r   r  r  r  r  r   r3  s   & r   rG   ÚSatelliteTests.test_simpleN  s‡   € ô �NŠNØ %°4ÈDô
ˆð 	×Ñ˜Ÿ™ qÔ)Ø×Ñ˜Ÿ™ EÔ*Ø×Ñ˜Ÿ™ dÔ+Ø×Ñ˜×-Ñ-¨tÔ4Ø×ÑÜ�‹GÐUö	
r   r   N)r4   r5   r6   r7   r8   r   rG   r9   r   r   r   r/  r/  9  s   † ñõ
÷ 
ñ 
r   r/  N)r8   Ú
__future__r   Úzope.interfacer   Útwisted.positioningr   Útwisted.positioning.baser   r   Ú twisted.positioning.ipositioningr   Útwisted.trial.unittestr   r
   r;   r»   r2  r<  rX  rr  r”  r­  rø  r  r/  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   