added hook creation and set location to grpc.StartSession
This commit is contained in:
parent
4e03dc6888
commit
de936ea315
5 changed files with 119 additions and 29 deletions
|
@ -306,3 +306,16 @@ def get_net_stats():
|
|||
stats[line[0]] = {"rx": float(line[1]), "tx": float(line[9])}
|
||||
|
||||
return stats
|
||||
|
||||
|
||||
def session_location(session, location):
|
||||
"""
|
||||
Set session location based on location proto.
|
||||
|
||||
:param core.emulator.session.Session session: session for location
|
||||
:param core_pb2.SessionLocation location: location to set
|
||||
:return: nothing
|
||||
"""
|
||||
session.location.refxyz = (location.x, location.y, location.z)
|
||||
session.location.setrefgeo(location.lat, location.lon, location.alt)
|
||||
session.location.refscale = location.scale
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue