Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double interpolation (double flightAngle, const vector<double> & flightPath, const vector<double> & coLift) {
- int j;
- double answer;
- int size = static_cast<int> (flightPath.size());
- for (j = 0; j + 1 < size; ++j) {
- if (flightPath.at(j) > flightAngle) {
- break;
- }
- }
- answer = coLift.at(j - 1) + ((flightAngle - flightPath.at(j - 1))) / (flightPath.at(j)
- - flightPath.at(j - 1)) * (coLift.at(j) - coLift.at(j - 1));
- return answer;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement