FrameFocusReading
public readonly record struct FrameFocusReading : IEquatable<FrameFocusReading>
A lens position for a frame, and how far to trust it: FrameMetadata.FocusReading.
FrameMetadata.Focus is only ever the frame's own position. This is that too, and also the status telegram's, so check FrameFocusReading.Source before treating a position as the frame's own.
FrameFocusReading: constructors
public FrameFocusReading(float Fraction, ushort Position, FrameFocusSource Source, TimeSpan Age, TimeSpan Arrived)
A lens position for a frame, and how far to trust it: FrameMetadata.FocusReading.
Fraction: Where the lens was, as a fraction of its travel: 0.0 at the near end ofThermalCamera.GetFocusRange, 1.0 at the far end.Position: The same position in the scale ofThermalCamera.FocusPosition, so it can be sent back to the lens unchanged.Source: Where the position came from.Age: ForFrameFocusSource.StatusTelegram: how long before the frame was handed over the telegram arrived, plus how much later than the quickest recent telegram it came. The time the camera took to read its lens and send the telegram is not in it. At most five seconds.TimeSpan.Zerofor a position from the frame.Arrived: ForFrameFocusSource.StatusTelegram: when the telegram reached this computer, on the same clock as the frames'FrameMetadata.Timestamp, which over Ethernet is also the computer's arrival time. Someta.Timestamp - reading.Arrivedis how long before the frame arrived the telegram did, and two readings with the sameArrivedare the same telegram. It is when the telegram arrived, not when the camera read its lens.TimeSpan.Zerofor a position from the frame.
FrameMetadata.Focus is only ever the frame's own position. This is that too, and also the status telegram's, so check FrameFocusReading.Source before treating a position as the frame's own.
FrameFocusReading: properties
public TimeSpan Age { get; init; }
For FrameFocusSource.StatusTelegram: how long before the frame was handed over the telegram arrived, plus how much later than the quickest recent telegram it came. The time the camera took to read its lens and send the telegram is not in it. At most five seconds. TimeSpan.Zero for a position from the frame.
public TimeSpan Arrived { get; init; }
For FrameFocusSource.StatusTelegram: when the telegram reached this computer, on the same clock as the frames' FrameMetadata.Timestamp, which over Ethernet is also the computer's arrival time. So meta.Timestamp - reading.Arrived is how long before the frame arrived the telegram did, and two readings with the same Arrived are the same telegram. It is when the telegram arrived, not when the camera read its lens. TimeSpan.Zero for a position from the frame.
public float Fraction { get; init; }
Where the lens was, as a fraction of its travel: 0.0 at the near end of ThermalCamera.GetFocusRange, 1.0 at the far end.
public ushort Position { get; init; }
The same position in the scale of ThermalCamera.FocusPosition, so it can be sent back to the lens unchanged.
public FrameFocusSource Source { get; init; }
Where the position came from.