horizon

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 5, 2023 License: GPL-3.0 Imports: 5 Imported by: 0

README

Horizon version

Package of the Sunangel Project

Provides:

  • Data formats for horizons used in the project
  • Utilities to calculate natural horizons

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AltitudeArray

type AltitudeArray [horizonAngleResolution]float64

func AltitudeFromBytes

func AltitudeFromBytes(bytes []byte) (AltitudeArray, error)

AltitudeFromBytes returns an altitude array from a byte slice

type Horizon

type Horizon struct {
	Place *location.Location
	// contains filtered or unexported fields
}

func NewHorizon

func NewHorizon(place *location.Location, startRadius int) *Horizon

NewHorizon returns the computed horizon for a given location. The computation starts at the given startRadius

func NewHorizonWithAltitude

func NewHorizonWithAltitude(place *location.Location, r int, a AltitudeArray) *Horizon

NewHorizonWithAltitude returns a horizon with a given startRadius and altitude

func (*Horizon) AltitudeToBytes

func (hor *Horizon) AltitudeToBytes() []byte

AltitudeToBytes returns the altitude array of a horizon into a byte slice

func (Horizon) GetAltitude

func (horizon Horizon) GetAltitude(tgtAzimutAngle float64) float64

GetHorizonAngleAt returns the altitude angle of the horizon of a given location at a given azimut angle.

func (Horizon) GetAltitudeArray

func (hor Horizon) GetAltitudeArray() AltitudeArray

GetAltitudeArray returns the altitude array of the given horizon. Only use for testing!

func (Horizon) GetStartRadius

func (hor Horizon) GetStartRadius() int

GetStartRadius returns the start radius of the given horizon. Only use for testing!

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL