struct

Kozai::Observer

Inherits Struct < Value < Object

A ground station: somewhere on the Earth that wants to know where to point.

Positions are WGS-84 geodetic, the same thing a GPS receiver or a map will give you. The earth-fixed position is computed once at construction, because a pass search evaluates look angles thousands of times against a station that has not moved.

station = Kozai::Observer.new(52.3676, 4.9041, 0.005, name: "Amsterdam")
angles = station.look_angles(satellite, Time.utc)
puts "az #{angles.azimuth.round(1)} el #{angles.elevation.round(1)}"

Constructors

new(latitude : Float64, longitude : Float64, altitude_km : Float64 = 0.0, name : String | Nil = nil, minimum_elevation : Float64 = 0.0, refraction : Bool = false)

Creates a station.

latitude is positive north, longitude positive east, altitude_km is height above the WGS-84 ellipsoid.

Raises ArgumentError if the coordinates are not on the Earth.

Source

Instance methods

altitude_km

Height above the ellipsoid in kilometres.

Source
ecef

Station position in the earth-fixed frame, kilometres.

Source
latitude

Latitude in degrees, positive north.

Source
longitude

Longitude in degrees, positive east.

Source
look_angles(position_teme : Vector3, velocity_teme : Vector3, gmst : Float64) : Frames::LookAngles

Look angles to a TEME position and velocity at a given sidereal time.

This is the form the pass search uses: it already has the sidereal time in hand and does not want it recomputed per call.

Source
look_angles(state : SGP4::State, time : Time) : Frames::LookAngles

Look angles to a propagated state at time.

Source
look_angles(satellite : SGP4::Satellite, time : Time) : Frames::LookAngles | Nil

Look angles to satellite at time.

Returns nil if the propagator could not produce a position — a decayed satellite, or elements too degenerate to use.

Source
minimum_elevation

Elevation in degrees below which a pass does not count.

Zero is the geometric horizon. Real stations rarely see anything useful below a few degrees, because of terrain, buildings and the extra atmosphere a low signal has to cross.

Source
name

Station name, for display.

Source
position

Geodetic position of the station.

Source
refraction?

Whether reported elevations are apparent rather than geometric.

NOTE: off by default, and that is a decision rather than an omission. Refraction lifts an object near the horizon by 0.57 degrees, which is the largest single effect this software does not apply — larger than everything in the README's simplification list put together. Three reasons it is nonetheless not the default:

  • It is unpredictable. The bend depends on the pressure, temperature and humidity along the path, none of which a prediction made three days ahead can know. The 0.57 figure is a standard atmosphere, and a real one departs from it by a useful fraction.
  • It is largest exactly where a station cannot use it. At the horizon terrain, buildings and trees decide what you hear; by ten degrees, where a station starts working, refraction is 0.09 degrees, and an antenna beamwidth is tens.
  • Geometric elevation is the unambiguous quantity. Two tools that both apply refraction still disagree unless they assume the same atmosphere; two that report geometry agree exactly.

Turn it on to compare against tools that apply it — predict, Gpredict and Heavens-Above all do — or to squeeze the last of a horizon pass.

Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
visible?(satellite : SGP4::Satellite, time : Time) : Bool

Whether satellite is above #minimum_elevation at time.

Source