ostk.physics.time.Instant

class Instant

Bases: pybind11_object

Point in time.

Methods

GPS_epoch

Get the GPS epoch instant.

J2000

Get J2000 instant.

date_time

Create an instant from a date-time.

get_date_time

Get date-time.

get_julian_date

Get Julian date.

get_leap_second_count

Get leap second count.

get_modified_julian_date

Get Modified Julian date.

is_defined

Check if the instant is defined.

is_near

Check if instant is near another instant

is_post_epoch

Check if the instant is post-epoch (J2000).

julian_date

Create an instant from a Julian date.

modified_julian_date

Create an instant from a Modified Julian date.

now

Get current instant.

parse

Create an instant from a string representation.

to_string

Convert to string.

undefined

Create an undefined instant.

static GPS_epoch() ostk.physics.time.Instant

Get the GPS epoch instant.

Returns:

GPS epoch instant.

Return type:

Instant

static J2000() ostk.physics.time.Instant

Get J2000 instant.

Returns:

J2000 instant.

Return type:

Instant

__add__(
self: ostk.physics.time.Instant,
arg0: ostk.physics.time.Duration,
) ostk.physics.time.Instant
static date_time(
arg0: ostk.physics.time.DateTime,
arg1: ostk.physics.time.Scale,
) ostk.physics.time.Instant

Create an instant from a date-time.

Parameters:

date_time (DateTime) -- Date-time.

Returns:

Instant.

Return type:

Instant

get_date_time(
self: ostk.physics.time.Instant,
arg0: ostk.physics.time.Scale,
) ostk.physics.time.DateTime

Get date-time.

Returns:

Date-time.

Return type:

DateTime

get_julian_date(
self: ostk.physics.time.Instant,
arg0: ostk.physics.time.Scale,
) ostk.core.type.Real

Get Julian date.

Returns:

Julian date.

Return type:

float

get_leap_second_count(self: ostk.physics.time.Instant) int

Get leap second count.

Returns:

Leap second count.

Return type:

int

get_modified_julian_date(
self: ostk.physics.time.Instant,
arg0: ostk.physics.time.Scale,
) ostk.core.type.Real

Get Modified Julian date.

Returns:

Modified Julian date.

Return type:

float

is_defined(self: ostk.physics.time.Instant) bool

Check if the instant is defined.

Returns:

True if defined.

Return type:

bool

is_near(
self: ostk.physics.time.Instant,
arg0: ostk.physics.time.Instant,
arg1: ostk.physics.time.Duration,
) bool

Check if instant is near another instant

Returns:

True if near

Return type:

bool

is_post_epoch(self: ostk.physics.time.Instant) bool

Check if the instant is post-epoch (J2000).

Returns:

True if post-epoch.

Return type:

bool

static julian_date(
arg0: ostk.core.type.Real,
arg1: ostk.physics.time.Scale,
) ostk.physics.time.Instant

Create an instant from a Julian date.

Parameters:

julian_date (float) -- Julian date.

Returns:

Instant.

Return type:

Instant

static modified_julian_date(
arg0: ostk.core.type.Real,
arg1: ostk.physics.time.Scale,
) ostk.physics.time.Instant

Create an instant from a Modified Julian date.

Parameters:

modified_julian_date (float) -- Modified Julian date.

Returns:

Instant.

Return type:

Instant

static now() ostk.physics.time.Instant

Get current instant.

Returns:

Current instant.

Return type:

Instant

static parse(
string: ostk.core.type.String,
scale: ostk.physics.time.Scale,
date_time_format: ostk.physics.time.DateTime.Format = Format.Standard,
) ostk.physics.time.Instant

Create an instant from a string representation.

Parameters:
  • string (str) -- String representation.

  • scale (Time.Scale) -- Time scale.

  • date_time_format (DateTime.Format) -- Date-time format.

Returns:

Instant.

Return type:

Instant

to_string(
self: ostk.physics.time.Instant,
scale: ostk.physics.time.Scale = Scale.UTC,
date_time_format: ostk.physics.time.DateTime.Format = Format.Standard,
) ostk.core.type.String

Convert to string.

Parameters:
  • scale (Time.Scale) -- Time scale.

  • date_time_format (DateTime.Format) -- Date-time format.

Returns:

String representation.

Return type:

str

static undefined() ostk.physics.time.Instant

Create an undefined instant.

Returns:

Undefined instant.

Return type:

Instant