Giter Site home page Giter Site logo

link2427 / swift-sgp4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from csanfilippo/swift-sgp4

0.0 0.0 0.0 67 KB

A Swift package to compute satellite positions from two-line elements (TLE).

License: MIT License

C++ 82.57% C 1.25% Objective-C 4.52% Objective-C++ 1.98% Swift 9.68%

swift-sgp4's Introduction

swift-sgp4

A Swift package to compute satellite positions from two-line elements (TLE), wrapping the sgp4lib library (by Daniel Warner)

Usage

import SGPKit

let title = "ISS (ZARYA)"
let firstLine = "1 25544U 98067A   13165.59097222  .00004759  00000-0  88814-4 0    47"
let secondLine = "2 25544  51.6478 121.2152 0011003  68.5125 263.9959 15.50783143834295"

// Instantiate a new TLE descriptor
let tle = TLE(title: title, firstLine: firstLine, secondLine: secondLine)

// Instantiate the interpreter
let interpreter = TLEInterpreter()

// Obtain the data
let data: SatelliteData = interpreter.satelliteData(from: tle, date: .now)

print(data.latitude)
print(data.longitude)
print(data.altitude)
print(data.speed)

Installation

Swift Package Manager

If you want to use SGPKit in any other project that uses SwiftPM, add the package as a dependency in Package.swift:

dependencies: [
  .package(
    url: "https://github.com/csanfilippo/swift-sgp4",
    from: "1.2.0"
  ),
]

swift-sgp4's People

Contributors

csanfilippo avatar link2427 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.