|
 |
|
09-11-2006, 11:43 PM
|
#542
|
|
Constant Bitrate
Join Date: Apr 2006
Location: California
Posts: 191
|
__________________
MacCar progress:
Planning:-----> [||||||||||||||||||||] 70%
Parts:---------> [||||||||||||||||||||] 0%
Construction:-> [||||||||||||||||||||] 0%
Car broken into... progress is basically zip...
|
|
|
09-16-2006, 12:45 AM
|
#543
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Did I release the version of AMP with the internet detection light? (the green/red light)?
If not, I can upload a new version soon with that light, the colored signal detection bars in wardriver, and QuickMenu..... but not tomorrow  My "dream girl" from school is coming over tomorrow cause I'm throwing her dog a birthday party.. Growing up is so.. gay.. lol
__________________
-
|
|
|
09-16-2006, 01:20 AM
|
#544
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 263
|
the version out has the indicator light, but doesn't have the colored signal detection bar in the wardrive section....
woof woof!  (happy birthday in dog talk)
|
|
|
09-16-2006, 03:08 AM
|
#545
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
Quote: Originally Posted by aychamo 
Did I release the version of AMP with the internet detection light? (the green/red light)?
How do you check for internet availability? Ping to some pre-defined host?
|
|
|
09-16-2006, 09:24 AM
|
#546
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Quote: Originally Posted by Jirka Jirout 
How do you check for internet availability? Ping to some pre-defined host?
Well, I had tried a few different ways at first. The first way I tried was using:
Code:
if(system("ping -c 1 -t 3 www.google.com")) return NO; else return YES;
However, I had problems with this. If the internet was available, it would be ok. Then with the app still running, if I removed internet access it would show the internet not being accessible (everything seems ok so far.) But then when I re-enable the internet (and give it time, like I can load google.com in Safari), when this method runs it says "cant resolve host google.com".. Odd!
So I looked on developer.apple.com, and saw they suggested using this:
Code:
#include <CoreFoundation/CoreFoundation.h>
#include <SystemConfiguration/SCNetworkReachability.h>
- (BOOL)wirelessHasInternet
{
SCNetworkReachabilityRef netreach;
SCNetworkConnectionFlags flags;
netreach = SCNetworkReachabilityCreateWithName (
kCFAllocatorSystemDefault, "www.google.com" )
AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
SCNetworkReachabilityGetFlags ( netreach, &flags )
AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
BOOL reachable = (kSCNetworkFlagsReachable & flags);
if (reachable) return YES; else return NO;
}
However.. This didn't work. I use Airport and connect to a network
that I can access the internet on, and it says it can't access the
internet. And if I try it on a network that I can't access the
internet on, it still says it can't access it.
So, then I toyed around and looked through more docs and came up with this:
Code:
if ([[preferencesDictionary valueForKey:@"CHECK_FOR_INTERNET"] isEqualToString:@"YES"])
{
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:3.0];
NSURLConnection *theConnection=[[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
if (theConnection) {}
}
And implement its' delegate methods:
- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
[self setInternetAccess:[[NSBundle mainBundle] pathForImageResource:@"internet_ok.png"]];
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
[self setInternetAccess:[[NSBundle mainBundle] pathForImageResource:@"internet_bad.png"]];
}
That's what I use now. For me, it works. When testing, I had to make sure to disable my ethernet connection, and only enable my wireless. The if (connection) {} line is a placeholder.
The problems with what I'm using now is:
1. If there is internet, it shows it's connected. But if you connect to one of those pay WiFi hot-spots, like in airports or hotels, it still shows you are connected, because the hotspot routes all requests to the same place. However, dave (gnat) told me how to fix that, by comparing Googles, (or Apple.com's) header of the request to what it should be (hopefully it doesnt change), and then that would let me know better if there is actual "internet" access. Perhaps the light could be orange if it was a pay internet site. But.. I haven't done this yet
2. Someone said it may pop-up a dialup-internet setting if you have one, as it tries to access the net.. My response is "who the hell would be using a dialup internet connection on their Mini?"
Besides that,, it works flawlessly! And, I like this method because of how the delegate methods handle the actual interpretation of the result. And I have the first two lines just in a timer that fires every 5 seconds or so. (that may be a bit too frequent..)
__________________
-
Last edited by aychamo; 09-16-2006 at 09:27 AM.
|
|
|
09-16-2006, 09:28 AM
|
#547
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Quote: Originally Posted by LightningMac 
the version out has the indicator light, but doesn't have the colored signal detection bar in the wardrive section....
woof woof!  (happy birthday in dog talk)
I took your advice on the colored bars  Also, the "dark" bars look better now. I had meant to fix that before I released.. Now it looks pretty cool man.
__________________
-
|
|
|
09-16-2006, 09:38 AM
|
#548
|
|
QCar Creator
Join Date: Jul 2005
Location: Netherlands
Posts: 577
|
Quote: Originally Posted by aychamo 
2. Someone said it may pop-up a dialup-internet setting if you have one, as it tries to access the net.. My response is "who the hell would be using a dialup internet connection on their Mini?"
Almost everyone who is using some kind of mobile connection (GPRS, Edge, UMTS...). Most of them are PPP-based.
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
09-16-2006, 10:31 AM
|
#549
|
|
Admin. Don't bug or I'll byte.
Join Date: Sep 2004
Location: Corning, NY
Posts: 6,141
|
Quote: Originally Posted by aychamo 
Well, I did a little investigation with GoogleEarth. It doesn't support the ability to allow external programs to control it's window position. It allows commands to tell it where to go (like I can have AMP zoom in on a lat/lon @ a distance), but I can't change the window size.. I may be able to just have a window stick on top of it at all times, but that would hide the bottom part of GE's window..
Also.. Don't you ahve to have an internet connection for GE to be able to zoom in and get the zoomed in graphics?
I vote for using Google Earth because it's free. If you can get internet access, you can use it for route planning. In the next few years, that will be trivial. Otherwise, you can plan a route and save it. The caching is a pain, but again, it's FREE.
You don't need to code anything in AMP at all for this solution to work. Just tell users to install GPSd, the daemon that serves GPS info to multiple programs (this is important because if you use GPSd, AMP can query the GPSd server and get stuff like speed, location, altitude, without interfering with the nav on GE).
Then, people can use GPS2GE as their source for running the GE map -OR- you can build that functionality into AMP so it's integrated. Basically, use AMP to control GE.
To display it in AMP, I'd come up with a special NAV window that is either just a partial window and allows GE to show through underneath, or go with an AMP window that is basically transparent.
That would solve two problems easily for you. 1) It makes AMP work with Google Earth and you have a FREE nav solution. 2) You don't have to futz around with making AMP detect all kinds of different GPS'. Oh, and 3) It gets GPS data right into AMP so you can do some stuff like GPSrouteX does.
Here's a screenshot of the GPSrouteX running over GE. You can see that it's got great info BUT it needs to be displayed so you can read it and stuff!
|
|
|
09-16-2006, 10:37 AM
|
#550
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Quote: Originally Posted by Jirka Jirout 
Almost everyone who is using some kind of mobile connection (GPRS, Edge, UMTS...). Most of them are PPP-based.
Hmm. But in that case it shouldn't be a problem because it's already connected, right? If they don't want to connect, they can just turn off the internet checking option.
__________________
-
|
|
|
09-16-2006, 11:46 AM
|
#551
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 263
|
Quote: Originally Posted by aychamo 
I took your advice on the colored bars  Also, the "dark" bars look better now. I had meant to fix that before I released.. Now it looks pretty cool man.
thanks, glad some of my suggestions are of help!
|
|
|
09-16-2006, 11:48 AM
|
#552
|
|
Variable Bitrate
Join Date: Feb 2006
Posts: 263
|
I agree with Bugbyte (maybe because he agreed with me) but I think Google Earth is so widely used, it will only get better with time! Bugbyte can't you help him integrate GE into AMP?
thanks Guys!
|
|
|
09-16-2006, 12:37 PM
|
#553
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
Quote: Originally Posted by LightningMac 
I agree with Bugbyte (maybe because he agreed with me) but I think Google Earth is so widely used, it will only get better with time! Bugbyte can't you help him integrate GE into AMP?
thanks Guys!
I've been playing around a bit with GE. It behaves like a good little program and it remembers where it was last positioned on the screen and the dimensions you gave it. So for it to be "integrated", the first time it runs you'll have to move it exactly where you want it and size it appropriately.
Also, GE supports an AppleScript command "SetViewInfo" to tell it exaclty where you want it to navigate to using the "view info" structure:
latitude (real) : lat
longitude (real) : long
distance (real) : distance
tilt (real) : tilt
azimuth (real) : azimuth
The point of that, meaning, that perhaps if we have the source code to gpsd (its open source, right?), it may be possible to use that to send a direct AppleScript command to GE to have it set the position automatically, which would eliminate the need to have GPS2GE running. But then again the GPS2GE works fine, so it's not really a problem. I know Jirka can program circles around me, so maybe I can get him to help me with that.
I like what Jirka was doing with using Google Maps in a WebView, but it's a shame that we can't cache the maps from that. That makes me lend toward GE, due to caching 2 gigs of images/info. Jirka's way would look a WHOLE lot better, but without permanent internet access, it just isn't practical right now.
As I see it now, AMP could launch GE, and you could see all your stuff in GE, and I can have one of my little transparent windows on the bottom part of the screen with a button to return back to AMP, etc. And the first time you run GE you'd have to make the window the right size so that it doesn't get covered, etc. And it's nice that GE has that "sidebar" button to hide and show the side bar with all your "Saved Points" or whatever.
I *possibly* could do something like GPSRouteX (or whatever it's name is) and keep track of a route in the background, and have AMP pop-up little boxes when a turn is getting near, etc. Or at least have it popup boxes showing your current GPS speed, location, etc. But we need to accomplish the first part first.
Are there any "pay" solutions that are better than this? I hear about Route66, etc. Do they suck or are they ok?
I emailed the guys at RouteBuddy, but they never replied. They have a lot of work to do before it's a solution too. At least all of their maps are downloadable though. To me, all they would need to do to be "in car capable" is have some sort of OSK for entering all the text. They are more than capable programmers, so it shouldn't be a problem. I guess it just doesn't make sense to me how people develop GPS apps, because the only point of a real-time tracking GPS software is to have it in the car with you as you are driving, and there's really only two ways to do that, with a laptop or with a touchscreen. I know touchscreen is the minority, but it's still the #2 option (and enabling this option with an OSK is extraordinarily simple)
Well, it seems like we are getting somewhat close to a solution.
__________________
-
Last edited by aychamo; 09-16-2006 at 12:41 PM.
|
|
|
09-16-2006, 01:32 PM
|
#554
|
|
Newbie
Join Date: Jul 2006
Posts: 31
|
I purchased RouteBuddy and added it as a plugin in AMP. I think AMP should concentrate on just being a Front End application so it doesn't get bogged down with GPS programming and the like. Keep AMP simple and it will be the best front end.
RouteBuddy doesn't have the features yet but it's looking promising as a viable option for GPS in the future.
Keep up the good work!
|
|
|
09-16-2006, 02:50 PM
|
#555
|
|
AMP Creator
Join Date: Jun 2006
Posts: 454
|
!! Tell us about how RouteBuddy works out for you as an in-car solution!! How do you like it??
__________________
-
|
|
|
|
Sponsored links
|
|
Advertisement
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:14 AM.
| |