This function converts a given GPS-DD data type (decimal degrees) into a GPS data type (direction, degrees, minutes, and seconds).
GPS decimal degree to GPS "native".
LGF_GpsDDToGps (FC) | ||||||||
---|---|---|---|---|---|---|---|---|
LGF_typeGPS_DD | gps | Ret_Val | LGF_typeGPS | |||||
error | Bool | |||||||
status | Word | |||||||
Identifier | Data type | Description |
---|---|---|
gps | LGF_typeGPS_DD | GPS-Data to be converted (decimal degrees), e.g. 52.520817 13.40945 |
Identifier | Data type | Description |
---|---|---|
Ret_Val | LGF_typeGPS | Converted GPS-Data (direction, degrees, minutes, and seconds), e.g. N52° 31′ 14.941″ E13° 24′ 34.020″ |
error | Bool | FALSE: No error TRUE: An error occurred during the execution of the FB |
status | Word | 16#0000-16#7FFF: Status of the FB 16#8000-16#FFFF: Error identification (see following Table) |
Code / Value | Identifier / Description |
---|---|
16#0000 | STATUS_EXECUTION_FINISHED_NO_ERROR Execution finished without errors |
16#8201 | ERR_LATITUDE_VALUE Error: Latitude Value |
16#8203 | ERR_LONGITUDE_VALUE Error: Longitude Value |
Datatype for GPS Coordinates in decimal degrees.
For latitude and longitude.
Datatype for a whole GPS Data set.
Identifier | Data type | Default value | Description |
---|---|---|---|
latitude | Real | 0.0 | Degrees latitude with decimal places (Unit: degree decimal), North = positive; South = negative) valid value range [-90.00000..90.00000] |
longitude | Real | 0.0 | Degrees longitude in degrees with decimal places (Unit: degree decimal), East = positive; West = negative) valid range [-180.0000..180.0000] |
Datatype for GPS Coordinates Latitude and Longitude.
Child Datatypes in Degree, Minutes, Seconds and the Direction.
Datatype for a whole GPS Data set.
Identifier | Data type | Default value | Description |
---|---|---|---|
latitude | LGF_typeGPS_DMS | --- | Latitude child element |
longitude | LGF_typeGPS_DMS | --- | Longitude child element |
Version & Date | Change description | |
---|---|---|
01.00.00 | SIMATIC Systems Support | |
2019.09.11 | First released version | |
03.00.00 | Siemens Industry Support | |
2019.04.23 | Set version to V3.0.0 harmonize the version of the whole library | |
03.00.02 | Simatic Systems Support | |
20.01.2021 | Fix `tempStatus` initialization Insert documentation |