Search Comments and Ratings

go

   
Date File Comment by Comment Rating
11 Aug 2014 Convert Azimuth and Elevation to Right Ascension and Declination Algorithm will convert Az/El angles to RA /DEC using a topocentric coordinate frame Author: Darin Koblick Darin Koblick

You should reference Vallado pg. 162 for additional information on "topocentric coordinate frame". It is a Geocentric equatorial coordinate system with the origin translated from the center of the Earth to the origin of the observer.

23 Apr 2014 Efficient Vector Rotation Matrix Routine Efficient Method to Determine a Matrix Needed to Rotate One Vector to Another Author: Darin Koblick Darin Koblick

Alexander, you are correct. I went ahead and changed the vector angle check to be closer to 1 instead of 0.99. Also, I found that I needed to add the case where vectors where close to parallel (i.e. abs(c) > 1-1e-13) and two or more components had the same values. Thank you for pointing out the problem to me.

01 Sep 2013 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Chad,

The two code lines you are referencing are trying to find the midnight that occurs before the provided Julian Date.

As written, the first check will be true if the Julian date occurs after midnight and 12+ hours before the time.

As written, the second check will be true if the Julian date occurs after midnight and less than 12 hours before the time.

If both checks are true, the code will use the last midnight that occurred. This is the desired functionality.

Because I am rounding down on the Julian date and subtracting a half day, there is no possible way that jd could be less than jdMin.

-Darin

20 Oct 2012 Convert UTC to Solar Apparent Time Convert a time given in UTC to Solar Apparent or Solar Mean Time Author: Darin Koblick Darin Koblick

Brandon,

Also, if you are trying to compare the Solar Apparent Time, (SAT) be sure to input the longitude in degrees (W < 0, E > 0).

You can see that this function will match the solutions (almost exactly ... depending on the year) to those solutions in Example 4 of the ASTRONOMICAL INFORMATION SHEET No. 58 http://astro.ukho.gov.uk/nao/services/ais58.pdf

20 Oct 2012 Convert UTC to Solar Apparent Time Convert a time given in UTC to Solar Apparent or Solar Mean Time Author: Darin Koblick Darin Koblick

Brandon,

Latitude and Longitude are needed to determine the input time value to the equation of time (UT). They aren't needed to determine the equation of time ... it has nothing to do with latitude and longitude. Perhaps you should compare to a location with a 0hr local time offset.

See this document for a description of what the equation of time is, you can also compare results to this as an "example". I don't guarantee any specific accuracy with EoT as it depends on the mean anomaly of the sun which is obviously a first/second order approximation.

http://www.ips.gov.au/Educational/2/1/14

11 Aug 2012 Convert ECEF to ECI Coordinates Take any vector or series of vectors in the ECEF Coordinate frame and convert them to ECI. Author: Darin Koblick Darin Koblick

John,

35 leap seconds since 1972 sounds like that is indeed what you are seeing in STK. As you know, ECEFtoECI.m takes in a Julian date, so the correction would not be internal to this particular conversion routine.

In fact, I don't think Mathworks attempts to address this issue with their juliandate.m routine. You would more than likely want to make the leap second correction when converting UTC to Julian date.

Are you able to check for the estimated position differences using Julian date in STK instead of UTC? Perhaps this should make the comparisons a little more accurate as well.

Truthfully, unless you are trying to use this routine in high-precision satellite mission operations, as long as you are consistent with your coordinate frame conversions (i.e. always using these conversion routines), it really shouldn't matter if there are minor discrepancies with STK (it is all relative motion anyway).

-Darin

28 Jun 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Drake,

J2000 is factored into the ECI to ECEF conversion routine through the call to JD2GAST.m (converts Julian Date to Greenwhich Apparent Sidereal Time). In order to do this, the effects of nutation are considered, and depend on the correct number of Julian centuries since J2000.

28 May 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Johan,

You are correct, thank you for spotting that mistake. I should have left everything in degrees since the mean obliquity of the ecliptic is referenced directly in the final computation.
The new parameters for the mean obliquity should be:

EPSILONm = 23.439291-0.0130111.*T - 1.64E-07.*(T.^2) + 5.04E-07.*(T.^3);

This corresponds to the estimates contained in Vallado, Fundamentals of Astrodynamics and Applications, Second edition, (EQ 3-53). 2001.

Thank you again for double checking my work.

11 Apr 2012 Vectorized Analytic Two Body Propagator (Kepler Universal Variables) Analytic propagation routine uses universal variables to solve a single formula for all orbit types Author: Darin Koblick Darin Koblick

John,

The zip file seems to unzip without problems. Try using either the default windows zip utility, the MATLAB command unzip(), or the free 7zip utility. If all else fails, you can view the source code here:

http://www.mathworks.com/matlabcentral/fileexchange/35566-vectorized-analytic-two-body-propagator-kepler-universal-variables/content/keplerUniversal.m

08 Apr 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

The following ECI coordinate information

rECI = [-2392.11241452386
-17078.1233608647
19945.4195944851];

vECI = [3.27682054057320
-1.79903293168245
-1.11948244495650];

t = 2453937.82777778;

Will yield an ECEF position and velocity of

rECEF = [-15615.6915464865
-7322.85945823539
19943.173494021];

vECEF = [-0.253618011215938
-2.5887912909949
-1.1194824449565];

This was obtained using the routines provided by CelesTrak found from http://www.celestrak.com/software/vallado-sw.asp

The ECItoECEF.m routine I posted on the FileExchange comes very close to this with the following vectors:

rECF = [ -15618.7911316673
-7310.12058163083
19945.4195944851];

vECF = [-0.253618011215938
-2.5887912909949
-1.1194824449565];

The problem is your ECEF position and velocity vectors do not correspond to each other.

A very easy way to check this is to compute the magnitude of your position vectors.

The magnitude of the first ECI position vector you have provided is: 26,366.726420485 km

The magnitude of the ECEF solution should be exactly the same as the magnitude in the ECI reference frame.

The magnitude of your ECEF position vector is 31,124.2960748149 km.

Hopefully this solves your problem.

07 Apr 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

The MATLAB function juliandate.m should be fine. Can you please post the epoch, the position/velocity vector in ECI coordinates, and your ECF solution?

05 Apr 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Check to make sure your time vector is in J2000 format, not Unix Time (epoch should be starting 01/01/2000 12:00:00).

09 Jan 2012 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Syed,

Send me your test case and I will take a look at it.

Thanks,
-Darin

28 Oct 2010 Convert ECI to ECEF Coordinates Transform ECI position, velocity and acceleration to ECEF position, velocity & acceleration. Author: Darin Koblick Darin Koblick

Ismail,

You are more than likely using the wrong dimensions for r_ECI.
This is specified in my input requirements as [3 x N].

Try:
r_ECI = [10.7148713368681e+003; ...
-7.10368453661470e+003; ...
-22.0702973475812e+003]

In other words, transpose the r_ECI input for the correct answer.

Contact us