AugmentedSolarSystem icon indicating copy to clipboard operation
AugmentedSolarSystem copied to clipboard

Investigate lines / trails of planet paths -

Open johndpope opened this issue 8 years ago • 1 comments

https://github.com/Stellarium/stellarium/blob/ff2e4e253a57ee0da3b5279fe91904a2d160cb13/src/core/modules/GridLinesMgr.cpp

johndpope avatar Dec 03 '17 03:12 johndpope

https://github.com/UgolUgol/ARHome/blob/bd41f7e087ae05b33ce278a330b4ddd7202477d8/ARHOME112/Orbit.swift

screen shot 2018-03-09 at 3 13 25 pm

orbits with eccentricity / elliptic curves

// add one trajectory point of planet to scene
   func addTrajectoryPoint(position: SCNVector3){
       
       // check planet finished one full rotation cycle
       if(self.time == 0.0){
           self.orbit.isTrajFinish = true
       }
       
       // if one cycle is not finished
       // add point to scene
       if(!self.orbit.isTrajFinish){
           self.orbit.updateTrajectory(planetPosition: self.position)
       }
   }
   
   
   // make one rotation step on V angle
   func rotationStep(position: SCNVector3, scale: Float!){
   
       // rotation time moment
       self.time = (self.time + self.dt) <= self.T ? self.time + self.dt : 0.0
       
       
       // find the angle E(t) solving kelper eq with Halleys method
       // after it find true anomaly v(E, t)
       var newPosition = SCNVector3()
       self.M = self.n * self.time
       self.E = methodHalleys()
       self.v = trueAnomaly()
           
       // set new position to move
       newPosition.x = self.orbit.x(angle: self.v) / scale
       newPosition.y = position.y
       newPosition.z = self.orbit.z(angle: self.v) / scale
       
       // speed calculation
       speedAtPoint(r: self.orbit.r(angle: self.v))
       
       // move to new position
       self.position = newPosition
   }

johndpope avatar Mar 09 '18 20:03 johndpope