Help with getting asteroid 2012 DA14 orbit right

Post requests, images, descriptions and reports about work in progress here.
Topic author
Bryan
Posts: 2
Joined: 30.09.2012
With us: 12 years 2 months

Help with getting asteroid 2012 DA14 orbit right

Post #1by Bryan » 01.10.2012, 22:28

Hello!

I used the settings from viewtopic.php?f=7&t=16825#p129949 from the Horizons web interface.

I would like some help with getting this orbit right, when i use my XYZV file, it looks like stair steps with double precision on. Without double precision, it's just a short line. I also had to remove the commas by opening OpenOffice's spreadsheet editor, delete the column with the regular formatted dates (the dates start with A.D.). Then I saved it as TXT after checking the filter thing and checking fixed column width. Then I removed the commas in notepad++ using the replace feature.

Here's what my SSC file looks like:

Code: Select all

"2012 DA14" "Sol"
{
   Texture   "asteroid.jpg"
   Mesh    "asteroid.cms"
   Radius    60
   RotationPeriod   6.9
   Albedo         0.7
   
   EllipticalOrbit
   {
      Period           366.2637955227459
      SemiMajorAxis    1.001836944811502
      Eccentricity    0.1082356434519823
      Inclination    10.33969989795044
      AscendingNode    147.2623459568118
      ArgOfPericenter   271.0769762135869
      MeanAnomaly    299.9997000218837
      Epoch           2456261.544271118023
   }
   
   #SampledTrajectory { Source "2012DA14.xyzv" }
}
I commented out SampledTrajectory to see if that helped... but the orbit was way off.

A small part of my XYZV file:

Code: Select all

2456333.5   -1.14E+08   9.10E+07   -2.76E+06   -2.12E+01   -2.12E+01   5.37E+00
2456333.503   -1.14E+08   9.10E+07   -2.75E+06   -2.12E+01   -2.12E+01   5.37E+00
2456333.507   -1.14E+08   9.10E+07   -2.75E+06   -2.12E+01   -2.12E+01   5.37E+00
2456333.51   -1.14E+08   9.10E+07   -2.75E+06   -2.12E+01   -2.12E+01   5.37E+00


Help would be appreciated.
Last edited by Bryan on 03.10.2012, 14:08, edited 1 time in total.
English may be my first and only language, but I'm kinda bad at it. :(

Topic author
Bryan
Posts: 2
Joined: 30.09.2012
With us: 12 years 2 months

Re: Help with getting asteroid 2012 DA14 orbit right

Post #2by Bryan » 03.10.2012, 14:06

Hello?

Could someone please help?
English may be my first and only language, but I'm kinda bad at it. :(

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 3 months
Location: NY, USA

Re: Help with getting asteroid 2012 DA14 orbit right

Post #3by selden » 03.10.2012, 20:37

When I use Horizons values, the initial elliptical orbit and the corresponding xyz trajectory values match almost perfectly up until the flyby, as they should. Note that I'm only using the xyz trajectory coordinates and not the velocity component. I haven't taken the time to figure out the correct message to have velocity included, so the set of commands shown below returns only the asteroid's xyz positions, once per day.

These elliptical orbit coordinates were obtained by using Horizon's telnet interface.

Code: Select all

#*******************************************************************************
#JPL/HORIZONS                     (2012 DA14)               2012-Oct-03 11:54:37
#Rec #:745306 (+COV)   Soln.date: 2012-May-13_02:50:12      # obs: 188 (79 days)
#
#FK5/J2000.0 helio. ecliptic osc. elements (AU, DAYS, DEG, period=Julian yrs):
#
#EPOCH=  2456007.5 ! 2012-Mar-21.00 (CT)         Residual RMS= .28422
#EC= .1082356434519823  QR= .8933003245207058  TP= 2455895.355491354
#OM= 147.2896474597286  W= 271.0806938513611   IN= 10.33969989795044
#A= 1.001722392200821   MA= 110.2455360245707  ADIST= 1.110144459880936
#PER= 1.0026            N= .9830667360000001   ANGMOM= .017115762
#DAN= .98797            DDN= .9920099999999999 L= 58.3881762
#B= -10.3378405                                TP= 2011-Nov-29.8554914
#

"2012_da14_00" "Sol"
{
   Class "planet"
   Radius 100
   Color [1 0.3 0]
   Texture "asteroid.jpg"
   BlendTexture true

   EllipticalOrbit {
     Epoch  2456007.5 # 2012-Mar-21.00 (CT)  Residual RMS= .28422
     SemiMajorAxis     1.001722392200821
     Eccentricity      0.1082356434519823
     Inclination      10.33969989795044
     Period            1.0026
     AscendingNode   147.2896474597286
     ArgOfPericenter 271.0806938513611
     MeanAnomaly     110.2455360245707
   }
   Albedo 0.2
}


To obtain the xyz trajectory coordinates, I used the Horizons email interface and an appropriately modified version of the xyz request template that I created some years ago. The template (which includes brief instructions not quoted below) is available at http://www.lepp.cornell.edu/celestia/ho ... mplate.txt

Code: Select all

!$$SOF (ssd)       JPL/Horizons Execution Control VARLIST
 EMAIL_ADDR = 'seb1@cornell.edu'
 COMMAND    = '2012 DA14'
 OBJ_DATA   = 'NO'
 MAKE_EPHEM = 'YES'
 TABLE_TYPE = 'VECTORS'
 CENTER     = '@10'
 REF_PLANE  = 'ECLIPTIC'
 SITE_COORD = '0,0,0'
 START_TIME = '2012-Oct-01 00:00'
 STOP_TIME  = '2013-JUL-01 00:00'
 STEP_SIZE  = '1d'
 REF_SYSTEM = 'J2000'
 OUT_UNITS  = 'KM-D'
 VECT_TABLE = '1'
 VECT_CORR  = 'NONE'
 TIME_DIGITS = 'MIN'
 CSV_FORMAT = 'NO'
 VEC_LABELS = 'NO'
 ELM_LABELS = 'NO'
 R_T_S_ONLY = 'NO'
 CA_TABLE_TYPE= 'EXTENDED'
 CALIM_SB= '0.1'
 CALIM_PL= '.1, .1, .1, .1, 1.0, 1.0, 1.0, 1.0, .1, .003'
