naev 0.11.5
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 68 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 78 of file commodity.h.

◆ name

char* CommodityPrice::name

used for keeping tabs during averaging

Definition at line 75 of file commodity.h.

◆ price

double CommodityPrice::price

Average price of a commodity on a particular spob

Definition at line 69 of file commodity.h.

◆ spobPeriod

double CommodityPrice::spobPeriod

Minor time period (days) over which commidity price varies

Definition at line 70 of file commodity.h.

◆ spobVariation

double CommodityPrice::spobVariation

Major time period Mmount by which a commodity price varies

Definition at line 72 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 76 of file commodity.h.

◆ sum2

double CommodityPrice::sum2

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

Definition at line 77 of file commodity.h.

◆ sysPeriod

double CommodityPrice::sysPeriod

Definition at line 71 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 73 of file commodity.h.

◆ updateTime

int64_t CommodityPrice::updateTime

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

Definition at line 74 of file commodity.h.


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