I want to know the le_gnss_Sample type

typedef struct le_gnss_Sample* le_gnss_SampleRef_t;

may i know the structure declaration. It is help full to use gnss/Position api in external IRNSS module

Hello !

I don’t know if this is what you’re looking for, but the Position Sample struct is defined in le_gnss.c as:

typedef struct le_gnss_PositionSample
{
    le_gnss_FixState_t fixState;              ///< Position Fix state
    bool              latitudeValid;          ///< if true, latitude is set
    int32_t           latitude;               ///< altitude
    bool              longitudeValid;         ///< if true, longitude is set
    int32_t           longitude;              ///< longitude
    bool              hAccuracyValid;         ///< if true, horizontal accuracy is set
    int32_t           hAccuracy;              ///< horizontal accuracy
    bool              altitudeValid;          ///< if true, altitude is set
    int32_t           altitude;               ///< altitude
    bool              altitudeOnWgs84Valid;   ///< if true, altitude with respect to the WGS-84 is
                                              ///< set
    int32_t           altitudeOnWgs84;        ///< altitude with respect to the WGS-84 ellipsoid
    bool              vAccuracyValid;         ///< if true, vertical accuracy is set
    int32_t           vAccuracy;              ///< vertical accuracy
    bool              hSpeedValid;            ///< if true, horizontal speed is set
    uint32_t          hSpeed;                 ///< horizontal speed
    bool              hSpeedAccuracyValid;    ///< if true, horizontal speed accuracy is set
    int32_t           hSpeedAccuracy;         ///< horizontal speed accuracy
    bool              vSpeedValid;            ///< if true, vertical speed is set
    int32_t           vSpeed;                 ///< vertical speed
    bool              vSpeedAccuracyValid;    ///< if true, vertical speed accuracy is set
    int32_t           vSpeedAccuracy;         ///< vertical speed accuracy
    bool              directionValid;         ///< if true, direction is set
    uint32_t          direction;              ///< direction
    bool              directionAccuracyValid; ///< if true, direction accuracy is set
    uint32_t          directionAccuracy;      ///< direction accuracy
    bool              dateValid;              ///< if true, date is set
    uint16_t          year;                   ///< UTC Year A.D. [e.g. 2014].
    uint16_t          month;                  ///< UTC Month into the year [range 1...12].
    uint16_t          day;                    ///< UTC Days into the month [range 1...31].
    bool              timeValid;              ///< if true, time is set
    uint16_t          hours;                  ///< UTC Hours into the day [range 0..23].
    uint16_t          minutes;                ///< UTC Minutes into the hour [range 0..59].
    uint16_t          seconds;                ///< UTC Seconds into the minute [range 0..59].
    uint16_t          milliseconds;           ///< UTC Milliseconds into the second [range 0..999].
    uint64_t          epochTime;              ///< Epoch time in milliseconds since Jan. 1, 1970
    bool              gpsTimeValid;           ///< if true, GPS time is set
    uint32_t          gpsWeek;                ///< GPS week number from midnight, Jan. 6, 1980.
    uint32_t          gpsTimeOfWeek;          ///< Amount of time in milliseconds into the GPS week.
    bool              timeAccuracyValid;      ///< if true, timeAccuracy is set
    uint32_t          timeAccuracy;           ///< Estimated Accuracy for time in nenoseconds
    bool              leapSecondsValid;       ///< if true, leapSeconds is set
    uint8_t           leapSeconds;            ///< UTC leap seconds in advance in seconds
    bool              positionLatencyValid;   ///< if true, positionLatency is set
    uint32_t          positionLatency;        ///< Position measurement latency in milliseconds
    bool              hdopValid;              ///< if true, horizontal dilution is set
    uint32_t          hdop;                   ///< The horizontal dilution of precision (DOP)
    bool              vdopValid;              ///< if true, vertical dilution is set
    uint32_t          vdop;                   ///< The vertical dilution of precision (DOP)
    bool              pdopValid;              ///< if true, position dilution is set
    uint32_t          pdop;                   ///< The position dilution of precision (DOP)
    bool              gdopValid;              ///< if true, geometric dilution is set
    uint32_t          gdop;                   ///< The geometric dilution of precision (DOP)
    bool              tdopValid;              ///< if true, time dilution is set
    uint32_t          tdop;                   ///< The time dilution of precision (DOP)
    bool              magneticDeviationValid; ///< if true, magnetic deviation is set
    int32_t           magneticDeviation;      ///< The magnetic deviation
    // Satellite Vehicles information
    bool              satsInViewCountValid;   ///< if true, satsInViewCount is set
    uint8_t           satsInViewCount;        ///< Satellites in View count.
    bool              satsTrackingCountValid; ///< if true, satsTrackingCount is set
    uint8_t           satsTrackingCount;      ///< Tracking satellites in View count.
    bool              satsUsedCountValid;     ///< if true, satsUsedCount is set
    uint8_t           satsUsedCount;          ///< Satellites in View used for Navigation.
    bool              satInfoValid;           ///< if true, satInfo is set
    le_gnss_SvInfo_t  satInfo[LE_GNSS_SV_INFO_MAX_LEN];
    bool              satMeasValid;           ///< if true, satMeas is set
    le_gnss_SvMeas_t  satMeas[LE_GNSS_SV_INFO_MAX_LEN];
                                              ///< Satellite Vehicle measurement information.
    le_dls_Link_t   link;                     ///< Object node link
}
le_gnss_PositionSample_t;

You can find this file here in the Legato source code.

Hope this helps !

Thanks @paulmeis

My intention. after reading the External GNSS module nmea string by using UART1.
nmea string has to send to gnss position api functions, to getting gnss samples.

if you have any other idea , please share me the information and I have one doubt,
is this possible to change the
#define LE_GNSS_NMEA_NODE_PATH “/dev/nmea”
to
#define LE_GNSS_NMEA_NODE_PATH “/dev/ttyHS0”

Hi @dhanarajbp1

I’m not sure to understand exactly what you are trying to do.
Correct me if i’m wrong, but I understood you want to get gnss samples using an application (with le_gnss or le_pos api I guess). Then you want to send the samples over UART (for example to your computer ?).

To send info over UART I would use the console port of the board (but this might not be the best way to do this). To do this you can write into /dev/console.
First you have to redirect Legato logs to /dev/console by modifying /etc/init.d/start_legato.sh using this command:

$ echo "logread -f > /dev/console &" >> /etc/init.d/startlegato.sh

Then you just have to log your gnss samples from your app with LE_INFO, and you should see them printed when you read the console output of your board.