from aviation_ellipsoid_calc_tools import vincenty_direct_solution from aviation_bearing_tools import MagVar, Bearing from aviation_coordinate_tools import CoordinatesPair
Constructor of LocalOriginPoint class:
class LocalOriginPoint(CoordinatesPair): def __init__(self, src_lat, src_lon, src_mag_var, origin_id='', origin_name=''): CoordinatesPair.__init__(self, src_lat, src_lon) self.mag_var = MagVar(src_mag_var) self.origin_id = origin_id self.origin_name = origin_name self.check_init_data()
Definition of check_init_data() function:
def check_init_data(self): if self.mag_var.is_valid is False: self.is_valid = False self.err_msg += self.mag_var.err_msg
Constructor of LocalPolarEndPoint class:
class LocalPolarEndPoint: def __init__(self, origin_point: LocalOriginPoint, brng: Bearing, dist_m): self.origin_point = origin_point self.brng = brng self.dist_m = dist_m self._ep_lon_dd = None self._ep_lat_dd = None self.calc_ep()
Definition of calc_ep() function:
def calc_ep(self): self.brng.calc_tbrng(self.origin_point.mag_var.dd_value) self.ep_lat_dd, self.ep_lon_dd = vincenty_direct_solution(self.origin_point.dd_lat, self.origin_point.dd_lon, self.brng.dd_tbrng, self.dist_m, WGS84_A, WGS84_B, WGS84_F)
No comments:
Post a Comment