USGlobalSat GPS Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: API/Method to get location data from GPS device (USG-MR350) within cocoa app.  (Read 2198 times)

sunil

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4

I am using USB GlobalSat(USG-MR350) GPS device. I want to get location data (latitude and longitude) from the device within my mac cocoa application. Can I use an API to communicate to the device if yes, please help me find it! OR if there is a cocoa method I can use to detect the device and get the data... any help would be highly appreciated!
Logged

GS_TECH01

  • Administrator
  • Hero Member
  • *****
  • Karma: 5
  • Offline Offline
  • Posts: 1755

Is your device a BU-353 (http://www.usglobalsat.com/p-62-bu-353-w.aspx) or an MR-350P (http://www.usglobalsat.com/p-58-mr-350p-bulkhead.aspx)?

Basically, our GPS receivers output the standard NMEA protocol, that is sent to the computer via a COM port/Serial Port. Below is a sample of the NMEA library I found, perhaps this will help: http://sourceforge.net/projects/nmea/

Also, here is the NMEA Protocol document: http://www.usglobalsat.com/store/downloads/NMEA_commands.pdf

Let me know if you have any further questions. Thanks.
Logged

sunil

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4

Details of the GPS device:
The device is GlobalSat USG-MR350.
The productID is 8963 and VendorID is 1659.

Please help me about how to read the NMEA data from the GPS Device using cocoa application.
« Last Edit: February 23, 2012, 11:59:00 am by USG_TECH10 »
Logged

sunil

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 4

Tried to run the AppleUSBCDCDriver sample code.It is detecting the usb device and giving some output in nonreadable format.How can the data be converted to a readable format. This is a part of the code.

 (void)serialPortReadData:(NSDictionary *)dataDictionary
{
    // this method is called if data arrives
    // @"data" is the actual data, @"serialPort" is the sending port
    AMSerialPort *sendPort = [dataDictionary objectForKey:@"serialPort"];
    NSData *data = [dataDictionary objectForKey:@"data"];
    if ([data length] > 0) {
        NSString *text = [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding];
        [outputTextView insertText:text];
        [text release];
        // continue listening
        [sendPort readDataInBackground];
    } else { // port closed
        [outputTextView insertText:@"port closed\r"];
    }
    [outputTextView setNeedsDisplay:YES];
    [outputTextView displayIfNeeded];
}
Logged

GS_TECH01

  • Administrator
  • Hero Member
  • *****
  • Karma: 5
  • Offline Offline
  • Posts: 1755

I apologize for the late response. After checking with our engineers, they stated the following instructions can possibly assist you. Please refer below:
1.  First, make sure the driver is properly installed.
2.  Download the serial tools to make sure the driver is working properly and the MR-350 functions normally: http://www.w7ay.net/site/Applications/Serial%20Tools/index.html
3.  Then, use the xcode to read the GPS. You can refer to this site: http://www.w7ay.net/site/Applications/Serial%20Tools/Contents/download.html

Other than this suggestion, we cannot provide further support. Thank you for understanding. 
Logged
Pages: [1]   Go Up
 

Page created in 0.22 seconds with 19 queries.