Code Monkey home page Code Monkey logo

predict-lisp's Introduction

predict

Jeff Francis [email protected]

This is a library to talk to the predict API to extract satellite orbit predictions. Obviously, it's a bit short on documentation, but it follows the predict documenation almost perfectly.

http://www.qsl.net/kd2bd/predict.html

Here's a quick example. First, properly configure and start predict on your local machine. Make sure to include the "-s" flag telling it to turn on the API.:

jfrancis@desktop ~ $ predict -s

Now load the predict package and connect to the server (note than you can also connect to remote servers, as well as servers on non-standard ports - RTSL):

CL-USER> (ql:quickload :predict)
(ql:quickload :predict)
To load "predict":
  Load 1 ASDF system:
    predict
; Loading "predict"
[package predict]..
(:PREDICT)
CL-USER> (in-package :predict)
#<PACKAGE "PREDICT">
PREDICT> (connect-to-predict)
#<USOCKET:DATAGRAM-USOCKET {1007097CD3}>
PREDICT>

Start with asking predict for a list of satellites currently being tracked:

PREDICT> (get-list)
("HUBBLE" "ISS" "LO-19" "AO-91" "AO-92" "SO-50" "AO-85")
PREDICT>

You can get the current position of a satellite, and the data is returned as an object:

PREDICT> (describe (get-sat "AO-91"))
#<SATELLITE {10072EFE83}>
  [standard-object]

Slots with :INSTANCE allocation:
  NAME                           = "AO-91"
  TIMESTAMP                      = 1535761303
  LON                            = 73.39
  LAT                            = -82.21
  AZ                             = 171.99
  EL                             = -64.9
  NEXT-AOS-LOS                   = 1535787950
  FOOTPRINT                      = "5871.93"
  RANGE                          = 12313.15
  ALTITUDE                       = 741.01
  VELOCITY                       = 7.44
  ORBIT-NUMBER                   = 4231
  IN-SUNLIGHT                    = T
  VISIBLE                        = NIL
  ORBITAL-PHASE                  = 246.23
  ECLIPSE-DEPTH                  = -15.07
  SQUINT                         = NIL
; No value
PREDICT>

Likewise, try each of the various functions in the predict documentation, located here:

https://github.com/koansys/predict/tree/master/clients/samples

Each function requires the same parameters as the docs, and returns the same data (though it's returned as objects).

predict-lisp's People

Contributors

jfrancis42 avatar

Watchers

 avatar  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.