Alarms

class AlarmManager

Alarm manager. Obtained by calling alarm_manager.

alarms

A list of all alarms.

Attribute:

Read-only, cannot be set

Return type:

list(Alarm)

static add_alarm(time[, title = 'Alarm'][, description = ''])

Create an alarm.

Parameters:
  • time (float) – Number of seconds from now that the alarm should trigger.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

static add_vessel_alarm(time, vessel[, title = 'Vessel Alarm'][, description = ''])

Create an alarm linked to a vessel.

Parameters:
  • time (float) – Number of seconds from now that the alarm should trigger.

  • vessel (Vessel) – Vessel to link the alarm to.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

static add_apoapsis_alarm(vessel[, offset = 60.0][, title = 'Apoapsis Alarm'][, description = ''])

Create an alarm for the given vessel’s next apoapsis.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (float) – Time in seconds to offset the alarm by.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

static add_periapsis_alarm(vessel[, offset = 60.0][, title = 'Periapsis Alarm'][, description = ''])

Create an alarm for the given vessel’s next periapsis.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (float) – Time in seconds to offset the alarm by.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

static add_maneuver_node_alarm(vessel, node[, offset = 60.0][, add_burn_time = True][, title = 'Maneuver Node Alarm'][, description = ''])

Create an alarm for the given vessel and maneuver node.

Parameters:
  • vessel (Vessel) – The vessel.

  • node (Node) – The maneuver node.

  • offset (float) – Time in seconds to offset the alarm by.

  • add_burn_time (bool) – Whether the node’s burn time should be included in the alarm.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

static add_soi_alarm(vessel[, offset = 60.0][, title = 'SOI Change Alarm'][, description = ''])

Create an alarm for the given vessel’s next sphere of influence change.

Parameters:
  • vessel (Vessel) – The vessel.

  • offset (float) – Time in seconds to offset the alarm by.

  • title (str) – Title for the alarm.

  • description (str) – Description for the alarm.

Return type:

Alarm

class Alarm

An alarm. Can be accessed using alarm_manager.

id

Unique identifier of the alarm. KSP destroys and recreates an alarm when it is edited. This id will remain constant between the old and new alarms.

Attribute:

Read-only, cannot be set

Return type:

int

type

Type of alarm

Attribute:

Read-only, cannot be set

Return type:

str

title

Title of the alarm

Attribute:

Read-only, cannot be set

Return type:

str

description

Description of the alarm.

Attribute:

Read-only, cannot be set

Return type:

str

time

Time the alarm will trigger.

Attribute:

Read-only, cannot be set

Return type:

float

time_until

Time until the alarm triggers.

Attribute:

Read-only, cannot be set

Return type:

float

event_offset

Seconds between the alarm going off and the event it references.

Attribute:

Read-only, cannot be set

Return type:

float

vessel

Vessel the alarm references. None if it does not reference a vessel.

Attribute:

Read-only, cannot be set

Return type:

Vessel