Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 6    Views: 30

miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
09/10/14 09:25 AM (9 years ago)

Smugs Location Message: 2 questions

My Smugs Location Message map starts in the middle of South Atlantic Ocean, despite my location coordinates are written right. I have GPS option in Core enabled. Second question is about compass: if I turn-off Wi-fi, compass shows, but I don't know why is in the head of compass: -1.0 degree N, and it stays so when I turn device around. Shouldn't there be azimuth measure? I tried this on iOS, didn't come to Android yet.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/10/14 02:54 PM (9 years ago)
"South Atlantic Ocean" usually ends up being coordinates 0, 0. Make sure you've got GPS Turned on in the BT Control Panel (core settings). Cheers! -- Smug
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
09/11/14 12:14 AM (9 years ago)
Thanks, Smug, but I have GPS turned on, that's why starting coordinates are not 0,0 but right ones. Only map shows ocean, like coordinates would be 0,0, but they are not. I will try Android version too and let you know if result is the same.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/13/14 08:13 AM (9 years ago)
How are things going? Cheers! -- Smug
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
09/13/14 09:31 AM (9 years ago)
Hello, Smug, would you please look these 2 screeenshots: https://www.dropbox.com/s/v0mg6i7hlrdlgdn/screen_smug1.png?dl=0 https://www.dropbox.com/s/41d2voajv224vpd/screen_smug2.png?dl=0 On first you can see that coordinates are right, but image is from ocean, second is made with device's Wi-fi and Cellular data disabled, so Compass is only seen. Orientation of arrow is good, but angle data is all the time -1,0 degree.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
09/14/14 01:12 AM (9 years ago)
Try this. Around line 112 of sw_smugmsgloc.m you should see a line like this: [smugView setFrame:CGRectMake(5, 50, self.objWidth - 10, self.view.frame.size.height - 70)]; Directly under it, paste this line: [smugView setCenterCoordinate:swCurCoord zoomLevel:swZoomLevel animated:FALSE]; That should help. What seems to be happening is, it takes a first reading from the device and uses it to initially plot your location. Then, after the code has loaded, it uses the location manager to get a more accurate reading. The reason for this is the design is/was for kind of an emergency situation, where it wasn't as important for you to know where you are, as it was for 'them' to know exactly where you are. So, the first reading is a rough estimate, the second reading is more precise. What kind of phone are you using? The angle updates with the location manager, but I had bad luck with my iPhone 3GS with respect to the accelerometer. An iPhone 4 works much better. Cheers! -- Smug
 
miku
Aspiring developer
Profile
Posts: 405
Reg: Feb 20, 2014
zagorje ob savi
10,600
like
09/14/14 02:01 AM (9 years ago)
Hello, Map is correct after refreshing, but first look is still in the ocean: might be confusing for user to see only blue colour on screen and doesn't know what is happening. I test app on iphone 4S and 5S. Compass works fine on 4S, but on 5S it shows azimuth -1.0 degree N all the time.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.