gpsPosition (Functionblock) |
Top Previous Next |
Use this function block to read the current position from an external GPS smart-antenna connected to the serial port on the RTCU device. On devices with an in-build GPS receiver the gpsFix() function should used.
When using this function to get the current position from an external GPS receiver, the external GPS receiver must send the RMC status with regular intervals (typically every second). The baud rate must be 4800 bps and the external GPS receiver must be connected to the RTCU through RS232 port #0.
When using the GPS SmartAntenna with the RTCU DX4i pro it is important to first power on the SmartAntenna by using boardDCOut function.
Input: None.
Output: valid : BOOL; TRUE if GPS has valid position, otherwise FALSE.
year : SINT Years since 2000.
month : SINT Month (1..12).
day : SINT Date (1..31).
hour : SINT Hour (0..23).
minute : SINT Minute (0..59).
second : SINT Second (0..59).
latdegrees : SINT Negative is south (-90..+90).
latminutes : SINT Minutes (0..59).
latdecimalminutes : INT Decimal minutes (0..9999).
londegrees : INT Negative is west (-180..+180).
lonminutes : SINT Minutes (0..59).
londecimalminutes : INT Decimal minutes (0..9999).
speed : DINT Speed over ground in meters/hour.
course : DINT Course over ground. In xxx.xx degrees (multiplied by 100).
Declaration: FUNCTION_BLOCK gpsPosition;
Example: INCLUDE rtcu.inc |