traffic/algorithms/navigation.py
def diversion(self) -> Optional["Flight"]:
        """Returns the segment of trajectory after a possible decision
        of diversion.

        The method relies on the `destination` parameter to identify the
        intended destination.

        """
        from ..data import airports

        f_above = self.query("altitude > 15000")  # type: ignore
        if (
            self.destination != self.destination  # type: ignore
            or airports[self.destination] is None  # type: ignore
            or f_above is None
        ):
            return None

        return (
            f_above.distance(airports[self.destination])  # type: ignore
            .diff("distance")
            .agg_time("10T", distance_diff="mean")
            .query("distance_diff > 0")
        )
Returns the segment of trajectory after a possible decision
        of diversion.

        The method relies on the `destination` parameter to identify the
        intended destination.

        
Returns the segment of trajectory after a possible decision
of diversion.

The method relies on the `destination` parameter to identify the
intended destination.
Returns the segment of trajectory after a possible decision of diversion . The method relies on the ` destination ` parameter to identify the intended destination .
def diversion(self) -> Optional["Flight"]:
        from ..data import airports
        f_above = self.query("altitude > 15000")  
        if (
            self.destination != self.destination  
            or airports[self.destination] is None  
            or f_above is None
        ):
            return None
        return (
            f_above.distance(airports[self.destination])  
            .diff("distance")
            .agg_time("10T", distance_diff="mean")
            .query("distance_diff > 0")
        )
def diversion ( self ) -> Optional [ "Flight" ] : from . . data import airports f_above = self . query ( "altitude > 15000" ) if ( self . destination != self . destination or airports [ self . destination ] is None or f_above is None ) : return None return ( f_above . distance ( airports [ self . destination ] ) . diff ( "distance" ) . agg_time ( "10T" , distance_diff = "mean" ) . query ( "distance_diff > 0" ) )
Returns the segment of trajectory after a possible decision
of diversion.
Returns the segment of trajectory after a possible decision of diversion .
"""Returns the segment of trajectory after a possible decision
        of diversion.

        The method relies on the `destination` parameter to identify the
        intended destination.

        """ # type: ignore # type: ignore # type: ignore # type: ignore
self