Alarms

class SpaceCenter.AlarmManager

Alarm manager. Obtained by calling SpaceCenter.alarm_manager.

alarms: List

A list of all alarms.

Attribute:

Read-only, cannot be set

Return type:

List

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

Create an alarm.

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.Alarm

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

Create an alarm linked to a vessel.

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

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.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 (SpaceCenter.Vessel) – The vessel.

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.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 (SpaceCenter.Vessel) – The vessel.

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.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 (SpaceCenter.Vessel) – The vessel.

  • node (SpaceCenter.Node) – The maneuver node.

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

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.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 (SpaceCenter.Vessel) – The vessel.

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

  • title (string) – Title for the alarm.

  • description (string) – Description for the alarm.

Return type:

SpaceCenter.Alarm

class SpaceCenter.Alarm

An alarm. Can be accessed using SpaceCenter.alarm_manager.

id: number

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:

number

type: string

Type of alarm

Attribute:

Read-only, cannot be set

Return type:

string

title: string

Title of the alarm

Attribute:

Read-only, cannot be set

Return type:

string

description: string

Description of the alarm.

Attribute:

Read-only, cannot be set

Return type:

string

time: number

Time the alarm will trigger.

Attribute:

Read-only, cannot be set

Return type:

number

time_until: number

Time until the alarm triggers.

Attribute:

Read-only, cannot be set

Return type:

number

event_offset: number

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

Attribute:

Read-only, cannot be set

Return type:

number

vessel: SpaceCenter.Vessel

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

Attribute:

Read-only, cannot be set

Return type:

SpaceCenter.Vessel