Function open_notify::init [−][src]
pub fn init(
latitude: f64,
longitude: f64,
altitude: f64,
poll_mins: u64
) -> Receiver
Expand description
Spawns a thread which fetches the current ISS spotting from http://api.open-notify.org periodically.
Parameters
latitude
: latitude in decimal degrees of the ground station. required Range: -90..90longitude
: longitude in decimal degress of the ground station. required Range: -180..180altitude
: altitude in meters of the ground station. optional. Range: 0..10000poll_mins
: Update interval:> 0
: duration of poll period in minutes (90
is recommended)= 0
: thread will terminate after the first successful update.
Return value
-
open_notify::Receiver
: Handle this toopen_notify::update()
to get the latest ISS spotting update.The return value is a
mpsc
channel receiver:pub type Receiver = std::sync::mpsc::Receiver<Result<open_notify::Spot, String>>;