Skip to content

KBE3D / KBSatellite / _tlejs

_tlejs

tle.js - 第三方导出

函数

函数描述
clearCacheClears SGP caches to free up memory for long-running apps.
getCacheSizesReturns the current sizes of SGP caches.
getGroundTracks(Async) Calculates three orbit tracks for a TLE (previous, current, and next orbits).
getGroundTracksSync(Sync) Calculates three orbit tracks for a TLE (previous, current, and next orbits).
getLastAntemeridianCrossingTimeMSDetermines the last time the satellite crossed the antemeridian. Returns -1 if not found (e.g. for geosynchronous satellites).
getLatLngObjDetermines satellite position for the given time.
getLngLatAtEpochDetermines the satellite's position at the time of the TLE epoch (when the TLE was generated).
getOrbitTrack(Async) Generates an array of lng/lat pairs representing a ground track (orbit track), starting from startTimeMS and continuing until just before crossing the antemeridian, which is considered the end of the orbit for convenience.
getOrbitTrackSync(Sync) Generates an array of lng/lat pairs representing a ground track (orbit track), starting from startTimeMS and continuing until just before crossing the antemeridian, which is considered the end of the orbit for convenience.
getSatBearing(Experimental) Determines the compass bearing from the perspective of the satellite. Useful for 3D / pitched map perspectives.
getSatelliteInfoDetermines satellite position and look angles from an earth observer. Note that observer input arguments are only needed if you are interested in observer-relative outputs (azimuth, elevation, and range).
getVisibleSatellitesDetermines which satellites are currently visible, assuming a completely flat horizon.
getBstarDragBSTAR drag term. This estimates the effects of atmospheric drag on the satellite's motion. See https://en.wikipedia.org/wiki/BSTAR, https://celestrak.com/columns/v04n03, and http://www.castor2.ca/03_Mechanics/03_TLE/B_Star.html
getCatalogNumberReturns the Space Catalog Number (aka NORAD Catalog Number). See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999
getCatalogNumber1Returns the Space Catalog Number (aka NORAD Catalog Number) from the first line of the TLE. See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999
getChecksum1TLE line 1 checksum (modulo 10), for verifying the integrity of this line of the TLE. Note that letters, blanks, periods, and plus signs are counted as 0, while minus signs are counted as 1. Output range: 0 to 9
getClassificationReturns the satellite classification.
getEpochDayReturns the TLE epoch day of the year (day of year with fractional portion of the day) when the TLE was generated. For example, a TLE generated on January 1 will return something like 1.18396726. Output range: 1 to 365.99999999
getEpochYearReturns the TLE epoch year (last two digits) when the TLE was generated. For example, a TLE generated in 2022 will return 22. Output range: 00 to 99.
getFirstTimeDerivativeFirst Time Derivative of the Mean Motion divided by two, measured in orbits per day per day (orbits/day ^ 2). Defines how mean motion changes from day to day, so TLE propagators can still be used to make reasonable guesses when distant from the original TLE epoch. Can be a negative or positive number. Aka mean motion dot. See https://en.wikipedia.org/wiki/Mean_Motion
getIntDesignatorLaunchNumberReturns the launch number of the year, which makes up part of the COSPAR id (international designator). For example, the 50th launch of the year will return 50. See https://en.wikipedia.org/wiki/International_Designator Output range: 1 to 999
getIntDesignatorPieceOfLaunchReturns the piece of the launch, which makes up part of the COSPAR id (international designator). For example, "A" represents the primary payload, followed by secondary payloads, rockets involved in the launch, and any subsequent debris. See https://en.wikipedia.org/wiki/International_Designator Output range: A to ZZZ
getIntDesignatorYearReturns the launch year (last two digits), which makes up part of the COSPAR id (international designator). For example, a satellite launched in 1999 will return "99". See https://en.wikipedia.org/wiki/International_Designator Output range: 00 to 99
getLineNumber1Returns the line number from line 1. Should always return "1" for valid TLEs.
getOrbitModelPrivate value - used by Air Force Space Command to reference the orbit model used to generate the TLE (e.g. SGP, SGP4). Distributed TLES will always return 0 for this value. Note that all distributed TLEs are generated with SGP4/SDP4. See https://celestrak.com/columns/v04n03/ Output range: 0 to 9
getSecondTimeDerivativeSecond Time Derivative of Mean Motion divided by six, measured in orbits per day per day per day (orbits/day ^ 3). Similar to the first time derivative, it measures rate of change in the Mean Motion Dot so software can make reasonable guesses when distant from the original TLE epoch. Normally zero unless the satellite is manuevering or has a decaying orbit. See https://en.wikipedia.org/wiki/Mean_Motion and http://castor2.ca/03_Mechanics/03_TLE/Mean_Mot_Dot.html Aka mean motion double dot.
getTleSetNumberTLE element set number, incremented for each new TLE generated since launch. 999 seems to mean the TLE has maxed out. Output range: technically 1 to 9999, though in practice the maximum number seems to be 999.
getCatalogNumber2Returns the Space Catalog Number (aka NORAD Catalog Number) from the second line of the TLE. See https://en.wikipedia.org/wiki/Satellite_Catalog_Number Output range: 0 to 99999
getChecksum2TLE line 2 checksum (modulo 10), for verifying the integrity of this line of the TLE. Note that letters, blanks, periods, and plus signs are counted as 0, while minus signs are counted as 1. Output range: 0 to 9
getEccentricityReturns the orbital eccentricity. All artificial Earth satellites have an eccentricity between 0 (perfect circle) and 1 (parabolic orbit). See https://en.wikipedia.org/wiki/Orbital_eccentricity Output range: 0 to 1
getInclinationReturns the inclination relative to the Earth's equatorial plane in degrees (0 to 180 degrees). 0 to 90 degrees is a prograde orbit and 90 to 180 degrees is a retrograde orbit. See https://en.wikipedia.org/wiki/Orbital_inclination
getLineNumber2Returns the line number from line 2. Should always return "2" for valid TLEs.
getMeanAnomalyReturns the Mean Anomaly. Indicates where the satellite was located within its orbit at the time of the TLE epoch. See https://en.wikipedia.org/wiki/Mean_Anomaly
getMeanMotionReturns the revolutions around the Earth per day (mean motion). Theoretically can be a value between 0 to 17. See https://en.wikipedia.org/wiki/Mean_Motion
getPerigeeReturns the argument of perigee. See https://en.wikipedia.org/wiki/Argument_of_perigee
getRevNumberAtEpochReturns the total satellite revolutions when this TLE was generated (0 to 99999). This number seems to roll over (e.g. 99999 -> 0).
getRightAscensionReturns the right ascension of the ascending node in degrees. Essentially, this is the angle of the satellite as it crosses northward (ascending) across the Earth's equator (equatorial plane). See https://en.wikipedia.org/wiki/Right_ascension_of_the_ascending_node
getCOSPARDetermines COSPAR ID (International Designator). See https://en.wikipedia.org/wiki/International_Designator
getSatelliteNameDetermines the name of a satellite, if present in the first line of a 3-line TLE. If not found, returns "Unknown" by default (or the COSPAR ID when fallbackToCOSPAR is true).
getEpochTimestampDetermines the timestamp of a TLE epoch (the time a TLE was generated).
getAverageOrbitTimeMSDetermines the average amount of milliseconds in one orbit.
getAverageOrbitTimeMinsDetermines the average amount of minutes in one orbit.
getAverageOrbitTimeSDetermines the average amount of seconds in one orbit.
parseTLEConverts string and array TLE formats into a parsed TLE in a consistent object format. Accepts 2 and 3-line (with satellite name) TLE variants in string (\n-delimited) and array variants.
isValidTLEDetermines if a TLE is structurally valid.
computeChecksumDetermines the checksum for a single line of a TLE. Checksum = modulo 10 of sum of all numbers (including line number) + 1 for each negative sign (-). Everything else is ignored.
clearTLEParseCacheClears the TLE parse cache, which may be useful for long-running app.s

接口

接口描述
GroundTracksInputInput for getGroundTracks() and getGroundTracksSync().
LngLatLongitude, latitude pair in Array format. Note that this format is reversed from the more familiar lat/lng format in order to be easily used for GeoJSON, which formats points as [lng, lat].
LatLngObjectLatitude, longitude pair in Object format.
ParsedTLEOutput of parseTLE(). TLE normalized into a predictable format for fast lookups.
OrbitTrackSyncInputInput for getOrbitTrackSync(). Note that getOrbitTrack() uses OrbitTrackInput instead.
OrbitTrackInputInput for getOrbitTrack(). Note that getOrbitTrackSync() uses OrbitTrackInputSync instead.
SatBearingOutputOutput for getSatBearing().
SatelliteInfoOutputOutput for getSatelliteInfo().
VisibleSatellitesInputInput for getVisibleSatellites().

枚举

枚举描述
SatelliteClassification-

类型别名

类型别名描述
DegreesGeneric degrees. Generally 0 to 360 degrees unless otherwise noted.
Meters-
Kilometers-
KilometersPerSecond-
LatitudeDegreesLatitude in degrees. Range: from -90 to 90.
LongitudeDegreesLongitude in degrees. Range: from -180 to 180.
TimestampUnix timestamp in milliseconds.
Minutes-
Seconds-
Milliseconds-
TLETLE in unknown format, to be normalized by parseTLE().
TLELine-
ThreeGroundTracksThree ground track arrays (last, current, and next orbit).
BSTARDragOutputOutput of getBstarDrag() in EarthRadii ^ -1 units.
FirstTimeDerivativeOutputOutput of getFirstTimeDerivative() in orbits / day ^ 2 units.
SecondTimeDerivativeOutputOutput of getSecondTimeDerivative() in orbits / day ^ 3 units.

KBE3D @3.0.0 Copyright © 2024-present KBE3D