{"id":25306770,"url":"https://github.com/davidcalhoun/tle.js","last_synced_at":"2026-03-04T16:03:13.477Z","repository":{"id":2235254,"uuid":"46033983","full_name":"davidcalhoun/tle.js","owner":"davidcalhoun","description":"🛰️ Satellite TLE tools in JavaScript: get lat/lon of satellites, get look angles, plot orbit lines, extract individual TLE elements, etc","archived":false,"fork":false,"pushed_at":"2025-05-07T19:47:16.000Z","size":2903,"stargazers_count":156,"open_issues_count":2,"forks_count":30,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-07T18:54:38.854Z","etag":null,"topics":["gps","javascript","orbital-mechanics","satellites","sgp4","space","spacecraft","tle"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcalhoun.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-11-12T06:26:33.000Z","updated_at":"2025-09-15T06:48:22.000Z","dependencies_parsed_at":"2024-06-18T17:02:58.115Z","dependency_job_id":"00d9f4ff-bbb7-4244-9469-33144bfdec26","html_url":"https://github.com/davidcalhoun/tle.js","commit_stats":{"total_commits":285,"total_committers":6,"mean_commits":47.5,"dds":0.03157894736842104,"last_synced_commit":"add487b3a1533c9a3992b6dffe40fa11d41aac21"},"previous_names":[],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/davidcalhoun/tle.js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcalhoun%2Ftle.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcalhoun%2Ftle.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcalhoun%2Ftle.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcalhoun%2Ftle.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcalhoun","download_url":"https://codeload.github.com/davidcalhoun/tle.js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcalhoun%2Ftle.js/sbom","scorecard":{"id":326202,"data":{"date":"2025-08-11","repo":{"name":"github.com/davidcalhoun/tle.js","commit":"14c5f1d283e2d84a23936b268d17101ea3d9b447"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 8/30 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/unit-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/davidcalhoun/tle.js/unit-tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/davidcalhoun/tle.js/unit-tests.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/unit-tests.yml:27","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T02:32:26.533Z","repository_id":2235254,"created_at":"2025-08-18T02:32:26.533Z","updated_at":"2025-08-18T02:32:26.533Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30085832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T15:40:14.053Z","status":"ssl_error","status_checked_at":"2026-03-04T15:40:13.655Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gps","javascript","orbital-mechanics","satellites","sgp4","space","spacecraft","tle"],"created_at":"2025-02-13T10:52:43.401Z","updated_at":"2026-03-04T16:03:13.467Z","avatar_url":"https://github.com/davidcalhoun.png","language":"JavaScript","readme":"# tle.js\n\n[![npm downloads](https://img.shields.io/npm/dm/tle.js.svg)](https://www.npmjs.com/package/tle.js)\n\nSatellite TLE tools in JavaScript\n\n## Installation\n\n`npm add tle.js` or `yarn add tle.js`\n\n## Introduction\n\n`tle.js` is designed to simplify satellite TLEs and SGP4 with a friendly interface, with [satellite.js](https://github.com/shashwatak/satellite-js) doing the heavy lifting behind the scenes.\n\nThe origin of TLEs goes back to the punchcard days! A [TLE, or two-line element set](https://en.wikipedia.org/wiki/Two-line_element_set), is used by [SGP4 propagators](https://en.wikipedia.org/wiki/Simplified_perturbations_models)\nto determine spacecraft positioning information, taking into account gravity perturbations (the\nmoon, etc).\n\nMost users will probably want to simply get the latitude/longitude of a satellite (see\n[getLatLngObj](#getlatlngobjtle-optionaltimestampms)) or get the look angles from a ground position, which can be used to track\nwhere in the sky a satellite is visible (see [getSatelliteInfo](#getsatelliteinfotle-optionaltimestamp-observerlat-observerlng-observerelevation)). Users may\nalso want to plot orbit lines (see [getGroundTracks](#getgroundtracksoptions)).\n\nUsers may also be interested in grabbing specific values from a TLE. In this case, you\ncan use one of the [TLE getters](#basic-tle-getters), for instance [getCOSPAR](#getcospartle).\n\nNote that TLEs should be updated at least daily to avoid drift in calculations. You can get them online at\n[Celestrak](http://celestrak.com/NORAD/elements/), where they are updated every few hours.\n\nMore info on TLEs:\n\n- [Two-line element set (Wikipedia)](https://en.wikipedia.org/wiki/Two-line_element_set)\n- [TLE details from CASTOR](http://castor2.ca/03_Mechanics/03_TLE/)\n\n## Shared code\n\nLet's start out with some code to define some variables which we'll use in many examples below.\n\n```js\n// Satellite TLE; should be updated at least once a day for best results.\n// TLE source: http://celestrak.com/NORAD/elements/\nconst tle = `ISS (ZARYA)\n1 25544U 98067A   17206.18396726  .00001961  00000-0  36771-4 0  9993\n2 25544  51.6400 208.9163 0006317  69.9862  25.2906 15.54225995 67660`;\n```\n\nTwo-line variants and an array of strings are also accepted.\n\n## `getLatLngObj(tle, optionalTimestampMS)`\n\nComputes the latitude/longitude of a spacecraft. Defaults to the current local time if `optionalTimestampMS` is not passed in.\n\nNote: the greater the difference between this timestamp and the TLE epoch (when the TLE was generated) will result in inaccuracies or even errors.\n\n```js\nimport { getLatLngObj } from \"tle.js\";\nconst optionalTimestampMS = 1502342329860;\nconst latLonObj = getLatLngObj(tle, optionalTimestampMS);\n-\u003e\n{\n  lat: -47.64247588153391,\n  lng: -29.992233800623634\n}\n```\n\n## `getGroundTracks(options)`\n\nAsync function that returns a Promise that resolves with an array of longitude, latitude pairs for drawing the ground track (satellite path) for three orbits: one past orbit, one current orbit, and one future orbit.\n\nOrbits start and stop at the international date line (antemeridian) because values passing over\nthat line is commonly problematic in mapping.\n\nNote: the synchronous version of this function, `getGroundTracksSync`, has the same function signature (it accepts the same inputs).\n\n```js\nimport { getGroundTracks } from 'tle.js';\n\nconst threeOrbitsArr = await getGroundTracks({\n    tle: tleStr,\n\n    // Relative time to draw orbits from.  This will be used as the \"middle\"/current orbit.\n    startTimeMS: 1502342329860,\n\n    // Resolution of plotted points.  Defaults to 1000 (plotting a point once for every second).\n    stepMS: 1000,\n\n    // Returns points in [lng, lat] order when true, and [lat, lng] order when false.\n    isLngLatFormat: true,\n});\n\n// Alternatively, if your setup doesn't support async/await:\ngetGroundTracks({\n    tle: tleStr,\n    startTimeMS: 1502342329860,\n    stepMS: 1000,\n    isLngLatFormat: true,\n}).then(function (threeOrbitsArr) {\n    // Do stuff with three orbits array here.\n});\n\n// threeOrbitsArr contents\n[\n    // previous orbit\n    [\n        [-179.93297540317567, 45.85524291891481],\n        // etc...\n    ],\n\n    // current orbit\n    [\n        [-179.9398612198045, 51.26165992503701],\n        // etc...\n    ],\n\n    // next orbit\n    [\n        [-179.9190165549038, 51.0273714070371],\n        // etc...\n    ],\n];\n```\n\n## `getSatelliteInfo(tle, optionalTimestamp, observerLat, observerLng, observerElevation)`\n\nGet both look angles (for a ground observer) as well as a few more tidbits of satellite info.\n\n```js\nimport { getSatelliteInfo } from \"tle.js\";\nconst satInfo = getSatelliteInfo(\n  tleStr,         // Satellite TLE string or array.\n  1501039265000,  // Timestamp (ms)\n  34.243889,      // Observer latitude (degrees)\n  -116.911389,    // Observer longitude (degrees)\n  0               // Observer elevation (km)\n);\n\n-\u003e\n{\n  // satellite compass heading from observer in degrees (0 = north, 180 = south)\n  azimuth: 294.5780478624994,\n\n  // satellite elevation from observer in degrees (90 is directly overhead)\n  elevation: 81.63903620330046,\n\n  // km distance from observer to spacecraft\n  range: 406.60211015810074,\n\n  // spacecraft altitude in km\n  height: 402.9082788620108,\n\n  // spacecraft latitude in degrees\n  lat: 34.45112876592785,\n\n  // spacecraft longitude in degrees\n  lng: -117.46176597710809,\n\n  // spacecraft velocity (relative to observer) in km/s\n  velocity: 7.675627442183371\n}\n```\n\n## `getVisibleSatellites(options)`\n\nCalculates satellites visible relative to an observer's position.\n\n```js\nimport { getVisibleSatellites } from \"tle.js\";\nconst allVisible = getVisibleSatellites({\n  observerLat: 34.439283990227125,\n  observerLng: -117.47561122364522,\n  observerHeight: 0,\n\n  // Array of 3-line TLE arrays.\n  tles: uniqTLES,\n\n  // Filters satellites above a certain elevation (0 is horizon, 90 is directly overhead).\n  // E.g. 75 will only return satellites 75 degrees or greater above the horizon.\n  // Defaults to 0.\n  elevationThreshold: 75,\n\n  // Defaults to current time.\n  timestampMS: 1570911182419\n});\n-\u003e\n[\n  {\n    tleArr: [\n      'COSMOS 2492 [GLONASS-M]',\n      '1 39620U 14012A   19285.51719791 -.00000065  00000-0  10000-3 0  9999',\n      '2 39620  65.6759  35.9755 0011670 324.9338 289.9534  2.13103291 43246'\n    ],\n    info: {\n      lng: -124.83404516738146,\n      lat: 32.070522714505586,\n      elevation: 81.2241916805502,\n      azimuth: 251.01601040118692,\n      range: 19217.756476304672,\n      height: 19161.979896618526,\n      velocity: 3.9490073154305385\n    }\n  },\n  {\n    tleArr: [\n      'GSAT0203 (GALILEO 7)',\n      '1 40544U 15017A   19284.43409211 -.00000061  00000-0  00000+0 0  9996',\n      '2 40544  56.2559  48.3427 0003736 223.0231 136.9337  1.70475323 28252'\n    ],\n    info: {\n      lng: -117.86836105927033,\n      lat: 29.08239877156373,\n      elevation: 83.16839172166615,\n      azimuth: 183.67559090645165,\n      range: 23256.47316878015,\n      height: 23221.387218003325,\n      velocity: 3.6703580049175333\n    }\n  }\n]\n```\n\n## Basic TLE getters\n\nIn addition to the powerful functions above, there are also helpful functions for getting\nspecific information from a TLE itself.\n\nFor further reading, see [Kelso's article](https://celestrak.com/columns/v04n03/).\n\n### Shared TLE for below examples.\n\n```js\nconst tle = `ISS (ZARYA)\n1 25544U 98067A   17206.18396726  .00001961  00000-0  36771-4 0  9993\n2 25544  51.6400 208.9163 0006317  69.9862  25.2906 15.54225995 67660`;\n```\n\n### `getSatelliteName(tle)`\n\nReturns the name of the satellite. Note that this defaults to 'Unknown' for 2-line TLEs that lack\nthe satellite name on the first line.\n\n```js\nimport { getSatelliteName } from \"tle.js\";\ngetSatelliteName(tle);\n-\u003e 'ISS (ZARYA)'\n```\n\n### `getCatalogNumber(tle)`\n\nReturns the [NORAD satellite catalog number](https://en.wikipedia.org/wiki/Satellite_Catalog_Number).\nUsed since Sputnik was launched in 1957 (Sputnik's rocket was 00001, while Sputnik itself was\n00002).\n\n- Range: 0 to 99999\n\n```js\nimport { getCatalogNumber } from \"tle.js\";\ngetCatalogNumber(tle);\n-\u003e 25544\n```\n\n### `getCOSPAR(tle)`\n\nReturns the COSPAR id string, aka [international designator](https://en.wikipedia.org/wiki/International_Designator).\n\n```js\nimport { getCOSPAR } from \"tle.js\";\ngetCOSPAR(tle);\n-\u003e \"1998-067A\"\n```\n\n### `getClassification(tle)`\n\nReturns the satellite classification.\n\n- 'U' = unclassified\n- 'C' = classified\n- 'S' = secret\n\n```js\nimport { getClassification } from \"tle.js\";\ngetClassification(tle);\n-\u003e 'U'\n```\n\n### `getIntDesignatorYear(tle)`\n\nLaunch year (last two digits) ([international designator](https://en.wikipedia.org/wiki/International_Designator)), which makes up part of the COSPAR id.\n\nNote that a value between 57 and 99 means the launch year was in the 1900s, while a value between\n00 and 56 means the launch year was in the 2000s.\n\n- Range: 00 to 99\n\n```js\nimport { getIntDesignatorYear } from \"tle.js\";\ngetIntDesignatorYear(tle);\n-\u003e 98\n```\n\n### `getIntDesignatorLaunchNumber(tle)`\n\nLaunch number of the year\n([international designator](https://en.wikipedia.org/wiki/International_Designator)), which makes up part of the COSPAR id.\n\n- Range: 1 to 999\n\n```js\nimport { getIntDesignatorLaunchNumber } from \"tle.js\";\ngetIntDesignatorLaunchNumber(tle);\n-\u003e 67\n```\n\n### `getIntDesignatorPieceOfLaunch(tle)`\n\nPiece of the launch\n([international designator](https://en.wikipedia.org/wiki/International_Designator)), which makes up part of the COSPAR id.\n\n- Range: A to ZZZ\n\n```js\nimport { getIntDesignatorPieceOfLaunch } from \"tle.js\";\ngetIntDesignatorPieceOfLaunch(tle);\n-\u003e 'A'\n```\n\n### `getEpochYear(tle)`\n\nTLE epoch year (last two digits) when the TLE was generated.\n\n- Range: 00 to 99\n\n```js\nimport { getEpochYear } from \"tle.js\";\ngetEpochYear(tle);\n-\u003e 17\n```\n\n### `getEpochDay(tle)`\n\nTLE epoch day of the year (day of year with fractional portion of the day) when the TLE was\ngenerated.\n\n- Range: 1 to 365.99999999\n\n```js\nimport { getEpochDay } from \"tle.js\";\ngetEpochDay(tle);\n-\u003e 206.18396726\n```\n\n### `getEpochTimestamp(tle)`\n\nUnix timestamp (in milliseconds) when the TLE was generated (the TLE epoch).\n\n```js\nimport { getEpochTimestamp } from \"tle.js\";\ngetEpochTimestamp(tle);\n-\u003e 1500956694771\n```\n\n### `getFirstTimeDerivative(tle)`\n\nFirst Time Derivative of the [Mean Motion](https://en.wikipedia.org/wiki/Mean_Motion) divided by\ntwo, measured in orbits per day per day (orbits/day\u003csup\u003e2\u003c/sup\u003e). Defines how mean motion changes\nfrom day to day, so TLE propagators can still be used to make reasonable guesses when distant\nfrom the original TLE epoch.\n\n- Units: Orbits / day\u003csup\u003e2\u003c/sup\u003e\n\n```js\nimport { getFirstTimeDerivative } from \"tle.js\";\ngetFirstTimeDerivative(tle);\n-\u003e 0.00001961\n```\n\n### `getSecondTimeDerivative(tle)`\n\nSecond Time Derivative of [Mean Motion](https://en.wikipedia.org/wiki/Mean_Motion) divided by six,\nmeasured in orbits per day per day per day (orbits/day\u003csup\u003e3\u003c/sup\u003e). Similar to the first time\nderivative, it measures rate of change in the [Mean Motion Dot](http://castor2.ca/03_Mechanics/03_TLE/Mean_Mot_Dot.html)\nso software can make reasonable guesses when distant from the original TLE epoch.\n\nUsually zero, unless the satellite is manuevering or in a decaying orbit.\n\n- Units: Orbits / day\u003csup\u003e3\u003c/sup\u003e\n\n```js\nimport { getSecondTimeDerivative } from \"tle.js\";\ngetSecondTimeDerivative(tle);\n-\u003e 0\n```\n\nNote: the original value in TLE is `00000-0` (= `0.0 x 10`\u003csup\u003e`0`\u003c/sup\u003e = `0`).\n\n### `getBstarDrag(tle)`\n\n[BSTAR](https://en.wikipedia.org/wiki/BSTAR) drag term. This estimates the effects of atmospheric\ndrag on the satellite's motion.\n\n- Units: EarthRadii\u003csup\u003e-1\u003c/sup\u003e\n\n```js\nimport { getBstarDrag } from \"tle.js\";\ngetBstarDrag(tle);\n-\u003e 0.000036771\n```\n\nNote: the original value in TLE is '36771-4' (= `0.36771 x 10`\u003csup\u003e`-4`\u003c/sup\u003e = `0.000036771`).\n\n### `getOrbitModel(tle)`\n\nPrivate value - used by the [United States Space Force](https://en.wikipedia.org/wiki/United_States_Space_Force) to reference the orbit model used to generate the\nTLE. Will always be seen as zero externally (e.g. by \"us\", unless you are \"them\" - in which case,\nhello!).\n\n```js\nimport { getOrbitModel } from \"tle.js\";\ngetOrbitModel(tle);\n-\u003e 0\n```\n\n### `getTleSetNumber(tle)`\n\nTLE element set number, incremented for each new TLE generated since launch. 999 seems to mean the\nTLE has maxed out.\n\n- Range: Technically 1 to 9999, though in practice the maximum number seems to be 999.\n\n```js\nimport { getTleSetNumber } from \"tle.js\";\ngetTleSetNumber(tle);\n-\u003e 999\n```\n\n### `getChecksum1(tle)`\n\nTLE 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.\n\n- Range: 0 to 9\n\n```js\nimport { getChecksum1 } from \"tle.js\";\ngetChecksum1(tle);\n-\u003e 3\n```\n\nNote that this simply reads the checksum baked into the TLE string. Compare this with the computed checksum to ensure data integrity:\n\n```js\nimport { getChecksum1, computeChecksum } from \"tle.js\";\nconst expectedChecksum = getChecksum1(tle);\n-\u003e 3\nconst computedChecksum = computeChecksum(tle[1]);\n-\u003e 3\nexpectedChecksum === computedChecksum;\n-\u003e true\n```\n\n### `getInclination(tle)`\n\n[Inclination](https://en.wikipedia.org/wiki/Orbital_inclination) relative to the Earth's\nequatorial plane in degrees. 0 to 90 degrees is a prograde orbit and 90 to 180 degrees is a\nretrograde orbit.\n\n- Units: degrees\n- Range: 0 to 180\n\n```js\nimport { getInclination } from \"tle.js\";\ngetInclination(tle);\n-\u003e 51.6400\n```\n\n### `getRightAscension(tle)`\n\n[Right ascension of the ascending node](https://en.wikipedia.org/wiki/Right_ascension_of_the_ascending_node)\nin degrees. Essentially, this is the angle of the satellite as it crosses northward (ascending)\nacross the Earth's equator (equatorial plane).\n\n- Units: degrees\n- Range: 0 to 359.9999\n\n```js\nimport { getRightAscension } from \"tle.js\";\ngetRightAscension(tle);\n-\u003e 208.9163\n```\n\n### `getEccentricity(tle)`\n\n[Orbital eccentricity](https://en.wikipedia.org/wiki/Orbital_eccentricity), decimal point assumed.\nAll artificial Earth satellites have an eccentricity between 0 (perfect circle) and 1 (parabolic\norbit).\n\n- Range: 0 to 1\n\n```js\nimport { getEccentricity } from \"tle.js\";\ngetEccentricity(tle);\n-\u003e 0.0006317\n```\n\nNote that the value in the original TLE is `0006317`, with the preceding decimal point assumed\n(= `0.0006317`).\n\n### `getPerigee(tle)`\n\n[Argument of perigee](https://en.wikipedia.org/wiki/Argument_of_perigee).\n\n- Units: degrees\n- Range: 0 to 359.9999\n\n```js\nimport { getPerigee } from \"tle.js\";\ngetPerigee(tle);\n-\u003e 69.9862\n```\n\n### `getMeanAnomaly(tle)`\n\n[Mean Anomaly](https://en.wikipedia.org/wiki/Mean_Anomaly). Indicates where the satellite was\nlocated within its orbit at the time of the TLE epoch.\n\n- Units: degrees\n- Range: 0 to 359.9999\n\n```js\nimport { getMeanAnomaly } from \"tle.js\";\ngetMeanAnomaly(tle);\n-\u003e 25.2906\n```\n\n### `getMeanMotion(tle)`\n\nRevolutions around the Earth per day ([mean motion](https://en.wikipedia.org/wiki/Mean_Motion)).\n\n- Units: revs per day\n- Range: 0 to 17 (theoretically)\n\n```js\nimport { getMeanMotion } from \"tle.js\";\ngetMeanMotion(tle);\n-\u003e 15.54225995\n```\n\n### `getRevNumberAtEpoch(tle)`\n\nTotal satellite revolutions when this TLE was generated. This number seems to roll over (e.g.\n99999 -\u003e 0).\n\n- Units: revs\n- Range: 0 to 99999\n\n```js\nimport { getRevNumberAtEpoch } from \"tle.js\";\ngetRevNumberAtEpoch(tle);\n-\u003e 6766\n```\n\n### `getChecksum2(tle)`\n\nTLE line 2 checksum (modulo 10) for verifying the integrity of this line of the TLE.\n\n- Range: 0 to 9\n\n```js\nimport { getChecksum2 } from \"tle.js\";\ngetChecksum2(tle);\n-\u003e 0\n```\n\nNote that this simply reads the checksum baked into the TLE string. Compare this with the computed checksum to ensure data integrity:\n\n```js\nimport { getChecksum2, computeChecksum } from \"tle.js\";\nconst expectedChecksum = getChecksum2(tle);\n-\u003e 0\nconst computedChecksum = computeChecksum(tle[2]);\n-\u003e 0\nexpectedChecksum === computedChecksum;\n-\u003e true\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcalhoun%2Ftle.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcalhoun%2Ftle.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcalhoun%2Ftle.js/lists"}