docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NavSatFixMsg

    ROS sensor_msgs/NavSatFix message.

    Inheritance
    object
    NavSatFixMsg
    Implements
    IMessage
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.SimulationPro.Foundation.SensorMessages
    Assembly: Unity.SimulationPro.Foundation.dll
    Syntax
    [Serializable]
    public class NavSatFixMsg : IMessage

    Constructors

    NavSatFixMsg()

    Initializes a new instance with default values.

    Declaration
    public NavSatFixMsg()

    NavSatFixMsg(HeaderMsg, NavSatStatusMsg, double, double, double, double[], byte)

    Initializes a new instance with default values.

    Declaration
    public NavSatFixMsg(HeaderMsg header, NavSatStatusMsg status, double latitude, double longitude, double altitude, double[] position_covariance, byte position_covariance_type)
    Parameters
    Type Name Description
    HeaderMsg header

    ROS message header containing timestamp and coordinate frame identifier.

    NavSatStatusMsg status

    Status information.

    double latitude

    Geodetic latitude in degrees.

    double longitude

    Geodetic longitude in degrees.

    double altitude

    Altitude above the WGS 84 ellipsoid in meters.

    double[] position_covariance

    Row-major 3×3 covariance for the position fix.

    byte position_covariance_type

    Integer code indicating which covariance axes are valid.

    Fields

    COVARIANCE_TYPE_APPROXIMATED

    Constant value for COVARIANCE_TYPE_APPROXIMATED.

    Declaration
    public const byte COVARIANCE_TYPE_APPROXIMATED = 1
    Field Value
    Type Description
    byte

    COVARIANCE_TYPE_DIAGONAL_KNOWN

    Constant value for COVARIANCE_TYPE_DIAGONAL_KNOWN.

    Declaration
    public const byte COVARIANCE_TYPE_DIAGONAL_KNOWN = 2
    Field Value
    Type Description
    byte

    COVARIANCE_TYPE_KNOWN

    Constant value for COVARIANCE_TYPE_KNOWN.

    Declaration
    public const byte COVARIANCE_TYPE_KNOWN = 3
    Field Value
    Type Description
    byte

    COVARIANCE_TYPE_UNKNOWN

    If the covariance of the fix is known, fill it in completely. If the GPS receiver provides the variance of each measurement, put them along the diagonal. If only Dilution of Precision is available, estimate an approximate covariance from that.

    Declaration
    public const byte COVARIANCE_TYPE_UNKNOWN = 0
    Field Value
    Type Description
    byte

    altitude

    Altitude [m]. Positive is above the WGS 84 ellipsoid (quiet NaN if no altitude is available).

    Declaration
    public double altitude
    Field Value
    Type Description
    double

    header

    Navigation Satellite fix for any Global Navigation Satellite System Specified using the WGS 84 reference ellipsoid header.stamp specifies the ROS time for this measurement (the corresponding satellite time may be reported using the sensor_msgs/TimeReference message). header.frame_id is the frame of reference reported by the satellite receiver, usually the location of the antenna. This is a Euclidean frame relative to the vehicle, not a reference ellipsoid.

    Declaration
    public HeaderMsg header
    Field Value
    Type Description
    HeaderMsg

    k_MessageTypeId

    Identifier for this message type.

    Declaration
    public static readonly MessageTypeId k_MessageTypeId
    Field Value
    Type Description
    MessageTypeId

    k_MessageTypeName

    The ROS message type name string used for serialization and topic matching.

    Declaration
    public const string k_MessageTypeName = "sensor_msgs/NavSatFix"
    Field Value
    Type Description
    string

    latitude

    Latitude [degrees]. Positive is north of equator; negative is south.

    Declaration
    public double latitude
    Field Value
    Type Description
    double

    longitude

    Longitude [degrees]. Positive is east of prime meridian; negative is west.

    Declaration
    public double longitude
    Field Value
    Type Description
    double

    position_covariance

    Position covariance [m^2] defined relative to a tangential plane through the reported position. The components are East, North, and Up (ENU), in row-major order. Beware: this coordinate system exhibits singularities at the poles.

    Declaration
    public double[] position_covariance
    Field Value
    Type Description
    double[]

    position_covariance_type

    Position covariance type field.

    Declaration
    public byte position_covariance_type
    Field Value
    Type Description
    byte

    status

    Satellite fix status information.

    Declaration
    public NavSatStatusMsg status
    Field Value
    Type Description
    NavSatStatusMsg

    Properties

    MessageTypeId

    Gets the unique runtime identifier for this message type.

    Declaration
    public MessageTypeId MessageTypeId { get; }
    Property Value
    Type Description
    MessageTypeId

    MessageTypeName

    Gets the ROS message type name for this message.

    Declaration
    public string MessageTypeName { get; }
    Property Value
    Type Description
    string

    Methods

    Deserialize(IMessageDeserializer)

    Deserializes a NavSatFixMsg from the given deserializer.

    Declaration
    public static NavSatFixMsg Deserialize(IMessageDeserializer deserializer)
    Parameters
    Type Name Description
    IMessageDeserializer deserializer

    The deserializer.

    Returns
    Type Description
    NavSatFixMsg

    A new NavSatFixMsg instance.

    Register()

    Registers this message type with the MessageTypeRegistry.

    Declaration
    [InitializeOnLoadMethod]
    public static void Register()

    ToString()

    Returns a human-readable string representation of this message.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of this instance.

    Overrides
    object.ToString()

    WriteTo(IMessageSerializer)

    Serializes this message to the given serializer.

    Declaration
    public void WriteTo(IMessageSerializer serializer)
    Parameters
    Type Name Description
    IMessageSerializer serializer

    The serializer.

    Implements

    IMessage

    Extension Methods

    MessageExtensions.ToLatLongString(NavSatFixMsg)
    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)