perturb 1.0.0
A modern C++11 wrapper for the SGP4 orbit propagator
Loading...
Searching...
No Matches
perturb Namespace Reference

Primary namespace for the perturb library, everything is in here. More...

Namespaces

namespace  sgp4
 An internal namespace containing the underlying SGP4 implementation.
 

Classes

struct  ClassicalOrbitalElements
 Classical Keplerian orbital elements. More...
 
struct  DateTime
 A basic and human readable representation of a point in time. More...
 
struct  JulianDate
 Represents a specific point in time on the Julian calendar. More...
 
class  Satellite
 Represents a specific orbital ephemeris for an Earth-centered trajectory. More...
 
struct  StateVector
 Represents the output prediction from SGP4. More...
 
struct  TwoLineElement
 Represents a pre-parsed TLE record. More...
 

Typedefs

using Vec3 = std::array< double, 3 >
 Alias for representing position and velocity vectors.
 

Enumerations

enum class  Sgp4Error : int {
  NONE = 0 , MEAN_ELEMENTS , MEAN_MOTION , PERT_ELEMENTS ,
  SEMI_LATUS_RECTUM , EPOCH_ELEMENTS_SUB_ORBITAL , DECAYED , INVALID_TLE ,
  UNKNOWN
}
 Possible issues during SGP4 propagation or even TLE parsing. More...
 
enum class  GravModel { WGS72_OLD , WGS72 , WGS84 }
 Choice of gravity model / constants for the underlying SGP4 impl. More...
 
enum class  TLEParseError {
  NONE , SHOULD_BE_SPACE , INVALID_FORMAT , INVALID_VALUE ,
  CHECKSUM_MISMATCH
}
 Possible errors when parsing a TLE. More...
 

Variables

constexpr std::size_t TLE_LINE_LEN = 69
 Both lines of a TLE must be this length, for TLE constructors. More...
 

Detailed Description

Primary namespace for the perturb library, everything is in here.

See README for a brief intro to the main library types and basic usage.

Enumeration Type Documentation

◆ GravModel

enum class perturb::GravModel
strong

Choice of gravity model / constants for the underlying SGP4 impl.

Corresponds to the gravconsttype type in perturb::sgp4. Generally, WGS72 is the standard choice, despite WGS84 being the newer and more accurate model. What is most important is that this is the exact same as the gravity model used to generate the TLE ephemeris. This can be confirmed from the source of your TLE data.

◆ Sgp4Error

enum class perturb::Sgp4Error : int
strong

Possible issues during SGP4 propagation or even TLE parsing.

This is important in two places:

  1. After construction of a Satellite, check Satellite::last_error for any issues with TLE parsing or SGP4 initialization.
  2. Calling Satellite::propagate returns a perturb::Sgp4Error, indicating any possible issues with propagation.

If everything is all good, the value should be Sgp4Error::NONE. The errors Sgp4Error::MEAN_ELEMENTS to SGP4Error::DECAYED directly correlate to errors in the underlying SGP4 impl, from the comments of perturb::sgp4::sgp4. The additional Sgp4Error::INVALID_TLE is for issues with reading the TLE strings.

◆ TLEParseError

enum class perturb::TLEParseError
strong

Possible errors when parsing a TLE.

Returned by TwoLineElement::parse after processing a TLE record string.

Postcondition
Errors (excluding NONE) are guaranteed to occur in definition order. Meaning that spaces are checked first, then invalid format, then invalid values, and lastly checksum. This allows you to assume, for example, that if there is a CHECKSUM_MISMATCH, then none of the previous errors occurred first, and so the invalid checksum is the only issue.
Enumerator
NONE 

If no issues when parsing.

SHOULD_BE_SPACE 

If there is a lack of space in the TLE.

INVALID_FORMAT 

If general parsing was unsuccessfully.

INVALID_VALUE 

If a parsed value doesn't make sense.

CHECKSUM_MISMATCH 

If the checksum doesn't match.

Variable Documentation

◆ TLE_LINE_LEN

constexpr std::size_t perturb::TLE_LINE_LEN = 69
constexpr

Both lines of a TLE must be this length, for TLE constructors.

The memory can and is accessed. Lines can be longer for verification mode, but that's for internal testing purposes only and doesn't pertain to general usage.