NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
ex_digps.nxc

This is an example of how to use the SetSensorDIGPSWaypoint, SensorDIGPSStatus, SensorDIGPSTime, SensorDIGPSLatitude, SensorDIGPSLongitude, SensorDIGPSVelocity, SensorDIGPSHeading, SensorDIGPSDistanceToWaypoint, SensorDIGPSHeadingToWaypoint, and SensorDIGPSRelativeHeading functions.

task main()
{
// while(!SensorDIGPSStatus(S1)) Wait(10);
SetSensorDIGPSWaypoint(S1, 36165833, -86784444);
while (true)
{
// show link status
// show latitude & longitude
float lat = SensorDIGPSLatitude(S1) / 1000000;
float lng = SensorDIGPSLongitude(S1) / 1000000;
NumOut(0, LCD_LINE2, lat);
NumOut(0, LCD_LINE3, lng);
// show heading
// show velocity
// show time in UTC
Wait(500);
}
}