Changeset 14310


Ignore:
Timestamp:
08/04/12 11:13:45 (12 years ago)
Author:
tbretz
Message:
Fixed a problem with the visibility and current-predition if sources have their maximum at the same time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/smartfact.cc

    r14309 r14310  
    19711971            return make_pair(vector<float>(), make_pair(Time(), 0));
    19721972
    1973         return make_pair(vec, make_pair(maxjd, maxjd>jd+jd0&&maxjd<jd+jd1?max:0));
     1973        return make_pair(vec, make_pair(maxjd, maxjd>jd+jd0&&maxjd<jd+jd1?max:-1));
    19741974    }
    19751975#endif
     
    20412041        out4 << now.JavaDate() << '\n';
    20422042
    2043         map<Time, pair<string, float>> culmination;
    2044         map<Time, pair<string, float>> lightcond;
     2043        multimap<Time, pair<string, float>> culmination;
     2044        multimap<Time, pair<string, float>> lightcond;
    20452045        vector<vector<float>> alt;
    20462046        vector<vector<float>> cur;
     
    20552055        {
    20562056            alt.push_back(vism.first);
    2057             culmination[vism.second.first] = make_pair("Moon", vism.second.second);
     2057            culmination.insert(make_pair(vism.second.first, make_pair("Moon", vism.second.second)));
    20582058        }
    20592059#endif
     
    20872087                {
    20882088                    alt.push_back(vis.first);
    2089                     culmination[vis.second.first] = make_pair(name, vis.second.second);
     2089                    culmination.insert(make_pair(vis.second.first, make_pair(name, vis.second.second)));
    20902090
    20912091                    const pair<vector<float>, pair<Time, float>> lc = GetLightCondition(&pos, &observer, now.JD());
     
    20932093                    {
    20942094                        cur.push_back(lc.first);
    2095                         lightcond[lc.second.first] = make_pair(name, lc.second.second);
     2095                        lightcond.insert(make_pair(lc.second.first, make_pair(name, lc.second.second)));
    20962096                    }
    20972097                }
    2098 
    2099                 //out3 << vis.second.first << "/" << vis.second.second << " ";
    21002098
    21012099                string col = HTML::kWhite;
Note: See TracChangeset for help on using the changeset viewer.