Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 19-02-2017, 13:36   #376
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Celestial Navigation Plugin Redux

Yes, indeed Viking Sailor, the Celestial_Navigation_pi reliably bombs Opencpn when the second siting is entered! - Windows 10.

I can confirm this now.
The plugin compiled with the warnings listed and installed into O v4.5.214.
rgleason is offline   Reply With Quote
Old 20-02-2017, 18:31   #377
Registered User

Join Date: Feb 2015
Location: Cambridge, UK
Posts: 16
Send a message via Skype™ to povl
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by rgleason View Post
Sean, Pavel & NAV any ideas why there is this discrepancy?
I think I have identified two sources of error: proper motion (small error) and precession (really big error - accounts for almost all of the problems!). At the moment the plugin isn't applying either correction to stars. I have a dummy program on my computer, using the functions from the plugin (basically a modified version of Sight.cpp), which appears to give star positions within 0.5' of the USNO website for all stars - and usually within 0.2'. So it's considerably more accurate than the existing code, though I think there still might be a small mistake somewhere. I haven't yet tried to put the modifications back into the plugin. And the code I have used for the precession calculation comes from XEphem, and is under a very restrictive license - so it can't be used in its current form. But at least it is a start. Below is my test output for the case in post 368:

Code:
Before proper motion: ra=1.38181, dec = 0.802837
Before precession: ra=1.38182, dec = 0.802801
After precession: ra=1.38734, dec = 0.803109
At 2017/02/13 21:34:07
Greenwich Sidereal Time: 1.8786 rad, 107.636 deg, 7.17572 hours, 07:10:32
deltaPsi (nutation in longitude): -3.05431e-05 rad, -0.00174999deg
eps (apparent obliquity): 0.409015 rad, 23.4348deg
EOE (deltaPsi * cos(eps))): -2.80237e-05 rad, -0.00160564deg
GAST (Greenwich Siderial Time + EOE): 1.87857 rad, 107.634deg, 7.17561 hours
RA: 1.38734 rad, 79.4888deg
Lon (RA-GAST): -0.491229 rad, -28.1453deg
Almanac Data For Capella
Geographical Position (lat, lon) = 46.0148 -28.1453
GHAAST = 107 38.0'
SHA = 280 30.7'
GHA = 28 8.7'
Dec = N 46 0.9'
povl is offline   Reply With Quote
Old 22-02-2017, 08:16   #378
Registered User

Join Date: Feb 2017
Posts: 6
Re: Celestial Navigation Plugin Redux

Sorry, if I don't understand..

This crashing windows 10 crashing problem...
Is the rebuild the fix? What do I do with it? I don't know anything about computers

Thanks Deep
DeepBoel is offline   Reply With Quote
Old 22-02-2017, 13:29   #379
Registered User

Join Date: Feb 2017
Location: UK
Boat: Albin Vega 27
Posts: 12
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by DeepBoel View Post
Sorry, if I don't understand..

This crashing windows 10 crashing problem...
Is the rebuild the fix? What do I do with it? I don't know anything about computers

Thanks Deep
Hi Deep

This is my take on what's happening ...

The windows 10 crash issue - there is a fix & rgleason has proved that it works but it hasn't been put up on the website yet - I think Sean has to do that.

Meanwhile there's a separate issue on star sight accuracy that povl has kindly been progressing ...

Hope that makes sense ...
slackie501 is offline   Reply With Quote
Old 23-02-2017, 18:43   #380
Registered User

Join Date: Feb 2017
Posts: 6
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by slackie501 View Post
Hi Deep

This is my take on what's happening ...

The windows 10 crash issue - there is a fix & rgleason has proved that it works but it hasn't been put up on the website yet - I think Sean has to do that.

Meanwhile there's a separate issue on star sight accuracy that povl has kindly been progressing ...

Hope that makes sense ...
Makes sense. I'm sorry I can't help in solving this problem. I just wait until the bright guys come with a solution....
DeepBoel is offline   Reply With Quote
Old 24-02-2017, 03:04   #381
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Celestial Navigation Plugin Redux

Not fixed yet. Warnings are not necessarily the answer.
See http://www.cruisersforum.com/forums/....php?p=2058536

Also Pavel's message below that.
rgleason is offline   Reply With Quote
Old 24-02-2017, 03:05   #382
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Celestial Navigation Plugin Redux

