LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get geographical location without GPS sensor??? Using internet ip address approximation??

Solved!
Go to solution

Hi 

I am doing a project with sensor nodes and using the Cloud to help with the node energy management. Basically labview should be connected with the node and from time to time receive data. The data is stored in the cloud. Up to this step, everything is fine.

The cloud should also receive the GPS location, thus if in the cloud there are recent data related to that gps location, labview would check that and would not request data to the sensor node (help saving energy).

My problem is that I do not have a GPS sensor, however I know that in the internet, websites such as google maps, can approximate your location (i believe with a ip triangulation technique). So, the only thing that i wish is to acquire this information in real time with labview. How can I do that?

0 Kudos
Message 1 of 12
(4,677 Views)

You use e.g. https://www.iplocation.net/ (or rather one of the services they list) to check for an address.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 12
(4,665 Views)

@Yamaeda wrote:

You use e.g. https://www.iplocation.net/ (or rather one of the services they list) to check for an address.

/Y


You should always double check these services. Often they just do a "Who is" and only report the location of the person or company who registered the domain by reading the registrar address from the who is database. 

 

In the case of a nationwide ISP the registrar address could easily be in another town or state.

 

For instance I have Comcast and iplocation says I am in a town 20 miles away where Comcast's headend is located, but at least it did not say I was in Philadelphia where Comcast headquarters is located.

========================
=== Engineer Ambiguously ===
========================
Message 3 of 12
(4,630 Views)

There are of course issues with using an IP address to geo location look up.  In practice it probably works fine in most cases.  But then there are the cases where every IP address in an entire country is shared.  Most aren't this extreme but according to Wikipedia the country of Chad has about 4,000 IP addresses but has a population around 10 million.

 

Or there are the cases where an IP address can't be looked up and in those cases some services will just pick this random house in Kansas which has over 600 million IP addresses associated with its geo location.

 

Just keep these things in mind when you get results from these address look up sites.

0 Kudos
Message 4 of 12
(4,610 Views)

@Hooovahh wrote:

There are of course issues with using an IP address to geo location look up.  In practice it probably works fine in most cases.  But then there are the cases where every IP address in an entire country is shared.  Most aren't this extreme but according to Wikipedia the country of Chad has about 4,000 IP addresses but has a population around 10 million.

 

Or there are the cases where an IP address can't be looked up and in those cases some services will just pick this random house in Kansas which has over 600 million IP addresses associated with its geo location.

 

Just keep these things in mind when you get results from these address look up sites.


Actually considering serial breakout GPS modules can be had for an little $20, it seems silly to not just add one if you really need to know your devices location.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 5 of 12
(4,605 Views)

You don't say if the equipment is fixed or mobile. if the equipment is at a fixed location, you can overcome the problems of the unreliabi!ity of ip geolocation and of indoor gps reception by storing the location as part of the configuration details.

 

Ip geolocation can be very inaccurate. I just did a geolocation of my ip address. None of the results was close. I was recently using the guest wifi facility at a UK office of large American company. I had problems using one particular website, as geolocation put me in the USA. I presume that either the IP address was recorded as being at corporate HQ, or that the office was on a VPN to the USA.

 

Rod.

0 Kudos
Message 6 of 12
(4,578 Views)

Hey,

Thanks for the replies

I actually do not have time to order a gps sensor. I do not need a precise location, since it is just for tests. In the future, if the application works fine, i can get a sensor. However, what I really want to know is:

 

-in Labview, how can get the geolocation based on IP triangulation? Like, Do i have to import it from a website? if so, how can I do this?

 

thanks again

0 Kudos
Message 7 of 12
(4,537 Views)

@carnage90 wrote:

Hey,

Thanks for the replies

I actually do not have time to order a gps sensor. I do not need a precise location, since it is just for tests. In the future, if the application works fine, i can get a sensor. However, what I really want to know is:

 

-in Labview, how can get the geolocation based on IP triangulation? Like, Do i have to import it from a website? if so, how can I do this?

 

thanks again


Probably the easiest way would be to install Microsoft's Whois client and have LabVIEW do a Whois https://technet.microsoft.com/en-us/sysinternals/whois.aspx

 

First using the systemexec do an ipconfig and parse your domain out of the responce.

Then again using the systemexec do a whois on the domain and parse the location out. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 12
(4,515 Views)
Solution
Accepted by carnage90

Of course, you could always try using google's location services API: https://developers.google.com/maps/documentation/geolocation/intro#wifi_access_point_object


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 9 of 12
(4,507 Views)

That seems to be a good idea
Would you have a link that I can use to learn how to use the API in labview?

0 Kudos
Message 10 of 12
(4,489 Views)