@tak-ps/node-tak
    Preparing search index...

    Class CoT

    Convert to and from an XML CoT message

    A string/buffer containing the XML representation or the xml-js object tree

    Index

    Constructors

    • Parameters

      • cot:
            | string
            | object
            | {
                event: {
                    _attributes: {
                        access?: string;
                        how?: string;
                        opex?: string;
                        qos?: string;
                        stale: string;
                        start: string;
                        time: string;
                        type: string;
                        uid: string;
                        version: string;
                    };
                    detail?: {
                        __chat?: {
                            _attributes: {
                                chatroom: string;
                                groupOwner?: string;
                                id: string;
                                messageId?: string;
                                parent?: string;
                                senderCallsign: string;
                            };
                            chatgrp: any;
                        };
                        __forcedelete?: {};
                        __geofence?: {
                            _attributes: {
                                boundingSphere?: number;
                                elevationMonitored?: string;
                                maxElevation?: string;
                                minElevation?: string;
                                monitor?: string;
                                tracking?: string;
                                trigger?: string;
                            };
                        };
                        __group?: { _attributes?: { name: string; role: string } };
                        __milsym?: {
                            _attributes: { id: string };
                            unitmodifier?:
                                | { _attributes: { code: string }; _text?: string }
                                | { _attributes: { code: ... }; _text?: (...) | (...) }[];
                        };
                        __video?: {
                            _attributes?: {
                                sensor?: string;
                                spi?: string;
                                uid?: string;
                                url?: string;
                            };
                            ConnectionEntry?: {
                                _attributes: {
                                    address: string;
                                    alias?: (...)
                                    | (...);
                                    bufferTime?: (...) | (...);
                                    ignoreEmbeddedKLV?: (...) | (...) | (...);
                                    networkTimeout?: (...) | (...);
                                    path?: (...) | (...);
                                    port?: (...) | (...);
                                    protocol?: (...) | (...);
                                    roverPort?: (...) | (...);
                                    rtspReliable?: (...) | (...);
                                    uid: string;
                                };
                            };
                        };
                        "_flow-tags_"?: any;
                        ackrequest?: {
                            _attributes: { ackrequested: boolean; tag: string; uid: string };
                        };
                        archive?: | { _attributes?: { value?: string } }
                        | { _attributes?: { value?: (...) | (...) } }[];
                        attachment_list?: { _attributes: { hashes: string } };
                        bearing?: { _attributes: { value: number } };
                        bearingUnits?: { _attributes: { value: string } };
                        color?: { _attributes?: { argb?: string } };
                        contact?: {
                            _attributes: {
                                callsign?: string;
                                endpoint?: string;
                                name?: string;
                                phone?: string;
                            };
                        };
                        creator?: {
                            _attributes: {
                                callsign: string;
                                time: string;
                                type: string;
                                uid: string;
                            };
                        };
                        fileshare?: {
                            _attributes: {
                                filename: string;
                                name: string;
                                senderCallsign: string;
                                senderUid: string;
                                senderUrl: string;
                                sha256: string;
                                sizeInBytes: number;
                            };
                        };
                        fillColor?: { _attributes?: { value?: string } };
                        inclination?: { _attributes: { value: string } };
                        labels_on?: { _attributes?: { value?: string } };
                        link?:
                            | {
                                _attributes: {
                                    mime?: string;
                                    parent_callsign?: string;
                                    point?: string;
                                    production_time?: string;
                                    relation?: string;
                                    remarks?: string;
                                    type?: string;
                                    uid?: string;
                                    url?: string;
                                };
                            }
                            | {
                                _attributes: {
                                    mime?: string;
                                    parent_callsign?: string;
                                    point?: string;
                                    production_time?: string;
                                    relation?: string;
                                    remarks?: string;
                                    type?: string;
                                    uid?: string;
                                    url?: string;
                                };
                            }[];
                        link_attr?: {
                            _attributes: {
                                color?: number;
                                direction?: "Infil"
                                | "Exfil";
                                method: "Driving" | "Walking" | "Flying" | "Swimming" | "Watercraft";
                                order: "Ascending Check Points" | "Descending Check Points";
                                planningmethod?: "Infil" | "Exfil";
                                prefix: string;
                                routetype: "Primary" | "Secondary";
                                stroke?: string;
                                type?: string;
                            };
                        };
                        marti?: {
                            _attributes?: {};
                            dest?: | {
                                _attributes: {
                                    after?: (...)
                                    | (...);
                                    callsign?: (...) | (...);
                                    group?: (...) | (...);
                                    mission?: (...) | (...);
                                    "mission-guid"?: (...) | (...);
                                    path?: (...) | (...);
                                    uid?: (...) | (...);
                                };
                            }
                            | {
                                _attributes: {
                                    after?: ...;
                                    callsign?: ...;
                                    group?: ...;
                                    mission?: ...;
                                    "mission-guid"?: ...;
                                    path?: ...;
                                    uid?: ...;
                                };
                            }[];
                        };
                        mission?: {
                            _attributes?: {
                                authorUid?: string;
                                guid?: string;
                                name?: string;
                                tool?: string;
                                type?: string;
                            };
                            MissionChanges?: {
                                MissionChange: | {
                                    contentUid: ...;
                                    creatorUid: ...;
                                    details: ...;
                                    isFederatedChange: ...;
                                    missionName: ...;
                                    timestamp: ...;
                                    type: ...;
                                }
                                | (...)[];
                            };
                            missionLayer?: {
                                name?: { _text: ... };
                                parentUid?: { _text: ... };
                                type?: { _text: ... };
                                uid?: { _text: ... };
                            };
                        };
                        northRef?: { _attributes: { value: string } };
                        precisionlocation?: {
                            _attributes: { altsrc?: string; geopointsrc?: string };
                        };
                        range?: { _attributes: { value: number } };
                        rangeUnits?: { _attributes: { value: string } };
                        remarks?: {
                            _attributes?: { source?: string; time?: string; to?: string };
                            _text?: string;
                        };
                        sensor?: {
                            _attributes: {
                                azimuth?: number;
                                displayMagneticReference?: number;
                                elevation?: number;
                                fov?: number;
                                fovAlpha?: number;
                                fovBlue?: number;
                                fovGreen?: number;
                                fovRed?: number;
                                hideFov?: boolean;
                                model?: string;
                                north?: number;
                                range?: number;
                                rangeLines?: number;
                                rangeLineStrokeColor?: number;
                                rangeLineStrokeWeight?: number;
                                roll?: number;
                                strokeColor?: number;
                                strokeWeight?: number;
                                type?: string;
                                version?: string;
                                vfov?: number;
                            };
                        };
                        shape?: {
                            ellipse?: {
                                _attributes: { angle: number; major: number; minor: number };
                            };
                            polyline?: {
                                _attributes?: { closed?: ...; color?: ...; fillColor?: ... };
                                vertex?: { _attributes: ... } | (...)[];
                            };
                        };
                        status?: { _attributes: { battery?: string; readiness?: string } };
                        strokeColor?: { _attributes?: { value?: string } };
                        strokeStyle?: { _attributes?: { value?: string } };
                        strokeWeight?: { _attributes?: { value?: string } };
                        TakControl?: {
                            TakProtocolSupport?: { _attributes?: { version?: ... } };
                            TakServerVersionInfo?: { _attributes?: { serverVersion?: ... } };
                        };
                        takv?: {
                            _attributes: {
                                device?: string;
                                os?: string;
                                platform?: string;
                                version?: string;
                            };
                        };
                        tog?: { _attributes?: { enabled?: string } };
                        track?: {
                            _attributes?: {
                                course?: string;
                                eCourse?: string;
                                eSlope?: string;
                                eSpeed?: string;
                                slope?: string;
                                speed?: string;
                            };
                        };
                        uid?: { _attributes: { Droid: string } };
                        usericon?: { _attributes: { iconsetpath: string } };
                    };
                    point: {
                        _attributes: {
                            ce: string
                            | number;
                            hae: string | number;
                            lat: string | number;
                            le: string | number;
                            lon: string | number;
                        };
                    };
                };
            }
            | Buffer<ArrayBufferLike>
      • opts: {
            creator?:
                | CoT
                | { callsign: string; time?: string
                | Date; type: string; uid: string };
        } = {}

      Returns CoT

    Properties

    metadata: Record<string, unknown>
    path: string
    raw: {
        event: {
            _attributes: {
                access?: string;
                how?: string;
                opex?: string;
                qos?: string;
                stale: string;
                start: string;
                time: string;
                type: string;
                uid: string;
                version: string;
            };
            detail?: {
                __chat?: {
                    _attributes: {
                        chatroom: string;
                        groupOwner?: string;
                        id: string;
                        messageId?: string;
                        parent?: string;
                        senderCallsign: string;
                    };
                    chatgrp: any;
                };
                __forcedelete?: {};
                __geofence?: {
                    _attributes: {
                        boundingSphere?: number;
                        elevationMonitored?: string;
                        maxElevation?: string;
                        minElevation?: string;
                        monitor?: string;
                        tracking?: string;
                        trigger?: string;
                    };
                };
                __group?: { _attributes?: { name: string; role: string } };
                __milsym?: {
                    _attributes: { id: string };
                    unitmodifier?:
                        | { _attributes: { code: string }; _text?: string }
                        | { _attributes: { code: string }; _text?: string }[];
                };
                __video?: {
                    _attributes?: {
                        sensor?: string;
                        spi?: string;
                        uid?: string;
                        url?: string;
                    };
                    ConnectionEntry?: {
                        _attributes: {
                            address: string;
                            alias?: string;
                            bufferTime?: number;
                            ignoreEmbeddedKLV?: boolean;
                            networkTimeout?: number;
                            path?: string;
                            port?: number;
                            protocol?: string;
                            roverPort?: number;
                            rtspReliable?: number;
                            uid: string;
                        };
                    };
                };
                "_flow-tags_"?: any;
                ackrequest?: {
                    _attributes: { ackrequested: boolean; tag: string; uid: string };
                };
                archive?: | { _attributes?: { value?: string } }
                | { _attributes?: { value?: string } }[];
                attachment_list?: { _attributes: { hashes: string } };
                bearing?: { _attributes: { value: number } };
                bearingUnits?: { _attributes: { value: string } };
                color?: { _attributes?: { argb?: string } };
                contact?: {
                    _attributes: {
                        callsign?: string;
                        endpoint?: string;
                        name?: string;
                        phone?: string;
                    };
                };
                creator?: {
                    _attributes: {
                        callsign: string;
                        time: string;
                        type: string;
                        uid: string;
                    };
                };
                fileshare?: {
                    _attributes: {
                        filename: string;
                        name: string;
                        senderCallsign: string;
                        senderUid: string;
                        senderUrl: string;
                        sha256: string;
                        sizeInBytes: number;
                    };
                };
                fillColor?: { _attributes?: { value?: string } };
                inclination?: { _attributes: { value: string } };
                labels_on?: { _attributes?: { value?: string } };
                link?:
                    | {
                        _attributes: {
                            mime?: string;
                            parent_callsign?: string;
                            point?: string;
                            production_time?: string;
                            relation?: string;
                            remarks?: string;
                            type?: string;
                            uid?: string;
                            url?: string;
                        };
                    }
                    | {
                        _attributes: {
                            mime?: string;
                            parent_callsign?: string;
                            point?: string;
                            production_time?: string;
                            relation?: string;
                            remarks?: string;
                            type?: string;
                            uid?: string;
                            url?: string;
                        };
                    }[];
                link_attr?: {
                    _attributes: {
                        color?: number;
                        direction?: "Infil"
                        | "Exfil";
                        method: "Driving" | "Walking" | "Flying" | "Swimming" | "Watercraft";
                        order: "Ascending Check Points" | "Descending Check Points";
                        planningmethod?: "Infil" | "Exfil";
                        prefix: string;
                        routetype: "Primary" | "Secondary";
                        stroke?: string;
                        type?: string;
                    };
                };
                marti?: {
                    _attributes?: {};
                    dest?: | {
                        _attributes: {
                            after?: string;
                            callsign?: string;
                            group?: string;
                            mission?: string;
                            "mission-guid"?: string;
                            path?: string;
                            uid?: string;
                        };
                    }
                    | {
                        _attributes: {
                            after?: (...)
                            | (...);
                            callsign?: (...) | (...);
                            group?: (...) | (...);
                            mission?: (...) | (...);
                            "mission-guid"?: (...) | (...);
                            path?: (...) | (...);
                            uid?: (...) | (...);
                        };
                    }[];
                };
                mission?: {
                    _attributes?: {
                        authorUid?: string;
                        guid?: string;
                        name?: string;
                        tool?: string;
                        type?: string;
                    };
                    MissionChanges?: {
                        MissionChange: | {
                            contentUid: { _text: ... };
                            creatorUid: { _text?: ... };
                            details: { _attributes: ...; location?: ... };
                            isFederatedChange: { _text: ... };
                            missionName: { _text: ... };
                            timestamp: { _text: ... };
                            type: { _text: ... };
                        }
                        | {
                            contentUid: ...;
                            creatorUid: ...;
                            details: ...;
                            isFederatedChange: ...;
                            missionName: ...;
                            timestamp: ...;
                            type: ...;
                        }[];
                    };
                    missionLayer?: {
                        name?: { _text: string };
                        parentUid?: { _text: string };
                        type?: { _text: string };
                        uid?: { _text: string };
                    };
                };
                northRef?: { _attributes: { value: string } };
                precisionlocation?: {
                    _attributes: { altsrc?: string; geopointsrc?: string };
                };
                range?: { _attributes: { value: number } };
                rangeUnits?: { _attributes: { value: string } };
                remarks?: {
                    _attributes?: { source?: string; time?: string; to?: string };
                    _text?: string;
                };
                sensor?: {
                    _attributes: {
                        azimuth?: number;
                        displayMagneticReference?: number;
                        elevation?: number;
                        fov?: number;
                        fovAlpha?: number;
                        fovBlue?: number;
                        fovGreen?: number;
                        fovRed?: number;
                        hideFov?: boolean;
                        model?: string;
                        north?: number;
                        range?: number;
                        rangeLines?: number;
                        rangeLineStrokeColor?: number;
                        rangeLineStrokeWeight?: number;
                        roll?: number;
                        strokeColor?: number;
                        strokeWeight?: number;
                        type?: string;
                        version?: string;
                        vfov?: number;
                    };
                };
                shape?: {
                    ellipse?: {
                        _attributes: { angle: number; major: number; minor: number };
                    };
                    polyline?: {
                        _attributes?: {
                            closed?: (...)
                            | (...)
                            | (...);
                            color?: (...) | (...);
                            fillColor?: (...) | (...);
                        };
                        vertex?: | { _attributes: { lat: ...; lon: ... } }
                        | { _attributes: ... }[];
                    };
                };
                status?: { _attributes: { battery?: string; readiness?: string } };
                strokeColor?: { _attributes?: { value?: string } };
                strokeStyle?: { _attributes?: { value?: string } };
                strokeWeight?: { _attributes?: { value?: string } };
                TakControl?: {
                    TakProtocolSupport?: { _attributes?: { version?: (...) | (...) } };
                    TakServerVersionInfo?: {
                        _attributes?: { serverVersion?: (...) | (...) };
                    };
                };
                takv?: {
                    _attributes: {
                        device?: string;
                        os?: string;
                        platform?: string;
                        version?: string;
                    };
                };
                tog?: { _attributes?: { enabled?: string } };
                track?: {
                    _attributes?: {
                        course?: string;
                        eCourse?: string;
                        eSlope?: string;
                        eSpeed?: string;
                        slope?: string;
                        speed?: string;
                    };
                };
                uid?: { _attributes: { Droid: string } };
                usericon?: { _attributes: { iconsetpath: string } };
            };
            point: {
                _attributes: {
                    ce: string
                    | number;
                    hae: string | number;
                    lat: string | number;
                    le: string | number;
                    lon: string | number;
                };
            };
        };
    }

    Raw XML-JS representation of CoT

    Methods

    • Add a given Dest tag to a CoT

      Parameters

      • dest: {
            after?: string;
            callsign?: string;
            group?: string;
            mission?: string;
            "mission-guid"?: string;
            path?: string;
            uid?: string;
        }

      Returns CoT

    • Parameters

      • link: {
            mime?: string;
            parent_callsign?: string;
            point?: string;
            production_time?: string;
            relation?: string;
            remarks?: string;
            type?: string;
            uid?: string;
            url?: string;
        }

      Returns CoT

    • Parameters

      • video: { sensor?: string; spi?: string; uid?: string; url?: string }
      • Optionalconnection: {
            address: string;
            alias?: string;
            bufferTime?: number;
            ignoreEmbeddedKLV?: boolean;
            networkTimeout?: number;
            path?: string;
            port?: number;
            protocol?: string;
            roverPort?: number;
            rtspReliable?: number;
            uid: string;
        }

      Returns CoT

    • Returns or sets the Callsign of the CoT

      Parameters

      • Optionalcallsign: string

        Optional Callsign to set

      Returns string

    • Parameters

      • Optionalcreator: { callsign: string; time: undefined | string | Date; type: string; uid: string }

      Returns undefined | { callsign: string; time: string; type: string; uid: string }

    • Return Detail Object of CoT or create one if it doesn't yet exist and pass a reference

      Returns {
          __chat?: {
              _attributes: {
                  chatroom: string;
                  groupOwner?: string;
                  id: string;
                  messageId?: string;
                  parent?: string;
                  senderCallsign: string;
              };
              chatgrp: any;
          };
          __forcedelete?: {};
          __geofence?: {
              _attributes: {
                  boundingSphere?: number;
                  elevationMonitored?: string;
                  maxElevation?: string;
                  minElevation?: string;
                  monitor?: string;
                  tracking?: string;
                  trigger?: string;
              };
          };
          __group?: { _attributes?: { name: string; role: string } };
          __milsym?: {
              _attributes: { id: string };
              unitmodifier?:
                  | { _attributes: { code: string }; _text?: string }
                  | { _attributes: { code: string }; _text?: string }[];
          };
          __video?: {
              _attributes?: {
                  sensor?: string;
                  spi?: string;
                  uid?: string;
                  url?: string;
              };
              ConnectionEntry?: {
                  _attributes: {
                      address: string;
                      alias?: string;
                      bufferTime?: number;
                      ignoreEmbeddedKLV?: boolean;
                      networkTimeout?: number;
                      path?: string;
                      port?: number;
                      protocol?: string;
                      roverPort?: number;
                      rtspReliable?: number;
                      uid: string;
                  };
              };
          };
          "_flow-tags_"?: any;
          ackrequest?: {
              _attributes: { ackrequested: boolean; tag: string; uid: string };
          };
          archive?: | { _attributes?: { value?: string } }
          | { _attributes?: { value?: string } }[];
          attachment_list?: { _attributes: { hashes: string } };
          bearing?: { _attributes: { value: number } };
          bearingUnits?: { _attributes: { value: string } };
          color?: { _attributes?: { argb?: string } };
          contact?: {
              _attributes: {
                  callsign?: string;
                  endpoint?: string;
                  name?: string;
                  phone?: string;
              };
          };
          creator?: {
              _attributes: {
                  callsign: string;
                  time: string;
                  type: string;
                  uid: string;
              };
          };
          fileshare?: {
              _attributes: {
                  filename: string;
                  name: string;
                  senderCallsign: string;
                  senderUid: string;
                  senderUrl: string;
                  sha256: string;
                  sizeInBytes: number;
              };
          };
          fillColor?: { _attributes?: { value?: string } };
          inclination?: { _attributes: { value: string } };
          labels_on?: { _attributes?: { value?: string } };
          link?:
              | {
                  _attributes: {
                      mime?: string;
                      parent_callsign?: string;
                      point?: string;
                      production_time?: string;
                      relation?: string;
                      remarks?: string;
                      type?: string;
                      uid?: string;
                      url?: string;
                  };
              }
              | {
                  _attributes: {
                      mime?: string;
                      parent_callsign?: string;
                      point?: string;
                      production_time?: string;
                      relation?: string;
                      remarks?: string;
                      type?: string;
                      uid?: string;
                      url?: string;
                  };
              }[];
          link_attr?: {
              _attributes: {
                  color?: number;
                  direction?: "Infil"
                  | "Exfil";
                  method: "Driving" | "Walking" | "Flying" | "Swimming" | "Watercraft";
                  order: "Ascending Check Points" | "Descending Check Points";
                  planningmethod?: "Infil" | "Exfil";
                  prefix: string;
                  routetype: "Primary" | "Secondary";
                  stroke?: string;
                  type?: string;
              };
          };
          marti?: {
              _attributes?: {};
              dest?: | {
                  _attributes: {
                      after?: string;
                      callsign?: string;
                      group?: string;
                      mission?: string;
                      "mission-guid"?: string;
                      path?: string;
                      uid?: string;
                  };
              }
              | {
                  _attributes: {
                      after?: string;
                      callsign?: string;
                      group?: string;
                      mission?: string;
                      "mission-guid"?: string;
                      path?: string;
                      uid?: string;
                  };
              }[];
          };
          mission?: {
              _attributes?: {
                  authorUid?: string;
                  guid?: string;
                  name?: string;
                  tool?: string;
                  type?: string;
              };
              MissionChanges?: {
                  MissionChange: | {
                      contentUid: { _text: string };
                      creatorUid: { _text?: string };
                      details: {
                          _attributes: { callsign?: string; color?: string; type: string };
                          location?: { _attributes: { lat: ...; lon: ... } };
                      };
                      isFederatedChange: { _text: string };
                      missionName: { _text: string };
                      timestamp: { _text: string };
                      type: { _text: string };
                  }
                  | {
                      contentUid: { _text: string };
                      creatorUid: { _text?: string };
                      details: {
                          _attributes: {
                              callsign?: (...) | (...);
                              color?: (...) | (...);
                              type: string;
                          };
                          location?: { _attributes: ... };
                      };
                      isFederatedChange: { _text: string };
                      missionName: { _text: string };
                      timestamp: { _text: string };
                      type: { _text: string };
                  }[];
              };
              missionLayer?: {
                  name?: { _text: string };
                  parentUid?: { _text: string };
                  type?: { _text: string };
                  uid?: { _text: string };
              };
          };
          northRef?: { _attributes: { value: string } };
          precisionlocation?: {
              _attributes: { altsrc?: string; geopointsrc?: string };
          };
          range?: { _attributes: { value: number } };
          rangeUnits?: { _attributes: { value: string } };
          remarks?: {
              _attributes?: { source?: string; time?: string; to?: string };
              _text?: string;
          };
          sensor?: {
              _attributes: {
                  azimuth?: number;
                  displayMagneticReference?: number;
                  elevation?: number;
                  fov?: number;
                  fovAlpha?: number;
                  fovBlue?: number;
                  fovGreen?: number;
                  fovRed?: number;
                  hideFov?: boolean;
                  model?: string;
                  north?: number;
                  range?: number;
                  rangeLines?: number;
                  rangeLineStrokeColor?: number;
                  rangeLineStrokeWeight?: number;
                  roll?: number;
                  strokeColor?: number;
                  strokeWeight?: number;
                  type?: string;
                  version?: string;
                  vfov?: number;
              };
          };
          shape?: {
              ellipse?: {
                  _attributes: { angle: number; major: number; minor: number };
              };
              polyline?: {
                  _attributes?: { closed?: boolean; color?: string; fillColor?: string };
                  vertex?:
                      | { _attributes: { lat: number; lon: number } }
                      | { _attributes: { lat: number; lon: number } }[];
              };
          };
          status?: { _attributes: { battery?: string; readiness?: string } };
          strokeColor?: { _attributes?: { value?: string } };
          strokeStyle?: { _attributes?: { value?: string } };
          strokeWeight?: { _attributes?: { value?: string } };
          TakControl?: {
              TakProtocolSupport?: { _attributes?: { version?: string } };
              TakServerVersionInfo?: { _attributes?: { serverVersion?: string } };
          };
          takv?: {
              _attributes: {
                  device?: string;
                  os?: string;
                  platform?: string;
                  version?: string;
              };
          };
          tog?: { _attributes?: { enabled?: string } };
          track?: {
              _attributes?: {
                  course?: string;
                  eCourse?: string;
                  eSlope?: string;
                  eSpeed?: string;
                  slope?: string;
                  speed?: string;
              };
          };
          uid?: { _attributes: { Droid: string } };
          usericon?: { _attributes: { iconsetpath: string } };
      }

    • Determines if the CoT message represents an Airborne Element

      Returns boolean

    • Determines if the CoT message represents an Assumed Element

      Returns boolean

    • Determines if the CoT message represents an Element

      Returns boolean

    • Determines if the CoT message represents a Chat Message

      Returns boolean

    • Determines if the CoT message represents Equipment

      Returns boolean

    • Determines if the CoT message represents a Faker Element

      Returns boolean

    • Determines if the CoT message represents a Friendly Element

      Returns boolean

    • Determines if the CoT message represents a Ground Element

      Returns boolean

    • Determines if the CoT message represents a Hostile Element

      Returns boolean

    • Determines if the CoT message represents an Installation

      Returns boolean

    • Determines if the CoT message represents a Joker Element

      Returns boolean

    • Determines if the CoT message represents a Neutral Element

      Returns boolean

    • Determines if the CoT message represents a Pending Element

      Returns boolean

    • Returns boolean

    • Determines if the CoT message represents a Subsurface Element

      Returns boolean

    • Determines if the CoT message represents a Surface Element

      Returns boolean

    • Determines if the CoT message represents a Suspect Element

      Returns boolean

    • Determines if the CoT message represents a Tasking Message

      Returns boolean

    • Determines if the CoT message represents a UAV Element

      Returns boolean

    • Determines if the CoT message represents a Unknown Element

      Returns boolean

    • Determines if the CoT message represents a Vehicle

      Returns boolean

    • Detect difference between CoT messages Note: This diffs based on GeoJSON Representation of message So if unknown properties are present they will be excluded from the diff

      Parameters

      • cot: CoT
      • opts: {
            diffDest: boolean;
            diffFlow: boolean;
            diffMetadata: boolean;
            diffStaleStartTime: boolean;
        } = ...

      Returns boolean

    • Parameters

      • Optionalposition: number[]

      Returns number[]

    • Parameters

      • Optionalsensor: {
            azimuth?: number;
            displayMagneticReference?: number;
            elevation?: number;
            fov?: number;
            fovAlpha?: number;
            fovBlue?: number;
            fovGreen?: number;
            fovRed?: number;
            hideFov?: boolean;
            model?: string;
            north?: number;
            range?: number;
            rangeLines?: number;
            rangeLineStrokeColor?: number;
            rangeLineStrokeWeight?: number;
            roll?: number;
            strokeColor?: number;
            strokeWeight?: number;
            type?: string;
            version?: string;
            vfov?: number;
        }

      Returns null | { coordinates: number[][][]; type: "Polygon" }

    • Return a GeoJSON Feature from an XML CoT message

      Returns {
          geometry:
              | { coordinates: number[][][]; type: "Polygon" }
              | { coordinates: number[]; type: "Point" }
              | { coordinates: number[][]; type: "LineString" };
          id: string;
          path?: string;
          properties: {
              ackrequest?: { ackrequested: boolean; tag: string; uid: string };
              archived?: boolean;
              attachments?: string[];
              bearing?: number;
              callsign: string;
              center: number[];
              chat?: {
                  chatgrp: any;
                  chatroom: string;
                  groupOwner?: string;
                  id: string;
                  messageId?: string;
                  parent?: string;
                  senderCallsign: string;
              };
              contact?: {
                  callsign?: string;
                  endpoint?: string;
                  name?: string;
                  phone?: string;
              };
              course?: number;
              creator?: { callsign: string; time: string; type: string; uid: string };
              dest?:
                  | {
                      after?: string;
                      callsign?: string;
                      group?: string;
                      mission?: string;
                      "mission-guid"?: string;
                      path?: string;
                      uid?: string;
                  }
                  | {
                      after?: string;
                      callsign?: string;
                      group?: string;
                      mission?: string;
                      "mission-guid"?: string;
                      path?: string;
                      uid?: string;
                  }[];
              droid?: string;
              fileshare?: {
                  filename: string;
                  name: string;
                  senderCallsign: string;
                  senderUid: string;
                  senderUrl: string;
                  sha256: string;
                  sizeInBytes: number;
              };
              fill?: string;
              "fill-opacity"?: number;
              flow?: { [key: string]: string };
              geofence?: {
                  boundingSphere?: number;
                  elevationMonitored?: string;
                  maxElevation?: string;
                  minElevation?: string;
                  monitor?: string;
                  tracking?: string;
                  trigger?: string;
              };
              group?: { name: string; role: string };
              how: string;
              icon?: string;
              links?: {
                  mime?: string;
                  parent_callsign?: string;
                  point?: string;
                  production_time?: string;
                  relation?: string;
                  remarks?: string;
                  type?: string;
                  uid?: string;
                  url?: string;
              }[];
              "marker-color"?: string;
              "marker-opacity"?: number;
              metadata?: { [key: string]: unknown };
              mission?: {
                  authorUid?: string;
                  guid?: string;
                  missionChanges?: {
                      contentUid: string;
                      creatorUid: string;
                      details: {
                          callsign: string;
                          color: string;
                          lat: string;
                          lon: string;
                          type: string;
                      };
                      isFederatedChange: string;
                      missionName: string;
                      timestamp: string;
                      type: string;
                  }[];
                  missionLayer?: {
                      name?: string;
                      parentUid?: string;
                      type?: string;
                      uid?: string;
                  };
                  name?: string;
                  tool?: string;
                  type?: string;
              };
              precisionlocation?: { altsrc?: string; geopointsrc?: string };
              range?: number;
              remarks?: string;
              sensor?: {
                  azimuth?: number;
                  displayMagneticReference?: number;
                  elevation?: number;
                  fov?: number;
                  fovAlpha?: number;
                  fovBlue?: number;
                  fovGreen?: number;
                  fovRed?: number;
                  hideFov?: boolean;
                  model?: string;
                  north?: number;
                  range?: number;
                  rangeLines?: number;
                  rangeLineStrokeColor?: number;
                  rangeLineStrokeWeight?: number;
                  roll?: number;
                  strokeColor?: number;
                  strokeWeight?: number;
                  type?: string;
                  version?: string;
                  vfov?: number;
              };
              shape?: { ellipse?: { angle: number; major: number; minor: number } };
              slope?: number;
              speed?: number;
              stale: string;
              start: string;
              status?: { battery?: string; readiness?: string };
              stroke?: string;
              "stroke-opacity"?: number;
              "stroke-style"?: string;
              "stroke-width"?: number;
              takv?: {
                  device?: string;
                  os?: string;
                  platform?: string;
                  version?: string;
              };
              time: string;
              track?: {
                  course?: string;
                  eCourse?: string;
                  eSlope?: string;
                  eSpeed?: string;
                  slope?: string;
                  speed?: string;
              };
              type: string;
              video?: {
                  connection?: {
                      address: string;
                      alias?: string;
                      bufferTime?: number;
                      ignoreEmbeddedKLV?: boolean;
                      networkTimeout?: number;
                      path?: string;
                      port?: number;
                      protocol?: string;
                      roverPort?: number;
                      rtspReliable?: number;
                      uid: string;
                  };
                  sensor?: string;
                  spi?: string;
                  uid?: string;
                  url?: string;
              };
          };
          type: string;
      }

    • Return an ATAK Compliant Protobuf

      Parameters

      • version: number = 1

      Returns Uint8Array

    • Returns string

    • Returns or sets the Callsign of the CoT

      Parameters

      • Optionaltype: string

      Returns string

    • Returns or sets the UID of the CoT

      Parameters

      • Optionaluid: string

      Returns string

    • Return an CoT Message given a GeoJSON Feature

      Parameters

      • feature: {
            geometry:
                | { coordinates: number[][][]; type: "Polygon" }
                | { coordinates: number[]; type: "Point" }
                | { coordinates: number[][]; type: "LineString" };
            id?: string;
            path?: string;
            properties: {
                ackrequest?: { ackrequested: boolean; tag: string; uid: string };
                archived?: boolean;
                attachments?: string[];
                bearing?: number;
                callsign?: string;
                center?: number[];
                chat?: {
                    chatgrp: any;
                    chatroom: string;
                    groupOwner?: string;
                    id: string;
                    messageId?: string;
                    parent?: string;
                    senderCallsign: string;
                };
                contact?: {
                    callsign?: string;
                    endpoint?: string;
                    name?: string;
                    phone?: string;
                };
                course?: number;
                creator?: { callsign: string; time: string; type: string; uid: string };
                dest?:
                    | {
                        after?: string;
                        callsign?: string;
                        group?: string;
                        mission?: string;
                        "mission-guid"?: string;
                        path?: string;
                        uid?: string;
                    }
                    | {
                        after?: string;
                        callsign?: string;
                        group?: string;
                        mission?: string;
                        "mission-guid"?: string;
                        path?: string;
                        uid?: string;
                    }[];
                droid?: string;
                fileshare?: {
                    filename: string;
                    name: string;
                    senderCallsign: string;
                    senderUid: string;
                    senderUrl: string;
                    sha256: string;
                    sizeInBytes: number;
                };
                fill?: string;
                "fill-opacity"?: number;
                flow?: { [key: string]: string };
                geofence?: {
                    boundingSphere?: number;
                    elevationMonitored?: string;
                    maxElevation?: string;
                    minElevation?: string;
                    monitor?: string;
                    tracking?: string;
                    trigger?: string;
                };
                group?: { name: string; role: string };
                how?: string;
                icon?: string;
                links?: {
                    mime?: string;
                    parent_callsign?: string;
                    point?: string;
                    production_time?: string;
                    relation?: string;
                    remarks?: string;
                    type?: string;
                    uid?: string;
                    url?: string;
                }[];
                "marker-color"?: string;
                "marker-opacity"?: number;
                metadata?: { [key: string]: unknown };
                mission?: {
                    authorUid?: string;
                    guid?: string;
                    missionChanges?: {
                        contentUid: string;
                        creatorUid: string;
                        details: {
                            callsign: string;
                            color: string;
                            lat: string;
                            lon: string;
                            type: string;
                        };
                        isFederatedChange: string;
                        missionName: string;
                        timestamp: string;
                        type: string;
                    }[];
                    missionLayer?: {
                        name?: string;
                        parentUid?: string;
                        type?: string;
                        uid?: string;
                    };
                    name?: string;
                    tool?: string;
                    type?: string;
                };
                precisionlocation?: { altsrc?: string; geopointsrc?: string };
                range?: number;
                remarks?: string;
                sensor?: {
                    azimuth?: number;
                    displayMagneticReference?: number;
                    elevation?: number;
                    fov?: number;
                    fovAlpha?: number;
                    fovBlue?: number;
                    fovGreen?: number;
                    fovRed?: number;
                    hideFov?: boolean;
                    model?: string;
                    north?: number;
                    range?: number;
                    rangeLines?: number;
                    rangeLineStrokeColor?: number;
                    rangeLineStrokeWeight?: number;
                    roll?: number;
                    strokeColor?: number;
                    strokeWeight?: number;
                    type?: string;
                    version?: string;
                    vfov?: number;
                };
                shape?: { ellipse?: { angle: number; major: number; minor: number } };
                slope?: number;
                speed?: number;
                stale?: string | number;
                start?: string;
                status?: { battery?: string; readiness?: string };
                stroke?: string;
                "stroke-opacity"?: number;
                "stroke-style"?: string;
                "stroke-width"?: number;
                takv?: {
                    device?: string;
                    os?: string;
                    platform?: string;
                    version?: string;
                };
                time?: string;
                track?: {
                    course?: string;
                    eCourse?: string;
                    eSlope?: string;
                    eSpeed?: string;
                    slope?: string;
                    speed?: string;
                };
                type?: string;
                video?: {
                    connection?: {
                        address: string;
                        alias?: string;
                        bufferTime?: number;
                        ignoreEmbeddedKLV?: boolean;
                        networkTimeout?: number;
                        path?: string;
                        port?: number;
                        protocol?: string;
                        roverPort?: number;
                        rtspReliable?: number;
                        uid: string;
                    };
                    sensor?: string;
                    spi?: string;
                    uid?: string;
                    url?: string;
                };
            };
            type: string;
        }

        GeoJSON Point Feature

      Returns CoT

    • Parse an ATAK compliant Protobuf to a JS Object

      Parameters

      • raw: Uint8Array
      • version: number = 1

      Returns CoT

    • Return a CoT Message

      Returns CoT