Skip to content

Commit 17a186a

Browse files
committed
Transferred pymavlink to new repository
1 parent 4e92cc4 commit 17a186a

16 files changed

+1111
-0
lines changed

pymavswarm/Agent.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import monotonic
2+
from .state import *
3+
4+
5+
class Agent:
6+
"""
7+
Agent represents and stores the state of an agent in the network. The
8+
agent's state is updated as new MAVLink messages are received from the
9+
associated message
10+
"""
11+
def __init__(self, sys_id, comp_id, timeout_period=30) -> None:
12+
self.sys_id: int = sys_id
13+
self.comp_id: int = comp_id
14+
self.attitude: Attitude = Attitude()
15+
self.battery: Battery = Battery()
16+
self.docker_info: DockerInfo = DockerInfo()
17+
self.gps_info: GPSInfo = GPSInfo()
18+
self.location: Location = Location()
19+
self.ekf: EKFStatus = EKFStatus()
20+
self.telemetry: Telemetry = Telemetry()
21+
self.velocity: Velocity = Velocity()
22+
self.armed: bool = False
23+
self.flight_mode: str = 'None'
24+
self.system_status = 'None'
25+
self.vehicle_type = 'None'
26+
self.last_heartbeat: int = monotonic.monotonic()
27+
self.timeout_period: int = timeout_period
28+
self.timeout: bool = False

0 commit comments

Comments
 (0)