示例#1
0
    def add_flight_path2(self,axis):

        """ plot line """
        x=self.flight['lon']
        y= self.flight['lat']
        axis.plot( x[0], y[0],        color=self.flightColor,
                                marker='o')

        xx=x[0]
        yy=y[0]
        dx=x[-1]-x[0]
        dy=y[-1]-y[0]
        axis.arrow(xx,yy,dx,dy,
                    width=0.005*self.flightWidth,
                    head_width=0.05,
                    length_includes_head=True,
                    facecolor=self.flightColor, 
                    edgecolor=self.flightColor)


        if self.flightDotOn:        
            """ add dots and text """
            frequency=10 # [km]
            [dist_from_p0,idxs] = cm.get_distance_along_flight_track(lon=x, lat=y, 
                                                                ticks_every=frequency)

            self.flight_track_distance=dist_from_p0
            self.flight_dot_index=idxs
示例#2
0
def get_xaxis(SYNTH,FLIGHT):
    """ flight path from standard tape """
    fpath=FLIGHT.get_path(SYNTH.start, SYNTH.end)
    fp=zip(*fpath)
    x = fp[1] # longitude
    y = fp[0] # latitude
    frequency=10 #[km]
    [flight_xaxis, flight_xticks] = cm.get_distance_along_flight_track(lon=x,lat=y,
                                                            ticks_every=frequency)
    return flight_xaxis,flight_xticks
示例#3
0
    def add_flight_path(self,axis):

        """ plot line """
        x=self.flight['lon']
        y= self.flight['lat']
        axis.plot(x,y,    color=self.flightColor,
                        linewidth=self.flightWidth,
                        linestyle=self.flightStyle)

        if self.flightDotOn:        
            """ add dots and text """
            frequency=10 # [km]
            [dist_from_p0,idxs] = cm.get_distance_along_flight_track(lon=x, lat=y, 
                                                                ticks_every=frequency)
            
            for i in idxs:
                value=cm.round_to_closest_int(dist_from_p0[i],frequency)
                self.add_flight_dot(axis,y[i],x[i],value)

            self.flight_track_distance=dist_from_p0
            self.flight_dot_index=idxs