TimeScale

org.abh80.nf.core.time.TimeScale
trait TimeScale

A trait representing a time scale system for astronomical time calculations.

TimeScale provides mechanisms to convert between different time standards, with TAI (International Atomic Time) serving as a reference scale. Time scales may handle leap seconds and other time adjustments differently.

Common implementations include UTC, TAI, TT, etc.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class GPSScale
class IRNSSScale
class TAIScale
class TTScale
class TDTScale
class GLONASSScale
class TDBScale
class UTCScale
Show all

Members list

Value members

Abstract methods

Calculates the difference between this time scale and TAI at the given time.

Calculates the difference between this time scale and TAI at the given time.

Value parameters

time

The absolute time to calculate the offset for

Attributes

Returns

A TimeFormat representing the offset from TAI

Concrete methods

Returns the most recent leap second adjustment applied to this time scale.

Returns the most recent leap second adjustment applied to this time scale.

For time scales without leap seconds, this returns zero.

Attributes

Returns

The most recent leap second adjustment as a TimeFormat

Retrieves the leap second adjustment for the given absolute time.

Retrieves the leap second adjustment for the given absolute time.

Value parameters

time

The absolute time for which to determine the leap second adjustment.

Attributes

Returns

The leap second adjustment as a TimeFormat instance.

def getName: String

Gets the identifying name of this time scale.

Gets the identifying name of this time scale.

Attributes

Returns

The name of this time scale (e.g., "UTC", "TAI", "TT")

def isInsideLeapSecond(time: AbsoluteTime): Boolean

Determines if a given absolute time falls within a leap second.

Determines if a given absolute time falls within a leap second.

For time scales that don't use leap seconds (like TAI), this always returns false. For UTC, this would return true during leap second events.

Value parameters

time

The absolute time to check

Attributes

Returns

true if the time is inside a leap second, false otherwise

def minuteDuration(time: AbsoluteTime): Int

Duration of a minute in seconds. Default is 60 seconds for most time scales. May differ for specialized astronomical time scales.

Duration of a minute in seconds. Default is 60 seconds for most time scales. May differ for specialized astronomical time scales.

Attributes

def timeToTAI(date: Date, time: Time): TimeFormat

Converts a date and time in this scale to the equivalent TAI time.

Converts a date and time in this scale to the equivalent TAI time.

This method iteratively converges on the correct offset using the timePastTAI function. It typically requires 3-4 iterations to converge with sufficient accuracy.

Value parameters

date

The date component in this time scale

time

The time component in this time scale

Attributes

Returns

The offset to add to the input time to get TAI

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Abstract fields

protected val name: String

The name identifier of this time scale

The name identifier of this time scale

Attributes