onekiloparsec / SwiftAA

The most comprehensive collection of accurate astronomical algorithms in (C++, Objective-C and) Swift.
http://www.onekiloparsec.dev/
MIT License
171 stars 31 forks source link

shiftedCoordinates & ProperMotion #119

Open Saturnyn opened 1 year ago

Saturnyn commented 1 year ago

Hi, I'm trying to use: coordinates.shiftedCoordinates(to: .J2000, with: properMotion)

But this will not compile : 'ProperMotion' initializer is inaccessible due to 'internal' protection level

I can not find another way to instantiate ProperMotion in the lib, isn't it just missing a public constructor ?

Thanks

onekiloparsec commented 1 year ago

Hi. PropertMotion is a public struct. But I just discovered that Swift still doesn't synthetize public initializer (see e.g. here.)

I will have to go over all public struct without init, and add initializers.

onekiloparsec commented 1 year ago

Ok, ProperMotion and SaturnicentricCoordinates were the only two missing initializers. Will be part of next release (trying right now to close the most recent pending issues).

Saturnyn commented 1 year ago

Great, thank you !