Pavel's message. http://www.cruisersforum.com/forums/...ad.php?t=98748
rgleason is offline   Reply With Quote
Old 26-02-2017, 12:34   #383
Registered User

Join Date: Feb 2015
Location: Cambridge, UK
Posts: 16
Send a message via Skype™ to povl
Re: Celestial Navigation Plugin Redux

I've been working on the star sights for the last week, and have submitted a pull request for an improved version at https://github.com/seandepagnier/cel...tion_pi/pull/9

The attached screenshot shows the sample sights from slackie501's post 368. Now the stars, sun, moon, and planet sights all line up pretty well! I don't think the new calculations are perfect, but they do seem to give fixes within 0.5 miles - quite a lot better than 23 miles. I have also re-ordered the stars in the dialog box, so they are in alphabetical order (they almost were before).

In the process of fixing this, I have discovered an unrelated bug: when you restart OpenCPN, all sights are treated as being lower limb. The XML file with sights does save the limb information, so it looks like this is a simple mistake when loading the file. But I think I have done enough coding for today!
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2017-02-26 at 19.16.13.jpg
Views:	80
Size:	354.4 KB
ID:	142030  
povl is offline   Reply With Quote
Old 26-02-2017, 14:30   #384
Registered User

Join Date: Feb 2017
Location: UK
Boat: Albin Vega 27
Posts: 12
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by povl View Post
I think I have identified two sources of error: proper motion (small error) and precession (really big error - accounts for almost all of the problems!).
I came across this article https://www.cv.nrao.edu/~rfisher/Eph...earth_rot.html - it has a couple of approximate equations for precession - they're of limited validity (to ~2020), but look reasonably easy to implement ... if I could work out how to get "time from January 1, 2000 in fractional years" ...
slackie501 is offline   Reply With Quote
Old 26-02-2017, 22:45   #385
Registered User

Join Date: Feb 2017
Location: UK
Boat: Albin Vega 27
Posts: 12
Re: Celestial Navigation Plugin Redux

Povl - I obviously missed your #383 when I posted my last - your fix looks great & I much appreciate the work you've put into it. I'm looking forward to trying your code when it's available. Thanks.
slackie501 is offline   Reply With Quote
Old 27-02-2017, 06:21   #386
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Celestial Navigation Plugin Redux

Povl's fix has been compiled in Debug Configuration under Windows 10 and compiles and it works! He has also fixed the problem with crash on second entry of sight. There were NO complaints during debug run, no asserts or anything.

This is great news. Thank you Povl! I will be posting an NSIS install executable to OpenCPN Beta File Thingie shortly. I hope you celestial gurus will test this for accuracy now and beat on it a little!

I have just one other big request which I will post on Sean's github repos.

Can we get a function to export all sightings and calcs to csv? Also the reverse, to import. This would be very helpful for operations and testing!

PS: To convert altitude from Decimal to DMS I used this converter
http://www.satsig.net/degrees-minute...calculator.htm


Attached is a pic of the debug test.
Attached Thumbnails
Click image for larger version

Name:	Cel-nav-debug-test.png
Views:	78
Size:	71.9 KB
ID:	142069  
rgleason is offline   Reply With Quote
Old 27-02-2017, 08:00   #387
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,766
Images: 2
Re: Celestial Navigation Plugin Redux

Povl's version compiles as a standalone plugin and NSIS install works and completes, but when installed into Opencpn v4.2, v4.4, v4.5.221 and when I press on the Cel-Nav buttton Opencpn crashes!

I have tried various versions of opencpn.lib (4.2, 4.4.x, 4.5.221) and none fix this problem. Perhaps someone can figure this out.

https://github.com/seandepagnier/cel...n_pi/issues/12
rgleason is offline   Reply With Quote
Old 28-02-2017, 08:35   #388
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,425
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by slackie501 View Post
Further to my last post, I found a consistent discrepancy of ~12nm in starsights on an E-W axis (not N-S). I compared this with results from another celestial nav package (Teacup), which indicated that the issue was with the OpenCPN PI.

There appears to be a difference of ~20' between SHAs reported (Capella 2017-02-13 21:34:07 - OpenCPN PI: 280 49.7'; Teacup: 280 30.55'; PyAlmanac: 280 30.6'). GHA Ares appears consistent between all packages. Could this account for the discrepancy I'm seeing?

