Documentation
¶
Index ¶
- Constants
- Variables
- func GSTimeFromDate(date time.Time) float64
- func JDay(year, month, day, hour, minute int, second float64) float64
- func JDayTime(date time.Time) float64
- func ThetaGJD(jday float64) float64
- type Coordinates
- type DSComResults
- type DeepSpaceInitResult
- type DeepSpaceResult
- type DpperResult
- type GravConst
- type Gravity
- type LookAngles
- type Satellite
- type TLE
- type Vector3
Constants ¶
const DEG2RAD float64 = math.Pi / 180.0
const EQUATOR_RADIUS float64 = 6378.137
const GRAVITY_EARTH float64 = 398600.4418
const JULIAN_CENTURY float64 = 36525.0
const JULIAN_DAY_JAN_1_2000 float64 = 2451545.0
const POLAR_RADIUS float64 = 6356.7523142
const RAD2DEG float64 = 180.0 / math.Pi
const SECONDS_IN_DAY float64 = 86400.0
const TWOPI float64 = math.Pi * 2.0
const XPDOTP float64 = 1440.0 / TWOPI
Variables ¶
var ErrInvalidLatitude = errors.New("latitude not within bounds -pi/2 to +pi/2")
var ErrInvalidMeanEccentricity = errors.New("mean eccentricity is not within range 0 <= e < 1")
var ErrInvalidMeanMotion = errors.New("mean motion is less than 0")
var ErrInvalidPertubedEccentricity = errors.New("perturbed eccentricity is not within range 0 <= e < 1")
var ErrInvalidSemilatusRectum = errors.New("semilatus rectum is less than 0")
var ErrSatelliteDecay = errors.New("mrt is less than 1.0 indicating decay")
var Now = func() time.Time { return time.Now().UTC() }
Returns the current time in UTC This is a variable so it can be mocked in tests
Functions ¶
func GSTimeFromDate ¶
Calc GST given year, month, day, hour, minute and second.
Types ¶
type Coordinates ¶
Holds latitude and Longitude in either degrees or radians
func ECIToLLA ¶
func ECIToLLA(eciCoords Vector3, gmst float64) (velocity float64, ret Coordinates)
Convert Earth Centered Inertial coordinated into equivalent latitude, longitude, altitude and velocity. Reference: http://celestrak.com/columns/v02n03/
func LatLongDeg ¶
func LatLongDeg(rad Coordinates) (Coordinates, error)
Convert LatLong in radians to LatLong in degrees.
type DSComResults ¶
type DSComResults struct {
// contains filtered or unexported fields
}
A struct returned from the dscom function
type DeepSpaceInitResult ¶
type DeepSpaceInitResult struct {
// contains filtered or unexported fields
}
Result of dsinit(...)
type DeepSpaceResult ¶
type DeepSpaceResult struct {
// contains filtered or unexported fields
}
Result of dspace(...)
type DpperResult ¶
type DpperResult struct {
// contains filtered or unexported fields
}
A struct returned from the dpper function
type GravConst ¶
type GravConst struct {
// contains filtered or unexported fields
}
GravConst holds variables that are dependent upon selected gravity model.
type LookAngles ¶
func ECIToLookAngles ¶
func ECIToLookAngles(eciSat Vector3, obsCoords Coordinates, jday float64, grav GravConst) LookAngles
Calculate look angles for given satellite position and observer position obsAlt in km Reference: http://celestrak.com/columns/v02n02/
type TLE ¶
type TLE struct { Line1 string `json:"LINE1"` Line2 string `json:"LINE2"` CatalogNumber string EpochYear int64 EpochDay float64 // aka ndot FirstTimeDerivativeOfMeanMotion float64 // aka nddot SecondTimeDerivativeOfMeanMotion float64 BStar float64 Inclination float64 RightAscensionOfAscendingNode float64 Eccentricity float64 ArgumentOfPerigee float64 MeanAnomaly float64 MeanMotion float64 OrbitNumberAtEpoch int64 }
type Vector3 ¶
type Vector3 struct {
X, Y, Z float64
}
func ECIToECEF ¶
Convert Earth Centered Intertial coordinates into Earth Cenetered Earth Final coordinates Reference: http://ccar.colorado.edu/ASEN5070/handouts/coordsys.doc
func LLAToECI ¶
func LLAToECI(obsCoords Coordinates, jday float64, grav GravConst) Vector3
Convert latitude, longitude and altitude(km) into equivalent Earth Centered Intertial coordinates(km) Reference: The 1992 Astronomical Almanac, page K11.