Distance Values Choos Km/m Miles/feet

Issue #121 resolved
magic_lothar created an issue

Hi it is for a Bike track or drive root not good to show up in Meters 78000 there shoudt be a settings for getting othere values i hacked in side Cplotprofile to get the trackheight done but dident get the speed chart eighter

void CPlotProfile::updateData()
{
    clear();

    if(mode == eModeIcon)
    {
        setXLabel(trk->getName());
        setYLabel("");
    }
    else
    {
        setXLabel(tr("Entfernung [km]"));
        setYLabel(tr("alt. [%1]").arg(IUnit::self().baseunit));
    }

    QPolygonF lineEle;
    QPolygonF lineDem;
    QPolygonF coords;

    IGisProject * project = dynamic_cast<IGisProject*>(trk->parent());

    qreal basefactor = IUnit::self().basefactor;
    const CGisItemTrk::trk_t& t = trk->getTrackData();
    for(const CGisItemTrk::trkseg_t& seg : t.segs)
    {
        for(const CGisItemTrk::trkpt_t& trkpt : seg.pts)
        {
            if(trkpt.flags & CGisItemTrk::trkpt_t::eHidden)
            {
                continue;
            }

            if(trkpt.ele == NOINT)
            {
                continue;
            }

            lineEle << QPointF(trkpt.distance/1000, trkpt.ele * basefactor);
            coords << QPointF(trkpt.lon * DEG_TO_RAD, trkpt.lat * DEG_TO_RAD);
            lineDem << QPointF(trkpt.distance/1000, NOFLOAT);

            if(nullptr == project || trkpt.keyWpt.item.isEmpty() || (mode == eModeIcon))
            {
                continue;
            }

            CGisItemWpt * wpt = dynamic_cast<CGisItemWpt*>(project->getItemByKey(trkpt.keyWpt));
            if(wpt)
            {
                CPlotData::point_t tag;
                tag.point = lineEle.last();
                tag.icon  = wpt->getIcon();
                tag.label = wpt->getName();
                data->tags << tag;
            }
        }
    }

    CMainWindow::self().getElevationAt(coords, lineDem);

    newLine(lineEle, "GPS");
    if(!lineDem.isEmpty())
    {
        addLine(lineDem, "DEM");
    }
    setLimits();
    resetZoom();
}

so work needed here to get all charts aligned the same value Km and translated Distance