Example #1
0
 void CalculateLocalization()
 {
     //PlayerPosition.debug.text += "calculate localization \n";
     GetPlayerPosition();
     if (playerPosition)
     {
         Vector3 northRefOffset = GPSPositionUtils.WorldOffsetToNorthRefOffset(transform.position - playerPosition.transform.position);
         //PlayerPosition.debug.text += "northRefOffset " + northRefOffset + "\n";
         calculatedLocalization = GPSPositionUtils.GetLocalization(playerPosition.gpsPosition.lastData, northRefOffset);
         //PlayerPosition.debug.text += "calculatedLocalization " + calculatedLocalization.GetInfo() + "\n";
     }
 }
Example #2
0
    void UpdateInfo()
    {
        GetPlayerPosition();
        if (playerPosition)
        {
            northRefOffset          = GPSPositionUtils.WorldOffsetToNorthRefOffset(transform.position - playerPosition.transform.position);
            northRefOffsetInfo.text = northRefOffset + "";

            calculatedLocalization          = GPSPositionUtils.GetLocalization(playerPosition.gpsPosition.lastData, northRefOffset);
            calculatedLocalizationInfo.text = calculatedLocalization.GetInfo();
        }
    }