Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 30-04-2014, 03:23   #1
Registered User

Join Date: May 2013
Posts: 6
Obtaining latitude and longitude as a double value

hi
I want to obtain ships latitude and longitude as a double value like(6.143275) to store separately. I tried sending gpsg_lat to toSMDD() from AIS_Decoder:ecode( const wxString& str ) but it did not provide the solution I need (I want to get each ais messages Lat and Lon )dose OpenCPN provide solution to that
please help
__________________

__________________
hvalola is offline   Reply With Quote
Old 30-04-2014, 03:46   #2
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,751
Re: Obtaining latitude and longitude as a double value

If you don't the data in real time you might use the VDR plug-in and then process the AIS data.
In the other case this would have to be some plug-in type of software.
In any of this cases, working with the AIS data you will have to look for the dynamic and the static data sets.

Can you tell us more about your idea/application?

bcn
__________________

__________________
bcn is offline   Reply With Quote
Old 30-04-2014, 05:48   #3
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,802
Re: Obtaining latitude and longitude as a double value

Are you writing a plugin?

If so I think WANTS_NMEA_EVENTS is what you want.

Then you will get SetPositionFix and SetPositionFixEx virtual functions called which both contain lat and lon as double.
__________________
boat_alexandra is offline   Reply With Quote
Old 30-04-2014, 08:34   #4
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Obtaining latitude and longitude as a double value

hvalola...
To be honest, it is not very clear what you are trying to do, may we have a look at your code?

Pavel
__________________
nohal is online now   Reply With Quote
Old 30-04-2014, 20:40   #5
Registered User

Join Date: May 2013
Posts: 6
Re: Obtaining latitude and longitude as a double value

Hi
my intention is to identify whether radar track target is a ship or not.
my method is to get radar data lat and lon and compare with ais data lat and lon to id it and plot it in a diffrent color on the opencpn window.
I store radar data on a mysql database and I need the lat and lon to compare with it
__________________
hvalola is offline   Reply With Quote
Old 30-04-2014, 20:49   #6
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: Masachusetts
Boat: bristol 27
Posts: 2,802
Re: Obtaining latitude and longitude as a double value

Why would you want to try to align ais to radar data?

The only reason I can think of would be to calibrate the radar to make it more accurate, or to train some sort of artificial intelligence to learn what ships look like so if ais is not working you will recognize it as a ship using radar alone. Is this the idea? If so please explain your method.
__________________
boat_alexandra is offline   Reply With Quote
Old 01-05-2014, 04:56   #7
Registered User

Join Date: May 2011
Posts: 847
Re: Obtaining latitude and longitude as a double value

Quote:
Originally Posted by boat_alexandra View Post
Why would you want to try to align ais to radar data?

The only reason I can think of would be to calibrate the radar to make it more accurate, or to train some sort of artificial intelligence to learn what ships look like so if ais is not working you will recognize it as a ship using radar alone. Is this the idea? If so please explain your method.
Errrr boat - the OP said he wanted to check whether a radar target was a ship or not, he didn't say anything about aligning; or did I miss that.

Seems like a useful thing to me, could be non-ais enabled ships/boats a container, an ice-berg (although they have a nasty habit of being radar stealthy!) or something else worth keeping a very close eye. An app like that could be very useful in busy shipping helping you filter what to watch on AIS and what you have to start a radar plot for.
__________________
Littlechay is offline   Reply With Quote
Old 01-05-2014, 06:56   #8
Registered User

Join Date: Jun 2010
Location: St. Petersburg, Florida
Boat: Gemini 3200
Posts: 702
Re: Obtaining latitude and longitude as a double value

Quote:
Originally Posted by Littlechay View Post
Errrr boat - the OP said he wanted to check whether a radar target was a ship or not, he didn't say anything about aligning; or did I miss that.

Seems like a useful thing to me, could be non-ais enabled ships/boats a container, an ice-berg (although they have a nasty habit of being radar stealthy!) or something else worth keeping a very close eye. An app like that could be very useful in busy shipping helping you filter what to watch on AIS and what you have to start a radar plot for.
I didn't know icebergs had AIS transponders.

Doesn't AIS already tell you if the object is a ship?

Fabbian
__________________
fgd3 is offline   Reply With Quote
Old 01-05-2014, 07:05   #9
Registered User

Join Date: May 2011
Posts: 847
Re: Obtaining latitude and longitude as a double value

Quote:
Originally Posted by fgd3 View Post
I didn't know icebergs had AIS transponders.

Doesn't AIS already tell you if the object is a ship?

Fabbian
Presumably Fabbian you are a troll... but here goes

Radar doesn't tell you if the object is a ship, the OP wants to check which targets are ships as confirmed by AIS

As for you iceberg comment..... they, usually (although some have), don't have transponders do this app would help ID a potential target as a berg
__________________
Littlechay is offline   Reply With Quote
Old 01-05-2014, 10:40   #10
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Obtaining latitude and longitude as a double value

hvalola...
The explanation that you want to implement (M)ARPA is nice, butw e still want to see your code. As latitudes and longitudes are represented as doubles everywhere but while displayed, I'm really curious what your problem could be.

Pavel
__________________
nohal is online now   Reply With Quote
Old 01-05-2014, 22:54   #11
Registered User

Join Date: May 2013
Posts: 6
Re: Obtaining latitude and longitude as a double value

hi
Since small fishing boats do not have AIS radar is used to track them
but some times radar tracks AIS ships to remove that fuse AIS data with radar data to identify them Fuse data plot in different color radar target in different color and AIS target as usual.

It needs to be real time compare AIS data with radar data
initially I try to get difference of lat and lon then use Speed course of ships to fuse the data.to fuse data real time i tried to get gpsg_lat and gpsg_lon
but it has 1.6318147791597e-311 ,-1.9600458270010524e277 like values
I get vales using aisevent function how to get proper lat lon vales
__________________
hvalola is offline   Reply With Quote
Old 02-05-2014, 01:56   #12
bcn
Registered User

Join Date: May 2011
Location: underway whenever possible
Boat: Rangeboat 39
Posts: 2,751
Re: Obtaining latitude and longitude as a double value

Hvalola,

you are aware of the timing/refresh of AIS signals, aren't you?Ais Reporting Intervals

Slow targets, as Class A units < 3kn (*) or Class B units < 2kn, will update position only in 3min intervals.
(*) see document above
Static data is updated every 6min.

Transponder are alternating between the two AIS frequencies, so in case using a receiver that is listening only on one single channel you will have to double all these times.

Hubert
__________________
bcn is offline   Reply With Quote
Old 02-05-2014, 06:53   #13
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,016
Re: Obtaining latitude and longitude as a double value

hvalola...
Let aside the probable limited usability of your approach Hubert pointed out. Both the numbers you posted are doubles, one very small, one very big and both represented in exponential notation to save those 300 zeroes each would contain.
My thought is that they are not actually initialized and containing any value at the moment you look at them, but it is of course impossible to confirm without looking at your code.
But just from you saying you use gpsg_lat/lon inside of AIS_Decoder I can say you probably could have chosen more wisely...

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boat Insurance: Agreed Value vs Actual Cash Value Policies Robertson Dollars & Cents 19 04-02-2013 15:13
Help on obtaining meds from Florida to Trinidad and in between please Kaja Health, Safety & Related Gear 13 11-01-2013 16:02
High Latitude vs Low Latitude Sailing maxingout General Sailing Forum 10 03-07-2009 06:08
Determining Longitude outdoor Navigation 23 22-06-2009 20:23



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 19:54.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.