Skip to content

Commit

Permalink
Add velocity sigma to GPS solution outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-naru committed Nov 16, 2023
1 parent aca8df6 commit af3a2d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tool/INS_GPS/GNSS_Receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ data.gps.solver_options. expr
<< ',' << "v_east"
<< ',' << "v_down"
<< ',' << "receiver_clock_error_dot_ms"
<< ',' << "vel_sigma"
<< ',' << "used_satellites"
<< ',' << "PRN";
}
Expand Down Expand Up @@ -622,9 +623,10 @@ data.gps.solver_options. expr
out << ',' << src.user_velocity_enu.north()
<< ',' << src.user_velocity_enu.east()
<< ',' << -src.user_velocity_enu.up()
<< ',' << src.receiver_error_rate;
<< ',' << src.receiver_error_rate
<< ',' << src.sigma_vel.p;
}else{
out << ",,,,";
out << ",,,,,";
}
if(src.position_solved()){
out << ',' << src.used_satellites
Expand Down
4 changes: 2 additions & 2 deletions tool/misc/receiver_debug.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def self.pvt_items(opt = {})
}
]
}.call] + [[
[:v_north, :v_east, :v_down, :receiver_clock_error_dot_ms],
[:v_north, :v_east, :v_down, :receiver_clock_error_dot_ms, :vel_sigma],
proc{|pvt|
next [nil] * 4 unless pvt.velocity_solved?
[:north, :east, :down].collect{|k| pvt.velocity.send(k)} \
+ [pvt.receiver_error_rate]
+ [pvt.receiver_error_rate, pvt.vel_sigma]
}
]] + [
[:used_satellites, proc{|pvt| pvt.used_satellites}],
Expand Down
1 change: 1 addition & 0 deletions tool/swig/GPS.i
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ struct GPS_User_PVT
const FloatT &hsigma() const {return base_t::sigma_pos.h;}
const FloatT &vsigma() const {return base_t::sigma_pos.v;}
const FloatT &tsigma() const {return base_t::sigma_pos.t;}
const FloatT &vel_sigma() const {return base_t::sigma_vel.p;}
const unsigned int &used_satellites() const {return base_t::used_satellites;}
std::vector<int> used_satellite_list() const {return base_t::used_satellite_mask.indices_one();}
bool position_solved() const {return base_t::position_solved();}
Expand Down

0 comments on commit af3a2d8

Please sign in to comment.