Angle plugin: misplaced drawing

Bug #1398899 reported by Nick Fedoseev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Low
Nick Fedoseev

Bug Description

Angle line is slightly misplaced, annoying on small FOV. See attached picture.

Tags: plugin angle

Related branches

Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :
Revision history for this message
Alexander Wolf (alexwolf) wrote :

I guess it fixed already - please try 0.13.1.87

Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :

I still see the bug in 0.13.1.87

Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :

One more observation. The bug is only seen when "A" (Atmosphere) is turned on.

gzotti (georg-zotti)
Changed in stellarium:
status: New → Confirmed
assignee: nobody → gzotti (georg-zotti)
Changed in stellarium:
milestone: none → 0.13.2
importance: Undecided → Low
Revision history for this message
gzotti (georg-zotti) wrote :

The two formulae to add and subtract refraction are not perfect reciprokes as long as we have no knowledge of a pair of such perfectly reciproke formulae.

There was another problem in refraction (bug #1088413) which also somewhat enhanced the difference between clicked point and the point which was displayed on screen. After fixing the refraction bug, the slight mismatch has been reduced to about two arcseconds in medium altitudes. Else there is no current solution other than switching off atmosphere before you measure the separation of binaries in range of arcseconds.

Changed in stellarium:
status: Confirmed → Won't Fix
Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :

As far as I understand, the problem is due to asymmetric conversions real -> screen and screen -> real.

This problem affects not only angular measurement, but any module which does use screen to real transform. For example "Show coordinates" plugin.

But this can be easily fixed with iterative method, which usually is used for complex transformations.
1. Screen coords = (Sx, Sy) = S are converted to real coords = (Rx, Ry) =R; using formula S2R(point2D)
2) R converted back to screen using R2S(point2D), having S2 (Sx2, Sy2)
3) The difference D = S2-S is used to correct the result.
If module(D) is less then couple of pixels, we just quit iterations, returning R as the result.
Otherwise we try to use S-D (the point on opposite side of S2) having R2 = S2R(S-D)
4) R2 converted back to screen using R2S(point2D), having next iteration result.
5) Again trying the difference D = S2-S etc.

I'm sure that only a single step will be enough to fix the problem, since we deal with this problem at very small FOV, where non-linearity of S2R and R2S conversions can be ignored.

Revision history for this message
gzotti (georg-zotti) wrote :

Yes, that could be a way. OK, I reopen this, but cannot promise a delivery date, holidays are over. If you can fix Refraction::backwards() this way, please send a patch.

Changed in stellarium:
status: Won't Fix → Confirmed
milestone: 0.13.2 → none
assignee: gzotti (georg-zotti) → Nick Fedoseev (nick-ut2uz)
Revision history for this message
Nick Fedoseev (nick-ut2uz) wrote :

Just tried to fix the issue in the simplest way, adding modification in both "Angle Measure" and "Show Coordinates" plugins like
  prj->unProject(x,y,endPoint);
  { // patch
   Vec3d win;
   prj->project(endPoint,win);
   float dx = x - win.v[0];
   float dy = y - win.v[1];
   prj->unProject(x+dx, y+dy, endPoint);
  }

for each unProject occurrence, of course.

The bug has gone in both modules, at least for reasonable FOVs of 0.0001°

I've not prepared the patch as I'm not sure if this modification is safe.

Revision history for this message
Alexander Wolf (alexwolf) wrote :

Georg, is acceptable for you this patch?

Revision history for this message
gzotti (georg-zotti) wrote :

I have put it into these two plugins. I think it is safe in these cases. Thank You, Nick!

Changed in stellarium:
milestone: none → 0.13.2
status: Confirmed → Fix Committed
Revision history for this message
gzotti (georg-zotti) wrote :

BTW commit was r7283.

Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.