Skip to content

Commit

Permalink
Modify pseudorange calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
fukudakazuya committed Jan 6, 2025
1 parent 0221d27 commit 1914899
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/real/aocs/gnss_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ void GnssReceiver::MainRoutine(const int time_count) {
// Pseudorange calculation
size_t number_of_calculated_gnss_satellites = gnss_satellites_->GetNumberOfCalculatedSatellite();
for (size_t i = 0; i < number_of_calculated_gnss_satellites; i++) {
math::Vector<3> gnss_satellite_position_ecef_m = math::Vector<3>(0.0);
math::Vector<3> position_true_ecef_m = dynamics_->GetOrbit().GetPosition_ecef_m();
// double geometric_distance_m = (gnss_satellite_position_ecef_m - position_true_ecef_m).CalcNorm();
// randomization::NormalRand pseudorange_random_noise_m;
// pseudorange_random_noise_m.SetParameters(0.0, pseudorange_noise_standard_deviation_m_, randomization::global_randomization.MakeSeed());
// double pseudorange_m = geometric_distance_m + pseudorange_random_noise_m;
// pseudorange_list_m_[i] = pseudorange_m;
math::Vector<3> gnss_satellite_position_i_m = gnss_satellites_->GetPosition_eci_m(i);
math::Vector<3> position_true_i_m = dynamics_->GetOrbit().GetPosition_i_m();
double geometric_distance_m = (gnss_satellite_position_i_m - position_true_i_m).CalcNorm();
randomization::NormalRand pseudorange_random_noise_m;
pseudorange_random_noise_m.SetParameters(0.0, pseudorange_noise_standard_deviation_m_, randomization::global_randomization.MakeSeed());
double pseudorange_m = geometric_distance_m + pseudorange_random_noise_m;
pseudorange_list_m_[i] = pseudorange_m;
}

if (is_gnss_visible_) {
Expand Down

0 comments on commit 1914899

Please sign in to comment.