I'm getting to the limit of my knowledge here, so if anyone has any ideas I'd be grateful to hear.
Quote:
Originally Posted by NAV View Post
Possibly a time error or an almanac error.
Quote:
Originally Posted by NAV View Post
And the figures of the US Naval Observatory are:
GHA Aries SHA Capella GHA Capella Dec Capella
107° 38.0' [280° 30.6'] 28° 08.6' 46° 00.8'
Celestial Navigation Data for Assumed Position and Time

So it seems there is an error in the almanac or the calculations of the Celestial plugin (assuming that the time mentioned for your Capella sight is UT).
Quote:
Originally Posted by povl View Post
I think I have identified two sources of error: proper motion (small error) and precession (really big error - accounts for almost all of the problems!). At the moment the plugin isn't applying either correction to stars.
Really! This is very important!
Quote:
I have a dummy program on my computer, using the functions from the plugin (basically a modified version of Sight.cpp), which appears to give star positions within 0.5' of the USNO website for all stars - and usually within 0.2'. So it's considerably more accurate than the existing code, though I think there still might be a small mistake somewhere. I haven't yet tried to put the modifications back into the plugin. And the code I have used for the precession calculation comes from XEphem, and is under a very restrictive license - so it can't be used in its current form. But at least it is a start. Below is my test output for the case in post 368:
So you called this restrictive code to apply precession calculations?
Quote:
Code:
Before proper motion: ra=1.38181, dec = 0.802837
Before precession: ra=1.38182, dec = 0.802801
After precession: ra=1.38734, dec = 0.803109
At 2017/02/13 21:34:07
Greenwich Sidereal Time: 1.8786 rad, 107.636 deg, 7.17572 hours, 07:10:32
deltaPsi (nutation in longitude): -3.05431e-05 rad, -0.00174999deg
eps (apparent obliquity): 0.409015 rad, 23.4348deg
EOE (deltaPsi * cos(eps))): -2.80237e-05 rad, -0.00160564deg
GAST (Greenwich Siderial Time + EOE): 1.87857 rad, 107.634deg, 7.17561 hours
RA: 1.38734 rad, 79.4888deg                                   
Lon (RA-GAST): -0.491229 rad, -28.1453deg
Almanac Data For Capella
Geographical Position (lat, lon) = 46.0148 -28.1453
GHAAST = 107 38.0'
SHA = 280 30.7'
GHA = 28 8.7'
Dec = N 46 0.9'

I wrote the plugin 4 years ago, so my memory has faded.


Does stellarium perform the correct calculations? Can we use their routines?
seandepagnier is offline   Reply With Quote
Old 28-02-2017, 08:59   #389
Registered User

Join Date: Feb 2015
Location: Cambridge, UK
Posts: 16
Send a message via Skype™ to povl
Re: Celestial Navigation Plugin Redux

After looking at various other open source programs (but not Stellarium), I have written some code of my own to do these calculations, and included one function from the (much less restrictively licensed) IAU Sofa library. It appears to work OK now - though there might be a separate problem with running the plugin on Windows 10.

I have tried compiling and testing on Mac OS X 10.12.3 and Ubuntu 16.04 LTS (briefly) - and it appears to work on both platforms. I'm afraid I don't have Windows 10 - so I won't be able to help out with the problems on that platform...
povl is offline   Reply With Quote
Old 28-02-2017, 09:15   #390
Registered User

Join Date: Jul 2010
Location: Hannover - Germany
Boat: Amel Sharki
Posts: 2,547
Re: Celestial Navigation Plugin Redux

Quote:
Originally Posted by povl View Post
After looking at various other open source programs (but not Stellarium), I have written some code of my own to do these calculations, and included one function from the (much less restrictively licensed) IAU Sofa library. It appears to work OK now - though there might be a separate problem with running the plugin on Windows 10.

I have tried compiling and testing on Mac OS X 10.12.3 and Ubuntu 16.04 LTS (briefly) - and it appears to work on both platforms. I'm afraid I don't have Windows 10 - so I won't be able to help out with the problems on that platform...
I'm interested to have a working Celestial Navigation Plugin. Is your code included in version at https://github.com/seandepagnier/cel...tion_pi/pull/9
or do you have an own github? I'm working with Xcode and Sierra (10.12.3).

Gerhard
CarCode is offline   Reply With Quote
Reply

Tags
celestial navigation, navigation


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
Logbook Konni for OpenCPN konni OpenCPN 1129 22-07-2024 03:15
Google Earth Plugin r.fairman OpenCPN 445 29-04-2020 10:11
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 21:33
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 04:03.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.