Skip to main content

aivdm_message_position

Function aivdm_message_position 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn aivdm_message_position( msg: *const AivdmMessage, out_lat: *mut f64, out_lon: *mut f64, ) -> bool
Expand description

Reads the position, in decimal degrees, off a message.

Returns true and writes *out_lat/*out_lon if this message type carries a position and it is marked available; returns false (leaving the outputs untouched) otherwise.

ยงSafety

msg must be NULL or a valid, non-freed handle from aivdm_decode_line. out_lat and out_lon must be valid pointers to writable f64s.