from auvsi_suas.client import client from auvsi_suas.proto import interop_api_pb2 from google.protobuf import json_format client = client.Client(url='http://10.10.130.10:80', username='******', password='******') mission = client.get_mission(3) print(json_format.MessageToJson(mission))
str, joerow))) # Write emergentLastKnownPos coordinate writer.write('\n') writer.write("\t".join(map(str, landingrow))) # Write Landing coordinate writer.write('\n') return # Create client object client = client.Client(url='http://192.168.137.1:8000', username='******', password='******') #Get missions mission_id = int(input('Select mission ID:')) mission = client.get_mission(mission_id) json_mission = json_format.MessageToJson(mission) # Use json library to read the mission data json_parsed = json.loads(json_mission) # json_parsed = json.loads(mission) # Write flyzones altitude altmax = json_parsed['flyZones'][0]['altitudeMax'] altmin = json_parsed['flyZones'][0]['altitudeMin'] print("Flyzone alt:", "Max", altmax, "Min", altmin) # Write boundarypoints coordinates bp_num = 0 while True: try: bp_lat = json_parsed['flyZones'][0]['boundaryPoints'][bp_num][