Astrex.Server (Astrex v0.5.1)

View Source

Provides a GenServer to hold the local coordinates. This is useful for applications that are localized (e.g. telescope control) and makes possible to access the functions via the Astrex module, without supplying the local coordinates each time.

Use of the GenServer is by no means mandatory. All the functions can be accessed via the Astrex.Astro.* modules.

If the GenServer is used it is responsibility of the application to start, initialize and supervise it

Summary

Functions

Returns a specification to start this module under a supervisor.

The Genserver is initialized using Greenwich coordinates, unless local coordinates are specified

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_ll()

init(lat_long \\ %{lat: 51.477928, long: 0.0})

Callback implementation for GenServer.init/1.

set_ll(ll)

start_link(state \\ %{lat: 51.477928, long: 0.0}, opts \\ [])

The Genserver is initialized using Greenwich coordinates, unless local coordinates are specified

stop()