Exemplo n.º 1
0
    void Update()
    {
        // Update target position from input
        float latitudeDelta  = Input.GetAxis("Vertical") * movementSpeed * Time.deltaTime;
        float longitudeDelta = Input.GetAxis("Horizontal") * movementSpeed * Time.deltaTime;

        targetPosition.SetLatitude(targetPosition.GetLatitude() + (latitudeDelta * 0.00006f));
        targetPosition.SetLongitude(targetPosition.GetLongitude() + (longitudeDelta * 0.00006f));

        // Command positioner to move using lat-long
        positioner.SetLocation(targetPosition.GetLatitude(), targetPosition.GetLongitude());

        // Update physical location via GeometryTransform, with corrected ECEF fetched from positioner
        coordinateFrame.SetPosition(positioner.GetECEFLocation());
    }