NI-Sync C API Reference

niSync_GetVelocity

  • Updated2023-02-21
  • 2 minute(s) read

C Function Prototype

ViStatus _VI_FUNC niSync_GetVelocity (ViSession vi, ViReal64 * eastVelocity, ViReal64 * northVelocity, ViReal64 * upVelocity);

Purpose

Returns the last calculated velocity of the onboard GPS receiver. The function returns east velocity, north velocity, and up velocity in meters per second.

Note Note  
  • You must connect an external GPS antenna to your device to receive valid data from this function, and you must enable Mobile Mode on the device to receive non-zero velocity values. You can enable Mobile Mode using Measurement & Automation Explorer (MAX) or by calling the NISYNC_ATTR_GPS_MOBILE_MODE attribute.
  • This attribute is supported only on certain targets. Refer to Target Support for Timing Attributes and Functions to determine whether or not this attribute is supported on your target.

Parameters

Name Type Description
vi ViSession The session handle that you obtain from niSync_init. The handle identifies a particular instrument session.
eastVelocity ViReal64 * An input double pointer. The caller of this function must allocate a ViReal64 and pass the pointer in this argument. This parameter returns current east velocity, in meters per second, of the device. Negative values represent how fast the device is traveling west. Positive values represent how fast the device is traveling east.
northVelocity ViReal64 * An input double pointer. The caller of this function must allocate a ViReal64 and pass the pointer in this argument. The parameter returns the current north velocity, in meters per second, of the device. Negative values represent how fast the device is traveling south. Positive values represent how fast the device is traveling north.
upVelocity ViReal64 * An input double pointer. The caller of this function must allocate a ViReal64 and pass the pointer in this argument. This parameter returns the current up velocity, in meters per second, of your device. Negative values represent how fast your device is traveling down. Positive values represent how fast your device is traveling up.

Return Values

Log in to get a better experience