Code
function CovertCoordinate($Position){
$deg = floor($Position);
$min = floor(($Position - $deg)*60);
$sec = round((((($Position - $deg)*60) - $min)*60),3);
return ($deg * 3600000) + ($min * 60000) + ($sec * 1000);
}
function RevertCoordinate($Position){
$deg = floor($Position/3600000);
$min = floor(($Position - ($deg * 3600000))/60000);
$sec = (($deg * 3600000) - ($min * 60000))/1000;
return $deg + ($min / 60) + ($sec / 3600);
}
沒有留言:
張貼留言