DGAC / Acropole

This repository contains the Acropole model for aircraft fuel flow prediction and Python packages for aircraft trajectory processing and fuel flow enhancement.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

column names

junzis opened this issue · comments

Hi @JarryGabriel, I think the current way of handling column names in acropole is a little complicated, and it could be simplified. What do you think? I am happy to give it a try.

Hi @junzis, sure I agree this is a clear issue. If you have ideas on how to deal with it, let's go :) !

I refactored the code so that the library is column name independent.

Here is the branch on my fork:
https://github.com/junzis/acropole/tree/refactor/acropole

Here is a minimal working example:

import pandas as pd
from acropole import FuelEstimator

flight = pd.read_csv("example_flight.csv")

afe = FuelEstimator()

flight_fuel = afe.estimate(
    flight,
    typecode="FLPL_AIRC_TYPE",
    timestamp="FLIGHT_TIME",
    groundspeed="GRND_SPD_KT",
    altitude="ALTI_STD_FT",
    vertical_rate="VERT_SPD_FTMN",
    airspeed="TRUE_AIR_SPD_KT",
    mass="MASS_KG",
)

Also, I did some heavy downsizing of the code with pandas tricks :)

The smoothing and resample functions are not in this branch, as I think traffic already has quite an easier-to-use interface for standardized trajectory processing. It can be used before passing data to acropole.

changes are proposed in pull request: #4