Struct DroneState

Namespace
MavNet.PX4.Vehicles
Assembly
MavNet.PX4.dll

Immutable per-fire snapshot of a Drone's observable state. Captured atomically when SubscribeState(Action<DroneState>, StateRate) delivers, so consumers see a coherent view (no torn reads across separate property gets). Use this overload from telemetry recorders, replay, and anywhere a handler might run on a different thread from the receive loop.

public readonly record struct DroneState : IEquatable<DroneState>
Implements
Inherited Members

Constructors

DroneState(double, double, double, double, double, string, bool, double, int, bool)

Immutable per-fire snapshot of a Drone's observable state. Captured atomically when SubscribeState(Action<DroneState>, StateRate) delivers, so consumers see a coherent view (no torn reads across separate property gets). Use this overload from telemetry recorders, replay, and anywhere a handler might run on a different thread from the receive loop.

public DroneState(double Lat, double Lon, double Alt, double Hdg, double Vel, string Mode, bool Armed, double Battery, int Sats, bool LinkUp)

Parameters

Lat double
Lon double
Alt double
Hdg double
Vel double
Mode string
Armed bool
Battery double
Sats int
LinkUp bool

Properties

Alt

public double Alt { get; init; }

Property Value

double

Armed

public bool Armed { get; init; }

Property Value

bool

Battery

public double Battery { get; init; }

Property Value

double

FenceOpaqueId

On-vehicle geofence-plan opaque id (0 = no plan / no change-tracking).

public uint FenceOpaqueId { get; init; }

Property Value

uint

Hdg

public double Hdg { get; init; }

Property Value

double

Lat

public double Lat { get; init; }

Property Value

double

LinkUp

public bool LinkUp { get; init; }

Property Value

bool

Lon

public double Lon { get; init; }

Property Value

double

MissionCurrentSeq

Current mission item seq from MISSION_CURRENT, or -1 if unknown.

public int MissionCurrentSeq { get; init; }

Property Value

int

MissionOpaqueId

On-vehicle waypoint-plan opaque id (0 = no plan / no change-tracking).

public uint MissionOpaqueId { get; init; }

Property Value

uint

MissionReachedCount

Cumulative count of MISSION_ITEM_REACHED events seen.

public int MissionReachedCount { get; init; }

Property Value

int

MissionState

Mission-execution state (Active / Paused / Complete / …).

public MissionState MissionState { get; init; }

Property Value

MissionState

MissionTotal

Total mission item count from MISSION_CURRENT, or -1 if unknown.

public int MissionTotal { get; init; }

Property Value

int

Mode

public string Mode { get; init; }

Property Value

string

RallyOpaqueId

On-vehicle rally-point-plan opaque id (0 = no plan / no change-tracking).

public uint RallyOpaqueId { get; init; }

Property Value

uint

Sats

public int Sats { get; init; }

Property Value

int

Vel

public double Vel { get; init; }

Property Value

double