suppor_lib.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:DHP 作者: YuhangSong 项目源码 文件源码
def get_transfered_data(lon, lat, theta, data_frame, max_distance_on_position=1.0*math.pi, max_distance_on_degree=180.0, final_discount_to=10**(-4)):

    distance_on_position = haversine(lon1=lon,
                                     lat1=lat,
                                     lon2=data_frame.p[0],
                                     lat2=data_frame.p[1])

    distance_on_degree = abs(theta - data_frame.theta)
    if(distance_on_degree>180):
        distance_on_degree = distance_on_degree - 180

    thegma_2_on_position = -0.5*(max_distance_on_position**2)/math.log(final_discount_to)
    thegma_2_on_degree = -0.5*(max_distance_on_degree**2)/math.log(final_discount_to)

    '''guassion trustworthy transfer'''
    prob = 1.0 * math.exp(-1.0 / 2.0 * (distance_on_position**2) / (thegma_2_on_position)) * math.exp(-1.0 / 2.0 * (distance_on_degree**2) / (thegma_2_on_degree))

    return prob
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号