Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph scaling wrong when observing from another planet #1925

Closed
gzotti opened this issue Sep 26, 2021 · 2 comments
Closed

Graph scaling wrong when observing from another planet #1925

gzotti opened this issue Sep 26, 2021 · 2 comments
Assignees
Labels
bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash
Milestone

Comments

@gzotti
Copy link
Member

gzotti commented Sep 26, 2021

Expected Behaviour

The AstroCalc Graphs/Graph tag has a "duration" field to select the range of dates for the X axis. Setting e.g. to 5 should show the development of the selected quantity over the next 5 (presumably earth) years.

Actual Behaviour

Describe or maybe attach a screenshot?
stellarium-009

Observe from Uranus, select Jupiter as target. Draw e.g. Distance vs. Time and Magnitude vs. Time.
Set duration to 5 years (I had come from Earth and some older settings for Mars before.)
It seems the graph has a timeline for 12 years? Drawing takes a few minutes (!)
Setting to 1 year and redrawing provides an empty graph which also looks like several years wide.

Steps to reproduce

System

  • Stellarium version: master (0.21.1-da6168c74c5, post 0.21.2-RC2)
  • Operating system: Win10 (irrelevant)

Logfile

If possible, attach the logfile log.txt from your user data directory. Look into the Guide for its location.

@gzotti gzotti added bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash labels Sep 26, 2021
@gzotti gzotti added this to the 0.21.3 milestone Sep 26, 2021
@gzotti
Copy link
Member Author

gzotti commented Sep 26, 2021

Also in 0.21.1. Methinks the culprit is in AstroCalcDialog::prepareXVsTimeAxesAndGraph():

int dYear = (static_cast<int>(core->getCurrentPlanet()->getSiderealPeriod()*graphsDuration) + 1) * 86400;

Looks like an unfortunate mix between sidereal period (orbit vis period for the planets!) observer location and duration of earth's rotation (?) The date scale labeled with calendar dates should probably be always counted in earth years, at least until colonies in orbit around the outer planets become reality... ;-) @alex-w ?

@alex-w
Copy link
Member

alex-w commented Sep 28, 2021

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash
Development

No branches or pull requests

2 participants