1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! `CRadarTarget` FFI declarations.
use std::ffi::{c_char, c_int};
use crate::{EsHandle, FlightPlanPtr};
unsafe extern "C" {
/// Whether the radar-target handle references a live aircraft.
/// Wraps `CRadarTarget::IsValid`.
pub fn es_radartarget_is_valid(h: EsHandle) -> bool;
/// Aircraft callsign. Borrowed, NUL-terminated, ANSI.
/// Wraps `CRadarTarget::GetCallsign`.
pub fn es_radartarget_callsign(h: EsHandle) -> *const c_char;
/// System-assigned target ID (stable across instances, derived from the
/// callsign). Borrowed, NUL-terminated, ANSI.
/// Wraps `CRadarTarget::GetSystemID`.
pub fn es_radartarget_system_id(h: EsHandle) -> *const c_char;
/// Calculated vertical speed in feet/minute (protocol-inaccurate).
/// Wraps `CRadarTarget::GetVerticalSpeed`.
pub fn es_radartarget_vertical_speed(h: EsHandle) -> c_int;
/// Calculated track direction in degrees.
/// Wraps `CRadarTarget::GetTrackHeading`.
pub fn es_radartarget_track_heading(h: EsHandle) -> f64;
/// Ground speed in knots (reported, falling back to calculated).
/// Wraps `CRadarTarget::GetGS`.
pub fn es_radartarget_gs(h: EsHandle) -> c_int;
/// Correlate this radar target with a flight plan; returns whether it
/// succeeded. Mutates EuroScope state.
/// Wraps `CRadarTarget::CorrelateWithFlightPlan`.
pub fn es_radartarget_correlate_with_flight_plan(h: EsHandle, fp: FlightPlanPtr) -> bool;
/// Uncorrelate this radar target from its flight plan. Mutates EuroScope
/// state.
/// Wraps `CRadarTarget::Uncorrelate`.
pub fn es_radartarget_uncorrelate(h: EsHandle);
}