none
Powershell Script to Get Coordinates from a USB GPS Device RRS feed

  • Question

  • 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?

    Wednesday, February 18, 2015 6:37 PM

Answers

  • 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
    Friday, February 20, 2015 4:33 PM

All replies

  • 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.


    ¯\_(ツ)_/¯

    Wednesday, February 18, 2015 6:58 PM
  • 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
    Wednesday, February 18, 2015 7:08 PM
  • 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.


    ¯\_(ツ)_/¯

    Wednesday, February 18, 2015 7:10 PM
  • With just a little searching we find this: http://www.verboon.info/2013/10/powershell-script-get-computergeolocation/

    ¯\_(ツ)_/¯

    Wednesday, February 18, 2015 7:15 PM
  • With just a little searching we find this: http://www.verboon.info/2013/10/powershell-script-get-computergeolocation/

    ¯\_(ツ)_/¯

    Script Uses "new-object -ComObject LocationDisp.DispLatLongReport" which is what I am having trouble with.

    Wednesday, February 18, 2015 7:31 PM
  • Read the whole script. It also uses Google API which si always available.

    ¯\_(ツ)_/¯

    Wednesday, February 18, 2015 7:43 PM
  • 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
    Friday, February 20, 2015 4:33 PM