rename MccCoordinate to MccAngle
This commit is contained in:
@@ -169,11 +169,11 @@ static int mcc_julday(traits::mcc_systime_c auto const& start_time,
|
||||
* .second = time duration to reach given altitude AFTER object upper culmination
|
||||
*/
|
||||
std::pair<std::chrono::duration<double>, std::chrono::duration<double>> mcc_time_to_alt(
|
||||
const MccCoordinate& alt_limit,
|
||||
const MccCoordinate& ra,
|
||||
const MccCoordinate& dec,
|
||||
const MccCoordinate& lat,
|
||||
const MccCoordinate& lon,
|
||||
const MccAngle& alt,
|
||||
const MccAngle& ra,
|
||||
const MccAngle& dec,
|
||||
const MccAngle& lat,
|
||||
const MccAngle& lon,
|
||||
traits::mcc_systime_c auto const& now,
|
||||
traits::mcc_time_duration_c auto const& dut1, // UT1-UTC
|
||||
traits::mcc_time_duration_c auto const& tt_tai, // TT-TAI
|
||||
@@ -183,7 +183,7 @@ std::pair<std::chrono::duration<double>, std::chrono::duration<double>> mcc_time
|
||||
auto nan_dur = std::chrono::duration<double>(std::numeric_limits<double>::quiet_NaN());
|
||||
auto inf_dur = std::chrono::duration<double>(std::numeric_limits<double>::infinity());
|
||||
|
||||
if (alt_limit < 0.0) {
|
||||
if (alt < 0.0) {
|
||||
return {nan_dur, nan_dur};
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ std::pair<std::chrono::duration<double>, std::chrono::duration<double>> mcc_time
|
||||
}
|
||||
}
|
||||
|
||||
double cos_ha = (std::sin(alt_limit) - std::sin(dec) * std::sin(lat)) / std::cos(dec) / std::cos(lat);
|
||||
double cos_ha = (std::sin(alt) - std::sin(dec) * std::sin(lat)) / std::cos(dec) / std::cos(lat);
|
||||
if (std::abs(cos_ha) > 1.0) { // it never reach given altitude
|
||||
return {inf_dur, inf_dur};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user