-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ephemerides Path #6
Comments
Hi Craig, |
Looking at your example again, I may have misunderstood your question. If possible, could you please share a minimal example with the error and repro steps? |
And platform as well. I presently do not have any Apple platform to test/debug |
Hi, The euro is that the file cannot be found in the path. How to se the path, and include the file is not part of the example. That is the challenge. I'm on Mac/iOS. I can try editing the puligin code. Thanks Craig ///Users/. ******. /Library/Application Support/sweph/2.10.03/' |
How are you accessing the position of Chiron? |
Do you want to package seas_18.se1 with your app as an asset? |
I think this is a bug. I have to update the init |
I have included the additional seas_18.se1 file in the _initFiles (see below); I noticed the files have to be copied across, with each initialisation. Ideally this could be established from the start (so no need to copy files over). Or done once only. Possibly the files could be included in the app directory (from the main app or plugin), so there I not need to se the path. So either:
Also init is setting the path, so not sure where sweph.swe_set_ephe_path(""xxx) I to be used. Is initFiles meant to be called only once? And then Just some suggestions. Craig
|
Also, once the files have been copied across (as above, the first init), I find there is no need to set the path. So no await prefix required. |
First of all, really appreciate your looking into this. |
Thanks - Happy to help. You'e done all the hard work with the FFI interface. Setting the path does not appear to be necessary. The C-code will look in this directory (/sweph/${swe_version()}') anyway it seems, without the init or setPath. Possibly the path is set elsewhere. The key dependency is for the files to have been copied across. C |
seas_18.se1 is the main extra and is required for Chiron and the four main asteroids plus others. Along with seas_18.se1, I also use se00010s.se1, s136108s.se1, se07066s.se1, se20000s.se1, s225088s.se1, s136472s.se1, se50000s.se1, se28978s.se1, se90482s.se1, se00005s.se1, se00433s.se1, se90377s.se1, s136199s.se1, seplm18.se1, sepl_18.se1, semom18.se1, semo_18.se1, seasm18.se1 Being able to reference and include via the main app yaml/assets directive would be ideal. I don't know if this is easily achieved however, as there may be restrictions as to what directories the c-code is allowed to access. See https://pub.dev/packages/path_provider The temporary, Application Support and Documents directories might be accessible. I presume you've hit this issue, and that is why you copy the files on init..... |
I think I have fixed the issue. The init sequence is different from before so will need some code change. |
I had to do breaking changes to the init. Should have realized that Sweph init is very rigid. |
This is a breaking change for me. |
I am not following. Could you give an idea of how you instantiate Sweph and
use it?
I am very curious to know if the example works on the Apple platform.
…On Sun, Dec 11, 2022 at 2:01 PM craigjarman ***@***.***> wrote:
OK - I will take a close look.
It seems that I can still call final sweph = Sweph() to get a standard
instance.
But call the future in order copy across the files ahead of the first time
it is used (for example on application load).
I've a timer that shows the planetary position every 1sec, so will need to
call the sync instance.
—
Reply to this email directly, view it on GitHub
<#6 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACX74PDTU5GEUP7QS32VVVDWMZFJ7ANCNFSM6AAAAAASY22C5Y>
.
You are receiving this because you commented.Message ID: <vm75/sweph.
***@***.***>
|
Hi, Here is an example of how I call the SwissHelper. No await call required... This approach does require that the initFiles() to have been run once previously by the app, just to copy the files over. Maybe this functionality could be moved to a setup() function. C
|
ok, thanks. |
OK - I will test for iOS and let you know. |
Hi Just tested now. The
fails with the following error. Exception has occurred. |
Hi,
I looking for some guidance re where to place the Swiss ephemerides files so as to prevent the following error.
Exception: SwissEph file 'seas_18.se1' not found in PATH '.:/users/ephe2/:/users/ephe/')
I have tried to adding the file to an 'assets' directory and setting the path:
sweph.swe_set_ephe_path("/assets");
Thanks
The text was updated successfully, but these errors were encountered: