Comments (7)
Hi @ZMAlt !
I think the problem is because propagate!
will return the state vector r, v
represented in the same reference frame of the orbit elements. In this example (Amazonia 1 orbit), it is represented in the True-of-Date, which is an ECI frame. Before converting to latitude and longitude, you need to convert to ECEF. This transformation can be done by:
r_ecef = r_eci_to_ecef(TOD(), PEF(), jd) * r
In which jd
is the Julian day at each propagation step. In your case, the Keplerian elements is being initialized with 0. I suggest adding some random day so that you can use to obtain this transformation matrix.
from satellitetoolbox.jl.
Because you are using the Two Body propagator which assumes a spherical Earth. The precession of the orbital plane is caused by Earth's oblateness which means you need to consider the J2 term and use the J2 propagator.
E.g.
orbp = init_orbit_propagator(Val(:J2),
KeplerianElements(0.0, 7130982.0, 0.001111, 98.405*pi/180, pi/2, 0.0, 0.0) )
r,_ = propagate!(orbp, collect(0 : 5 : 5 * 24 * 3600))
from satellitetoolbox.jl.
It works! ! Thank you. @ronisbr @helgee
from satellitetoolbox.jl.
Hi, @helgee I have modified the code as you suggested. And I got this.
However, I want to get the trajectory in the figure below. I used the same parameters to get this on HOMA.
from satellitetoolbox.jl.
Can you post your whole code or an MWE (minimum working example) so that we have an easier time debugging?
Do you know what kind of force model HOMA uses? I could not find information about that on the website.
from satellitetoolbox.jl.
Can you post your whole code or an MWE (minimum working example) so that we have an easier time debugging?
Julia code
using DelimitedFiles
using SatelliteToolbox
orbp = init_orbit_propagator(Val(:J2),
KeplerianElements(0.0, 7130982.0, 0.001111, 98.405*pi/180, pi/2, 0.0, 0.0) )
r,_ = propagate!(orbp, collect(0 : 5 : 5 * 24 * 3600))
lat = 0.0; lon = 0.0
r_ell = zeros(length(r), 2)
@inbounds for (i,pnt) in enumerate(r)
lat, lon = ecef_to_geodetic(pnt)
r_ell[i,:] = [rad2deg(lon),rad2deg(lat)]
end
writedlm("nadir.txt",r_ell)
GMT script
gmt begin map pdf
gmt coast -G220 -Rg -JQ8i -B
gmt plot -W0.1p nadir.txt
gmt end show
Do you know what kind of force model HOMA uses? I could not find information about that on the website.
I have no idea.
from satellitetoolbox.jl.
This seems to be working:
using DelimitedFiles
using SatelliteToolbox
jd0 = date_to_jd(2020, 1, 1, 0, 0, 0)
orbp = init_orbit_propagator(
Val(:J2),
KeplerianElements(jd0, 7130982.0, 0.001111, 98.405*pi/180, pi/2, 0.0, 0.0)
)
t = collect(0 : 5 : 5 * 24 * 3600)
r_tod, _ = propagate!(orbp, t)
r_ecef = map((t, r)->r_eci_to_ecef(TOD(), PEF(), jd0 + t / 86400) * r, t, r_tod)
lat = 0.0; lon = 0.0
r_ell = zeros(length(r_tod), 2)
@inbounds for (i,pnt) in enumerate(r_ecef)
lat, lon = ecef_to_geodetic(pnt)
r_ell[i,:] = [rad2deg(lon),rad2deg(lat)]
end
from satellitetoolbox.jl.
Related Issues (20)
- Remove unused variables
- Increase precision in ref. system conversions
- Reference to geodesic coordinate frames HOT 2
- Wrong docstring for rv_to_mean_elements_j2osc HOT 1
- High precision orbit propagator HOT 3
- Automatically download TLE HOT 3
- Quick fix to rv_to_kepler HOT 7
- Docstring update for getters functions HOT 2
- Precompilation error when SatelliteToolbox and get_iers_eop are used as dependencies HOT 2
- IERS data service down HOT 7
- Daily Ap index using get_Ap() and get_space_indices()
- Allow the propagators to initialize the structure in place HOT 1
- 2023 Space Index File not available HOT 2
- Compatibility of transformations code with Automatic Differentiation tools (Zygote) HOT 2
- Discrepancies between J2 Propagator and STK J2Perturbations HOT 20
- sgp4 propagator accuracy HOT 5
- ITRF to TEME transformation HOT 4
- Can't find ground_station_accesses in v0.10.0 HOT 10
- init_orbit_propagator method definition warning HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
ð Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ððð
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â€ïž Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from satellitetoolbox.jl.