Documentation
¶
Index ¶
- Variables
- func Altitude(date time.Time, lon, lat float64) float64
- func AltitudeN(date time.Time, lon, lat float64, n int) float64
- func ApparentAltitude(date time.Time, lon, lat, pressureHPa, temperatureC float64) float64
- func ApparentAltitudeN(date time.Time, lon, lat, pressureHPa, temperatureC float64, n int) float64
- func ApparentDec(date time.Time) float64
- func ApparentLo(date time.Time) float64
- func ApparentRa(date time.Time) float64
- func ApparentRaDec(date time.Time) (float64, float64)
- func ApparentSolarTime(date time.Time, lon float64) time.Time
- func ApparentSolarTimeN(date time.Time, lon float64, n int) time.Time
- func ApparentZenith(date time.Time, lon, lat, pressureHPa, temperatureC float64) float64
- func ApparentZenithN(date time.Time, lon, lat, pressureHPa, temperatureC float64, n int) float64
- func AxialtiltNutation(date time.Time) float64
- func AxialtiltNutation1980(date time.Time) float64
- func Azimuth(date time.Time, lon, lat float64) float64
- func AzimuthN(date time.Time, lon, lat float64, n int) float64
- func CulminationTime(date time.Time, lon float64) time.Time
- func CulminationTimeN(date time.Time, lon float64, n int) time.Time
- func Diameter(date time.Time) float64
- func DiameterN(date time.Time, n int) float64
- func DownTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error)deprecated
- func DownTimeN(date time.Time, lon, lat, height float64, aero bool, n int) (time.Time, error)
- func EarthDistance(date time.Time) float64
- func EclipticNutation(date time.Time) float64
- func EclipticNutation1980(date time.Time) float64
- func EclipticObliquity(date time.Time, nutation bool) float64
- func EquationTime(date time.Time) float64
- func EveningTwilight(date time.Time, lon, lat, angle float64) (time.Time, error)
- func EveningTwilightN(date time.Time, lon, lat, angle float64, n int) (time.Time, error)
- func GeometricLo(date time.Time) float64
- func HourAngle(date time.Time, lon, lat float64) float64
- func HourAngleN(date time.Time, lon, lat float64, n int) float64
- func MidFunc(date time.Time) float64
- func MorningTwilight(date time.Time, lon, lat, angle float64) (time.Time, error)
- func MorningTwilightN(date time.Time, lon, lat, angle float64, n int) (time.Time, error)
- func ParallacticAngle(date time.Time, lon, lat float64) float64
- func ParallacticAngleN(date time.Time, lon, lat float64, n int) float64
- func RiseTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error)
- func RiseTimeN(date time.Time, lon, lat, height float64, aero bool, n int) (time.Time, error)
- func Semidiameter(date time.Time) float64
- func SemidiameterN(date time.Time, n int) float64
- func SetTime(date time.Time, lon, lat, height float64, aero bool) (time.Time, error)
- func SetTimeN(date time.Time, lon, lat, height float64, aero bool, n int) (time.Time, error)
- func TrueBo(date time.Time) float64
- func TrueBoN(date time.Time, n int) float64
- func TrueLo(date time.Time) float64
- func TrueLoN(date time.Time, n int) float64
- func Zenith(date time.Time, lon, lat float64) float64
- func ZenithN(date time.Time, lon, lat float64, n int) float64
- type PhysicalInfo
Constants ¶
This section is empty.
Variables ¶
var ( ERR_SUN_NEVER_RISE = errors.New("ERROR:极夜,太阳在今日永远在地平线下!") ERR_SUN_NEVER_SET = errors.New("ERROR:极昼,太阳在今日永远在地平线上!") // ERR_SUN_NEVER_DOWN deprecated: -- use ERR_SUN_NEVER_RISE instead ERR_SUN_NEVER_DOWN = ERR_SUN_NEVER_SET ERR_TWILIGHT_NOT_EXISTS = errors.New("ERROR:今日晨昏朦影不存在!") )
Functions ¶
func Altitude ¶ added in v0.1.0
Altitude 太阳高度角 / solar altitude.
date 为观测时刻,会读取其时区参与地方时计算;lon/lat 为观测者经纬度,东正西负、北正南负;返回值单位度。 date is the observing instant and its zone offset participates in local-time calculations. lon/lat are east-positive and north-positive; the result is in degrees.
func AltitudeN ¶ added in v0.1.0
AltitudeN 截断项太阳高度角 / truncated solar altitude.
参数与 Altitude 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as Altitude. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func ApparentAltitude ¶ added in v0.1.0
ApparentAltitude 太阳视高度角 / apparent solar altitude.
func ApparentAltitudeN ¶ added in v0.1.0
ApparentAltitudeN 太阳视高度角(截断版) / truncated apparent solar altitude.
func ApparentDec ¶
ApparentDec 太阳地心视赤纬 / apparent geocentric declination.
返回 date 对应绝对时刻的太阳地心视赤纬,单位度。 Returns the Sun's apparent geocentric declination at the instant represented by date, in degrees.
func ApparentLo ¶
ApparentLo 太阳视黄经 / apparent ecliptic longitude.
返回 date 对应绝对时刻的太阳视黄经,单位度。 Returns the Sun's apparent ecliptic longitude at the instant represented by date, in degrees.
func ApparentRa ¶
ApparentRa 太阳地心视赤经 / apparent geocentric right ascension.
返回 date 对应绝对时刻的太阳地心视赤经,单位度。 Returns the Sun's apparent geocentric right ascension at the instant represented by date, in degrees.
func ApparentRaDec ¶
ApparentRaDec 太阳地心视赤经、视赤纬 / apparent geocentric right ascension and declination.
返回 date 对应绝对时刻的太阳地心视赤经与视赤纬,单位度。 Returns the Sun's apparent geocentric right ascension and declination at the instant represented by date, in degrees.
func ApparentSolarTime ¶
ApparentSolarTime 真太阳时 / apparent solar time.
返回 date 这一绝对时刻在给定经度 lon 处对应的真太阳时,结果时区为按经度换算的地方平太阳时区。 Returns the apparent solar time for the instant represented by date at longitude lon. The result uses a synthetic local-solar time zone derived from longitude.
func ApparentSolarTimeN ¶ added in v0.1.0
ApparentSolarTimeN 截断项真太阳时 / truncated apparent solar time.
参数与 ApparentSolarTime 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as ApparentSolarTime. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func ApparentZenith ¶ added in v0.1.0
ApparentZenith 太阳视天顶距 / apparent solar zenith distance.
func ApparentZenithN ¶ added in v0.1.0
ApparentZenithN 太阳视天顶距(截断版) / truncated apparent solar zenith distance.
func AxialtiltNutation ¶
AxialtiltNutation 交角章动(IAU 2000B) / nutation in obliquity, IAU 2000B.
返回 date 对应绝对时刻的交角章动,单位度。 Returns nutation in obliquity at the instant represented by date, in degrees.
func AxialtiltNutation1980 ¶
AxialtiltNutation1980 交角章动(IAU 1980) / nutation in obliquity, IAU 1980.
返回 date 对应绝对时刻的交角章动,单位度。 Returns nutation in obliquity at the instant represented by date, in degrees.
func Azimuth ¶
Azimuth 太阳方位角 / azimuth.
date 为观测时刻,会读取其时区参与地方时计算;lon/lat 为观测者经纬度,东正西负、北正南负;返回值按正北为 0°、向东增加。 date is the observing instant and its zone offset participates in local-time calculations. lon/lat are east-positive and north-positive; azimuth is measured from north toward east.
func AzimuthN ¶ added in v0.1.0
AzimuthN 截断项太阳方位角 / truncated azimuth.
参数与 Azimuth 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as Azimuth. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func CulminationTime ¶
CulminationTime 太阳中天时刻 / culmination time.
date 取其所在时区的当地日期,返回值保持相同时区;lon 为观测者经度,东正西负。 date is interpreted on its local civil day and the result keeps the same time zone. lon is east-positive longitude.
func CulminationTimeN ¶ added in v0.1.0
CulminationTimeN 截断项太阳中天时刻 / truncated culmination time.
参数与 CulminationTime 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as CulminationTime. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func DiameterN ¶ added in v0.1.0
DiameterN 太阳视直径(截断版),单位角秒 / truncated apparent solar diameter in arcseconds.
func DownTimeN ¶ added in v0.1.0
DownTimeN 截断项日落时刻别名 / deprecated truncated sunset alias.
参数与 SetTimeN 相同,仅为兼容旧接口保留。 Same as SetTimeN and kept only for backward compatibility.
func EarthDistance ¶
EarthDistance 日地距离 / Earth-Sun distance.
返回 date 对应绝对时刻的日地距离,单位 AU。 Returns the Earth-Sun distance at the instant represented by date, in astronomical units.
func EclipticNutation ¶
EclipticNutation 黄经章动(IAU 2000B) / nutation in longitude, IAU 2000B.
返回 date 对应绝对时刻的黄经章动,单位度。 Returns nutation in longitude at the instant represented by date, in degrees.
func EclipticNutation1980 ¶
EclipticNutation1980 黄经章动(IAU 1980) / nutation in longitude, IAU 1980.
返回 date 对应绝对时刻的黄经章动,单位度。 Returns nutation in longitude at the instant represented by date, in degrees.
func EclipticObliquity ¶
EclipticObliquity 黄赤交角 / ecliptic obliquity.
返回 date 对应绝对时刻的黄赤交角,单位度;nutation 为 true 时加入交角章动。 Returns the obliquity of the ecliptic at the instant represented by date, in degrees. When nutation is true, obliquity nutation is included.
func EquationTime ¶
EquationTime 均时差 / equation of time.
返回 date 对应绝对时刻的均时差,单位小时。 Returns the equation of time at the instant represented by date, in hours.
func EveningTwilight ¶
EveningTwilight 暮光终时 / evening twilight.
参数与 MorningTwilight 相同,返回对应当地日期的暮光结束时刻。 Uses the same inputs as MorningTwilight and returns the evening-twilight time on the corresponding local civil day.
func EveningTwilightN ¶ added in v0.1.0
EveningTwilightN 截断项暮光终时 / truncated evening twilight.
参数与 MorningTwilightN 相同,返回对应当地日期的暮光结束时刻。 Uses the same inputs as MorningTwilightN and returns the evening-twilight time on the corresponding local civil day.
func GeometricLo ¶
GeometricLo 太阳几何黄经 / geometric ecliptic longitude.
返回 date 对应绝对时刻的太阳几何黄经,单位度。 Returns the Sun's geometric ecliptic longitude at the instant represented by date, in degrees.
func HourAngle ¶
HourAngle 太阳时角 / hour angle.
date 为观测时刻,会读取其时区参与地方时计算;lon 为观测者经度,东正西负;返回值单位度。 lat 目前不参与计算,仅为与其他观测接口保持参数形状一致。 date is the observing instant and its zone offset participates in local-time calculations. lon is east-positive longitude and the result is in degrees. lat is currently unused and kept only for API symmetry with the other observation helpers.
func HourAngleN ¶ added in v0.1.0
HourAngleN 截断项太阳时角 / truncated hour angle.
参数与 HourAngle 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as HourAngle. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func MidFunc ¶
MidFunc 太阳中心差 / solar equation of center.
返回 date 对应绝对时刻的太阳中心差,单位度。 Returns the Sun's equation of center at the instant represented by date, in degrees.
func MorningTwilight ¶
MorningTwilight 晨光始时 / morning twilight.
date 取其所在时区的当地日期,返回值保持相同时区;lon/lat 为观测者经纬度,东正西负、北正南负; angle 为目标太阳高度角,常用 -6/-12/-18 度,分别对应民用、航海、天文朦影。 date is interpreted on its local civil day and the result keeps the same time zone. lon/lat are east-positive and north-positive; angle is the target solar altitude in degrees, typically -6, -12, or -18 for civil, nautical, and astronomical twilight.
func MorningTwilightN ¶ added in v0.1.0
MorningTwilightN 截断项晨光始时 / truncated morning twilight.
参数与 MorningTwilight 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as MorningTwilight. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func ParallacticAngle ¶ added in v0.1.0
ParallacticAngle 太阳视差角(天顶方向角) / solar parallactic angle.
lon/lat 为观测者经纬度,东正西负、北正南负;返回值为有符号视差角,单位度。
func ParallacticAngleN ¶ added in v0.1.0
ParallacticAngleN 截断项太阳视差角(天顶方向角) / truncated solar parallactic angle.
func RiseTime ¶
RiseTime 日出时刻 / sunrise time.
date 取其所在时区的当地日期,返回值保持相同时区;lon/lat 为观测者经纬度,东正西负、北正南负; height 为海拔高度,单位米;aero 为 true 时加入标准大气折射。 date is interpreted on its local civil day and the result keeps the same time zone. lon/lat are east-positive and north-positive; height is observer elevation in meters, and aero enables standard atmospheric refraction.
func RiseTimeN ¶ added in v0.1.0
RiseTimeN 截断项日出时刻 / truncated sunrise time.
参数与 RiseTime 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as RiseTime. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func Semidiameter ¶ added in v0.1.0
Semidiameter 太阳视半径,单位角秒 / apparent solar semidiameter in arcseconds.
func SemidiameterN ¶ added in v0.1.0
SemidiameterN 太阳视半径(截断版),单位角秒 / truncated apparent solar semidiameter in arcseconds.
func SetTime ¶
SetTime 日落时刻 / sunset time.
参数与 RiseTime 相同,返回给定当地日期内的日落时刻。 Uses the same inputs as RiseTime and returns the sunset time on the corresponding local civil day.
func SetTimeN ¶ added in v0.1.0
SetTimeN 截断项日落时刻 / truncated sunset time.
参数与 RiseTimeN 相同,返回给定当地日期内的日落时刻。 Uses the same inputs as RiseTimeN and returns the sunset time on the corresponding local civil day.
func TrueBo ¶
TrueBo 太阳真黄纬 / true ecliptic latitude.
返回 date 对应绝对时刻的太阳真黄纬,单位度。 Returns the Sun's true ecliptic latitude at the instant represented by date, in degrees.
func TrueBoN ¶ added in v0.1.0
TrueBoN 截断项太阳真黄纬 / truncated true ecliptic latitude.
参数与 TrueBo 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as TrueBo. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
func TrueLo ¶
TrueLo 太阳真黄经 / true ecliptic longitude.
返回 date 对应绝对时刻的太阳真黄经,单位度。 Returns the Sun's true ecliptic longitude at the instant represented by date, in degrees.
func TrueLoN ¶ added in v0.1.0
TrueLoN 截断项太阳真黄经 / truncated true ecliptic longitude.
参数与 TrueLo 相同;n<0 使用当前仓库内嵌的全部 VSOP 项,其余值用于截断太阳位置级数。 Uses the same inputs as TrueLo. n<0 keeps all embedded VSOP terms in this repository; other values truncate the solar series.
Types ¶
type PhysicalInfo ¶ added in v0.1.0
type PhysicalInfo struct {
// P 太阳北极位置角,单位度 / position angle of the solar north pole in degrees.
P float64
// B0 日面中心太阳纬度,单位度 / heliographic latitude of the disk center in degrees.
B0 float64
// L0 日面中心卡林顿经度,单位度 / Carrington heliographic longitude of the disk center in degrees.
L0 float64
}
PhysicalInfo 太阳物理观测参数 / physical observing parameters of the Sun.
func Physical ¶ added in v0.1.0
func Physical(date time.Time) PhysicalInfo
Physical 太阳物理观测参数 / physical observing parameters of the Sun.