Calculating satellite elevation angle from rinex files
Show older comments
Please, any help on a code to calculate satellite elevation angle from rinex files? I have loaded navigation and observation files. Tried a number of ways but still not possible. Thanks.
3 Comments
Peter Spanik
on 15 Dec 2020
Hello Ngbedene,
As far as I know Matlab do not support direct loading of RINEX files. I created functions and classes to read observation and navigation RINEX files (see GNSS-toolbox). Also loading and processing of other GNSS-related files, like SP3 files or ANTEX, is supported. For example you can load RINEX to Matlab OBSRNX object as following:
addpath(genpath('path_to_GNSS-toolbox/src')); % Add path to toolbox functionality
obs = OBSRNX('your_rinex_filepath');
When the OBSRNX object is created in Matlab you can querry observations and perform slicing as you want. Toolbox support also downloading some useful navigation data like broadcast and precise ephemeris. You can also compute satellite positions and then visualize satellite paths (there is class Skyplot which can be used for that).
Computation of satellite position is done as following:
obs = obs.computeSatPosition('broadcast','path_to_broadcast_ephemeris_file'); % Compute satellites position (using broadcast ephemeris)
%obs = obs.computeSatPosition('precie','path_to_sp3_file'); % Compute satellites position (using precise ephemeris)
% Sattelite positions are available as property: obs.satpos
After that you just need to get local satellite position as following:
gnss = 'G'; % Specify system and satellite number you want to get
satNo = 1;
[elevation,azimuth,slantRange] = obs.getLocal(gnss,satNo);
Computed local coordinates (elevation, azimuth, slant range) assume position from RINEX header, defined in line with APPROX POSITION XYZ. If different position should be used you need to changed it in the OBSRNX object before getLocal method is called.
Ngbede Echoda
on 15 Dec 2020
Samuel Olufemi Taiwo
on 27 May 2021
Ngbede Echoda,
Did you try this? and what was the outcome?
Hi Peter, your code works but getting the azimuth and elevation is what i am not still getting right.
I am doing something wrong.
Answers (0)
Categories
Find more on CubeSat and Satellites in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!