Powershell Script to Get Coordinates from a USB GPS Device

Hey, Scripting Guy!

I am trying to write a Powershell script that pings every T seconds.  If the ping fails, it sends time, date and GPS coordinates to a log file.  The time and date is easy peasy...  I have having trouble gathering the GPS coordinates from a USB GPS device.

I have tried this - 

$location=new-object -ComObject LocationDisp.DispLatLongReport
$location.Status

I receive '0' meaning 'Report not supported.'

The USB GPS device is using COM7.  I have another monitor that is verifying that I do have a good satellite connection.

Any Help?

February 18th, 2015 1:44pm

Can you post all of your script or are you asking for someone to write one for you?

To access a com device you will have to use the net port classes.  Look in repository or search for examples.  You can also post on vendors forum to get what other users of your devide have done.

Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 2:05pm

Here is a starter: http://blogs.msdn.com/b/powershell/archive/2006/08/31/writing-and-reading-info-from-serial-ports.aspx

February 18th, 2015 2:06pm

Not asking someone to write it for me...  Haven't written all the other stuff yet.  Doesn't make sense to me to write the entire script when it is solely dependent on gathering GPS coords.

Basically am wondering if anyone has had success with grabbing data from a USB GPS device, and if so, how they went about doing it.

Your link looks promising.  I will give it a try and post my results!

Thanks!


  • Edited by Telby 16 hours 20 minutes ago
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 2:15pm

Not asking someone to write it for me...  Haven't written all the other stuff yet.  Doesn't make sense to me to write the entire script when it is solely dependent on gathering GPS coords.

Basically am wondering if anyone has had success with grabbing data from a USB GPS device, and if so, how they went about doing it.

Thanks!

It is generally more successful to place product specific questions in a product forum.  This forum is about how to use scripts and not how to use devices.

February 18th, 2015 2:18pm

With just a little searching we find this: http://www.verboon.info/2013/10/powershell-script-get-computergeolocation/
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 2:23pm

Read the whole script. It also uses Google API which si always available.
Free Windows Admin Tool Kit Click here and download it now
February 18th, 2015 2:51pm

Not asking someone to write it for me...  Haven't written all the other stuff yet.  Doesn't make sense to me to write the entire script when it is solely dependent on gathering GPS coords.

Basically am wondering if anyone has had success with grabbing data from a USB GPS device, and if so, how they went about doing it.

Your link looks promising.  I will give it a try and post my results!

Thanks!


  • Edited by Telby Wednesday, February 18, 2015 7:09 PM
February 18th, 2015 10:08pm

Found a way to grab NMEA data from a COM port and how to format it so that it is useful!

http://mspowershell.blogspot.com/2008/07/nmea-gps-22-lines-of-powershell.html 

  • Marked as answer by Telby Friday, February 20, 2015 4:33 PM
Free Windows Admin Tool Kit Click here and download it now
February 20th, 2015 7:33pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics