naev 0.12.6
CommodityPrice Struct Reference

Data Fields

double price
double spobPeriod
double sysPeriod
double spobVariation
double sysVariation
int64_t updateTime
char * name
double sum
double sum2
int cnt

Detailed Description

Definition at line 87 of file commodity.h.

Field Documentation

◆ cnt

int CommodityPrice::cnt

used for calc of mean and standard deviation - number of records in the data.

Definition at line 105 of file commodity.h.

◆ name

char* CommodityPrice::name

used for keeping tabs during averaging

Definition at line 99 of file commodity.h.

◆ price

double CommodityPrice::price

Average price of a commodity on a particular spob

Definition at line 88 of file commodity.h.

◆ spobPeriod

double CommodityPrice::spobPeriod

Minor time period (days) over which commidity price varies

Definition at line 89 of file commodity.h.

◆ spobVariation

double CommodityPrice::spobVariation

Major time period Mmount by which a commodity price varies

Definition at line 92 of file commodity.h.

◆ sum

double CommodityPrice::sum

used when averaging over jump points during setup, and then for capturing the moving average when the player visits a spob.

Definition at line 101 of file commodity.h.

◆ sum2

double CommodityPrice::sum2

sum of (squared prices seen), used for calc of standard deviation.

Definition at line 103 of file commodity.h.

◆ sysPeriod

double CommodityPrice::sysPeriod

Definition at line 91 of file commodity.h.

◆ sysVariation

double CommodityPrice::sysVariation

System level commodity price variation. At a given time, commodity price is equal to price + sysVariation*sin(2pi t/sysPeriod) + spobVariation*sin(2pi t/spobPeriod)

Definition at line 93 of file commodity.h.

◆ updateTime

int64_t CommodityPrice::updateTime

used for averaging and to hold the time last average was calculated.

Definition at line 97 of file commodity.h.


The documentation for this struct was generated from the following file: