Skip to content

Commit

Permalink
License 2024 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
seldon1000 authored Feb 11, 2024
1 parent 9179216 commit 90ed258
Show file tree
Hide file tree
Showing 17 changed files with 107 additions and 222 deletions.
Binary file not shown.
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,22 @@

</div>

**SunKit** is a Swift package which uses math and trigonometry to compute several information about the Sun. This package has been developed by a team of learners relatively new to the Swift programming language, which means that there could be a lot of space for improvements. Every contribution is welcome.
**SunKit** is a Swift package that uses math and trigonometry to compute several pieces of information about the Sun.

SunKit was first developed as part of a bigger project: [Sunlitt](https://github.com/Sunlitt/Sunlitt-AppStore). Even though Sunlitt is not meant to be released as Open Source we decided to wrap the fundamental logic of the app and make an open source library out of it.
SunKit was first developed as part of a bigger project: [Sunlitt](https://github.com/Sunlitt/Sunlitt-AppStore). Even though Sunlitt is not meant to be open-sourced, we decided to wrap the fundamental logic of the app and build a library out of it, free for anyone to use, embrace and extend.

<img height="50" alt="sunkit" src="https://github.com/Sunlitt/SunKit/assets/55358113/a9d0b738-a4b6-49bf-bdfb-b462656cab92"> [<img src="https://user-images.githubusercontent.com/55358113/174020637-ca23803f-341c-48ce-b896-1fd4b7423310.svg" height="50">](https://apps.apple.com/app/sunlitt/id1628751457)

To compute Sunrise, Sunset, Golden Hour and so on we only need a CLLocation and the time zone of that location. **CoreLocation framework is required for SunKit to work**.
## Attribution
SunKit is licensed under the Apache License 2.0. For attribution, we request that you include an unmodified vector of SunKit's logo, available [here](Resources/sunkit.svg), along with our organization name "Sunlitt", both at legible sizes, and that they link back to our [website](https://sunlitt.app).

## Credit
For attribution, we prefer that you use an unmodified vector of our logomark available in this repository (sunkit.svg), along with our organization name, both at legible sizes, and that they link back to our website [Sunlitt.app](https://sunlitt.app).
If you are developing an app for Apple platforms, we additionally request that you include SunKit's license and copyright in the "Acknowledgments" section of your app's Settings.bundle file. We have included a Settings.bundle example [here](Resources/Settings.bundle) for you to download and import as is in your Xcode project.

Attribution is essential to make sure that our hard work is properly recognized and we thank you for complying with our requests.


## Usage
SunKit only needs a location and the relative time zone to compute every information you need about the Sun.
Everything is computed locally, no internet connection is needed.
**CoreLocation framework is required for SunKit to work**. SunKit only needs a location and the relative time zone. Everything is computed locally, no internet connection is needed.

### Creating a Sun

Expand Down Expand Up @@ -71,9 +72,9 @@ mySun.eveningGoldenHourEnd
// To know all the information you can retrieve go to the **Features** section.

```


### Working with Timezones and Dates


To properly show the Sun Date Events use the following DateFormatter.

```swift
Expand All @@ -93,9 +94,6 @@ To properly show the Sun Date Events use the following DateFormatter.

```




## Features
* Sun Azimuth
* Sun Altitude
Expand Down Expand Up @@ -131,8 +129,7 @@ To properly show the Sun Date Events use the following DateFormatter.
* Celestial Calculations: A Gentle Introduction to Computational Astronomy: [Link](https://www.amazon.it/Celestial-Calculations-Introduction-Computational-Astronomy/dp/0262536633/ref=sr_1_1?__mk_it_IT=ÅMÅŽÕÑ&crid=1U99GMGDZ2CUF&keywords=celestial+calculations&qid=1674408445&sprefix=celestial+calculation%2Caps%2C109&sr=8-1).

## MoonKit 🌙
Take a look to the other Package, this time about the [Moon](https://github.com/davideilmito/MoonKit).
Take a look at SunKit's spiritual brother, [MoonKit](https://github.com/davideilmito/MoonKit).

## Special thanks

* [Davide Biancardi](https://github.com/davideilmito): Creator of SunKit.
27 changes: 27 additions & 0 deletions Resources/Settings.bundle/Acknowledgements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>Acknowledgements</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>© Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano</string>
<key>Title</key>
<string></string>
</dict>
<dict>
<key>File</key>
<string>SunKit</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>SunKit</string>
</dict>
</array>
</dict>
</plist>
19 changes: 19 additions & 0 deletions Resources/Settings.bundle/Root.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>File</key>
<string>Acknowledgements</string>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>Acknowledgements</string>
</dict>
</array>
<key>StringsTable</key>
<string>Root</string>
</dict>
</plist>
29 changes: 29 additions & 0 deletions Resources/Settings.bundle/SunKit.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>StringsTable</key>
<string>SunKit</string>
<key>PreferenceSpecifiers</key>
<array>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>FooterText</key>
<string>Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.</string>
</dict>
</array>
</dict>
</plist>
File renamed without changes
3 changes: 2 additions & 1 deletion Sources/SunKit/Angle.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
//
// Angle.swift
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/DMS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// DMS.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/EclipticCoordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// EclipticCoordinates.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/EquatorialCoordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// EquatorialCoordinates.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Extensions.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/HMS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HMS.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/HorizonCoordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// HoorizonCoordinates.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/Sun.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Sun.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/SunElevationEvents.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// SunElevationEvents.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion Sources/SunKit/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Utils.swift
//
//
// Copyright 2023 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
// Copyright 2024 Leonardo Bertinelli, Davide Biancardi, Raffaele Fulgente, Clelia Iovine, Nicolas Mariniello, Fabio Pizzano
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 90ed258

Please sign in to comment.