!$$EOF++++++++++++++++++++++++++++++++++++++++++++++++++++++


The first few lines of the response, with 1 day sampling intervals, were

Code: Select all

 Automated mail xmit by MAIL_REQUEST, PID=   31231 Wed Oct  3 12:07:37 2012
++++++++++++++++++++++++++++++++ (part 1 of 1)  +++++++++++++++++++++++++++++++



*******************************************************************************
Ephemeris / MAIL_REQUEST Wed Oct  3 12:07:37 2012 Pasadena, USA  / Horizons
*******************************************************************************
Target body name: (2012 DA14)                     {source: JPL#35}
Center body name: Sun (10)                        {source: DE405}
Center-site name: BODY CENTER
*******************************************************************************
Start time      : A.D. 2012-Oct-01 00:00:00.0000 CT
Stop  time      : A.D. 2013-Jul-01 00:00:00.0000 CT
Step-size       : 1440 minutes
*******************************************************************************
Center geodetic : 0.00000000,0.00000000,0.0000000 {E-lon(deg),Lat(deg),Alt(km)}
Center cylindric: 0.00000000,0.00000000,0.0000000 {E-lon(deg),Dxy(km),Dz(km)}
Center radii    : 696000.0 x 696000.0 x 696000.0 k{Equator, meridian, pole}
Small perturbers: Ceres, Pallas, Vesta            {source: SB405-CPV-2}
Small body GMs  : 6.32E+01, 1.43E+01, 1.78E+01 km^3/s^2
Output units    : KM-D
Output format   : 01
Reference frame : ICRF/J2000.0
Output type     : GEOMETRIC cartesian states
Coordinate systm: Ecliptic and Mean Equinox of Reference Epoch
*******************************************************************************
Initial FK5/J2000.0 heliocentric ecliptic osculating elements (AU, DAYS, DEG):
  EPOCH=  2456007.5 ! 2012-Mar-21.00 (CT)         Residual RMS= .28422
    EC= .1082356434519823  QR= .8933003245207058  TP= 2455895.355491354
    OM= 147.2896474597286  W= 271.0806938513611   IN= 10.33969989795044
Asteroid physical parameters (KM, SEC, rotational period in hours):
    GM= n.a.               RAD= n.a.              ROTPER= n.a.
    H= 24.377              G= .150                B-V= n.a.
                           ALBEDO= n.a.           STYP= n.a.
*******************************************************************************
JDCT
   X     Y     Z
*******************************************************************************
$$SOE
2456201.500000000 = A.D. 2012-Oct-01 00:00:00.0000 (CT)
   1.393482465976654E+08 -3.045100308179304E+07 -9.073242323681137E+06
2456202.500000000 = A.D. 2012-Oct-02 00:00:00.0000 (CT)
   1.396038335849245E+08 -2.780262197650209E+07 -9.504777809338791E+06
2456203.500000000 = A.D. 2012-Oct-03 00:00:00.0000 (CT)
   1.398117885504721E+08 -2.514475457408382E+07 -9.933069991457094E+06
2456204.500000000 = A.D. 2012-Oct-04 00:00:00.0000 (CT)
   1.399717781680426E+08 -2.247826051757148E+07 -1.035795408850165E+07
2456205.500000000 = A.D. 2012-Oct-05 00:00:00.0000 (CT)
(plus many more lines)


I edited that response to create the xyz file

Code: Select all

2456201.500000000    1.393482465976654E+08 -3.045100308179304E+07 -9.073242323681137E+06
2456202.500000000    1.396038335849245E+08 -2.780262197650209E+07 -9.504777809338791E+06
2456203.500000000    1.398117885504721E+08 -2.514475457408382E+07 -9.933069991457094E+06
2456204.500000000    1.399717781680426E+08 -2.247826051757148E+07 -1.035795408850165E+07
2456205.500000000    1.400834849454027E+08 -1.980401241197275E+07 -1.077926489206265E+07
2456206.500000000    1.401466077334758E+08 -1.712289558444042E+07 -1.119683685387047E+07
2456207.500000000    1.401608622357275E+08 -1.443580782400091E+07 -1.161050417597367E+07
2456208.500000000    1.401259815169858E+08 -1.174365910042389E+07 -1.202010090406156E+07
(plus many more lines)

For the xyz trajectory, I used this SSC:

Code: Select all

"2012_da14_xyz" "Sol"
{
   Class "planet"
   Radius 100
   Color [1 0.7 0]

   SampledOrbit "2012_da14.xyz"

   Albedo 0.2
}


Below are three screen grabs. The first two are with today's date, so the asteroid is far away.

This first picture shows the elliptical orbit path.
2012_da14_00.jpg


In the picture below, note that the trajectory and elliptical orbit are so close that part of the red trajectory path is overwritten by the blue path of the elliptical orbit.
2012_da14_xyz.jpg


Here's a closeup of the orbits on the day of the flyby. They look reasonably close to one another, I think. The path drawn for the xyz trajectory doesn't go through the asteroid's position because Celestia uses a simpler algorithm to draw a path than it uses to calculate an object's position.
2012_da14_flyby.jpg


i hope this helps a little.
Selden


Return to “Add-on development”