TestGness.cs 837 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using UnityEngine;
  3. public class TestGness : MonoBehaviour
  4. {
  5. private SvrPlugin plugin = null;
  6. float[] gness = new float[3];
  7. public TextMesh Tx;
  8. // double[] dt = new double[3];//20米外的gps数据
  9. double Dt=0;
  10. IEnumerator Initialize()
  11. {
  12. yield return new WaitUntil(() => plugin.IsInitialized() == true);
  13. //plugin.getGnss(ref Dt, gness);
  14. Debug.Log("ness = {" + gness[0] + "," + gness[1] + "," + gness[2] + "," + "}");
  15. Tx.text = gness[0].ToString() + "," + gness[1].ToString() + "," + gness[2].ToString();
  16. }
  17. // Start is called before the first frame update
  18. void Start()
  19. {
  20. plugin = SvrPlugin.Instance;
  21. }
  22. // Update is called once per frame
  23. void Update()
  24. {
  25. StartCoroutine(Initialize());
  26. }
  27. }