ios - iBeacon Arrow Rotation -


I'm working on an iOS app, and I'm trying to rotate a Uaimaj weave which has an arrow Is graphic. I have my place in the room as a CGPint, and I want to show you the direction direction to reach another CGPoint. How do I create an angle between the two points, and make sure the arrow is pointing the right direction, and what is the best way to rotate UIImageView?

  - (CGFloat) pointPairToBearingDegrees :( Sijeepiint) start point second point: (Sijeepiiiint) Andingpoint {Sijeepiint original page = CP point make (Andingpoint X. - Early Piointi.aks, Andingpointkai - starting page); // Get the origin point of origin by reducing the initial float effect from the end radians = atan2f (originPoint.y, originPoint.x); // Radians have effect with float effect; Degrees = bearing readings * (180.0 / mpi); Degree to convert with // degreeGreagues = (effectgrade> 0.0? Bearings: (360.0 + effect)); // Right imbalance return bearings; } Siajifin Transformers transform = Sijiafiin Tronsformmekoteshn ([Spi Point Pier Tuingingdigrij: Your Lokens second point: CG Pointmek (0, 0)]); Self.arrow.transform = transform;  

The problem is that it jumps sharply instead of just pointing at the original (0,0) from my position (0.01 from your position, YOUR position)

It looks as if you want two devices - a sender, and recipient, and you want the device you received There is a compass for the broadcasting device. It looks very clean.

I will broadcast the latitude and latitude of the transmission device as a string through Major and Minor Keys.

Now, you need two points - Longitude and latitude transmission and the received device received device also has a compass.

You can use the code here: To direct the point

Note that for this to work, Bluetooth must be turned on for both devices, and the application Should also be open on both devices, even on broadcast equipment.

Edit

I think the random point is basically another device that is transmitting. I think that you just want to indicate where the signal is coming from, but there is no way to know about the device. Bluetooth is based on radio waves (i.e. light) and there is no way to say what source is coming from. To make this work you need to know two pieces: one place from each device, and a reference point to orient the device:

  1. Position the location in each location from the location If between devices and directions you accept that the received device has always answered
  2. Since users often do not face the answer while using their iPhone, Slia photo Orient the arrow you pointing device is required to use the compass on the device.

To locate the location, you can use the GPS, but it is important to be as accurate as possible if you are talking about the situation with the room and then You can use the above link to set orientation.

Note that an internal condition is SDK but it does not seem to be as accurate as you would expect.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -