Skip to content

Commit

Permalink
Sun!
Browse files Browse the repository at this point in the history
  • Loading branch information
onekiloparsec committed Jul 10, 2015
1 parent e2f8849 commit d3ad049
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 7 deletions.
24 changes: 18 additions & 6 deletions SwiftAA.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,22 @@
9F7A9E031B4FCCB600033B77 /* KPCAASidereal.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E001B4FCCB600033B77 /* KPCAASidereal.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E041B4FCCB600033B77 /* KPCAASidereal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E011B4FCCB600033B77 /* KPCAASidereal.mm */; };
9F7A9E051B4FCCB600033B77 /* KPCAASidereal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E011B4FCCB600033B77 /* KPCAASidereal.mm */; };
9F7A9E081B4FCD4100033B77 /* KPCAAStellarMagnitudes.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E061B4FCD4100033B77 /* KPCAAStellarMagnitudes.h */; };
9F7A9E091B4FCD4100033B77 /* KPCAAStellarMagnitudes.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E061B4FCD4100033B77 /* KPCAAStellarMagnitudes.h */; };
9F7A9E081B4FCD4100033B77 /* KPCAAStellarMagnitudes.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E061B4FCD4100033B77 /* KPCAAStellarMagnitudes.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E091B4FCD4100033B77 /* KPCAAStellarMagnitudes.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E061B4FCD4100033B77 /* KPCAAStellarMagnitudes.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E0A1B4FCD4100033B77 /* KPCAAStellarMagnitudes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E071B4FCD4100033B77 /* KPCAAStellarMagnitudes.mm */; };
9F7A9E0B1B4FCD4100033B77 /* KPCAAStellarMagnitudes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E071B4FCD4100033B77 /* KPCAAStellarMagnitudes.mm */; };
9F7A9E0E1B4FCE0300033B77 /* KPCAAUranus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E0C1B4FCE0300033B77 /* KPCAAUranus.h */; };
9F7A9E0F1B4FCE0300033B77 /* KPCAAUranus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E0C1B4FCE0300033B77 /* KPCAAUranus.h */; };
9F7A9E0E1B4FCE0300033B77 /* KPCAAUranus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E0C1B4FCE0300033B77 /* KPCAAUranus.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E0F1B4FCE0300033B77 /* KPCAAUranus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E0C1B4FCE0300033B77 /* KPCAAUranus.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E101B4FCE0300033B77 /* KPCAAUranus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E0D1B4FCE0300033B77 /* KPCAAUranus.mm */; };
9F7A9E111B4FCE0300033B77 /* KPCAAUranus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E0D1B4FCE0300033B77 /* KPCAAUranus.mm */; };
9F7A9E141B4FCE1500033B77 /* KPCAAVenus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */; };
9F7A9E151B4FCE1500033B77 /* KPCAAVenus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */; };
9F7A9E141B4FCE1500033B77 /* KPCAAVenus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E151B4FCE1500033B77 /* KPCAAVenus.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E161B4FCE1500033B77 /* KPCAAVenus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E131B4FCE1500033B77 /* KPCAAVenus.mm */; };
9F7A9E171B4FCE1500033B77 /* KPCAAVenus.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E131B4FCE1500033B77 /* KPCAAVenus.mm */; };
9F7A9E1A1B4FCE8100033B77 /* KPCAASun.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E181B4FCE8100033B77 /* KPCAASun.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E1B1B4FCE8100033B77 /* KPCAASun.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F7A9E181B4FCE8100033B77 /* KPCAASun.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F7A9E1C1B4FCE8100033B77 /* KPCAASun.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E191B4FCE8100033B77 /* KPCAASun.mm */; };
9F7A9E1D1B4FCE8100033B77 /* KPCAASun.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F7A9E191B4FCE8100033B77 /* KPCAASun.mm */; };
9F8AB38D1B481D4B00EF40C8 /* KPCAACoordinateTransformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F8AB38B1B481D4B00EF40C8 /* KPCAACoordinateTransformation.h */; settings = {ATTRIBUTES = (Public, ); }; };
9F8AB38E1B481D4B00EF40C8 /* KPCAACoordinateTransformation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F8AB38C1B481D4B00EF40C8 /* KPCAACoordinateTransformation.mm */; };
9F8AB3921B48201600EF40C8 /* KPCAADate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F8AB3901B48201600EF40C8 /* KPCAADate.h */; settings = {ATTRIBUTES = (Public, ); }; };
Expand Down Expand Up @@ -699,6 +703,8 @@
9F7A9E0D1B4FCE0300033B77 /* KPCAAUranus.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KPCAAUranus.mm; path = SwiftAA/KPCAAUranus.mm; sourceTree = "<group>"; };
9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPCAAVenus.h; path = SwiftAA/KPCAAVenus.h; sourceTree = "<group>"; };
9F7A9E131B4FCE1500033B77 /* KPCAAVenus.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KPCAAVenus.mm; path = SwiftAA/KPCAAVenus.mm; sourceTree = "<group>"; };
9F7A9E181B4FCE8100033B77 /* KPCAASun.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPCAASun.h; path = SwiftAA/KPCAASun.h; sourceTree = "<group>"; };
9F7A9E191B4FCE8100033B77 /* KPCAASun.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KPCAASun.mm; path = SwiftAA/KPCAASun.mm; sourceTree = "<group>"; };
9F8AB38B1B481D4B00EF40C8 /* KPCAACoordinateTransformation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPCAACoordinateTransformation.h; path = SwiftAA/KPCAACoordinateTransformation.h; sourceTree = "<group>"; };
9F8AB38C1B481D4B00EF40C8 /* KPCAACoordinateTransformation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = KPCAACoordinateTransformation.mm; path = SwiftAA/KPCAACoordinateTransformation.mm; sourceTree = "<group>"; };
9F8AB3901B48201600EF40C8 /* KPCAADate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KPCAADate.h; path = SwiftAA/KPCAADate.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1049,6 +1055,8 @@
9F7A9E011B4FCCB600033B77 /* KPCAASidereal.mm */,
9F7A9E061B4FCD4100033B77 /* KPCAAStellarMagnitudes.h */,
9F7A9E071B4FCD4100033B77 /* KPCAAStellarMagnitudes.mm */,
9F7A9E181B4FCE8100033B77 /* KPCAASun.h */,
9F7A9E191B4FCE8100033B77 /* KPCAASun.mm */,
9F7A9E0C1B4FCE0300033B77 /* KPCAAUranus.h */,
9F7A9E0D1B4FCE0300033B77 /* KPCAAUranus.mm */,
9F7A9E121B4FCE1500033B77 /* KPCAAVenus.h */,
Expand Down Expand Up @@ -1163,6 +1171,7 @@
9F29B55D1B47317500B64C96 /* AAPhysicalSun.h in Headers */,
9F7A9DEA1B4FC5D900033B77 /* KPCAARiseTransitSet.h in Headers */,
9F7A9DE41B4FC4D400033B77 /* KPCAARefraction.h in Headers */,
9F7A9E1A1B4FCE8100033B77 /* KPCAASun.h in Headers */,
9F7A9E141B4FCE1500033B77 /* KPCAAVenus.h in Headers */,
9F48D6191B4FB8FB00B7EE7F /* SwiftAA-Bridging-Header.h in Headers */,
9F7A9E021B4FCCB600033B77 /* KPCAASidereal.h in Headers */,
Expand Down Expand Up @@ -1241,6 +1250,7 @@
9FCE93641B4FBCFD0026E149 /* AAGalileanMoons.h in Headers */,
9FCE937C1B4FBCFD0026E149 /* AAPhysicalMars.h in Headers */,
9FCE93371B4FBCD20026E149 /* KPCAAInterpolate.h in Headers */,
9F7A9E1B1B4FCE8100033B77 /* KPCAASun.h in Headers */,
9F7A9DF71B4FC89F00033B77 /* KPCAASaturnMoons.h in Headers */,
9FCE93841B4FBCFD0026E149 /* AARiseTransitSet.h in Headers */,
9FCE93381B4FBCD20026E149 /* KPCAAJupiter.h in Headers */,
Expand Down Expand Up @@ -1533,6 +1543,7 @@
9FF55F971B4B0AC300A99DA2 /* KPCAAFK5.mm in Sources */,
9F48D51F1B4D0D0700B7EE7F /* KPCAAGalileanMoons.mm in Sources */,
9F7A9DE61B4FC4D400033B77 /* KPCAARefraction.mm in Sources */,
9F7A9E1C1B4FCE8100033B77 /* KPCAASun.mm in Sources */,
9F29B5521B47317500B64C96 /* AAParallactic.cpp in Sources */,
9F29B5791B47317500B64C96 /* AAUranus.cpp in Sources */,
9F48D55B1B4EE45200B7EE7F /* KPCAANeptune.mm in Sources */,
Expand Down Expand Up @@ -1660,6 +1671,7 @@
9F48D5FF1B4FB7A200B7EE7F /* AANodes.cpp in Sources */,
9F48D5BD1B4FB79300B7EE7F /* KPCAAEquationOfTime.mm in Sources */,
9F48D5E61B4FB7A200B7EE7F /* AAEclipses.cpp in Sources */,
9F7A9E1D1B4FCE8100033B77 /* KPCAASun.mm in Sources */,
9F48D5D41B4FB79300B7EE7F /* KPCAAParallax.mm in Sources */,
9F48D6031B4FB7A200B7EE7F /* AAParallax.cpp in Sources */,
9F48D5DC1B4FB79300B7EE7F /* KPCAAPrecession.mm in Sources */,
Expand Down
28 changes: 28 additions & 0 deletions SwiftAA/KPCAASun.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// KPCAASun.h
// SwiftAA
//
// Created by Cédric Foellmi on 10/07/15.
// Copyright (c) 2015 onekiloparsec. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "KPCAA3DCoordinate.h"

@interface KPCAASun : NSObject

+ (double)GeometricEclipticLongitude:(double)JD;
+ (double)GeometricEclipticLatitude:(double)JD;
+ (double)GeometricEclipticLongitudeJ2000:(double)JD;
+ (double)GeometricEclipticLatitudeJ2000:(double)JD;
+ (double)GeometricFK5EclipticLongitude:(double)JD;
+ (double)GeometricFK5EclipticLatitude:(double)JD;
+ (double)ApparentEclipticLongitude:(double)JD;
+ (double)ApparentEclipticLatitude:(double)JD;
+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesMeanEquinox:(double)JD;
+ (KPCAA3DCoordinate *)EclipticRectangularCoordinatesJ2000:(double)JD;
+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesJ2000:(double)JD;
+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesB1950:(double)JD;
+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesAnyEquinox:(double)JD JDEquinox:(double)JDEquinox;

@end
84 changes: 84 additions & 0 deletions SwiftAA/KPCAASun.mm
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
//
// KPCAASun.m
// SwiftAA
//
// Created by Cédric Foellmi on 10/07/15.
// Copyright (c) 2015 onekiloparsec. All rights reserved.
//

#import "KPCAASun.h"
#import "AASun.h"

@interface KPCAA3DCoordinate ()
+ (KPCAA3DCoordinate *)coordinateByWrapping:(CAA3DCoordinate)wrappedCoord;
- (CAA3DCoordinate)wrappedCoord;
@end

@implementation KPCAASun

+ (double)GeometricEclipticLongitude:(double)JD
{
return CAASun::GeometricEclipticLongitude(JD);
}

+ (double)GeometricEclipticLatitude:(double)JD
{
return CAASun::GeometricEclipticLatitude(JD);
}

+ (double)GeometricEclipticLongitudeJ2000:(double)JD
{
return CAASun::GeometricEclipticLongitudeJ2000(JD);
}

+ (double)GeometricEclipticLatitudeJ2000:(double)JD
{
return CAASun::GeometricEclipticLatitudeJ2000(JD);
}

+ (double)GeometricFK5EclipticLongitude:(double)JD
{
return CAASun::GeometricFK5EclipticLongitude(JD);
}

+ (double)GeometricFK5EclipticLatitude:(double)JD
{
return CAASun::GeometricFK5EclipticLatitude(JD);
}

+ (double)ApparentEclipticLongitude:(double)JD
{
return CAASun::ApparentEclipticLongitude(JD);
}

+ (double)ApparentEclipticLatitude:(double)JD
{
return CAASun::ApparentEclipticLatitude(JD);
}

+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesMeanEquinox:(double)JD
{
return [KPCAA3DCoordinate coordinateByWrapping:CAASun::EquatorialRectangularCoordinatesMeanEquinox(JD)];
}

+ (KPCAA3DCoordinate *)EclipticRectangularCoordinatesJ2000:(double)JD
{
return [KPCAA3DCoordinate coordinateByWrapping:CAASun::EclipticRectangularCoordinatesJ2000(JD)];
}

+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesJ2000:(double)JD
{
return [KPCAA3DCoordinate coordinateByWrapping:CAASun::EquatorialRectangularCoordinatesJ2000(JD)];
}

+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesB1950:(double)JD
{
return [KPCAA3DCoordinate coordinateByWrapping:CAASun::EquatorialRectangularCoordinatesB1950(JD)];
}

+ (KPCAA3DCoordinate *)EquatorialRectangularCoordinatesAnyEquinox:(double)JD JDEquinox:(double)JDEquinox
{
return [KPCAA3DCoordinate coordinateByWrapping:CAASun::EquatorialRectangularCoordinatesAnyEquinox(JD, JDEquinox)];
}

@end
2 changes: 1 addition & 1 deletion SwiftAA/SwiftAA.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@ FOUNDATION_EXPORT const unsigned char SwiftAAVersionString[];
#import <SwiftAA/KPCAASaturnRings.h>
#import <SwiftAA/KPCAASidereal.h>
#import <SwiftAA/KPCAAStellarMagnitudes.h>

#import <SwiftAA/KPCAASun.h>
#import <SwiftAA/KPCAAUranus.h>
#import <SwiftAA/KPCAAVenus.h>

0 comments on commit d3ad049

Please sign in to comment.