X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=code%2Fnetwork-generator%2Fmodel%2Fpython%2Fgeo_location.py;h=0dd344bac7730406b1e3e4576740960854f070da;hb=c8e3bd35883f540afe023fd077ad64cde327e18a;hp=6d60fc003a24c377abbea49f004308f42ae10a05;hpb=68f3097bd8defa526c289096368532c8fc5e52c9;p=oam.git diff --git a/code/network-generator/model/python/geo_location.py b/code/network-generator/model/python/geo_location.py index 6d60fc0..0dd344b 100644 --- a/code/network-generator/model/python/geo_location.py +++ b/code/network-generator/model/python/geo_location.py @@ -18,7 +18,7 @@ A collection of TypeDefinitions for a geographical location """ import math -from model.python.hexagon import Point +from model.python.point import Point class IGeoLocationData: @@ -35,7 +35,7 @@ class IGeoLocation: self.longitude = longitude self.aboveMeanSeaLevel = aboveMeanSeaLevel - def __str__(self): + def __str__(self)-> str: return f'lat : {self.latitude} : lon : {self.longitude} : amsl : {self.aboveMeanSeaLevel}' @@ -51,11 +51,11 @@ class GeoLocation(IGeoLocation): ) @property - def equatorialRadius(self): + def equatorialRadius(self) -> int: return GeoLocation._equatorialRadius @property - def polarRadius(self): + def polarRadius(self)-> int: return GeoLocation._polarRadius def set_latitude(self, value: float): @@ -68,14 +68,14 @@ class GeoLocation(IGeoLocation): raise ValueError('Invalid longitude. Longitude must be between -180 and 180.') self.longitude = value - def json(self): + def json(self) -> dict[str, float]: return { "latitude": self.latitude, "longitude": self.longitude, "aboveMeanSeaLevel": self.aboveMeanSeaLevel, } - def __str__(self): + def __str__(self) -> str: return str(self.json()) def point_to_geo_location(self, point:Point):