Skip to content

Utility Commands

log

Prints a message to the integrated console.

ParameterTypeDescription
messageanyThe message or value to be displayed

Example:

js
log("Hello World");
log(42);
log([1, 2, 3]);

deg2rad

Converts degrees to radians.

ParameterTypeDescription
xnumberAngle in degrees

rad2deg

Converts radians to degrees.

ParameterTypeDescription
xnumberAngle in radians

fetchTLE

Fetches the Two-Line Element (TLE) for a satellite using its COSPAR ID. This function will perform a request to Celestrak.

ParameterTypeDescription
norad_idstringCOSPAR ID of the satellite

setTime

Sets the current simulation time. This affects time-dependent calculations like satellite positions.

ParameterTypeDescription
newTimeDateThe new simulation time to set

Example:

js
setTime(new Date('2024-01-24T12:00:00Z'))